[Top][All Lists]

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

Re: better "pr" with gdb-6.4

From: Nick Roberts
Subject: Re: better "pr" with gdb-6.4
Date: Tue, 7 Feb 2006 23:25:22 +1300

 > > Most Emacs users/developers probably don't have GDB 6.4 so you would at
 > > least need to give your function a different name.
 > Perhaps, for portability, could .gdbinit do something like
 > globally:
 >  set $argc = -1
 > and then the pp functions could test if $argc >= 0 to 
 > recognize GDB 6.4 ?

Yes, that seems to work.

 > > I have a couple of other functions that just work when the selected frame
 > > is Ffuncall, for printing all the argument names.  Are they generally
 > > useful?
 > Seems useful, but why have to functions which does the same thing?

Sorry I wasn't clear.  They're meant as alternatives.

 > Actually, it would alse be useful if you could enhance
 > xbacktrace to recognize when the current frame is Ffuncall and
 > print the args at that level  (maybe for other functions too).

But only some of the lisp backtrace appears as calls to Ffuncall (the
primitives?).  In the example that I gave, the lisp backtrace has two

Lisp Backtrace:

but the C backtrace has only one call to Ffuncall (for load):

(gdb) bt
#0  Fload (file=140229683, noerror=137853993, nomessage=137853993,
    nosuffix=137853993, must_suffix=137853945) at lread.c:682
#1  0x0818cd1b in Ffuncall (nargs=5, args=0xfef0da20) at eval.c:2893
#2  0x081c0dd6 in Fbyte_code (bytestr=137297859, vector=137298020, maxdepth=48)
    at bytecode.c:694
#3  0x0818d3e7 in funcall_lambda (fun=137297836, nargs=0,
    arg_vector=0xfef0db90) at eval.c:3066
#4  0x0818d057 in apply_lambda (fun=137297836, args=137853945, eval_flag=1)
    at eval.c:2988
#5  0x0818c0bc in Feval (form=139389765) at eval.c:2261
#6  0x08111668 in top_level_2 () at keyboard.c:1332
#7  0x0818ab24 in internal_condition_case (bfun=0x8111654 <top_level_2>,
    handlers=137897729, hfun=0x811130f <cmd_error>) at eval.c:1465
#8  0x08111698 in top_level_1 () at keyboard.c:1340
#9  0x0818a5b6 in internal_catch (tag=137893985, func=0x811166d <top_level_1>,
    arg=137853945) at eval.c:1211
#10 0x081115d3 in command_loop () at keyboard.c:1297
#11 0x0811108e in recursive_edit_1 () at keyboard.c:995
#12 0x081111cf in Frecursive_edit () at keyboard.c:1056
#13 0x0810faac in main (argc=2, argv=0xfef0e2a4) at emacs.c:1789


reply via email to

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