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.
fche [Wed, 24 Aug 2005 17:01:52 +0000 (17:01 +0000)]
2005-08-24 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx (*::emit_probe_entries): Treat NULL and "" last_errors
both as clean early returns, not errors.
* translate.cxx: Revamp last_error handling logic. Remove all
"goto out" paths from expression context.
(visit_statement): Handle last_error exit one nesting level at a time.
(visit_return_statement, visit_functioncall): Set/reset last_error="".
(c_tmpcounter::visit_for_loop): New routine.
(c_unparser::visit_foreach, visit_for_loop): Rewrite to properly
support continue/breaks, non-local exits, (foreach) locks.
(emit_global): Emit lock variable.
(varlock ctor, dtor): Lock/unlock global variable.
(varlock_w, varlock_r): New concrete subclasses. Update all users.
* tapset/builtin_logging.stp (exit): Don't set last_error.
* src/testsuite/buildok/sixteen.stp: New test.
* tapsets.cxx: Temporarily rolled back graydon's changes.
hunt [Wed, 24 Aug 2005 16:27:35 +0000 (16:27 +0000)]
2005-08-24 Martin Hunt <hunt@redhat.com>
* librelay.c (sigproc): Reestablish signal handler so
impatient people don't hit ^C twice and terminate the
program before it saves the data and removes the module.
Also print a message to stderr that it is exiting.
(stp_main_loop): Write OOB data (warnings, errors, etc)
to stderr instead of stdout.
* librelay.h: Write debug info to stderr.
* Makefile: add librelay.h to dependencies.
fche [Mon, 22 Aug 2005 19:14:35 +0000 (19:14 +0000)]
2005-08-22 Frank Ch. Eigler <fche@elastic.org>
PR systemtap/1134
* elaborate.h (module_fds): New member in systemtap_session.
* tapsets.cxx (dwarf_derived_probe ctor): Open /sys/module/$MOD/.text
for the duration of a systemtap session, to lock module in memory.
fche [Sun, 21 Aug 2005 12:11:41 +0000 (12:11 +0000)]
2005-08-21 Frank Ch. Eigler <fche@redhat.com>
PR systemtap/1195, systemtap/1193
* elaborate.cxx (alias_expansion_builder): Set new block token.
* parse.cxx (parse_symbol): Set new target_symbol token.
* runtest.sh: Store more pertinent failure data.
* tapsets.cxx (emit_probe_entries): Rewrite error-handling path.
* translate.cxx (emit_common_header): Goodbye errorcount, hello
last_error & last_stmt.
(c_unparser::visit_statement): New "header" for all other stmts.
(c_assignop, visit_binary_expression): Adapt to last_error.
* tapset/builtin_logging.stp: Adapt to last_error.
2005-08-21 Frank Ch. Eigler <fche@redhat.com>
* arith.c (*): Adapt to last_error context variable.
hunt [Fri, 19 Aug 2005 18:29:21 +0000 (18:29 +0000)]
2005-08-19 Martin Hunt <hunt@redhat.com>
* transport.c (_stp_cmd_handler): Remove. This was used by
stp-control.
* procfs.c (_stp_proc_write_cmd): Call schedule_work() instead
of running _stp_exit_handler immediately. Fixes a problem where
the module couldn't exit if all the output buffers were full.
Set .owner for the filesystem entries.
fche [Fri, 19 Aug 2005 15:55:39 +0000 (15:55 +0000)]
2005-08-19 Frank Ch. Eigler <fche@elastic.org>
* librelay.c (modpath): New global. Use it for insmod only.
* stpd.c (main): Set both modpath and modname, to support
modules specified by full path name.
roland [Thu, 18 Aug 2005 08:51:30 +0000 (08:51 +0000)]
2005-08-18 Roland McGrath <roland@redhat.com>
* 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.
roland [Thu, 18 Aug 2005 03:42:24 +0000 (03:42 +0000)]
2005-08-17 Roland McGrath <roland@redhat.com>
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'.
(c_translate_location): Take new args FAIL, FAIL_ARG.
* loc2c.h: Update declaration.
* 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.
roland [Thu, 18 Aug 2005 03:41:29 +0000 (03:41 +0000)]
2005-08-17 Roland McGrath <roland@redhat.com>
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.
fche [Tue, 16 Aug 2005 18:41:02 +0000 (18:41 +0000)]
2005-08-16 Frank Ch. Eigler <fche@elastic.org>
PR systemtap/1180
* tapsets.cxx (*): Add more verbose-predicatation to informative
messages. Correct more hex/dec ostream mismatches.
(query_function): Use entry/querypc, not prologue-end, for
function().return and .statement() probe points.
(dwarf_derived_probe ctor): Reorganize function/statement
probe point regeneration.