From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5068 invoked by alias); 11 Nov 2003 18:45:33 -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 5040 invoked from network); 11 Nov 2003 18:45:33 -0000 Received: from unknown (HELO mclean.mail.mindspring.net) (207.69.200.57) by sources.redhat.com with SMTP; 11 Nov 2003 18:45:33 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by mclean.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1AJdW8-0004PG-00; Tue, 11 Nov 2003 13:45:32 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 3F26F4B361; Tue, 11 Nov 2003 13:45:34 -0500 (EST) To: ezannoni@redhat.com Subject: Re: [rfc] msymbol.size Cc: brobecker@gnat.com, gdb-patches@sources.redhat.com Message-Id: <20031111184534.3F26F4B361@berman.michael-chastain.com> Date: Tue, 11 Nov 2003 18:45:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2003-11/txt/msg00219.txt.bz2 Okay, I whacked dbxread.c with this kludge. This prints trace lines with the value of SYMBOL_VALUE_ADDRESS and MSYMBOL_SIZE every time end_psymtab is called, whether they are used or not. Then I ran before-and-after test runs of my msymbol.size patch. I tested on native i686-pc-linux-gnu with gcc 2.95.3 -gstabs+ and gcc 3.3.2 -gstabs+. I extracted the trace lines from gdb.log and compared. The trace lines were identical before and after, with the same values of SYMBOL_VALUE_ADDRESS and MSYMBOL_SIZE on all lines (357 lines with gcc 2.95.3, 285 lines with gcc 3.3.2). Based on this evidence, I'm confident that my msymbol.size patch stores the same sizes as the current code. So, can I commit the msymbol.size patch? (Obviously I don't want to commit this nasty little trace kludge). Michael C === Index: dbxread.c =================================================================== RCS file: /cvs/src/src/gdb/dbxread.c,v retrieving revision 1.59 diff -c -3 -p -r1.59 dbxread.c *** dbxread.c 8 Nov 2003 00:13:02 -0000 1.59 --- dbxread.c 11 Nov 2003 17:20:33 -0000 *************** end_psymtab (struct partial_symtab *pst, *** 2208,2214 **** a reliable texthigh by taking the address plus size of the last function in the file. */ ! if (pst->texthigh == 0 && last_function_name) { char *p; int n; --- 2208,2214 ---- a reliable texthigh by taking the address plus size of the last function in the file. */ ! if (last_function_name) { char *p; int n; *************** end_psymtab (struct partial_symtab *pst, *** 2234,2240 **** } if (minsym) ! pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + MSYMBOL_SIZE (minsym); last_function_name = NULL; } --- 2234,2245 ---- } if (minsym) ! { ! fprintf_unfiltered (gdb_stderr, "\nend_psymtab: %x %x\n", ! SYMBOL_VALUE_ADDRESS (minsym), MSYMBOL_SIZE (minsym)); ! if (pst->texthigh == 0) ! pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + MSYMBOL_SIZE (minsym); ! } last_function_name = NULL; }