| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* runtime/loc2c-runtime.h (store_deref_string): New.
* tapset/conversions-guru.stp (set_kernel_*): New guru functions.
|
|
|
|
|
|
| |
* runtime/loc2c-runtime.h (usr_i386): Fix si/di ordering. Add ip.
(usr_x86_64): Add rip.
(u_*_register): Use kernel standard ARRAY_SIZE() instead of S().
|
|
|
|
|
| |
* runtime/loc2c-runtime.h: Remove k_ vs u_[store_]deref; share instead.
* tapsets.cxx: Remove k_ vs u_ redirection for *deref().
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* runtime/loc2c-runtime.h (fetch_register, store_register):
forked into k_ (kernel) and u_ (user) varieties. Implement
i386 and x86_64 in terms of regset.h; fall back to k_* for
other architectures.
* tapsets.cxx: (*::visit_target_symbol): Emit macros to map
loc2c's fetch/store_register to loc2c-runtime's k_ or u_ as
appopriate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-09-03 Dave Brolley <brolley@redhat.com>
* runtime/addr-map.c (lookup_addr_aux): Now takes size argument.
Consider the size when looking for overlapping range with the map
entries.
(lookup_bad_addr): Now takes size argument. Disallow kernel space access
when STP_PRIVILEGED is not defined. Pass size to lookup_addr_aux.
<asm/processor.h>: #include it when STP_PRIVILEGED is not defined.
(add_bad_addr_entry): Supply a size of 1 to calls to lookup_addr_aux.
* runtime/loc2c-runtime.h (kread): Pass sizeof (*(ptr)) to
lookup_bad_addr.
(kwrite): Likewise.
(deref): Pass size to lookup_bad_addr.
(store_deref): Likewise.
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (dwflpp::translate_components): Eliminate the extra
die-dereference at the end of the loop (a regression from @casts).
* runtime/loc2c-runtime.h (store_bitfield): Use the target as the
representative type, since the base is always int64_t. Also be a
bit more aggressive with masking and parentheses.
* testsuite/systemtap.base/bitfield.*: New test for R/W bitfields.
|
|
|
|
|
|
|
|
| |
* NEWS: Note this change.
* hash.cxx (find_script_hash): Add s.skip_badvars into hash.
* translate.cxx (translate_pass): Emit STP_SKIP_BADVARS.
* runtime/loc2c-runtime.h (DEREF_FAULT, STORE_DEREF_FAULT): Provide
dummy implementation if STP_SKIP_BADVARS.
|
|
|
|
|
|
|
|
|
| |
In some configurations, GCC was warning about a possible use of _v in
the deref macros. I could not reproduce the error, but the only case
where _v is not written is if lookup_bad_addr rejects the address, in
which case we will hit DEREF_FAULT and _v won't be used.
Now we're priming _v=0 anyway, so GCC has no right to complain...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With most of the implementations, kread/kwrite call deref/store_deref,
and so it makes sense to have lookup_bad_addr in the latter as an
underlying address check.
However, in the STAPCONF_PROBE_KERNEL case that uses probe_kernel_read
and probe_kernel_write, the roles are reversed, so lookup_bad_addr needs
to be in kread/kwrite.
Also note that __deref_bad and __store_deref_bad should only be used in
cases that can be determined at compile time. These turn into invalid
symbols which prevent the module from loading. (They might be better
replaced with compile-time assertions.)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
For now, the autoconf for the new code is disabled, because it shows
poorer performance than our existing dereferencing functions. This is
probably because ours get inlined and optimized. The code is being
committed so that we may re-evaluate its usefulness in the future.
This addresses bugzilla 6432.
|
|
|
|
|
|
|
|
|
|
|
| |
PR 6028
* translate.cxx (c_unparser::emit_common_header): Add unwaddr for
caching unwound address.
* tapsets.cxx (common_probe_entryfn_prologue): Clear unwaddr.
* loc2c-runtime.h (fetch_register): Call ia64_fetch_register with
the address of c->unwaddr.
* regs-ia64.c (ia64_fetch_register): Don't unwind stack if it has
already unwound stack in same probe.
|
|
|
|
|
|
|
|
| |
PR5189
* vsprintf.c (_stp_vsnprintf): Arguments for dynamic width and precision
are of type 'int' again.
* loc2c-runtime.h (deref_string): Copy the data only if dst is not NULL.
(deref_buffer): New macro.
|
|
|
|
| |
patch for x86/x86_64
|
|
|
|
|
|
|
| |
PR 5041
From <michael.gruener@linux.vnet.ibm.com>:
* loc2c-runtime.h (store_register): Add value as macro parameter where
missing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 4593
* translate.cxx (c_unparser::emit_common_header): Add an
error_buffer to the context to allow dynamic error messages.
* tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref
fill in last_error with a detailed message.
runtime/
* loc2c-runtime.h (deref, store_deref): Set an error message with
the pointer value and name into last_error, since it's hard to
determine the details once you've already jumped to deref_fault.
tapset/
* conversions.stp (kernel_string, kernel_long, kernel_int,
kernel_short, kernel_char, user_string_warn): Use the
CONTEXT->error_buffer to create an error message instead of a static
local array.
|
|
|
|
|
|
|
| |
From Quentin Barnes.
* loc2c-runtime.h: Latest arm marcos.
* stack-arm.c (__stp_stack_print): Add a cast.
* regs.c (_stp_ret_addr): Define for arm.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch from Quentin Barnes.
* arith.c: Add arm support for 64-bit division.
* copy.c: Enable arm support.
* loc2c-runtime.h: Ditto.
* regs.[ch]: Ditto.
* stack.c: Include stack-arm.c.
* stack-arm.c: New file.
* time.c (_stp_gettimeofday_ns): hack
for arm. See PR 4569.
|
|
|
|
| |
byte writes.
|
|
|
|
| |
s390 kernels that do not already have it defined.
|
|
|
|
| |
macro eliminating the need for both a s390 and s390x version of these functions. This alos fixed an aligment problem building the the exception table.
|
| |
|
|
|
|
|
|
|
|
| |
runtime/
* loc2c-runtime.h (kread): Let it work with const types.
testsuite/
* systemtap.base/deref.stp: Test kread with const sources.
|
|
|
|
| |
* loc2c-runtime.h (store_deref): Use "Zr" constraint for 64-bit case.
|
|
|
|
|
|
|
|
|
| |
runtime/
* loc2c-runtime.h (kread, kwrite): Tweaks to work better with
reading and writing pointer values.
testsuite/
* systemtap.base/deref.stp: Rewrite test, and now also check the ability
to read/write pointers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3079
runtime/
* loc2c-runtime.h (kread, kwrite): New macros to safely read/write
values from kernel pointers. This includes a workaround for 64-bit
numbers on i386 platforms.
testsuite/
* systemtap.base/deref.stp: Use the new kread macro that should work
fine with 64-bit numbers on i386 platforms. Also expand the test to
include writes with kwrite.
* systemtap.base/deref.exp: Remove the setup_kfail.
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3079
* loc2c-runtime.h (deref, store_deref): Fork x86 and x86-64
variants. Remove dysfunctional 64-bit ops from x86.
2006-12-18 Frank Ch. Eigler <fche@elastic.org>
* vfs.stp (ppos_pos): Protect contents with deref(), though
this blocks operation on i686 due to bug #3079.
|
| |
|
|
|
|
| |
* loc2c-runtime.h: Add some comments.
|
|
|
|
|
|
| |
* loc2c-runtime.h (deref_string): resolved gcc "warning:
assignment makes integer from pointer without a cast" when
using a pointer as the source address.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Systemtap should now be able to build on Ia64.
Includes supports for - function probes, return probes,
function parameter access and dumping stack backtrace.
Added by Anil S Keshavamurthy <Anil.s.keshavamurthy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2005-09-30 Graydon Hoare <graydon@redhat.com>
PR 1131.
* tapsets.cxx (dwflpp::find_variable_and_frame_base)
(dwflpp::translate_components)
(dwflpp::resolve_unqualified_inner_typedie)
(dwflpp::translate_final_fetch_or_store): New functions.
(dwflpp::literal_stmt_for_local): Factor a bit.
(variable_flavour_calculating_visitor::visit_target_symbol):
Don't fault on lvalue, just collect an extra char.
(var_expanding_copy_visitor::target_symbol_setter_functioncalls):
New member.
(var_expanding_copy_visitor::visit_assignment): New method.
(var_expanding_copy_visitor::visit_target_symbol): Permit lvalues.
[runtime/ChangeLog]
2005-09-30 Graydon Hoare <graydon@redhat.com>
* loc2c-runtime.h (_put_user_asm): Fix bracket-matching.
|
|
|
|
| |
* loc2c-runtime.h [__powerpc__] (store_register): Add #undef.
|
|
|
|
|
|
|
| |
* loc2c-runtime.h (fetch_register, store_register): Rewritten to pass
REGS to dwarf_register_<N> as a macro argument.
[__i386__, __x86_64__]: Update dwarf_register_* macros.
[__i386__] (dwarf_register_4): Define special case for stack pointer.
|
| |
|
|
|
|
| |
* loc2c-runtime.h (deref_string): Rewritten using deref.
|
| |
|
| |
|
|
|
|
| |
* loc2c-runtime.h (deref_string): New macro.
|
|
|
|
|
| |
* loc2c-runtime.h (store_bitfield): Fix argument use.
(store_deref): New macro (three flavors).
|
|
* 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.
|