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.
* translate.cxx (varlock): Use trylock only for write locks.
(translate_pass): Remove read_trylock macro hack.
(visit_foreach_loop): Remove protective read lock, until PR 1275.
(visit_*): Added many more "last_stmt"-setting expressions in the
output, to improve last_error message locality.
* translate.cxx (emit_probe): Add a call to _stp_print_flush
at the end of each probe.
(translate_pass): Define STP_NUM_STRINGS to be 1 for
a scratch string. Include current.c and stack.c. Don't
define KALLSYMS_LOOKUP_NAME or KALLSYMS_LOOKUP. Remove
references to next_fmt() and stp_dbug().
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.
fche [Wed, 31 Aug 2005 19:29:55 +0000 (19:29 +0000)]
2005-08-31 Frank Ch. Eigler <fche@redhat.com>
* translate.cxx (visit_array_in, visit_arrayindex): Use write locks
even for array reads, until PR 1275.
(translate_pass): Add read_trylock -> write_trylock escalation.
hunt [Wed, 31 Aug 2005 18:24:26 +0000 (18:24 +0000)]
2005-08-31 Martin Hunt <hunt@redhat.com>
* sym.c (_stp_kallsyms_lookup): Moved to runtime.h.
* stack.c (_stp_kta): Moved to runtime.h.
* runtime.h (init_module): Initialize _stp_kallsyms_lookup
and _stp_kta.
* probes.c (_stp_lookup_name): Replaced by kallsyms_lookup_name().
roland [Wed, 31 Aug 2005 03:14:16 +0000 (03:14 +0000)]
2005-08-30 Roland McGrath <roland@redhat.com>
* 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.
graydon [Wed, 31 Aug 2005 03:05:39 +0000 (03:05 +0000)]
2005-08-30 Graydon Hoare <graydon@redhat.com>
* tapsets.cxx (dwflpp::literal_stmt_for_local): Handle dwarf
pointer-to-1-byte-means-char case (found in PR 1187)
* parse.cxx (parse_symbol): Eliminate use of "." from target
symbol parser, conflicting with string concatenation operator.
* staptree.h (target_symbol::component_type) Eliminate
comp_struct_pointer_member, since . and -> are considered the
same now.
* staptree.cxx (target_symbol::print): Likewise.
* testsuite/buildok/seventeen.stp: Test solution on PR 1191.
* testsuite/buildok/six.stp: Test working portion of PR 1155.
* testsuite/semko/nineteen.stp: Unresolved portion of PR 1155.
fche [Tue, 30 Aug 2005 01:54:44 +0000 (01:54 +0000)]
2005-08-29 Frank Ch. Eigler <fche@redhat.com>
* stapprobes.5.in, stapfuncs.5.in, stapex.5.in: New man pages.
* stap.1.in: Moved some content out.
* Makefile.am (man_MANS): Add new man pages.
* configure.ac (AC_CONFIG_FILES): Add them.
* systemtap.spec.in: Package them.
* Makefile.in, configure: Regenerated.
* buildrun.cxx (run_pass): Pass "-r" to stpd.
* translate.cxx (emit_common_header): Wrap try/catch around
variable decls, to improve exception particularity.
(visit_literal_number): Emit as unsigned literal, which is
actually a subtle correctness issue.
fche [Sun, 28 Aug 2005 15:21:00 +0000 (15:21 +0000)]
2005-08-28 Frank Ch. Eigler <fche@redhat.com>
* translate.cxx (visit_target): Make target variable exceptions
more informative.
(literal_stmt_for_local): Improve bad-type exception message.
* translate.cxx (emit_module_init): Include probe point in comments.
graydon [Fri, 26 Aug 2005 19:41:31 +0000 (19:41 +0000)]
2005-08-26 Graydon Hoare <graydon@redhat.com>
* parse.cxx (scan): Preserve basic C-ish escapes.
* translate.cxx (c_tmpcounter::declaring): New flag.
(c_tmpcounter::declare_or_init): New helper method.
(c_tmpcounter::visit_*): Use declare_or_init.
(c_unparser::emit_function): Run a tmpcounter to initialize tmps.
(c_unparser::emit_probe): Likewise.
(c_unparser::c_strcpy): Use strlcpy.
(c_unparser::c_strcat): Use strlcat.