From: Keith Seitz <keiths@redhat.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] dwarf2_physname FINAL
Date: Fri, 05 Mar 2010 22:12:00 -0000 [thread overview]
Message-ID: <4B9181C3.40005@redhat.com> (raw)
In-Reply-To: <m3wrxqsadk.fsf@fleche.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
On 03/05/2010 01:53 PM, Tom Tromey wrote:
> Keith> One other issue that I uncovered: DW_AT_MIPS_linkage_name appears to
> Keith> be necessary for Ada. I have a patch that I used to address this (for
> Keith> one of our internal releases), but it is probably not complete. [In
> Keith> other words: it's now just as broken as it was before.] I can submit
> Keith> this as a follow-up, if so desired.
>
> By this, I assume you mean that after your patch, Ada continues to work,
> but still uses DW_AT_MIPS_linkage_name; and that you have a follow-on
> patch that is incomplete but which attempts to remove the reliance on
> DW_AT_MIPS_linkage_name?
The patch simply keeps/uses MIPS_linkage_name for Ada. Almost nothing
else is changed. I've attached it. With this patch, Ada tests now fail
as much as they did before. I'm guessing there is a lot more to do, though.
It is incomplete in the fact that I did not spend much time with it, and
this patch is quite hacky. If we want to incorporate something like
this, I'll need to play with it a bit first. Probably want to try to
move this from dwarf2_name to dwarf2_physname, if that's even possible.
[DW_AT_name and DW_AT_MIPS_linkage_name don't appear to be related in
any way in the test cases I've seen.]
Keith
[-- Attachment #2: ada-linkage-name.patch --]
[-- Type: text/plain, Size: 1137 bytes --]
*** a/gdb/dwarf2read.c.orig 2010-02-19 17:36:48.000000000 -0500
--- b/gdb/dwarf2read.c 2010-02-19 17:37:37.000000000 -0500
*************** read_partial_die (struct partial_die_inf
*** 7366,7371 ****
--- 7366,7375 ----
break;
}
break;
+ case DW_AT_MIPS_linkage_name:
+ if (cu->language == language_ada)
+ part_die->name = DW_STRING (&attr);
+ break;
case DW_AT_comp_dir:
if (part_die->dirname == NULL)
part_die->dirname = DW_STRING (&attr);
*************** dwarf2_canonicalize_name (char *name, st
*** 9928,9936 ****
static char *
dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
{
! struct attribute *attr;
! attr = dwarf2_attr (die, DW_AT_name, cu);
if (!attr || !DW_STRING (attr))
return NULL;
--- 9932,9944 ----
static char *
dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
{
! struct attribute *attr = NULL;
!
! if (cu->language == language_ada)
! attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
! if (!attr)
! attr = dwarf2_attr (die, DW_AT_name, cu);
if (!attr || !DW_STRING (attr))
return NULL;
next prev parent reply other threads:[~2010-03-05 22:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 22:52 Keith Seitz
2010-03-05 21:54 ` Tom Tromey
2010-03-05 22:12 ` Keith Seitz [this message]
2010-03-08 6:18 ` Joel Brobecker
2010-03-09 18:10 ` Keith Seitz
2010-03-10 8:11 ` [commit/dwarf2/Ada] Adjust handling of Ada DIEs after dwarf2_physname patch Joel Brobecker
2010-03-23 20:25 ` [RFA] dwarf2_physname FINAL Ulrich Weigand
2010-03-24 20:24 ` Keith Seitz
2010-03-25 10:21 ` Ulrich Weigand
2010-03-25 18:31 ` [RFA] Java DWARF fixes (was Re: [RFA] dwarf2_physname FINAL) Keith Seitz
2010-03-25 20:05 ` [RFA] Java DWARF fixes Tom Tromey
2010-03-25 22:14 ` Keith Seitz
2010-03-26 16:48 ` Ulrich Weigand
2010-03-26 16:54 ` Keith Seitz
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=4B9181C3.40005@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