summaryrefslogtreecommitdiffstats
path: root/loc2c.c
Commit message (Collapse)AuthorAgeFilesLines
* Update a few more files with Vim modelinesJosh Stone2009-02-031-0/+2
|
* PR5516: assignment to $pointersfche2008-03-031-0/+31
| | | | | | | | | | | | | | | | | | | | | 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.
* 2007-10-15 Roland McGrath <roland@redhat.com>roland2007-10-151-13/+34
| | | | | | | | | | | 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.
* 2007-06-15 Frank Ch. Eigler <fche@elastic.org>fche2007-06-151-9/+7
| | | | | | | 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.
* 2007-06-14 Frank Ch. Eigler <fche@elastic.org>fche2007-06-141-11/+40
| | | | | | | | | 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.
* 2007-06-05 Frank Ch. Eigler <fche@redhat.com>fche2007-06-061-15/+38
| | | | | | | | | | | | | 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.
* 2007-03-30 Frank Ch. Eigler <fche@redhat.com>fche2007-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2007-02-19 Frank Ch. Eigler <fche@elastic.org>fche2007-02-191-6/+12
| | | | | | | | | 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.
* 2006-04-04 Roland McGrath <roland@redhat.com>roland2006-04-051-2/+2
| | | | * loc2c.c (array_stride): stride_size -> byte_stride
* 2005-11-27 Roland McGrath <roland@redhat.com>roland2005-11-281-0/+3
| | | | * loc2c.c (location_from_address): Diagnose null FB_ATTR specially.
* 2005-11-27 Roland McGrath <roland@redhat.com>roland2005-11-281-1/+1
| | | | * loc2c.c (location_from_address): Fix function name in error message.
* (location_from_address): w/s tweakroland2005-11-281-1/+1
|
* 2005-11-27 Frank Ch. Eigler <fche@elastic.org>fche2005-11-281-3/+3
| | | | * loc2c.c (location_from_address): Tolerate errors with NULL *input.
* 2005-11-26 Roland McGrath <roland@redhat.com>roland2005-11-271-17/+32
| | | | | | | | | | | * 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.
* 2005-11-26 Roland McGrath <roland@redhat.com>roland2005-11-271-0/+1
| | | | * loc2c.c (translate): Initialize LOC->address.used_deref at start.
* 2005-11-21 Roland McGrath <roland@redhat.com>roland2005-11-221-27/+5
| | | | | | | | | | * 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-31 Roland McGrath <roland@redhat.com>roland2005-10-311-11/+10
| | | | | | | | | | | | | | * 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.
* 2005-10-26 Roland McGrath <roland@redhat.com>roland2005-10-261-1/+1
| | | | | * loc2c.c (max_fetch_size): Default to host pointer size, while still waiting for new libdw entrypoint.
* 2005-10-25 Roland McGrath <roland@redhat.com>roland2005-10-261-1/+1
| | | | | | | PR 1271 cont'd. * testsuite/buildok/twentytwo.stp: New file. * testsuite/buildok/twentythree.stp: New file. * loc2c.c (discontiguify): Add missing ; in output.
* 2005-10-14 Roland McGrath <roland@redhat.com>roland2005-10-141-133/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2005-09-14 Frank Ch. Eigler <fche@elastic.org>fche2005-09-141-3/+3
| | | | | | | PR 1257 * Makefile.am (AM_CFLAGS): Add -fexceptions. * loc2c.c (c_translate_location): Invoke *fail properly. * Makefile.in: Regenerated.
* 2005-08-31 Graydon Hoare <graydon@redhat.com>graydon2005-09-011-1/+2
| | | | | | | | | 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.
* 2005-08-18 Roland McGrath <roland@redhat.com>roland2005-08-181-1/+1
| | | | | | | * 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-6/+25
| | | | | | | | | | | | | | | | * 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-60/+86
| | | | | | | | | | | | | 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-14/+11
| | | | | | | | | | | | | * 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 (base_byte_size): Add assert on expected DIE tag. (c_translate_array, c_translate_pointer): Likewise. * loc2c.h: Amend comments to explicitly state type DIE tags expected. * loc2c.c: #include "loc2c.h".
* 2005-08-10 Roland McGrath <roland@redhat.com>roland2005-08-111-8/+113
| | | | | | | | | | | * 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.c (c_translate_location): Increment INDENT. (c_translate_pointer): Likewise. (emit_loc_value): Increment INDENT after emit_header.
* 2005-08-02 Roland McGrath <roland@redhat.com>roland2005-08-031-7/+9
| | | | | | * loc2c.c (emit_bitfield): Return bool, value from emit_base_fetch. (c_translate_fetch): Update caller. (c_translate_pointer): Never ignore emit_base_fetch return value.
* 2005-08-02 Frank Ch. Eigler <fche@elastic.org>fche2005-08-021-0/+2
| | | | | | | | | * loc2.c (emit_loc_address): Emit interleaved declaration into its own nested { } block. * tapsets.cxx (literal_stmt_for_local): Emit deref_fault block unconditionally. * tapset/builtin_hexstring.stp: New builtin. * testsuite/buildok/six.stp: New test.
* 2005-07-29 Roland McGrath <roland@redhat.com>roland2005-07-291-1/+1
| | | | | | | | | * configure.ac: Add AM_CONDITIONAL definition of HAVE_LIBDW. * Makefile.am [HAVE_LIBDW] (stap_SOURCES_libdw): New variable. (stap_SOURCES): Use it, moving loc2c.c there. * configure, config.in: Regenerated. * tapsets.cxx: <libdw.h> -> <elfutils/libdw.h> * loc2c.c, loc2c.h: Likewise.
* 2005-07-28 Graydon Hoare <graydon@redhat.com>graydon2005-07-291-0/+1398
* elaborate.cxx (derived_probe::derived_probe): Accept NULL probe. * staptree.cxx (provide, require): Move from here... * staptree.h: to here, and virtualize deep-copy methods. * translate.cxx (c_unparser::emit_common_header): Include loc2c-runtime.h * tapsets.cxx (dwflpp::iterate_over_modules): Use new, faster getmodules loop. (dwflpp::literal_stmt_for_local): New method, call loc2c. (var_expanding_copy_visitor): New struct which expands $-vars. (dwarf_derived_probe): Rebuild this->body using var expander. (query_function): Refactor logic a bit for speed. * loc2c.{c,h}: Copies (with minor changes) of Roland's work from elfutils CVS. * Makefile.am (AM_CFLAGS): Set to elfutils-style. (stap_SOURCES): Add loc2c.c. * Makefile.in: Regenerate. 2005-07-28 Graydon Hoare <graydon@redhat.com> * loc2c-runtime.h: New file from elfutils CVS.