fche [Mon, 10 Oct 2005 17:06:57 +0000 (17:06 +0000)]
2005-10-10 Frank Ch. Eigler <fche@elastic.org>
PR 1456.
* translate.cxx (c_unparser_assignment): Rename "pre" field to "post",
add blurb to clarify polarity.
(visit_pre/post_crement): Flip passed flag value.
kevinrs [Fri, 7 Oct 2005 17:54:26 +0000 (17:54 +0000)]
* tapset/system_calls.stp: All 281 syscalls *prototyped*. They
are still untested. Many of the aliases useability are contin-
gent upon resolution of namely: bz #1295 & bz #1382.
fche [Thu, 6 Oct 2005 16:33:48 +0000 (16:33 +0000)]
2005-10-06 Frank Ch. Eigler <fche@elastic.org>
PR 1332.
* translate.cxx (emit_symbol_data): New function to transcribe
a processed address->symbol lookup table, based upon /proc/kallsyms.
2005-10-06 Frank Ch. Eigler <fche@elastic.org>
PR 1332.
* sym.h: New file to declare explicit symbol table struct.
* runtime.h (_stp_kallsyms_lookup_tabled): Use it if available.
* sym.c (_stp_symbol_sprint): HAS_LOOKUP mooted.
graydon [Wed, 5 Oct 2005 00:43:14 +0000 (00:43 +0000)]
2005-10-04 Graydon Hoare <graydon@redhat.com>
PR 1131.
* tapsets.cxx
(target_variable_flavour_calculating_visitor::visit_target_symbol)
(var_expanding_copy_visitor::visit_target_symbol):
Require guru mode for writing to target vars.
* testsuite/buildok/twenty.stp: Test writing to target vars.
fche [Sat, 1 Oct 2005 17:25:24 +0000 (17:25 +0000)]
2005-10-01 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx (get_module_dwarf): Add "required" parameter, which
throws an exception if debuginfo is not found.
(focus_on_module_containing_global_address): Tolerate miss.
(query_kernel_exists): New function to test for "kernel" module in
dwfl_getmodules() result set.
(dwarf_builder::build): Call it if appropriate.
graydon [Sat, 1 Oct 2005 00:10:52 +0000 (00:10 +0000)]
[ChangeLog]
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.
mask_string.stp
function uses different algorithm to build symbolic
flag string from int. Now uses locals to do so. SMP
safe.
string.stp
add isinstr(s1,s2) - return 1 if s1 contains s2 else
return 0
tapset/mask_string.stp:
wrote a few aux functions that can be used by tapsets to derive
a bitmask symbolic string from a given number
tapset/string.stp:
strlen: Returns the length of the string argument
substr: Returns a substring starting at start/ending at stop
stapfuncs.5.in:
Added a STRING category with aforementioned functions
tapset/system_calls.stp
Exported more variable for more system calls
PR 1368.
* translate.cxx (emit_common_header): Move some MAX* definitions out ...
(translate_pass): ... to here. Fix probe_start API impedance mismatch.
(emit_module_init, exit): Tolerate registration errors, such as absence
of kretprobes support.
* map.c (_stp_cmp): New comparison function for sorts.
(_stp_swap): New swap function for bubble sort.
(_stp_map_sortn): New function.
(_stp_map_sort): New function.
(_stp_map_printn): New function.
(_stp_map_print): Convert to a macro.
PR 1306
* tapsets.cxx (dwflpp::has_single_line_record): New function.
(dwflpp::iterate_over_srcfile_lines): Throw when user requests
single statement line with multiple records (and provide advice).
(query_cu): Adjust call to match.
(query_srcfile_line): Fix indentation.
* arith.c (_stp_div64): Check for division by 0 or -1 first.
This simplifies things and removes the possibility of x86_64
trying LLONG_MIN/-1 and faulting.
(_stp_mod64): Ditto.
* Makefile.am, runtest.sh: Use a "testresuilt/" directory in build
tree rather than overloading "testsuite/".
* TODO: Removed obsoleted file.
* Makefile.in: Regenerated.
* stat-common.c (_stp_stat_print_valtype): Use _stp_div64().
* arith.c (_stp_div64): Check error before writing to it.
Remove check against 32-bit LONG_MIN and -1. That only
applies to 64-bit.
(_stp_mod64): Ditto.
* tapset/context.stp: Add function target().
* stapfuncs.5.in (target): Document it.
* elaborate.h (struct systemtap_session): Add cmd and target_pid to
the struct.
* main.cxx (usage): Add secriptions of "-c" and "-x" options.
(main): Set s.cmd and s.target_pid.
* buildrun.cxx (stringify): Copy this utility func here too.
(run_pass): Add new options to set cmd and pid to the stpd
command line.
* librelay.c: Remove all USE_PROCFS ifdefs.
(sig_usr): Signal handler for SIGUSR1.
(start_cmd): New function to handle "-c" option, forks()
off a new process then waits for SIGUSR1 to exec it.
(init_stp): Call start_cmd().
(stp_main_loop): Set a signal handler for SIGCHLD.
* stpd.c (main): Add "-t" and "-c" options.
(usage): Update with new options.
PR 1289
* translate.cxx (lex_cast_qstring): Correct "cast" of object
to string containing more than one word.
* tapset.cxx (lex_cast_qstring): Ditto.
(dwarf_derived_module::emit_probe_entries): Emit and use
a generic fault_handler.
PR 1172.
* staptree.h, staptree.cxx: Make all ::print*(), operator<<
functions take const staptree objects.
(literal_string::print): \-prefix double-quotes.
* translate.cxx (emit_common_header): Add context probe_point field.
Switch to atomic_t busy flags.
(emit_module_exit): Use atomic operations for busy flag.
(visit_*): Use lex_cast_qstring for last_stmt strings.
* tapsets.cxx (lex_cast_quoted): \-prefix double-quotes too.
(*::emit_probe_entries): Populate probe_point. Use atomic operations
for busy flag.
* tapset/context.stp (pp): New function.
* stapfuncs.5.in: Document it.
* testsuite/buildok/context_test.stp: Test it.