summaryrefslogtreecommitdiffstats
path: root/loc2c-test.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-09-17 15:06:57 +0200
committerMark Wielaard <mjw@redhat.com>2009-09-17 17:01:38 +0200
commit24c7957b4dbddc8545d0e0c734377746a5ae6e60 (patch)
treee276329ae8a27bc46dda20c2ef665766cc97baa2 /loc2c-test.c
parent6287a9e628bcbe6192da8fd9f0ce659a8acc13fc (diff)
downloadsystemtap-steved-24c7957b4dbddc8545d0e0c734377746a5ae6e60.tar.gz
systemtap-steved-24c7957b4dbddc8545d0e0c734377746a5ae6e60.tar.xz
systemtap-steved-24c7957b4dbddc8545d0e0c734377746a5ae6e60.zip
PR10417 Pass around attributes for supporting DW_OP_{implicit,stack}_value.
Preparation for retrieving the Dwarf_Block that holds the value of an DW_OP_implicit_value. We need the Dwarf_Attribute that is associated with the location expression operants. Depends on new elfutils 0.143 functionality. Recognizes, but does not yet handle the new operants DW_OP_{implicit,stack}_value. * loc2c.h (c_translate_location): Take an Dwarf_Attribute. * loc2c.c (c_translate_location): Likewise and pass it on. (location_relative): Likewise. (location_from_address): Likewise. (translate): Likewise and capture Dwarf_Block. * loc2c-test.c (handle_variable): Pass in Dwarf_Attribute. * dwflpp.cxx (translate_location): Likewise. (literal_stmt_for_return): Pass in NULL to indicate no attribute.
Diffstat (limited to 'loc2c-test.c')
-rw-r--r--loc2c-test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/loc2c-test.c b/loc2c-test.c
index b8883876..495a95f1 100644
--- a/loc2c-test.c
+++ b/loc2c-test.c
@@ -136,7 +136,7 @@ handle_variable (Dwarf_Die *lscopes, int lnscopes, int out,
struct location *head, *tail = NULL;
head = c_translate_location (&pool, &fail, NULL, NULL,
- 1, cubias, pc, locexpr, locexpr_len,
+ 1, cubias, pc, &attr_mem, locexpr, locexpr_len,
&tail, fb_attr, cfa_ops);
if (dwarf_attr_integrate (vardie, DW_AT_type, &attr_mem) == NULL)
@@ -238,7 +238,8 @@ handle_variable (Dwarf_Die *lscopes, int lnscopes, int out,
Dwarf_Op offset_loc = { .atom = DW_OP_plus_uconst };
if (dwarf_formudata (&attr_mem, &offset_loc.number) == 0)
c_translate_location (&pool, NULL, NULL, NULL,
- 1, cubias, pc, &offset_loc, 1,
+ 1, cubias, pc, &attr_mem,
+ &offset_loc, 1,
&tail, NULL, NULL);
else
#endif
@@ -246,7 +247,8 @@ handle_variable (Dwarf_Die *lscopes, int lnscopes, int out,
locexpr = get_location (cubias, pc, &attr_mem,
&locexpr_len);
c_translate_location (&pool, NULL, NULL, NULL,
- 1, cubias, pc, locexpr, locexpr_len,
+ 1, cubias, pc, &attr_mem,
+ locexpr, locexpr_len,
&tail, NULL, NULL);
}
}