This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] msymbol.size


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;
      }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]