author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 06 Sep 2019 02:30:16 +0100 | |
changeset 183 | 91a467093d63 |
parent 164 | 364ebdd1d42c |
permissions | -rw-r--r-- |
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
" |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
jv:vdb - Visual / VM Debugger |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
Copyright (C) 2015-now Jan Vrany |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License' |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
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/ |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
" |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
"{ Package: 'jv:vdb/tests' }" |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
"{ NameSpace: Smalltalk }" |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
VDBAbstractApplicationTests subclass:#VDBInstructionListApplicationTests |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
instanceVariableNames:'' |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
classVariableNames:'' |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
poolDictionaries:'' |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
category:'VDB-UI-Others-Tests' |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
! |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
!VDBInstructionListApplicationTests class methodsFor:'documentation'! |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
copyright |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
" |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
jv:vdb - Visual / VM Debugger |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
Copyright (C) 2015-now Jan Vrany |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License' |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
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/ |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
" |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
! ! |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
!VDBInstructionListApplicationTests methodsFor:'tests'! |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
|
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
35 |
test_01a |
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
| stack frameHolder | |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
debugger := GDBDebugger new. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
self assert: debugger isConnected. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
|
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
41 |
frameHolder := ValueHolder new. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
42 |
application := VDBInstructionListApplication new. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
43 |
application debuggerHolder: (ValueHolder with: debugger). |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
44 |
application disassemblableHolder: frameHolder. |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
45 |
application frameHolder: frameHolder. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
46 |
application open. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
47 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
48 |
|
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
debugger executable: GDBDebuggeesResource current binaryFactorial1. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
debugger send: 'b factorial'. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
debugger send: 'r' andWaitFor: GDBStoppedEvent. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
debugger send: 'c' andWaitFor: GDBStoppedEvent. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
|
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
stack := debugger selectedInferior threads first stack. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
55 |
self assert: stack size = 3. |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
56 |
|
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
57 |
frameHolder value: stack first. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
58 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
59 |
debugger send: 'stepi' andWaitFor: GDBStoppedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
60 |
debugger send: 'next' andWaitFor: GDBStoppedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
61 |
debugger send: 'd'. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
62 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
63 |
frameHolder value: nil. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
64 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
65 |
debugger send: 'c' andWaitFor: GDBThreadGroupExitedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
66 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
67 |
"Created: / 03-10-2018 / 12:27:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
68 |
"Modified: / 12-06-2019 / 15:54:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
69 |
! |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
70 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
71 |
test_01b |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
72 |
| stack frameHolder | |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
73 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
74 |
debugger := GDBDebugger new. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
75 |
self assert: debugger isConnected. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
76 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
77 |
frameHolder := ValueHolder new. |
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
78 |
application := VDBInstructionListApplication new. |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
79 |
application debuggerHolder: (ValueHolder with: debugger). |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
80 |
application disassemblableHolder: frameHolder. |
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
81 |
application frameHolder: frameHolder. |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
82 |
application allButOpen. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
83 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
84 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
85 |
debugger executable: GDBDebuggeesResource current binaryFactorial1. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
86 |
debugger send: 'b factorial'. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
87 |
debugger send: 'r' andWaitFor: GDBStoppedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
88 |
debugger send: 'c' andWaitFor: GDBStoppedEvent. |
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
|
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
90 |
stack := debugger selectedInferior threads first stack. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
91 |
self assert: stack size = 3. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
92 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
93 |
frameHolder value: stack first. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
94 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
95 |
debugger send: 'stepi' andWaitFor: GDBStoppedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
96 |
debugger send: 'next' andWaitFor: GDBStoppedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
97 |
debugger send: 'd'. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
98 |
debugger send: 'c' andWaitFor: GDBThreadGroupExitedEvent. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
99 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
100 |
"Created: / 03-10-2018 / 12:27:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
101 |
"Modified: / 12-06-2019 / 15:54:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
151
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
102 |
! |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
103 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
104 |
test_02 |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
105 |
" |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
106 |
This test tests that contents is not updated when |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
107 |
listView is not visible and gets update when it becomes |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
108 |
visible. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
109 |
" |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
110 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
111 |
| stack frameHolder internalListView | |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
112 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
113 |
debugger := GDBDebugger new. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
114 |
self assert: debugger isConnected. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
115 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
116 |
frameHolder := ValueHolder new. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
117 |
application := VDBInstructionListApplication new. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
118 |
application debuggerHolder: (ValueHolder with: debugger). |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
119 |
application disassemblableHolder: frameHolder. |
151
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
120 |
application frameHolder: frameHolder. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
121 |
application open. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
122 |
application window waitUntilVisible. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
123 |
internalListView := application instVarNamed: #internalListView. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
124 |
debugger executable: GDBDebuggeesResource current binaryFactorial1. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
125 |
debugger send: 'b factorial'. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
126 |
debugger send: 'r' andWaitFor: GDBStoppedEvent. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
127 |
debugger send: 'c' andWaitFor: GDBStoppedEvent. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
128 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
129 |
stack := debugger selectedInferior threads first stack. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
130 |
self assert: stack size = 3. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
131 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
132 |
"/ List visible, no frame set, so list should |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
133 |
"/ be empty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
134 |
self assert: frameHolder value isNil. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
135 |
self assert: internalListView shown. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
136 |
self assert: internalListView list isEmpty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
137 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
138 |
"/ List visible, set a frame, list should get |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
139 |
"/ updated and should contain some instructions |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
140 |
frameHolder value: stack first. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
141 |
self waitForUIToStabilize. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
142 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
143 |
self assert: frameHolder value notNil. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
144 |
self assert: internalListView shown. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
145 |
self assert: internalListView list notEmpty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
146 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
147 |
"/ List visible, set frame to nil, list should |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
148 |
"/ become empty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
149 |
frameHolder value: nil. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
150 |
self waitForUIToStabilize. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
151 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
152 |
self assert: frameHolder value isNil. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
153 |
self assert: internalListView shown. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
154 |
self assert: internalListView list isEmpty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
155 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
156 |
"/ Hide the list and set frame, list should |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
157 |
"/ stay empty (i.e., not updated) |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
158 |
application window beInvisible. |
151
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
159 |
frameHolder value: stack first. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
160 |
self waitForUIToStabilize. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
161 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
162 |
self assert: frameHolder value notNil. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
163 |
self assert: internalListView shown not. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
164 |
self assert: internalListView list isEmpty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
165 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
166 |
"/ Show the list, contents should get |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
167 |
"/ updated. |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
168 |
application window beVisible. |
151
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
169 |
internalListView waitUntilVisible. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
170 |
self waitForUIToStabilize. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
171 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
172 |
self assert: frameHolder value notNil. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
173 |
self assert: internalListView shown. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
174 |
self assert: internalListView list notEmpty. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
175 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
176 |
debugger send: 'd'. |
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
177 |
debugger send: 'c' andWaitFor: GDBThreadGroupExitedEvent. |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
178 |
self waitForUIToStabilize. |
151
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
179 |
|
bc7626f46210
Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
180 |
"Created: / 23-01-2019 / 16:28:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
164
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
181 |
"Modified: / 12-06-2019 / 16:13:36 / jv" |
364ebdd1d42c
Generalize `VDBInstructionListView`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
182 |
"Modified: / 12-06-2019 / 16:15:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
111
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
183 |
! ! |
a70313e80780
UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
184 |
|
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
185 |
!VDBInstructionListApplicationTests class methodsFor:'documentation'! |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
186 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
187 |
version_HG |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
188 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
189 |
^ '$Changeset: <not expanded> $' |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
190 |
! ! |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
191 |