Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Trevor Saunders <tbsaunde@tbsaunde.org>
Cc: Nick Clifton <nickc@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] sim: unify symbol table handling
Date: Mon, 15 Aug 2016 16:57:00 -0000	[thread overview]
Message-ID: <20160815165746.GD30544@vapier.lan> (raw)
In-Reply-To: <20160815142941.bs64o26znrff7t4u@ball>

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

On 15 Aug 2016 10:29, Trevor Saunders wrote:
> On Mon, Aug 15, 2016 at 10:22:04AM +0100, Nick Clifton wrote:
> > Hi Mike,
> > 
> > > Nick: can you double check the aarch64 & msp430 changes ?
> > > And see if in general this makes sense to you ?
> > 
> > Sure.
> > 
> > > diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c
> > > [...]
> > >  /* Filter out (in place) symbols that are useless for disassembly.
> > >     COUNT is the number of elements in SYMBOLS.
> > >     Return the number of useful symbols. */
> > >  
> > > -static unsigned long
> > > -remove_useless_symbols (asymbol **symbols, unsigned long count)
> > > +static long
> > > +remove_useless_symbols (asymbol **symbols, long count)
> > 
> > I understand the change to a signed long, but personally I consider
> > it a mistake.  The number of symbols is always going to be a positive
> > value, and the need for an error value could easily be handled using
> > -1U instead of -1L.  But the problem is endemic to the BFD library's
> > symbol handling code, so I guess that it will have to stay.  *sigh*
> 
> or can we convert sim to C++ and use maybe<unsigned long> ? ;)

wouldn't really help when the underlying bfd lib uses long everywhere.

that said, while conceptually it makes sense, the chances of working
with an ELF that has more than 2^31 symbols seems extremely unlikely.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-08-15 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13 19:55 Mike Frysinger
2016-08-15  9:22 ` Nick Clifton
2016-08-15 13:31   ` Mike Frysinger
2016-08-15 14:21   ` Trevor Saunders
2016-08-15 16:57     ` Mike Frysinger [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=20160815165746.GD30544@vapier.lan \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=tbsaunde@tbsaunde.org \
    /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