Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfa] replace SYMBOL_SOURCE_NAME by SYMBOL_PRINT_NAME
Date: Wed, 05 Feb 2003 03:06:00 -0000	[thread overview]
Message-ID: <20030205030631.GA25425@nevyn.them.org> (raw)
In-Reply-To: <ro1isvz1o71.fsf@jackfruit.Stanford.EDU>

On Tue, Feb 04, 2003 at 06:00:34PM -0800, David Carlton wrote:
> Right now, GDB has a macro called SYMBOL_SOURCE_NAME that gives you
> the demangled name of a symbol if 'demangle' is true, and the mangled
> name if 'demangle' is false.
> 
> It's mostly used in output routines; its use there is entirely
> appropriate.  It's sometimes used for internal purposes instead; its
> use there is not nearly as appropriate.  (E.g. what if you sort or
> hash a table when demangle is false and then look up something in a
> table when demangle is true?)  The internal uses should all be
> replaced by a different macro (to appear in a future use) which
> doesn't depend on the value of demangle.
> 
> Here's a patch to begin dealing with the issue.  It renames
> SYMBOL_SOURCE_NAME to SYMBOL_PRINT_NAME and adds a comment making it
> clear that it's only suitable for output.  It changes all occurrences
> of the macro in a completely mechanical way; in a later patch, I'll go
> through all the occurrences to see if they look appropriate or not.
> 
> The only part of the patch worth looking at is the symtab.h part,
> which I've listed first; the rest should (I hope!) be purely
> mechanical.
> 
> Tested on i686-pc-linux-gnu/GCC3.1/DWARF-2, and should be obviously
> correct if you accept the underlying idea (and if I didn't screw up
> with my keyboard macros in Emacs).  OK to commit?

I still don't understand why you want to rename it.  Why not just
clarify the comment?


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-02-05  3:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-05  2:00 David Carlton
2003-02-05  3:06 ` Daniel Jacobowitz [this message]
2003-02-05  5:42   ` David Carlton
2003-02-05 15:18     ` Andrew Cagney
2003-02-20  4:21 ` Elena Zannoni
2003-02-20 17:19   ` David Carlton

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=20030205030631.GA25425@nevyn.them.org \
    --to=drow@mvista.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