From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16866 invoked by alias); 5 Mar 2011 01:31:58 -0000 Received: (qmail 16858 invoked by uid 22791); 5 Mar 2011 01:31:57 -0000 X-SWARE-Spam-Status: No, hits=-4.4 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; Sat, 05 Mar 2011 01:31:54 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id CDF283D004 for ; Fri, 4 Mar 2011 17:31:52 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id C387CCD9CE for ; Fri, 4 Mar 2011 17:31:52 -0800 (PST) Message-ID: <4D719288.6050301@vmware.com> Date: Sat, 05 Mar 2011 01:31:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [RFA] frame.c (find_frame_sal): Check return value of get_frame_function. Content-Type: multipart/mixed; boundary="------------010206070207090307070104" 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/msg00355.txt.bz2 This is a multi-part message in MIME format. --------------010206070207090307070104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 75 The return value for get_frame_function is usually checked for null. OK? --------------010206070207090307070104 Content-Type: text/plain; name="null17.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="null17.txt" Content-length: 1098 2011-03-04 Michael Snyder * 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; --------------010206070207090307070104--