| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* loc2c-test.c (main): Correctly bias PC passed to dwarf_cfi_addrframe.
|
| |
|
|
|
|
|
|
| |
* loc2c.c (c_translate_constant): New function.
* loc2c.h: Declare it.
* loc2c-test.c (main): Use it for DW_AT_const_value cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* loc2c-test.c (handle_variable): Handle DW_TAG_reference_type.
|
|
|
|
|
|
| |
* loc2c-test.c (handle_variable): Skip the workaround for elfutils 0.142.
When doing it, use a synthetic location expression.
Never use c_translate_add_offset, which is broken.
|
|
|
|
|
| |
* loc2c-test.c (handle_variable): Set inner to zero after
calling dwarf_getscopes_die(), for loop will increase inner.
|
|
|
|
|
|
|
|
|
|
| |
When we see a DW_TAG_inlined_subroutine while walking the syntactical
die tree as returned by dwarf_getscopes for a given variable to retrieve
the frame base, then we need to switch to walking the physical die tree
where the subroutine is inlined.
* loc2c-test.c (handle_variable): Switch "die branches" when searching
for frame base and a DW_TAG_inlined_subroutine is encountered.
|
| |
|
|
|
|
|
|
|
| |
We were jumping through a few hoops to deal with elfutils < 0.138 that
did not have the _ELFUTILS_PREREQ macro. I've added an always-false
dummy macro to take its place when it doesn't exit. All of the other
"#ifdef _ELFUTILS_PREREQ" ugliness can now go away.
|
|
|
|
|
|
| |
The dwarf_diename in elfutils learned a long time ago to use
dwarf_attr_integrate when looking up the name. Our minimum elfutils
0.126 has this, so we don't need to kludge it ourselves.
|
|
|
|
|
| |
* dwflpp.cxx (get_cfa_ops): Only define cfa_nops if _ELFUTILS_PREREQ(0,142).
* loc2c-test.c (main): Likewise.
|
|
|
|
|
| |
* dwflpp.cxx (get_cfa_ops): Call dwarf_frame_cfa with cfa_nops size_t.
* loc2c-test.c (main): Likewise.
|
|
|
|
| |
* loc2c-test.c: Include elfutils/version.h when available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* loc2c.h (c_translate_add_offset): New function prototype.
* loc2c.c (c_translate_add_offset): New function implementation.
* loc2c-test.c (handle_variable): Use c_translate_add_offset if appropriate.
* dwflpp.cxx (translate_location): Likewise.
|
|
|
|
|
|
|
| |
* loc2c-test.c (print_vars): Define attr_mem, typedie_mem and typedie before
switch.
* loc2c.c (translate): Wrap case DW_OP_drop in block brackets.
(location_relative): Initialize stack.
|
|
|
|
|
| |
* loc2c-test.c (handle_variable): Resolve through DW_TAG_const_type and
DW_TAG_volatile_type typetags.
|
| |
|
|
|
|
|
|
|
|
|
| |
PR 4078 and more, including patch from
Eugeniy Meshcheryakov <eugen@debian.org>:
* Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Add -Wextra -Wall -Werror
consistently.
* Makefile.in: Regenerated.
(*): Many minor warning fixes.
|
|
|
|
| |
* loc2c-test.c (get_location): Fix function name in error message.
|
|
|
|
|
| |
* loc2c-test.c (main): Free SCOPES at end.
(handle_variable): Free POOL at end.
|
|
|
|
|
|
|
|
|
|
| |
* loc2c.c (c_translate_location): Take Dwarf_Op vector as argument
directly, not Dwarf_Attribute.p
* loc2c.h: Update decl.
* loc2c-test.c (get_location): New function.
(handle_variable): Use it.
* tapsets.cxx (dwflpp::translate_location): New method.
(dwflpp::translate_components, dwflpp::literal_stmt_for_local): Use it.
|
|
|
|
|
| |
* loc2c-test.c (handle_variable): Check for "=" before fetching DIE
from ATTR_MEM.
|
|
|
|
| |
* loc2c-test.c (fail): Print a newline after the error message.
|
|
|
|
|
| |
* loc2c-test.c (print_type): New function.
(print_vars): Use it.
|
|
|
|
|
| |
* loc2c-test.c (paddr, print_vars): New functions.
(main): If given no variable name argument, print out variables.
|
|
|
|
| |
* loc2c-test.c (handle_variable): Iterate on const_type/volatile_type.
|
|
|
|
|
|
|
| |
* loc2c.c (c_translate_addressof): Take TYPEDIE instead of TYPEATTR.
* loc2c.h: Update decl.
* loc2c-test.c (handle_variable): Handle DW_TAG_pointer_type target
for fetch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* loc2c.c (struct location): New member `emit_address'.
(alloc_location): Initialize new member from ORIGIN.
(location_from_address): New argument EMIT_ADDRESS.
Initialize new member.
(translate): Use LOC->emit_address hook to format DW_OP_addr constant.
(location_relative): Die if DW_OP_addr is used.
(default_emit_address): New function.
(c_translate_location): New argument EMIT_ADDRESS, pass it down.
Use default_emit_address if argument is null.
* loc2c.h: Update decl.
* loc2c-test.c (handle_variable): Update caller.
* tapsets.cxx (dwflpp::literal_stmt_for_local): Update caller.
(dwflpp::loc2c_emit_address): New static method.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR systemtap/1197
* loc2c.c (struct location): New members `fail', `fail_arg'.
(alloc_location): New function. Initialize those members.
(new_synthetic_loc, translate): Use that instead of obstack_alloc.
(location_from_address, location_relative): Likewise.
(FAIL): New macro. Use it everywhere in place of `error'.
* loc2c-test.c (fail): New function.
(handle_variable): Pass it to c_translate_location.
* tapsets.cxx (dwflpp::loc2c_error): New static method.
(dwflpp::literal_stmt_for_local): Pass it to to c_translate_location.
|
|
|
|
|
|
|
|
|
| |
* loc2c.c (c_translate_fetch): Take TYPEDIE instead of TYPEATTR.
(c_translate_store): Likewise.
* loc2c.h: Update decls.
* loc2c-test.c (handle_variable): Update callers.
Look up type, resolve typedefs, and check that it's DW_TAG_base_type.
* tapsets.cxx (dwflpp::literal_stmt_for_local): Likewise.
|
|
|
|
|
|
|
|
| |
* loc2c.c (emit_base_store): New function.
(emit_bitfield): Rewritten to handle stores, change parameters.
(c_translate_fetch): Update caller.
(c_translate_store): New function.
* loc2c-test.c (handle_variable): Grok "=" last argument to do a store.
|
|
* loc2c-test.c: New file.
* Makefile.am (stpd_LDADD): Add loc2c-test.
(loc2c_test_SOURCES, loc2c_test_LDADD): New variables.
* Makefile.in, aclocal.m4: Regenerated.
|