From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20833 invoked by alias); 15 Mar 2011 19:12:55 -0000 Received: (qmail 20821 invoked by uid 22791); 15 Mar 2011 19:12:53 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Mar 2011 19:12:48 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id AE24B5004; Tue, 15 Mar 2011 12:12:46 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id 9CD538EF13; Tue, 15 Mar 2011 12:12:46 -0700 (PDT) Message-ID: <4D7FBA2E.4090201@vmware.com> Date: Tue, 15 Mar 2011 19:26:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20110128) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" , Joel Brobecker Subject: Re: [RFA] frame.c (find_frame_sal): Check return value of get_frame_function. References: <4D719288.6050301@vmware.com> <201103151653.54091.pedro@codesourcery.com> <20110315173805.GN31264@adacore.com> <201103151744.20297.pedro@codesourcery.com> In-Reply-To: <201103151744.20297.pedro@codesourcery.com> Content-Type: multipart/mixed; boundary="------------080308090000080508070609" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00811.txt.bz2 This is a multi-part message in MIME format. --------------080308090000080508070609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 549 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? --------------080308090000080508070609 Content-Type: text/plain; name="null17b.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="null17b.txt" Content-length: 631 2011-03-15 Michael Snyder * 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) { --------------080308090000080508070609--