VDBScatchPadApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 08 Jul 2019 13:31:11 +0100
changeset 178 5d1c3e5fab6b
parent 175 a304c250e889
child 264 23960fcb9dac
permissions -rw-r--r--
Initial support for VDB python-based variable objects Due to a limitation of GDB itself, one cannot create variable object for "synthetic" argument/local created by custom frame decorator. Therefore one cannot "dig deeper" and inspect contents of such a variable in case it is a kind of composite - like an object on a heap referring to another objects. This is a problem when a debugee is does not have debug information and / or it's language is not C - such as when debugging JITed code. This (experimental) commit adds a parallel implementation of variable objects done completely in python. This new varobj MI interface is a super-set of GDB's builtin varobj MI interface.

"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany

This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'

You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
"{ Package: 'jv:vdb' }"

"{ NameSpace: Smalltalk }"

WorkspaceApplication subclass:#VDBScatchPadApplication
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Others'
!

!VDBScatchPadApplication class methodsFor:'documentation'!

copyright
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany

This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'

You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
! !

!VDBScatchPadApplication methodsFor:'defaults'!

defaultEvaluatorSyntax
    ^nil

    "Created: / 21-06-2019 / 10:59:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

thisIsASmalltalkWorkspace
    "can be redefined in a subclass to disable smalltalk-specific menu items
     (expecco uses workspaces as scratchpads)"

    ^ BlockValue
        with:[:syntax | syntax value == SmalltalkLanguage instance ]                
        argument: self syntaxHolder

    "Created: / 20-06-2019 / 22:08:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 23-06-2019 / 12:09:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBScatchPadApplication methodsFor:'menu-actions'!

loadFile:file encoding: encodingSymbolOrNil into:textView
    "Load contents of `file` into `textView`"

    | mimetype |

    super loadFile:file encoding: encodingSymbolOrNil into:textView.
    mimetype := MIMETypes mimeTypeForFilename: file.
    mimetype = 'application/x-smalltalk-source' ifTrue:[ 
        textView editedLanguage: SmalltalkLanguage instance.
        textView codeAspect: SyntaxHighlighter codeAspectStatements.
        self syntax: SmalltalkLanguage instance.
    ] ifFalse:[ 
        textView editedLanguage: nil.
        textView codeAspect: nil.
        self syntax: nil.
    ].

    "Created: / 21-06-2019 / 10:46:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 21-06-2019 / 12:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBScatchPadApplication class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !