Display context state in debugger

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Display context state in debugger

Gwenaël Casaccio
Hi,

I've added a new command 'J' that print the context state using
the debug informations.

Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Add-new-command-for-printing-context-state.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Holger Freyther
On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
> Hi,
>
> I've added a new command 'J' that print the context state using
> the debug informations.

Hi,

applying your four patches and pushing them to travis-ci is failing
the CI. The build log is here[1].

cheers
        holger

[1] https://travis-ci.org/zecke/gnu-smalltalk-debian/builds/10463528


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Gwenaël Casaccio
On 21/08/2013 20:43, Holger Hans Peter Freyther wrote:

> On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
>> Hi,
>>
>> I've added a new command 'J' that print the context state using
>> the debug informations.
> Hi,
>
> applying your four patches and pushing them to travis-ci is failing
> the CI. The build log is here[1].
>
> cheers
> holger
>
> [1] https://travis-ci.org/zecke/gnu-smalltalk-debian/builds/10463528
>

Hi,

this is strange because make distcheck works at home :-/

Gwen

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Gwenaël Casaccio
In reply to this post by Holger Freyther
On 21/08/2013 20:43, Holger Hans Peter Freyther wrote:

> On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
>> Hi,
>>
>> I've added a new command 'J' that print the context state using
>> the debug informations.
> Hi,
>
> applying your four patches and pushing them to travis-ci is failing
> the CI. The build log is here[1].
>
> cheers
> holger
>
> [1] https://travis-ci.org/zecke/gnu-smalltalk-debian/builds/10463528
>

I've reapplied my previous compiler INC_PTR removal patch and its green

Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Holger Freyther
In reply to this post by Gwenaël Casaccio
On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
> Hi,
>
> I've added a new command 'J' that print the context state using
> the debug informations.

I have now queued all four patches, will do some more smoke tetsing
and then push it to master (hopefully) tonight. Do you have an idea
how we could make the minidebugger work through gst-remote?

In general I would like to have gst-remote have a defined protocol
(e.g. something like shampoo), also a challenge/response based auth
protocol (like shampoo), and then it would be nice to have a debugger
for gst-remote.

Today I deployed some of my code and it didn't work when I resumed
an image with gst-remote. My code opened a file on image creation
and should have re-opened it on resume. I had to debug this by
launching gst -I deployed.image to get to my exception...

thanks
        holger


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Holger Freyther
On Sun, Aug 25, 2013 at 08:42:10PM +0200, Holger Hans Peter Freyther wrote:
> On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
> > Hi,
> >
> > I've added a new command 'J' that print the context state using
> > the debug informations.

and I broke it. Can you take another look? I think numArgs/numTemproaries
and method temporaries/arguments can disagree. :}

 st> [3 halt. 'String' select: [:each | false] ] value

String(SequenceableCollection)>>do: (SeqCollect.st:822)
      1 do: aBlock [
(debug) s
(debug) s
      5 1 to: self size do: [:i | aBlock value: (self at: i)]
(debug) J
  args:
    aBlock -> a BlockClosure
  temps:
    Object: Array new: 0 "<0x404651e0>" error: Invalid index 1: index out of range
SystemExceptions.IndexOutOfRange(Exception)>>signal (ExcHandling.st:254)
SystemExceptions.IndexOutOfRange class>>signalOn:withIndex: (SysExcept.st:665)
Array(Object)>>checkIndexableBounds: (Object.st:798)
Array(Object)>>at: (Object.st:858)
[] in MethodContext(ContextPart)>>printVariable:at:do:on:spaces: (ContextPart.st:102)
Array(Object)>>ifNil:ifNotNil: (Object.st:146)
MethodContext(ContextPart)>>printVariable:at:do:on:spaces: (ContextPart.st:102)
MethodContext(ContextPart)>>printTemporariesOn:spaces: (ContextPart.st:120)
MethodContext(ContextPart)>>printContextStateOn:spaces: (ContextPart.st:138)
MethodContext(ContextPart)>>printContextState (ContextPart.st:84)
MiniDebugger>>printContextState (Debugger.star#VFS.ZipFile/MiniDebugger.st:341)
MiniDebugger>>doCommand (Debugger.star#VFS.ZipFile/MiniDebugger.st:281)
MiniDebugger(MiniTool)>>getCommand (Debugger.star#VFS.ZipFile/MiniTool.st:76)
MiniDebugger>>commandLoop (Debugger.star#VFS.ZipFile/MiniDebugger.st:107)
[] in MiniDebugger class>>open: (Debugger.star#VFS.ZipFile/MiniDebugger.st:56)
BlockClosure>>on:do: (BlkClosure.st:193)
[] in MiniDebugger class>>open: (Debugger.star#VFS.ZipFile/MiniDebugger.st:57)
[] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/Extensions.st:75)
[] in Process>>onBlock:at:suspend: (Process.st:412)
BlockClosure>>on:do: (BlkClosure.st:193)
[] in Process>>onBlock:at:suspend: (Process.st:413)
BlockClosure>>ensure: (BlkClosure.st:268)
[] in Process>>onBlock:at:suspend: (Process.st:391)
[] in BlockClosure>>asContext: (BlkClosure.st:179)
BlockContext class>>fromClosure:parent: (BlkContext.st:68)

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Holger Freyther
On Sun, Aug 25, 2013 at 09:12:38PM +0200, Holger Hans Peter Freyther wrote:

> On Sun, Aug 25, 2013 at 08:42:10PM +0200, Holger Hans Peter Freyther wrote:
> > On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
> > > Hi,
> > >
> > > I've added a new command 'J' that print the context state using
> > > the debug informations.
>
> and I broke it. Can you take another look? I think numArgs/numTemproaries
> and method temporaries/arguments can disagree. :}
>
>  st> [3 halt. 'String' select: [:each | false] ] value


> MethodContext(ContextPart)>>printTemporariesOn:spaces: (ContextPart.st:120)

I added the below code and it triggers

variables size => 0
self method
..
    number of arguments: 1
    number of temporaries: 1
    number of literals: 0
...
self numTemps => 1

:}

diff --git a/kernel/ContextPart.st b/kernel/ContextPart.st
index d0d6c2f..b74699e 100644
--- a/kernel/ContextPart.st
+++ b/kernel/ContextPart.st
@@ -126,6 +126,8 @@ methods that can be used in inspection or debugging.'>
         self printVariableKind: 'temps' on: aStream spaces: 2.
 
         variables := self method temporaries.
+       variables size = self numTemps
+               ifFalse: [variables inspect. self method inspect. self numTemps printNl].
         1 to: self numTemps do: [ :i |
             self printVariable: variables at: i do: [ self at: self numArgs + i ] on: aStream
     ]


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Display context state in debugger

Gwenaël Casaccio
In reply to this post by Gwenaël Casaccio
On 21/08/2013 15:00, Gwenaël Casaccio wrote:
> Hi,
>
> I've added a new command 'J' that print the context state using
> the debug informations.
>
> Gwen
>

It can be applied as it

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk