Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	 Joel Brobecker <brobecker@adacore.com>
Subject: Re: [RFA] frame.c (find_frame_sal): Check return value of get_frame_function.
Date: Tue, 15 Mar 2011 19:26:00 -0000	[thread overview]
Message-ID: <4D7FBA2E.4090201@vmware.com> (raw)
In-Reply-To: <201103151744.20297.pedro@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

Pedro Alves wrote:
> On Tuesday 15 March 2011 17:38:05, Joel Brobecker wrote:
>>> It would normally, but in this case, we've just found that
>>> the next frame is an inlined function call.  Then it
>>> certainly has debug info?  Otherwise, how would gdb know
>>> it's an inlined function call?
>> Indeed, I think you're right. inline_skipped_symbol shouldn't
>> be returning a NULL symbol, as far as I can tell.  So should
>> we just add a gdb_assert with a comment explaining why we
>> expect sym to be non-NULL?
> 
> I think so.
> 

How's this?



[-- Attachment #2: null17b.txt --]
[-- Type: text/plain, Size: 631 bytes --]

2011-03-15  Michael Snyder  <msnyder@vmware.com>

	* frame.c (find_frame_sal): Assert sym is not null.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.292
diff -u -p -r1.292 frame.c
--- frame.c	9 Mar 2011 14:22:09 -0000	1.292
+++ frame.c	15 Mar 2011 19:11:48 -0000
@@ -1899,6 +1899,8 @@ find_frame_sal (struct frame_info *frame
       else
 	sym = inline_skipped_symbol (inferior_ptid);
 
+      /* If frame is inline, it certainly has symbols.  */
+      gdb_assert (sym);
       init_sal (sal);
       if (SYMBOL_LINE (sym) != 0)
 	{

  reply	other threads:[~2011-03-15 19:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05  1:31 Michael Snyder
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 [this message]
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=4D7FBA2E.4090201@vmware.com \
    --to=msnyder@vmware.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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