Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: ezannoni@redhat.com
Cc: brobecker@gnat.com, gdb-patches@sources.redhat.com
Subject: Re: [rfc] msymbol.size
Date: Tue, 11 Nov 2003 18:45:00 -0000	[thread overview]
Message-ID: <20031111184534.3F26F4B361@berman.michael-chastain.com> (raw)

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


             reply	other threads:[~2003-11-11 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-11 18:45 Michael Elizabeth Chastain [this message]
2003-11-11 19:11 ` Elena Zannoni
  -- strict thread matches above, loose matches on Subject: below --
2003-11-11 20:14 Michael Elizabeth Chastain
2003-11-11 17:10 Michael Elizabeth Chastain
2003-11-11 16:31 Michael Elizabeth Chastain
2003-11-11 16:50 ` Elena Zannoni
2003-11-09 23:30 Michael Elizabeth Chastain
2003-11-10 18:16 ` Joel Brobecker
2003-11-07 20:19 Michael Elizabeth Chastain
2003-11-07 20:31 ` Elena Zannoni
2003-11-07 19:47 Michael Elizabeth Chastain
2003-11-07 20:06 ` Elena Zannoni
2003-11-08 23:54   ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031111184534.3F26F4B361@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=brobecker@gnat.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox