public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: swagiaal@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-swagiaal-using-directive: Use dwarf2_full_name instead of dwarf2_linkage_name for variables. Date: Wed, 29 Oct 2008 20:56:00 -0000 [thread overview] Message-ID: <20081029205626.30960.qmail@sourceware.org> (raw) The branch, archer-swagiaal-using-directive has been updated via b0f43894cad0734092967db5a1d67b248e621371 (commit) from 1de38657622396795ce681e64b03fb74e81e6c3d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit b0f43894cad0734092967db5a1d67b248e621371 Author: Sami Wagiaalla <swagiaal@redhat.com> Date: Wed Oct 29 16:22:01 2008 -0400 Use dwarf2_full_name instead of dwarf2_linkage_name for variables. +2008-10-29 Sami Wagiaalla <swagiaal@redhat.com> + + * dwarf2read.c (determine_prefix): Added a rule to skip dies which + have a subprogram ancestor. + (new_symbol): use dwarf2_full_name instead of dwarf2_linkage_name for + variables. + ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 9 ++++++++- gdb/dwarf2read.c | 22 ++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) First 500 lines of diff: diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 610c6bc..6795e3c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2008-10-29 Sami Wagiaalla <swagiaal@redhat.com> + + * dwarf2read.c (determine_prefix): Added a rule to skip dies which + have a subprogram ancestor. + (new_symbol): use dwarf2_full_name instead of dwarf2_linkage_name for + variables. + 2008-10-28 Sami Wagiaalla <swagiaal@redhat.com> * dwarf2read.c (explore_children): New function. @@ -17,7 +24,7 @@ using_directives instead. (cp_initialize_namespace): Deleted. (cp_finalize_namespace): Deleted. - Added #include b"uildsym.h". + Added #include "buildsym.h". 2008-10-20 Sami Wagiaalla <swagiaal@redhat.com> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ef189b6..7200c3f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -7442,18 +7442,22 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) struct objfile *objfile = cu->objfile; struct gdbarch *gdbarch = get_objfile_arch (objfile); struct symbol *sym = NULL; - char *name; + const char *name; struct attribute *attr = NULL; struct attribute *attr2 = NULL; CORE_ADDR baseaddr; baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); - if (die->tag != DW_TAG_namespace) - name = dwarf2_linkage_name (die, cu); - else - name = TYPE_NAME (type); - + if (die->tag == DW_TAG_variable){ + name = dwarf2_full_name(die, cu); + }else{ + if (die->tag != DW_TAG_namespace) + name = dwarf2_linkage_name (die, cu); + else + name = TYPE_NAME (type); + } + if (name) { sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack, @@ -8024,10 +8028,16 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu) else switch (parent->tag) { + case DW_TAG_namespace: parent_type = read_type_die (parent, cu); /* We give a name to even anonymous namespaces. */ return TYPE_TAG_NAME (parent_type); + case DW_TAG_subprogram: + /* If the die is a direct or indirect child of a function then + no prefix is nessesary; this variable cannot be reference + from outside the function. */ + return ""; case DW_TAG_class_type: case DW_TAG_interface_type: case DW_TAG_structure_type: hooks/post-receive -- Repository for Project Archer.
reply other threads:[~2008-10-29 20:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20081029205626.30960.qmail@sourceware.org \ --to=swagiaal@sourceware.org \ --cc=archer-commits@sourceware.org \ /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: linkBe 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).