Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: FYI: minor simplification in add_psymbol_to_bcache
Date: Tue, 03 Nov 2009 20:21:00 -0000	[thread overview]
Message-ID: <20091103202058.GA23081@caradoc.them.org> (raw)
In-Reply-To: <m3iqdr9xov.fsf@fleche.redhat.com>

On Tue, Nov 03, 2009 at 01:10:24PM -0700, Tom Tromey wrote:
> This patch changes add_psymbol_to_bcache in two ways.
> 
> First, it removes the gratuitous use of a 'static' local variable.

It adds a memset... if you assume that this is a hot function, then it
was probably avoided on purpose.  On the other hand, the way it's
implemented is quite dodgy; there will be bogus padding if
sizeof (long) != sizeof (CORE_ADDR) and you alternate adding symbols
with VAL and COREADDR set.

> Second, it removes the copying of 'name'.  I think this copy is not
> needed because SYMBOL_SET_NAMES handles this case itself.

Yes, must predate SYMBOL_SET_NAMES>

I have no objection.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-11-03 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03 20:10 Tom Tromey
2009-11-03 20:21 ` Daniel Jacobowitz [this message]
2009-11-04 19:16   ` Tom Tromey
2009-11-05 20:03     ` Daniel Jacobowitz
2009-11-05 22:16       ` Tom Tromey

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=20091103202058.GA23081@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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