>From 95e01a11a8eaddf90b57e1494711eb7b8d7fef99 Mon Sep 17 00:00:00 2001 From: Gwenael Casaccio Date: Fri, 13 Sep 2013 15:14:51 +0200 Subject: [PATCH] GtkDebugger support debug informations --- packages/visualgst/ChangeLog | 6 ++++++ packages/visualgst/Debugger/Extensions.st | 22 ++++++++++++++++++++++ .../visualgst/Debugger/GtkStackInspectorView.st | 21 ++++++++++----------- packages/visualgst/Extensions.st | 19 ------------------- 4 files changed, 38 insertions(+), 30 deletions(-) diff --git a/packages/visualgst/ChangeLog b/packages/visualgst/ChangeLog index bd9b727..30d9e35 100644 --- a/packages/visualgst/ChangeLog +++ b/packages/visualgst/ChangeLog @@ -1,5 +1,11 @@ 2013-08-20 Gwenael Casaccio + * Extensions.st: Move some extensions to Debugger/Extensions. + * Debugger/Extensions.st: Moved extensions. + * Debugger/GtkStackInspectorView.st: Support debug information. + +2013-08-20 Gwenael Casaccio + * Inspector/Extensions.st: Add ContextPart view support. * Inspector/GtkContextInspectorView.st: Dedicated view for ContextPart. diff --git a/packages/visualgst/Debugger/Extensions.st b/packages/visualgst/Debugger/Extensions.st index 50eaa39..5d011b6 100644 --- a/packages/visualgst/Debugger/Extensions.st +++ b/packages/visualgst/Debugger/Extensions.st @@ -41,3 +41,25 @@ Behavior extend [ ^ VisualGST.GtkDebugger ] ] + +ContextPart extend [ + + variables [ + + + ^ self method arguments, self method temporaries + ] + + variablesDo: aBlock [ + + + ^ self variables do: aBlock + ] + + stackInspectorView [ + + + ^ VisualGST.GtkStackInspectorView + ] +] + diff --git a/packages/visualgst/Debugger/GtkStackInspectorView.st b/packages/visualgst/Debugger/GtkStackInspectorView.st index 1f8c05a..19355ab 100644 --- a/packages/visualgst/Debugger/GtkStackInspectorView.st +++ b/packages/visualgst/Debugger/GtkStackInspectorView.st @@ -34,7 +34,7 @@ ======================================================================" GtkConcreteWidget subclass: GtkStackInspectorView [ - | object variables | + | object args temps | GtkStackInspectorView class >> openOn: aContext [ @@ -59,22 +59,21 @@ GtkConcreteWidget subclass: GtkStackInspectorView [ do: aBlock [ - | i | - variables := Dictionary new. - i := 1. aBlock value: 'thisContext'. - self object variablesDo: [ :each | - variables at: each displayString put: i. - aBlock value: each displayString. - i := i + 1 ]. + args := IdentitySet new. + self object method arguments do: [ :each | + aBlock value: (args add: each asString) ]. + temps := IdentitySet new. + self object method temporaries do: [ :each | + aBlock value: (temps add: each asString) ]. ] selectedValue: aString [ - ^ aString = 'thisContext' - ifTrue: [ self object ] - ifFalse: [ self object at: (variables at: aString) ] + aString = 'thisContext' ifTrue: [ ^ self object ]. + (args includes: aString) ifTrue: [ ^ (self object at: (self object method arguments indexOf: aString asSymbol)) displayString ]. + ^ (self object at: self object numArgs + (self object method temporaries indexOf: aString asSymbol)) displayString ] canDive [ diff --git a/packages/visualgst/Extensions.st b/packages/visualgst/Extensions.st index 40b6013..0661d7d 100644 --- a/packages/visualgst/Extensions.st +++ b/packages/visualgst/Extensions.st @@ -286,25 +286,6 @@ ContextPart extend [ ifTrue: [ ctxt ] ifFalse: [ self error: 'Error indice too high' ] ] - - variables [ - - - ^ 1 to: self numArgs + self numTemps collect: [ :each | - each displayString ] - ] - - variablesDo: aBlock [ - - - ^ self variables do: aBlock - ] - - stackInspectorView [ - - - ^ GtkStackInspectorView - ] ] VariableBinding extend [ -- 1.8.1.2