From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Delayed physname computation
Date: Fri, 23 Apr 2010 23:03:00 -0000 [thread overview]
Message-ID: <m3aastwz46.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4BCE0D3C.7040201@redhat.com> (Keith Seitz's message of "Tue, 20 Apr 2010 13:23:24 -0700")
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> The solution I've implemented is to simply delay processing of method
Keith> physnames until the entire CU has been read/processed.
I read through this and I think it looks good.
I do have some questions, nothing major.
Keith> Unfortunately, this is another example in which the compiler used may
Keith> alter the test outcome. As a result, I've had to hack in a test case
Keith> which is independent of the compiler. I would appreciate special
Keith> attention to the test source file (pr11465.S), which is an edited
Keith> version of gcc's --save-temps output.
This sort of thing is fine, there are other tests made the same way.
I didn't try to read the assembly, but Jan's updated test is ok when
this patch goes in.
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.
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.
Keith> + /* If methods were found in the partial symbol table, we allocate one
Keith> + big buffer to hold the entire delayed list for the CU. */
Keith> + if (per_cu->num_methods)
Keith> + {
Keith> + cu->method_list
Keith> + = xmalloc (per_cu->num_methods * sizeof (struct delayed_method_info));
Keith> + }
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.
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?
Tom
next prev parent reply other threads:[~2010-04-23 23:03 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 [this message]
2010-04-23 23:34 ` Keith Seitz
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=m3aastwz46.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@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).