[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging with PSD (trace)

From: Bill Schottstaedt
Subject: Re: Debugging with PSD (trace)
Date: Fri, 29 Jun 2001 03:51:22 -0700

> I presume by "trace" you mean stack trace, not the '(trace ...)'
> facility?

No, I meant trace as in (trace rev).  I think it doesn't work
outside the ice-9/boot-9.scm repl.  I was asking how to get it
to work.

On the guile/gdb connection, I'd find it useful to have some
way to decode SCM stuff in gc semi-automatically; something
like "guile-aware-backtrace".  I currently use some gdb macros:

define gp
call gdb_print($arg0)
print gdb_output
document gp
Executes (object->string arg)

define ge
call gdb_read($arg0)
call gdb_eval(gdb_result)
call gdb_print(gdb_result)
print gdb_output
document ge
Executes (print (eval (read arg))): ge "(+ 1 2)" => 3

define gh
call g_help(scm_str2symbol($arg0), 20)
call gdb_print($1)
print gdb_output
document gh
Prints help string for arg: gh "enved-target"

so in gdb if you see something useless like:

#32 0x081ae8f4 in scm_primitive_load (filename=1112137128) at load.c:129

You can get the file name with gp:

(gdb) gp 1112137128
$1 = 0
$2 = 0x40853fac "\"/home/bil/test/share/guile/1.5.0/ice-9/session.scm\""

reply via email to

[Prev in Thread] Current Thread [Next in Thread]