public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-swagiaal-using-directive: Use dwarf2_full_name instead of dwarf2_linkage_name for variables.
@ 2008-10-29 20:56 swagiaal
  0 siblings, 0 replies; only message in thread
From: swagiaal @ 2008-10-29 20:56 UTC (permalink / raw)
  To: archer-commits

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-29 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29 20:56 [SCM] archer-swagiaal-using-directive: Use dwarf2_full_name instead of dwarf2_linkage_name for variables swagiaal

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).