Add mangled names to addr2line -i output.
authorJim Wilson <wilson@tuliptree.org>
Tue, 20 Sep 2005 18:13:32 +0000 (18:13 +0000)
committerJim Wilson <wilson@tuliptree.org>
Tue, 20 Sep 2005 18:13:32 +0000 (18:13 +0000)
* dwarf2.c (find_abstract_instance_name): Don't early exit when name
set.  For DW_AT_name case, only set name if not already set.  Handle
DW_AT_MIPS_linkage_name.

bfd/ChangeLog
bfd/dwarf2.c

index dcb557352021903bef6888354d3dd9107264b703..ad1c2517d0f236a4013f6ea7cf9cba8bbb2c199b 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-20  James E. Wilson  <wilson@specifix.com>
+
+       * dwarf2.c (find_abstract_instance_name): Don't early exit when name
+       set.  For DW_AT_name case, only set name if not already set.  Handle
+       DW_AT_MIPS_linkage_name.
+
 2005-09-20  Alan Modra  <amodra@bigpond.net.au>
 
        * elflink.c (_bfd_elf_merge_symbol): Simplify.
index 0a0fc12b1ca122d5078e839b4ca0a22d36b72299..ca792f4b4645a8785a42faf4de885ac1da0405b9 100644 (file)
@@ -1568,17 +1568,22 @@ find_abstract_instance_name (struct comp_unit *unit, bfd_uint64_t die_ref)
        }
       else
        {
-         for (i = 0; i < abbrev->num_attrs && !name; ++i)
+         for (i = 0; i < abbrev->num_attrs; ++i)
            {
              info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr);
              switch (attr.name)
                {
                case DW_AT_name:
-                 name = attr.u.str;
+                 /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name.  */
+                 if (name == NULL)
+                   name = attr.u.str;
                  break;
                case DW_AT_specification:
                  name = find_abstract_instance_name (unit, attr.u.val);
                  break;
+               case DW_AT_MIPS_linkage_name:
+                 name = attr.u.str;
+                 break;
                default:
                  break;
                }