From: "Robert Norton" <rnorton@broadcom.com>
To: "Robert Norton" <rnorton@broadcom.com>,
"Michael Snyder" <msnyder@specifix.com>
Cc: gdb@sourceware.org
Subject: RE: Bug handling zero sized symbols in minsyms.c
Date: Wed, 06 Aug 2008 11:18:00 -0000 [thread overview]
Message-ID: <B0D822BFECD50F4991F2516EA50F273C07D62F97@NT-IRVA-0752.brcm.ad.broadcom.com> (raw)
In-Reply-To: <B0D822BFECD50F4991F2516EA50F273C07A0A632@NT-IRVA-0752.brcm.ad.broadcom.com>
> -----Original Message-----
> From: gdb-owner@sourceware.org
> [mailto:gdb-owner@sourceware.org] On Behalf Of Robert Norton
> Sent: 03 July 2008 11:17
> To: Michael Snyder
> Cc: gdb@sourceware.org
> Subject: RE: Bug handling zero sized symbols in minsyms.c
>
> > -----Original Message-----
> > From: Michael Snyder [mailto:msnyder@specifix.com]
> > Sent: 02 July 2008 18:45
> > To: Robert Norton
> > Cc: gdb@sourceware.org
> > Subject: Re: Bug handling zero sized symbols in minsyms.c
> >
> > On Wed, 2008-07-02 at 09:58 -0700, Robert Norton wrote:
> > > Hi,
> > >
> > > In minsyms.c:lookup_minimal_symbol_by_pc_section() there is
> > some code
> > > which attempts to prefer symbols with sizes over those with
> > zero size.
> > > This is quite useful[1]. Unfortunately the present code
> > will only work
> > > if there is at most one zero-sized symbol. The fix is
> > around line 503:
> > >
> > > if (MSYMBOL_SIZE (&msymbol[hi]) == 0
> > > && best_zero_sized == -1)
> > > {
> > > best_zero_sized = hi;
> > > hi--;
> > > continue;
> > > }
> > >
> > > SHOULD be:
> > >
> > > if (MSYMBOL_SIZE (&msymbol[hi]) == 0)
> > > {
> > > if (best_zero_sized == -1)
> > > best_zero_sized = hi;
> > > hi--;
> > > continue;
> > > }
> > >
> > > We keep the highest zero-sized symbol as the best but continue to
> > > iterate backwards until we hit a non-zero-sized symbol or
> run out of
> > > symbols. It's pretty clear that this is what was originally
> > intended.
> >
> > Your change is good, thanks.
> >
> > > I can get copyright assigment for this if required
> although it seems
> > > pretty trivial...
> >
> > Not necessary, but feel free to if you'd like.
> > I think this is at least the second change you've submitted.
>
> It turns out that we (Broadcom) already have one on file, so
> no problems
> there.
>
> > Could you give us a change log entry please?
>
> How about:
>
> 2008-07-03 Robert Norton (rnorton@broadcom.com)
>
> * minsyms.c: Fix a bug with ignoring zero-sized symbols
> when looking
> up the minsym for a PC.
What is the status of this patch?
Robert
prev parent reply other threads:[~2008-08-06 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 17:00 Robert Norton
2008-07-02 17:45 ` Michael Snyder
2008-07-03 10:17 ` Robert Norton
2008-08-06 11:18 ` Robert Norton [this message]
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=B0D822BFECD50F4991F2516EA50F273C07D62F97@NT-IRVA-0752.brcm.ad.broadcom.com \
--to=rnorton@broadcom.com \
--cc=gdb@sourceware.org \
--cc=msnyder@specifix.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