VDBEvaluator.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 13 Mar 2019 13:54:14 +0000
changeset 148 7d2d523173af
parent 68 6caeb5d7c92b
child 151 bc7626f46210
permissions -rw-r--r--
Workaround: assume native target when issuing `run` or `attach` commands using simple console Background command execution is not supported by some targets, most notably by Windows native target. However, at the point we have to decided whether use background execution or not, we don't know which target will get connected and therefore we cannot check target features. So, make a guess and assime we gonna use native target. This is so bad, this *absolutely* has to be fixed somehow.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
68
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
jv:vdb - Visual / VM Debugger
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
"{ Package: 'jv:vdb' }"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
"{ NameSpace: Smalltalk }"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
Object subclass:#VDBEvaluator
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
	instanceVariableNames:'debugger'
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
	classVariableNames:''
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	poolDictionaries:''
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	category:'VDB-Tools'
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
!VDBEvaluator class methodsFor:'documentation'!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
copyright
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
jv:vdb - Visual / VM Debugger
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
Copyright (C) 2015-now Jan Vrany
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
! !
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
!VDBEvaluator methodsFor:'accessing - mimicry'!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
currentNameSpace: ignored
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
    self assert: ignored isNil
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
    "Created: / 21-03-2018 / 22:40:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
moreSharedPools:ignored
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
    self assert: ignored isNil
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
    "Created: / 21-03-2018 / 22:41:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
! !
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
!VDBEvaluator methodsFor:'evaluation'!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
evaluate:aString in: context receiver: receiver notifying: requestor logged:logged ifFail:failBlock
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
    ^ debugger evaluate: aString
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
    "Created: / 21-03-2018 / 22:41:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
! !
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
!VDBEvaluator methodsFor:'initialization'!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
setDebugger: aGDBDebugger
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    debugger := aGDBDebugger
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    "Created: / 21-03-2018 / 22:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
! !
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
!VDBEvaluator methodsFor:'instance creation'!
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
new
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
    "/ This is hack to overcome the fact that TextView and other expect
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
    "/ class that they instantiate themselves. This is indeed weird interface, 
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
    "/ but well, we cannot change that easily due to backward compatibility.
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
    "/ See
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
    "/ 
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
    "/      Workspace >> #executeDoIt:
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
    "/ 
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
    ^ self
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
    "Created: / 21-03-2018 / 22:36:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
! !
6caeb5d7c92b Added support for inspecting expression result in source view
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78