[Glass] How can I get the start/end of a step in a GsContext?
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Fri Nov 3 15:15:37 PDT 2017
Mariano,
Take a look at TDStackFrame>>calculateSelectionRange ...
You can easily look at the implementation of the debugger ... in the
text pane that has the highlighted source from the debugger, use the
`Window > inspect builder` menu item to bring up the code that
implements that pane ... you'll get an inspector on something like this:
Inspect aTDStackFrameMethodElementBuilder/
--------------------
. -> aTDStackFrameMethodElementBuilder
(class)@ -> TDStackFrameMethodElementBuilder
(oop)@ -> 204640769
formatOnAccept@ -> nil
formatOnDisplay@ -> nil
object@ ->
SmallInteger(Object)>>_doesNotUnderstand:args:envId:reason: @7 line 12
objectBlock@ -> nil
theEditorSpec@ -> aTDEditorSpec
theWindowLocation@ -> nil
theWindowName@ -> nil
and then clicking on the `object` field, you'll find what I think your
are looking for:
Inspect
aTDStackFrameMethodElementBuilder/SmallInteger(Object)>>_doesNotUnderstand:args:envId:reason:
@7 line 12/
--------------------
. ->
SmallInteger(Object)>>_doesNotUnderstand:args:envId:reason: @7 line 12
.. -> aTDStackFrameMethodElementBuilder
(class)@ -> TDStackFrame
(oop)@ -> 197204737
argAndTempNames@ -> anArray( 'aSymbol', 'anArray', 'aSmallInt',
'dnuKind', '.t1', '.t2')
frameContents@ -> anArray( aGsNMethod, 144, nil, nil, nil, nil, nil,
2, anArray( #'aSymbol', #'anArray', #'aSmallInt', #'dnuKind', '.t1',
'.t2'), 2, #'foo'...
frameIndex@ -> 5
next@ -> Executed Code
previous@ -> SmallInteger(Object)>>doesNotUnderstand: @10 line 10
selectionRange@ -> anInterval( 579, 580, 581, 582, 583, 584, 585, 586,
587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
601, 602, 603, ...
stack@ -> error printing
You will see that the object behind the text pane is a TDStackFrame with
an instance variable selectionRange ... and that should lead you to
TDStackFrame>>calculateSelectionRange....
Most of the raw information you will need is in the frameContents that
you can get from the continuation instance ...
Hope this helps,
Dale
On 11/3/17 2:22 PM, Mariano Martinez Peck via Glass wrote:
> Hi guys,
>
> Imagine the debugger prints
>
> "8. [] in
> DpQuuveProductionWalkbackErrorHandler(WAExceptionHandler)>>handleExceptionsDuring:
> @7 line 8"
>
> I manage to get to do doing some hack like this:
>
> (self instVarNamed: 'continuation' ) _reportAt: 8
>
> I understand 7 is the step pointer and 8 is the line number. The
> debugger knows where to start and where to stop that part of the step.
> See attached picture. See the blue text? how can I ask that to the
> GsContext ?
>
> Thanks in advance,
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20171103/da4a1040/attachment.html>
More information about the Glass
mailing list