From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25950 invoked by alias); 25 Feb 2003 22:52:38 -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 25939 invoked from network); 25 Feb 2003 22:52:37 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by 172.16.49.205 with SMTP; 25 Feb 2003 22:52:37 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h1PMl18A012511; Tue, 25 Feb 2003 17:47:01 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h1PMl0wA012507; Tue, 25 Feb 2003 17:47:00 -0500 To: "J. Johnston" Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: dbxread patch References: <3E5AB25A.30504@redhat.com> From: Jim Blandy Date: Tue, 25 Feb 2003 22:52:00 -0000 In-Reply-To: <3E5AB25A.30504@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00669.txt.bz2 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). Elena suggested the change, right? She should be credited in the ChangeLog entry. "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. > > > 2003-02-24 Jeff Johnston > > * dbxread.c (process_one_symbol): Only record line 0 if one or more sline > entries have been seen for the function. > > > > 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 24 Feb 2003 23:39:52 -0000 > @@ -2831,7 +2831,9 @@ > break; > } > > - record_line (current_subfile, 0, last_function_start + valu); > + if (sline_found_in_function) > + record_line (current_subfile, 0, last_function_start + valu); > + > within_function = 0; > new = pop_context (); >