summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-07-08 14:09:39 -0700
committerRoland McGrath <[email protected]>2009-07-08 14:09:39 -0700
commit95d10e4cbb66d2df883ae0ef98ddbc8f10696621 (patch)
tree1c1b109588f5727bda9d9a72a2ea0a5dfc9fe574 /src/readelf.c
parentf7a6f037a3c67ebd2d970146d8e04d2c15b106ad (diff)
parent714f66a60f55dada62ac808cd5cffeddd1f4ad39 (diff)
Merge branch 'master' of ssh://git.fedorahosted.org/git/elfutils
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c
index e432bfc5..2e8257fa 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -5135,9 +5135,20 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
const char *valuestr = NULL;
switch (attr)
{
+ /* This case can take either a constant or a loclistptr. */
+ case DW_AT_data_member_location:
+ if (form != DW_FORM_data4 && form != DW_FORM_data8)
+ {
+ printf (" %*s%-20s %" PRIxMAX "\n",
+ (int) (level * 2), "", dwarf_attr_string (attr),
+ (uintmax_t) num);
+ return DWARF_CB_OK;
+ }
+ /* else fallthrough */
+
+ /* These cases always take a loclistptr and no constant. */
case DW_AT_location:
case DW_AT_data_location:
- case DW_AT_data_member_location:
case DW_AT_vtable_elem_location:
case DW_AT_string_length:
case DW_AT_use_location: