aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-06-29 14:17:31 +0000
committerNick Clifton <nickc@redhat.com>2001-06-29 14:17:31 +0000
commit12ab83a9ae277dabd18ed836960cef94b7ff09d6 (patch)
tree492511c182d92a7c42204d4697bef8ae993355b2 /binutils
parente45bf86378ef68b380f62c56ff081eefcba68943 (diff)
downloadfsf-binutils-gdb-12ab83a9ae277dabd18ed836960cef94b7ff09d6.zip
fsf-binutils-gdb-12ab83a9ae277dabd18ed836960cef94b7ff09d6.tar.gz
fsf-binutils-gdb-12ab83a9ae277dabd18ed836960cef94b7ff09d6.tar.bz2
Add DWARF 2.1 attributes
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c51
2 files changed, 54 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f273483..4885444 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2001-06-29 James Cownie <jcownie@etnus.com>
+
+ * readelf.c: Support DWARF 2.1 attributes.
+
2001-06-28 Alan Modra <amodra@bigpond.net.au>
* readelf.c (GET_DATA_ALLOC): Remove.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 9fea077..027c916 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2,7 +2,7 @@
Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
- Modifications by Nick Clifton <nickc@cygnus.com>
+ Modifications by Nick Clifton <nickc@redhat.com>
This file is part of GNU Binutils.
@@ -6015,6 +6015,20 @@ get_AT_name (attribute)
case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
case DW_AT_virtuality: return "DW_AT_virtuality";
case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
+ /* DWARF 2.1 values. */
+ case DW_AT_allocated: return "DW_AT_allocated";
+ case DW_AT_associated: return "DW_AT_associated";
+ case DW_AT_data_location: return "DW_AT_data_location";
+ case DW_AT_stride: return "DW_AT_stride";
+ case DW_AT_entry_pc: return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
+ case DW_AT_extension: return "DW_AT_extension";
+ case DW_AT_ranges: return "DW_AT_ranges";
+ case DW_AT_trampoline: return "DW_AT_trampoline";
+ case DW_AT_call_column: return "DW_AT_call_column";
+ case DW_AT_call_file: return "DW_AT_call_file";
+ case DW_AT_call_line: return "DW_AT_call_line";
+ /* SGI/MIPS extensions. */
case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
@@ -6026,6 +6040,7 @@ get_AT_name (attribute)
case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
+ /* GNU extensions. */
case DW_AT_sf_names: return "DW_AT_sf_names";
case DW_AT_src_info: return "DW_AT_src_info";
case DW_AT_mac_info: return "DW_AT_mac_info";
@@ -6591,6 +6606,22 @@ decode_location_expression (data, pointer_size, length)
printf ("DW_OP_nop");
break;
+ /* DWARF 2.1 extensions. */
+ case DW_OP_push_object_address:
+ printf ("DW_OP_push_object_address");
+ break;
+ case DW_OP_call2:
+ printf ("DW_OP_call2: <%lx>", (long) byte_get (data, 2));
+ data += 2;
+ break;
+ case DW_OP_call4:
+ printf ("DW_OP_call4: <%lx>", (long) byte_get (data, 4));
+ data += 4;
+ break;
+ case DW_OP_calli:
+ printf ("DW_OP_calli");
+ break;
+
default:
if (op >= DW_OP_lo_user
&& op <= DW_OP_hi_user)
@@ -6600,6 +6631,9 @@ decode_location_expression (data, pointer_size, length)
/* No way to tell where the next op is, so just bail. */
return;
}
+
+ /* Separate the ops. */
+ printf ("; ");
}
}
@@ -6844,10 +6878,25 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
}
break;
+ case DW_AT_ordering:
+ switch (uvalue)
+ {
+ case -1: printf ("(undefined)"); break;
+ case 0: printf ("(row major)"); break;
+ case 1: printf ("(column major)"); break;
+ }
+ break;
+
case DW_AT_frame_base:
case DW_AT_location:
case DW_AT_data_member_location:
case DW_AT_vtable_elem_location:
+ case DW_AT_allocated:
+ case DW_AT_associated:
+ case DW_AT_data_location:
+ case DW_AT_stride:
+ case DW_AT_upper_bound:
+ case DW_AT_lower_bound:
if (block_start)
{
printf ("(");