emacs-devel
[Top][All Lists]
Advanced

[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 15:39:37 +1300

 > Well the same logic applies to these too, you cannot do:
 > 
 > p C-VAR
 > pp
 > 
 > or 
 > pp C-VAR1 C-VAR2

Most Emacs users/developers probably don't have GDB 6.4 so you would at
least need to give your function a different name.

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?

Nick


(gdb) b Fload
Breakpoint 3 at 0x81a4513: file lread.c, line 682.
(gdb) r -q
Starting program: /home/nickrob/emacs/src/emacs -q

Breakpoint 3, Fload (file=140229699, noerror=137853993, nomessage=137853993, 
nosuffix=137853993, must_suffix=137853945) at lread.c:682
(gdb) up
#1  0x0818cd1b in Ffuncall (nargs=5, args=0xfee5fd10) at eval.c:2893
(gdb) pp1args
args[0] = load
args[1] = "/usr/local/share/emacs/22.0.50/site-lisp/subdirs.el"
args[2] = t
args[3] = t
args[4] = t
(gdb) ppargs
load
"/usr/local/share/emacs/22.0.50/site-lisp/subdirs.el"
t
t
t



define ppargs
set $i = nargs
while $i
  set $index = nargs - $i
  pp args[$index]
  set $i = $i - 1
  end
end

define pp1args
set $i = nargs
while $i
  set $index = nargs - $i
  printf "args["
  output $index
  printf "] = "
  pp args[$index]
  set $i = $i - 1
  end
end




reply via email to

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