summaryrefslogtreecommitdiffstats
path: root/loc2c.h
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-07-15 12:04:57 +0200
committerMark Wielaard <mjw@redhat.com>2009-07-15 12:04:57 +0200
commit00b01a991cc4300f18c747853e85841d187b1fa4 (patch)
tree6a165d27d3e44afe1e42298d24b0c36081aa2c39 /loc2c.h
parentd52761f89a1826b1cca29b1a63269eafe7197756 (diff)
downloadsystemtap-steved-00b01a991cc4300f18c747853e85841d187b1fa4.tar.gz
systemtap-steved-00b01a991cc4300f18c747853e85841d187b1fa4.tar.xz
systemtap-steved-00b01a991cc4300f18c747853e85841d187b1fa4.zip
PR10388 Support DW_OP_call_frame_cfa.
Depends on elfutils 0.142 cfi support. * loc2c.h (c_translate_location): Take (optional) Dwarf_Op *cfa_ops. * loc2c.c (translate): Recognize DW_OP_call_frame_cfa. (location_from_address): Take cfa_ops, examine fb_ops, if it is DW_OP_call_frame_cfa, pass cfa_ops to translate instead. (location_relative): Take cfa_ops, pass to location_from_address. (c_translate_location): Take cfa_ops, pass to location_from_address. * loc2c-test.c (handle_variable): Take cfa_ops, pass to c_translate_location when needed. (main): Fetch cfa_ops, pass to handle_variable. * dwflpp.h (struct dwflpp): Add new method get_cfa_ops. * dwflpp.cxx: Include elfutils/version.h. (translate_location): Fetch cfa_ops when necessary. (get_cfa_ops): New method.
Diffstat (limited to 'loc2c.h')
-rw-r--r--loc2c.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/loc2c.h b/loc2c.h
index eb1f39d6..449d4499 100644
--- a/loc2c.h
+++ b/loc2c.h
@@ -11,7 +11,8 @@ struct location; /* Opaque */
/* Translate a C fragment for the location expression, using *INPUT
as the starting location, begin from scratch if *INPUT is null.
If DW_OP_fbreg is used, it may have a subfragment computing from
- the FB_ATTR location expression.
+ the FB_ATTR location expression. The call_frame might need to be
+ calculated by the cfa_ops for the given pc_address.
On errors, call FAIL, which should not return. Any later errors will use
FAIL and FAIL_ARG from the first c_translate_location call.
@@ -34,7 +35,8 @@ struct location *c_translate_location (struct obstack *,
const Dwarf_Op *locexpr,
size_t locexprlen,
struct location **input,
- Dwarf_Attribute *fb_attr);
+ Dwarf_Attribute *fb_attr,
+ const Dwarf_Op *cfa_ops);
/* Translate a fragment to dereference the given DW_TAG_pointer_type DIE,
where *INPUT is the location of the pointer with that type. */