From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: ac131313@cygnus.com
Cc: gdb@sources.redhat.com
Subject: Re: Add backtrace to gdb ...
Date: Thu, 27 Sep 2001 01:31:00 -0000 [thread overview]
Message-ID: <2593-Thu27Sep2001103049+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <3BB2BDE1.9000506@cygnus.com>
> Date: Thu, 27 Sep 2001 01:49:21 -0400
> From: Andrew Cagney <ac131313@cygnus.com>
>
> The attatched is a quick hack to tweek internal_error() giving the behavour:
[...]
> Create a core file containing the current state of GDB? ");
> +
> + /* Default (no case) is to not produce a stack dump. May not work
> + anyway. */
> + backtrace_p = query ("Produce a back-trace? ");
> +
> + if (backtrace_p)
> + {
> + extern char *global_argv0_hack;
> + char *cmd;
> + xasprintf (&cmd, "( echo set prompt ; echo attach %d ; echo bt ) | gdb -nw -nx --quiet %s",
> + getpid (), global_argv0_hack);
This assumes that every target supports "attach PID". DJGPP doesn't.
So I suggest to make a provision for a platform-specific function to
produce a backtrace (that's something DJGPP _can_ do).
> Just a shame that this GDB couldn't back-trace from libc.
It's a problem which will happen all too often. If we want to fix it,
we will need to arrange for GDB to step outside library functions, and
only then produce a backtrace.
prev parent reply other threads:[~2001-09-27 1:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-26 23:24 Andrew Cagney
2001-09-27 1:31 ` Eli Zaretskii [this message]
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=2593-Thu27Sep2001103049+0300-eliz@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=ac131313@cygnus.com \
--cc=gdb@sources.redhat.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox