From: Nick Roberts <nickrob@snap.net.nz>
Cc: Dan Nicolaescu <dann@ics.uci.edu>, emacs-devel@gnu.org
Subject: Re: better "pr" with gdb-6.4
Date: Tue, 7 Feb 2006 23:25:22 +1300 [thread overview]
Message-ID: <17384.30098.596419.302015@kahikatea.snap.net.nz> (raw)
In-Reply-To: <m3vevra63k.fsf@kfs-l.imdomain.dk>
> > 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
levels:
Lisp Backtrace:
"load"
"normal-top-level"
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
Nick
next prev parent reply other threads:[~2006-02-07 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-05 18:40 better "pr" with gdb-6.4 Dan Nicolaescu
2006-02-05 21:01 ` Kim F. Storm
2006-02-07 0:04 ` Dan Nicolaescu
2006-02-07 2:39 ` Nick Roberts
2006-02-07 9:08 ` Kim F. Storm
2006-02-07 9:52 ` Miles Bader
2006-02-07 10:48 ` Nick Roberts
2006-02-07 10:25 ` Nick Roberts [this message]
2006-02-07 10:51 ` Kim F. Storm
2006-02-08 3:34 ` Nick Roberts
2006-02-07 12:38 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17384.30098.596419.302015@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.