From 00b01a991cc4300f18c747853e85841d187b1fa4 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 15 Jul 2009 12:04:57 +0200 Subject: 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. --- dwflpp.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dwflpp.h') diff --git a/dwflpp.h b/dwflpp.h index e0098b9b..a2c38ad8 100644 --- a/dwflpp.h +++ b/dwflpp.h @@ -376,6 +376,10 @@ private: int num_cached_scopes; Dwarf_Die *cached_scopes; int dwarf_getscopes_cached (Dwarf_Addr pc, Dwarf_Die **scopes); + + // Returns the call frame address operations for the given program counter. + Dwarf_Op *get_cfa_ops (Dwarf_Addr pc); + }; #endif // DWFLPP_H -- cgit