From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] frame.c (find_frame_sal): Check return value of get_frame_function.
Date: Sat, 05 Mar 2011 01:31:00 -0000 [thread overview]
Message-ID: <4D719288.6050301@vmware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 75 bytes --]
The return value for get_frame_function is usually checked for null.
OK?
[-- Attachment #2: null17.txt --]
[-- Type: text/plain, Size: 1098 bytes --]
2011-03-04 Michael Snyder <msnyder@vmware.com>
* frame.c (find_frame_sal): Check return value of get_frame_function.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.291
diff -u -p -r1.291 frame.c
--- frame.c 7 Jan 2011 19:36:17 -0000 1.291
+++ frame.c 5 Mar 2011 01:27:39 -0000
@@ -1892,15 +1892,16 @@ find_frame_sal (struct frame_info *frame
sym = inline_skipped_symbol (inferior_ptid);
init_sal (sal);
- if (SYMBOL_LINE (sym) != 0)
+ if (sym && SYMBOL_LINE (sym) != 0)
{
sal->symtab = SYMBOL_SYMTAB (sym);
sal->line = SYMBOL_LINE (sym);
}
else
- /* If the symbol does not have a location, we don't know where
- the call site is. Do not pretend to. This is jarring, but
- we can't do much better. */
+ /* If the symbol does not have a location (or we didn't find a
+ symbol), we don't know where the call site is. Do not
+ pretend to. This is jarring, but we can't do much
+ better. */
sal->pc = get_frame_pc (frame);
return;
next reply other threads:[~2011-03-05 1:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 1:31 Michael Snyder [this message]
2011-03-11 22:50 ` Michael Snyder
2011-03-15 16:49 ` Joel Brobecker
2011-03-15 17:43 ` Pedro Alves
2011-03-15 17:44 ` Joel Brobecker
2011-03-15 17:54 ` Pedro Alves
2011-03-15 19:26 ` Michael Snyder
2011-03-15 19:29 ` Pedro Alves
2011-03-15 20:01 ` Michael Snyder
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=4D719288.6050301@vmware.com \
--to=msnyder@vmware.com \
--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