From: Nick Roberts <nickrob@snap.net.nz>
To: gdb-patches@sourceware.org
Subject: [PATCH] PR backtrace/9786
Date: Sun, 22 Feb 2009 19:37:00 -0000 [thread overview]
Message-ID: <18849.13514.379735.375860@kahikatea.snap.net.nz> (raw)
This patch prevents the assertion error reported in:
http://sourceware.org/bugzilla/show_bug.cgi?id=9786
Output from "info frame" after connecting to a remote target now looks like:
(gdb) info frame
Stack level 0, frame at 0x0:
eip = 0xb7f7d810; saved eip none
Outermost frame: unwinder did not report frame ID
Arglist at unknown address.
Locals at unknown address, Previous frame's sp in esp
With native targets "info frame" works as before and there are no regressions
in the testsuite. I don't understand the last line of output but I think
this is better than having Gdb throw an assertion error.
--
Nick http://www.inet.net.nz/~nickrob
2009-02-23 Nick Roberts <nickrob@snap.net.nz>
PR backtrace/9786
* stack.c (frame_info): Avoid assertion error when there
is no saved pc.
--- stack.c 12 Feb 2009 19:33:27 +1300 1.185
+++ stack.c 23 Feb 2009 00:09:02 +1300
@@ -894,6 +894,7 @@ frame_info (char *addr_exp, int from_tty
int selected_frame_p;
struct gdbarch *gdbarch;
struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
+ struct value *value;
fi = parse_frame_specification_1 (addr_exp, "No stack.", &selected_frame_p);
gdbarch = get_frame_arch (fi);
@@ -976,7 +977,12 @@ frame_info (char *addr_exp, int from_tty
puts_filtered ("; ");
wrap_here (" ");
printf_filtered ("saved %s ", pc_regname);
- fputs_filtered (paddress (frame_pc_unwind (fi)), gdb_stdout);
+ value = frame_unwind_register_value (fi, gdbarch_pc_regnum (gdbarch));
+ if (VALUE_LVAL (value) == lval_register
+ && !(frame_id_p (VALUE_FRAME_ID (value))))
+ printf_filtered ("none");
+ else
+ fputs_filtered (paddress (frame_pc_unwind (fi)), gdb_stdout);
printf_filtered ("\n");
if (calling_frame_info == NULL)
next reply other threads:[~2009-02-22 11:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-22 19:37 Nick Roberts [this message]
2009-02-23 0:51 ` Joel Brobecker
2009-02-23 1:08 ` Pedro Alves
2009-02-23 2:08 ` Daniel Jacobowitz
2009-04-18 0:43 ` Nick Roberts
2009-04-20 17:19 ` Tom Tromey
2009-04-21 8:28 ` Nick Roberts
2009-06-23 18:39 ` Joel Brobecker
2009-06-23 18:46 ` Daniel Jacobowitz
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=18849.13514.379735.375860@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb-patches@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox