Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[svn ci] Better gdb support (r11581)

3 views
Skip to first unread message

Leopold Toetsch

unread,
Feb 16, 2006, 6:52:36 AM2/16/06
to Perl 6 Internals
A debug session snippet:

Breakpoint 1, Parrot_invokecc_p (cur_opcode=0x84c7540,
interpreter=0x82a6008) at core.ops:411
411 PMC * p = $1;
(gdb) help user-defined
User-defined commands.
The commands in this class are those defined by the user.
Use the "define" command to define a command.

List of commands:

pi -- Pi n
ps -- Ps n
(gdb) help pi
pi n ... print contents of interpreter register In
(a variable 'interpreter' must be in context)
(gdb) ps 0
S0=0xbffff2f1 "11"
(gdb) ps 1
S1=0x8245113 "no such reg"
(gdb) pi 0
I0=0
(gdb) pi 1
I1=3

Leopold Toetsch

unread,
Feb 16, 2006, 9:58:37 AM2/16/06
to Perl 6 Internals
Leopold Toetsch wrote:
> A debug session snippet:

I've changed the syntax now to the more conforming convenience var
syntax for registers:

(gdb) pp $I1
I1=3

$x0 ... $x9 are predefined for x in S,I,N (no PMCs yet)

This is the same as printing HW registers:

(gdb) p $eax
$1 = 135154512

And:

(gdb) pp "N28" # general syntax

leo

0 new messages