public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Delayed physname computation
Date: Fri, 23 Apr 2010 23:34:00 -0000	[thread overview]
Message-ID: <4BD22E6A.9020309@redhat.com> (raw)
In-Reply-To: <m3aastwz46.fsf@fleche.redhat.com>

On 04/23/2010 04:03 PM, Tom Tromey wrote:
> Keith>  +static void
> Keith>  +add_to_method_list (struct type *type, int fnfield_index, int index,
> Keith>  +		    const char *name, struct die_info *die,
> Keith>  +		    struct dwarf2_cu *cu)
>
> This needs some kind of header comment.  It can be pretty mild.

Done.

> Keith>  +      physname = (char *) dwarf2_physname ((char *) mi->name, mi->die, cu);
>
> It would be nice to make all this stuff const-correct.  It is definitely
> not needed for this patch, I just didn't notice this earlier.

I'll add that to my immediate TODO list.

> I didn't go dig through the code, so consider this a conditional
> request.  If we are careful about cleanups here, then this needs a
> cleanup; otherwise an error results in a memory leak.  If we aren't
> already careful, then don't bother, I think we will need to make a pass
> through this to make the reader a bit more robust in the face of weird
> DWARF.  In this case, either file a bug or let me know and I will file
> one.

Yeah, I wasn't 100% sure whether this needed a cleanup, either. 
Nonetheless, we have two options, catch any errors (which I think was 
suggested in another thread for a different problem) or add a cleanup. A 
little paranoia can't hurt that much. If you have a preference, I'll 
implement that.

> Keith>       complaint (&symfile_complaints, _("member function type missing for '%s'"),
> Keith>  -	       physname);
> Keith>  +	       dwarf2_physname (fieldname, die, cu));
>
> Can this call to dwarf2_physname exhibit the problem that this patch is
> trying to circumvent?

Unfortunately, it very well could. I guess it would be almost as useful 
if this called dwarf2_fullname instead. What do you think?

Keith

  reply	other threads:[~2010-04-23 23:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 20:23 Keith Seitz
2010-04-21  6:38 ` Jan Kratochvil
2010-04-23 23:04   ` Tom Tromey
2010-04-23 23:03 ` Tom Tromey
2010-04-23 23:34   ` Keith Seitz [this message]
2010-04-26 18:38     ` Tom Tromey
2010-05-11 21:18       ` Keith Seitz
2010-06-04 22:37         ` Tom Tromey
2010-04-25 10:33 ` Jan Kratochvil

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=4BD22E6A.9020309@redhat.com \
    --to=keiths@redhat.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).