summaryrefslogtreecommitdiffstats
path: root/loc2c-test.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix PC arithmetic for CFI in loc2c-test.Roland McGrath2010-01-261-2/+2
| | | | * loc2c-test.c (main): Correctly bias PC passed to dwarf_cfi_addrframe.
* Report experssion stack slot use back from loc2c.Roland McGrath2009-10-141-2/+5
|
* Support DW_AT_const_value cases in loc2c and loc2c-test.Roland McGrath2009-09-241-14/+22
| | | | | | * loc2c.c (c_translate_constant): New function. * loc2c.h: Declare it. * loc2c-test.c (main): Use it for DW_AT_const_value cases.
* PR10417 Pass around attributes for supporting DW_OP_{implicit,stack}_value.Mark Wielaard2009-09-171-3/+5
| | | | | | | | | | | | | | | | | 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.
* Handle DW_TAG_reference_type in loc2c-test.Roland McGrath2009-09-161-0/+1
| | | | * loc2c-test.c (handle_variable): Handle DW_TAG_reference_type.
* Clean up loc2c-test workaround for constant DW_AT_data_member_location.Roland McGrath2009-09-161-27/+17
| | | | | | * 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.
* PR10533 inlined vars are not always found (lo2c-test off-by-one).Mark Wielaard2009-08-181-1/+1
| | | | | * loc2c-test.c (handle_variable): Set inner to zero after calling dwarf_getscopes_die(), for loop will increase inner.
* PR10533 loc2c doesn't resolve frame base correctly for inlined vars.Mark Wielaard2009-08-181-12/+28
| | | | | | | | | | 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.
* Print DIE offsets in loc2c-test scope dumps.Roland McGrath2009-08-181-1/+2
|
* Simplify _ELFUTILS_PREREQ checkingJosh Stone2009-08-101-2/+5
| | | | | | | 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.
* Zap dwarf_diename_integrateJosh Stone2009-08-071-15/+7
| | | | | | 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.
* Workaround cfa_nops not being needed on earlier elfutils.Mark Wielaard2009-07-231-1/+1
| | | | | * dwflpp.cxx (get_cfa_ops): Only define cfa_nops if _ELFUTILS_PREREQ(0,142). * loc2c-test.c (main): Likewise.
* Adjust to new elfutils dwarf_frame_cfa interface.Mark Wielaard2009-07-231-2/+3
| | | | | * dwflpp.cxx (get_cfa_ops): Call dwarf_frame_cfa with cfa_nops size_t. * loc2c-test.c (main): Likewise.
* Include elfutils/version.h in loc2c-test.Mark Wielaard2009-07-161-0/+3
| | | | * loc2c-test.c: Include elfutils/version.h when available.
* PR10388 Support DW_OP_call_frame_cfa.Mark Wielaard2009-07-151-4/+37
| | | | | | | | | | | | | | | | | | 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.
* Add support for constant struct member field offsets.Mark Wielaard2009-07-081-4/+29
| | | | | | | * 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.
* PR10348 Compilation failure with gcc 4.5 snapshot: switch jumps over vars.Mark Wielaard2009-07-071-3/+4
| | | | | | | * 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 resolve through const and volatile types.Mark Wielaard2009-06-241-1/+3
| | | | | * loc2c-test.c (handle_variable): Resolve through DW_TAG_const_type and DW_TAG_volatile_type typetags.
* Update a few more files with Vim modelinesJosh Stone2009-02-031-0/+2
|
* 2007-02-19 Frank Ch. Eigler <fche@elastic.org>fche2007-02-191-1/+2
| | | | | | | | | 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.
* 2005-12-11 Roland McGrath <roland@redhat.com>roland2005-12-121-1/+1
| | | | * loc2c-test.c (get_location): Fix function name in error message.
* 2005-11-26 Roland McGrath <roland@redhat.com>roland2005-11-271-0/+4
| | | | | * loc2c-test.c (main): Free SCOPES at end. (handle_variable): Free POOL at end.
* 2005-11-21 Roland McGrath <roland@redhat.com>roland2005-11-221-4/+38
| | | | | | | | | | * 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.
* 2005-10-14 Roland McGrath <roland@redhat.com>roland2005-10-141-2/+2
| | | | | * loc2c-test.c (handle_variable): Check for "=" before fetching DIE from ATTR_MEM.
* 2005-10-13 Roland McGrath <roland@redhat.com>roland2005-10-141-0/+2
| | | | * loc2c-test.c (fail): Print a newline after the error message.
* 2005-08-27 Roland McGrath <roland@redhat.com>roland2005-08-271-1/+51
| | | | | * loc2c-test.c (print_type): New function. (print_vars): Use it.
* 2005-08-27 Roland McGrath <roland@redhat.com>roland2005-08-271-24/+95
| | | | | * loc2c-test.c (paddr, print_vars): New functions. (main): If given no variable name argument, print out variables.
* 2005-08-24 Roland McGrath <roland@redhat.com>roland2005-08-251-0/+2
| | | | * loc2c-test.c (handle_variable): Iterate on const_type/volatile_type.
* 2005-08-18 Roland McGrath <roland@redhat.com>roland2005-08-181-6/+22
| | | | | | | * 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.
* 2005-08-18 Roland McGrath <roland@redhat.com>roland2005-08-181-2/+4
| | | | | | | | | | | | | | | | * 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.
* 2005-08-17 Roland McGrath <roland@redhat.com>roland2005-08-181-3/+17
| | | | | | | | | | | | | 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.
* 2005-08-17 Roland McGrath <roland@redhat.com>roland2005-08-181-2/+23
| | | | | | | | | * 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.
* 2005-08-10 Roland McGrath <roland@redhat.com>roland2005-08-111-4/+20
| | | | | | | | * 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.
* 2005-08-08 Roland McGrath <roland@redhat.com>roland2005-08-091-0/+271
* 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.