Replaced Squek computed arrays by more verbose `Array with:...`
...to workaround a buggy stx, sigh.
--- a/GDBBreakpoint.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBBreakpoint.st Fri Nov 17 20:36:08 2017 -0300
@@ -43,11 +43,11 @@
condition:aString
self assert: debugger notNil.
condition ~= aString ifTrue:[
- debugger send: (GDBMI_break_condition arguments: { number . aString }) andWait: true.
+ debugger send: (GDBMI_break_condition arguments: (Array with: number with: aString)) andWait: true.
condition := aString
].
- "Modified: / 11-07-2017 / 14:31:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
disp
@@ -62,14 +62,15 @@
self assert: debugger notNil.
enabled ~~ aBoolean ifTrue:[
aBoolean ifTrue:[
- debugger send: (GDBMI_break_enable arguments: { number }) andWait: true.
+ debugger send: (GDBMI_break_enable arguments: (Array with: number)) andWait: true.
] ifFalse:[
- debugger send: (GDBMI_break_disable arguments: { number }) andWait: true.
+ debugger send: (GDBMI_break_disable arguments: (Array with: number)) andWait: true.
].
enabled := aBoolean.
].
"Created: / 07-07-2017 / 12:33:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:24:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
file
@@ -99,12 +100,12 @@
script:aString
self assert: debugger notNil.
script ~= aString ifTrue:[
- debugger send: (GDBMI_break_commands arguments: { number } , aString asStringCollection) andWait: true.
+ debugger send: (GDBMI_break_commands arguments: (Array with: number) , aString asStringCollection) andWait: true.
script := aString
].
"Created: / 11-07-2017 / 14:32:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 11-07-2017 / 18:34:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:24:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
times
--- a/GDBDebugger.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBDebugger.st Fri Nov 17 20:36:08 2017 -0300
@@ -267,9 +267,10 @@
(gdb) attach <aStringOrInteger>
"
- self send:(GDBMI_target_attach arguments:{ aStringOrInteger asString }) andWait: true.
+ self send:(GDBMI_target_attach arguments:(Array with: aStringOrInteger asString)) andWait: true.
"Created: / 05-06-2017 / 17:08:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:23:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
enableFrameFilters
@@ -326,12 +327,13 @@
(gdb) set args <anArray>
"
- self send:(GDBMI_file_exec_and_symbols arguments:{ aStringOrFilename asString }) andWait: true.
+ self send:(GDBMI_file_exec_and_symbols arguments: (Array with: aStringOrFilename asString)) andWait: true.
anArray notEmptyOrNil ifTrue:[
self send: (GDBMI_exec_arguments arguments: anArray) andWait: true.
].
"Created: / 05-06-2017 / 17:05:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:22:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBDebugger methodsFor:'evaluating'!
@@ -618,14 +620,14 @@
Delay waitForMilliseconds:100.
"/ self send: (GDBMICommand inferiorTtySet: driver inferiorPTY name).
- self send: (GDBMI_inferior_tty_set arguments: { connection inferiorPTY name }).
+ self send: (GDBMI_inferior_tty_set arguments: (Array with: connection inferiorPTY name)).
self send: (GDBMI_gdb_set arguments: #('target-async' 'on')).
prettyPrintingEnabled := false.
frameFiltersEnabled := false.
"Created: / 20-06-2014 / 21:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 12-06-2017 / 09:49:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:14:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
release
--- a/GDBFrame.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBFrame.st Fri Nov 17 20:36:08 2017 -0300
@@ -69,7 +69,7 @@
variables := GDBTransientDataHolder debugger: debugger factory:[
| result |
- result := debugger send: (GDBMI_stack_list_variables new arguments: { '--thread' . thread id . '--frame' . level . '--simple-values' }).
+ result := debugger send: (GDBMI_stack_list_variables new arguments: (Array with: '--thread' with: thread id with: '--frame' with: level with: '--simple-values')).
(result propertyAt: #variables) ? #()
do:[ :each | each setFrame: self ];
yourself
@@ -78,7 +78,7 @@
^ variables value
"Created: / 27-02-2015 / 14:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 09-03-2015 / 23:43:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:22:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBFrame methodsFor:'printing & storing'!
--- a/GDBThread.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBThread.st Fri Nov 17 20:36:08 2017 -0300
@@ -55,9 +55,9 @@
stack isNil ifTrue:[
stack := GDBTransientDataHolder debugger: debugger factory:[
| result depth frames |
- result := debugger send: (GDBMI_stack_info_depth new arguments: { '--thread' . id . 100 }).
+ result := debugger send: (GDBMI_stack_info_depth new arguments: (Array with: '--thread' with: id with: 100)).
depth := result propertyAt: #depth.
- result := debugger send: (GDBMI_stack_list_frames new arguments: { '--thread' . id . 0 . depth - 1 }).
+ result := debugger send: (GDBMI_stack_list_frames new arguments: (Array with: '--thread' with: id with: 0 with: depth - 1 )).
frames := result propertyAt: #stack.
frames do:[:each |
each debugger: debugger.
@@ -69,7 +69,7 @@
^ stack value
"Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 27-02-2015 / 15:10:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:21:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
status
@@ -94,7 +94,7 @@
info := GDBTransientDataHolder debugger: debugger factory:[
| result infos |
- result := debugger send: (GDBMI_thread_info new arguments: { id }).
+ result := debugger send: (GDBMI_thread_info new arguments: (Array with: id)).
infos := result propertyAt: #threads.
self assert: (infos isEmptyOrNil or:[ infos size == 1 and:[ infos first id = id ] ]).
infos isEmptyOrNil
@@ -105,7 +105,7 @@
^ info value
"Created: / 08-03-2015 / 09:07:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 18-03-2015 / 13:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:21:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBThread methodsFor:'displaying'!
--- a/GDBThreadGroup.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBThreadGroup.st Fri Nov 17 20:36:08 2017 -0300
@@ -44,16 +44,16 @@
descriptionType
^ Magritte::MASingleOptionDescription new
- optionsAndLabels: {
+ optionsAndLabels: (Array with:
GDBThreadGroupTypeProcess -> 'process'
- };
+ );
accessor: (GDBMAPropertyAccessor forPropertyNamed: 'type');
label: 'type';
comment: 'The type of the thread group. At present, only ‘process’ is a valid type.';
yourself.
"Created: / 01-10-2014 / 01:29:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 05-06-2017 / 23:49:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:08:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBThreadGroup methodsFor:'accessing'!
--- a/GDBUnixProcess.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBUnixProcess.st Fri Nov 17 20:36:08 2017 -0300
@@ -59,12 +59,21 @@
dbgpty := GDBPTY new.
dbgpty setLocalEcho: false.
- dbgpty setOutputCRLF: false.
+ dbgpty setOutputCRLF: false.
- args := { GDBExecutable ? '/usr/bin/gdb' . '-q' . '-ex' . 'new-ui mi ', dbgpty name . '-ex' . 'set pagination off' . '-ex' . 'show version'}.
- Processor
+ args := (Array new: 8)
+ at: 1 put: GDBExecutable ? '/usr/bin/gdb';
+ at: 2 put: '-q';
+ at: 3 put: '-ex';
+ at: 4 put: 'new-ui mi ', dbgpty name;
+ at: 5 put: '-ex';
+ at: 6 put: 'set pagination off';
+ at: 7 put: '-ex';
+ at: 8 put: 'show version';
+ yourself.
+ Processor
monitor:[
- pid := OperatingSystem
+ pid := OperatingSystem
exec:args first
withArguments:args
environment:OperatingSystem getEnvironment
@@ -88,16 +97,16 @@
self error:'Failed to launch gdb'.
].
- "Modified: / 02-06-2017 / 08:18:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:18:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
release
- debuggerPTY notNil ifTrue:[
+ debuggerPTY notNil ifTrue:[
debuggerPTY release.
].
- consolePTY notNil ifTrue:[
+ consolePTY notNil ifTrue:[
consolePTY release.
- ].
+ ].
super release
"Created: / 02-06-2017 / 23:33:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
--- a/GDBVariable.st Tue Oct 03 21:15:12 2017 +0100
+++ b/GDBVariable.st Fri Nov 17 20:36:08 2017 -0300
@@ -54,7 +54,7 @@
].
].
- result := debugger send: (GDBMI_var_create new arguments: { '-' . '*' . name }).
+ result := debugger send: (GDBMI_var_create new arguments: (Array with: '-' with: '*' with: name)).
frame thread id ~= currentThreadId ifTrue:[
debugger send: (GDBMI_thread_select new arguments:currentThreadId).
@@ -70,7 +70,7 @@
^ varobj
"Created: / 27-02-2015 / 17:18:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 13-06-2017 / 14:51:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-11-2017 / 20:19:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBVariable methodsFor:'initialization'!