From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23676 invoked by alias); 26 Feb 2003 21:12:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23636 invoked from network); 26 Feb 2003 21:12:53 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 26 Feb 2003 21:12:53 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1QLCre30558 for ; Wed, 26 Feb 2003 16:12:54 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1QLCrq00462; Wed, 26 Feb 2003 16:12:53 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1QLCpc15424; Wed, 26 Feb 2003 16:12:51 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 0DD66FF79; Wed, 26 Feb 2003 16:16:54 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15965.11974.223929.954042@localhost.redhat.com> Date: Wed, 26 Feb 2003 21:12:00 -0000 To: "J. Johnston" Cc: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: RFA: dbxread patch In-Reply-To: <3E5BF96E.2020301@redhat.com> References: <3E5AB25A.30504@redhat.com> <3E5BF96E.2020301@redhat.com> X-SW-Source: 2003-02/txt/msg00747.txt.bz2 J. Johnston writes: > Jim Blandy wrote: > > Yes, looks good. > > > > Please add a comment briefly explaining why the check is needed > > (hand-generated stabs that contain N_FUN stabs but no N_SLINE stabs). > > > > I have attached a new patch with a comment. > > > Elena suggested the change, right? She should be credited in the > > ChangeLog entry. > > > > You are correct - thanks for spotting this oversight. > > 2003-02-25 Jeff Johnston > > From Elena Zannoni > * dbxread.c (process_one_symbol): Only record line 0 if one or more sline > entries have been seen for the function. > > > Ok now? Yes. Elena > > -- Jeff J. > > > "J. Johnston" writes: > > > > > >>The following patch fixes a problem when the stabs debug info > >>for a file does not contain sline entries. This happens, for > >>example with the glibc syscall code which is generated assembler > >>code. In process_one_symbol in dbxread.c, a line 0 is recorded for the > >>end of the function. When there are no other line numbers, we end up finding this > >>line 0 as our alt_symtab in symtab:find_pc_sect_line() and we end up > >>subtracting one resulting in line -1. This problem manifests itself > >>when we attempt to break at the generated glibc functions such as > >>kill. > >> > >>The patch changes process_one_symbol() to only record line 0 if sline info > >>has been found for the function. > >> > >>Ok to commit? > >> > >>-- Jeff J. > >> > >> > Index: dbxread.c > =================================================================== > RCS file: /cvs/src/src/gdb/dbxread.c,v > retrieving revision 1.43 > diff -u -r1.43 dbxread.c > --- dbxread.c 20 Feb 2003 18:31:14 -0000 1.43 > +++ dbxread.c 25 Feb 2003 23:12:07 -0000 > @@ -2831,7 +2831,13 @@ > break; > } > > - record_line (current_subfile, 0, last_function_start + valu); > + /* The following check is added before recording line 0 at > + end of function so as to handle hand-generated stabs > + which may have an N_FUN stabs at the end of the function, but > + no N_SLINE stabs. */ > + if (sline_found_in_function) > + record_line (current_subfile, 0, last_function_start + valu); > + > within_function = 0; > new = pop_context (); >