| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* loc2c.c (translate): DW_OP_shr is unsigned, DW_OP_shra is signed.
|
|
|
|
| |
* loc2c.c (translate): Use signed division for DW_OP_div.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 73b5e9 "Make sure loc2c declare_noncontig_union for different locs
don't overlap", wasn't complete. It only took into account having a piece
becuase of a noncontiguous loc and a constant loc together. But pieces can
be nested deeper (newer gcc outputs multiple constant locations for one
piece on 32bit systems). This patch keeps track of the piece declaration
depth. Another approach could have been to have each sub-piece in its own
local scope, but keeping track of the depth and naming the temporary unions
distinct fitted the current code better. It currently only supports a depth
of 10. An error will be emitted if a location construct needs more than 10
pieces to be assembled.
* loc2c.c (declare_noncontig_union): Take depth argument. Always use the
same name for the union (u_pieces<depth>).
(translate_base_fetch): Take depth argument. Use it to calculate union
names.
(translate_base_store): Likewise.
(c_translate_fetch): Pass in depth zero.
(c_translate_store): Likewise.
(c_translate_pointer): Likewise.
(c_translate_pointer_store): Likewise.
|
| |
|
|
|
|
|
|
| |
* loc2c.c (stack_slot_type): New function.
(translate): Use it in place of STACK_TYPE and UTYPE macros.
(emit_loc_address, emit_loc_value, c_emit_location): Likewise.
|
|
|
|
|
| |
* loc2c.c (alloc_location, location_from_address, c_translate_constant):
Initialize ops and nops fields.
|
|
|
|
| |
* loc2c.c (translate): Reset stack state tracking after finishing each piece.
|
| |
|
|
|
|
|
|
|
| |
* loc2c.c (declare_noncontig_union): Name union u_pieces for
loc_noncontiguous or u_const for loc_constant.
(translate_base_store): Use u_pieces for loc_noncontiguous.
(translate_base_fetch): Likewise or u_const for loc_constant.
|
|
|
|
|
| |
* loc2c.c (loc_constant): Add offset to size after creating piece in
loc_constant loop.
|
|
|
|
|
|
| |
* loc2c.c (c_translate_constant): New function.
* loc2c.h: Declare it.
* loc2c-test.c (main): Use it for DW_AT_const_value cases.
|
|
|
|
| |
* loc2c.c (declare_noncontig_union): Only open struct when loc_noncontiguous.
|
|
|
|
|
| |
* loc2c.c [!_ELFUTILS_PREREQ (0,142)]
(DW_OP_stack_value, DW_OP_implicit_value): Define as macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* loc2c.c (struct location): Add loc_constant variant,
with constant_block field.
(translate): Handle DW_OP_implicit_value to make loc_constant pieces.
(c_translate_location): Handle loc_constant.
(discontiguify): Likewise.
(location_relative): Likewise.
(declare_noncontig_union): Likewise.
(translate_base_fetch): Likewise.
(c_translate_array): Likewise.
(c_emit_location): Likewise.
(emit_base_store): Refuse loc_constant.
(c_translate_addressof): Likewise.
|
|\
| |
| |
| |
| | |
* loc2c.c (translate): Fix sense of _ELFUTILS_PREREQ test and clean up stub
for DW_OP_implicit_value case, still not really implemented.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
* loc2c.c (translate): _ELFUTILS_PREREQ(0,143).
Clarify attr == NULL DIE message.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
Do the same workaround as loc2c-test.c does. Just treat a constant member
location offset as a DW_OP_plus_uconst and call c_translate_location for it.
Also Remove c_translate_add_offset.
* dwflpp.cxx (dwflpp::translate_location): Check elfutils version and only
do workaround for elfutils < 0.142.
* loc2c.h (c_translate_add_offset): Removed.
* loc2c.c (c_translate_add_offset): Likewise.
|
|
|
|
|
| |
* dwarf_wrappers.h, loc2c.c: Define DW_TAG_rvalue_reference_type=0x42
for older elfutils.
|
|
|
|
|
|
|
|
|
|
| |
* dwarf_wrappers.cxx (dwarf_type_name): Name class and reference types.
* dwflpp.cxx (dwflpp::iterate_over_globals): Capture class names.
(dwflpp::print_members): Permit classes, and dig into inheritance.
(dwflpp::find_struct_member): Ditto.
(dwflpp::translate_components): Handle classes and references.
(dwflpp::translate_final_fetch_or_store): Ditto.
* loc2c.c (c_translate_pointer): Treat references as simple pointers.
|
|
|
|
| |
* loc2c.c (array_stride): iterate DIEs past typedef/const/volatile
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.cxx (dwflpp::translate_components): let pointers get treated
the same as arrays, and add a final DIE dereference for array access.
* loc2c.c (c_translate_array): tolerate pointer types
* testsuite/systemtap.base/pointer_array.*: new test
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will iterate over the module and its CUs looking for the type
definition, and then work with loc2c to dereference the pointer.
* loc2c.c (c_translate_argument): Create a dummy location to start
the address computation from a function parameter.
* translate.cxx (base_query, dwarf_query): Move some members from
base_query to dwarf_query, so the former can be more generic. Also
add a constructor using a module string instead of probe parameters.
(dwflpp::query_modules, dwflpp::iterate_over_modules): Use a generic
base_query instead of a dwarf_query.
(dwarf_cast_query): New query to scan the modules and CUs for a
matching type definition, and then produce a code fragment to deref
each component.
(dwarf_cast_expanding_visitor): Tries to replace @casts with a function
call to the result of a dwarf_cast_query.
(dwflpp::declaration_resolve): Search by name instead of by die.
(dwflpp::translate_components): Use the incoming vardie as the first
type die, so we don't assume that attr_mem has a DW_AT_type already.
(dwflpp::literal_stmt_for_pointer): Construct a C fragment that starts
with a pointer argument (THIS->pointer) and dereferences each member
component from there.
(*_derived_probe::register_patterns): Take a session parameter instead
of a match_node, so we can manipulate session-wide data.
(dwarf_derived_probe::register_patterns): Add a session code filter to
expand @casts with a dwarf_cast_expanding_visitor.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-03-03 Frank Ch. Eigler <fche@elastic.org>
PR5516
* elaborate.cxx (symbol_fetcher, dead_assignment_remover):
Support unresolved $target lvalues. Propagate pretty error
messages.
* staptree.cxx (varuse_collecting_visitor target_symbol): Ditto.
* staptree.h: Corresponding decl.
* loc2c.c: c_translate_pointer_store: New function.
* loc2c.h: Corresponding decl.
* tapsets.cxx (dwflpp::translate_final_fetch_or_store): Call it
for $target pointer assignments.
2008-03-03 Frank Ch. Eigler <fche@elastic.org>
PR5516
* buildok/twentynine.stp: New test.
|
|
|
|
|
|
|
|
|
|
|
| |
PR 5101
* loc2c.c (struct location): Replace regno union member with struct
member reg, fields regno and offset.
(translate): Update uses.
(emit_base_fetch, emit_base_store, emit_loc_register): Likewise.
Fail if reg.offset is not zero.
(location_relative): Handle DW_OP_plus_uconst relative to loc_register.
(c_translate_array): Handle array index into loc_register.
|
|
|
|
|
|
|
| |
PR 3331 cont'd.
* loc2c.c (base_encoding): Tolerate absenece of DW_AT_encoding.
(c_translate_pointer): Don't even try to find signedness, assume
unsigned.
|
|
|
|
|
|
|
|
|
| |
PR 3331 cont'd.
* loc2c.c (emit_base_fetch): Emit size/signedness cast
slightly differently for every low-level fetch.
(translate_base_fetch, c_translate_fetch, c_translate_store,
c_translate_pointer): Fetch & pass the $target signedness.
(base_encoding): Follow typedefs etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3331.
* loc2c.c (emit_base_fetch): Emit size/signedness cast
for every low-level fetch.
(translate_base_fetch, c_translate_fetch, c_translate_store,
c_translate_pointer): Fetch & pass the $target signedness.
2007-06-05 Frank Ch. Eigler <fche@elastic.org>
PR 3331.
* systemtap.base/deref2.*: New test, disabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1570
* NEWS: Document probe handler language change re. inline functions.
* stapprobes.5.in: Likewise.
* tapsets.cxx: Many changes to simplify caches and implement new
handling of inline functions, removed of stubs for future probes.
* elaborate.cxx (derived_probe printsig_nested): New function.
* elaborate.h: Declare it.
* main.cxx (usage): Clarify "-r" meaning.
(main): Tweak related "-p 4" message.
2007-03-30 Frank Ch. Eigler <fche@elastic.org>
PR 1570.
* memory.stp, scheduler.stp, signal.stp, LKET/signal.stp: Adapt
to .inline -> .function change.
2007-03-30 Frank Ch. Eigler <fche@elastic.org>
PR 1570
* */*.stp: Adapt to .inline -> .function change.
* lib/stap_run.exp, stap_run2.exp, stap_run_binary.exp: Shorten
pass/fail dejagnu log lines.
* systemtap.syscall/sys.stp, test.tcl: Make slightly more
compatible and failure more verbose.
|
|
|
|
|
|
|
|
|
| |
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.c (array_stride): stride_size -> byte_stride
|
|
|
|
| |
* loc2c.c (location_from_address): Diagnose null FB_ATTR specially.
|
|
|
|
| |
* loc2c.c (location_from_address): Fix function name in error message.
|
| |
|
|
|
|
| |
* loc2c.c (location_from_address): Tolerate errors with NULL *input.
|
|
|
|
|
|
|
|
|
|
|
| |
* loc2c.c (struct location): Move frame_base member out of the union.
(alloc_location): Initialize it.
(new_synthetic_loc, translate, location_from_address): Update uses.
(emit_loc_value): Don't handle frame_base here.
(c_emit_location): Do it here instead.
(translate): Track USED_DEREF separately for each piece.
Use a temporary struct when allocating a new piece, letting
a pending loc_address piece finish up first.
|
|
|
|
| |
* loc2c.c (translate): Initialize LOC->address.used_deref at start.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Update libdw test to require 0.116 with dwarf_diecu.
* configure: Regenerated.
* systemtap.spec.in: Update elfutils requirement to 0.116.
* loc2c.c: Dwarf_Loc -> Dwarf_Op.
(location_from_address): dwarf_addrloclists -> dwarf_getlocation_addr.
(c_translate_location): Likewise.
(max_fetch_size): Remove fakeo dwarf_diecu macro.
* tapsets.cxx (dwflpp): Dwarf_Func -> Dwarf_Die;
dwarf_func_name -> dwarf_diename;
dwarf_func_entrypc -> dwarf_entrypc;
dwarf_func_file, dwarf_func_line -> dwarf_decl_file, dwarf_decl_line.
|
|
|
|
|
| |
* loc2c.c (max_fetch_size): Default to host pointer size,
while still waiting for new libdw entrypoint.
|
|
|
|
|
|
|
| |
PR 1271 cont'd.
* testsuite/buildok/twentytwo.stp: New file.
* testsuite/buildok/twentythree.stp: New file.
* loc2c.c (discontiguify): Add missing ; in output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1271.
* loc2c.c (translate): Set LOC->byte_size in loc_noncontiguous result.
(struct location.address): New member `declare'.
(new_synthetic_loc, translate): Initialize it.
(struct location.type): Add loc_fragment, loc_decl to enum.
(c_emit_location): Emit unadorned code for loc_fragment.
(discontiguify): New function.
(c_translate_fetch, c_translate_store): Call it.
(get_bitfield): New function, broken out of ....
(emit_bitfield): ... here. Function removed.
(declare_noncontig_union): New function.
(max_fetch_size): New function.
(translate_base_fetch): New function, broken out of ...
(c_translate_fetch): ... here. Call it.
Use get_bitfield here, not emit_bitfield.
(c_translate_store): Likewise.
(c_emit_location): Emit declarations first.
* loc2c.c (dwarf_diename_integrate): Function removed.
Change all callers to use dwarf_diename.
2005-10-13 Roland McGrath <roland@redhat.com>
* loc2c.c (c_emit_location): Use final location's used_deref flag too.
* loc2c.c (translate): Pass LOC to alloc_location, not INPUT.
|
|
|
|
|
|
|
| |
PR 1257
* Makefile.am (AM_CFLAGS): Add -fexceptions.
* loc2c.c (c_translate_location): Invoke *fail properly.
* Makefile.in: Regenerated.
|
|
|
|
|
|
|
|
|
| |
PR systemtap/1258
* tapsets.cxx (dwflpp::literal_stmt_for_local):
Support DW_TAG_enumeration_type tag as synonymous with
DW_TAG_base_type.
* loc2c.c (base_byte_size): Likewise.
* testsuite/buildok/seven.stp: Adjust to work on UP kernels.
|