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.
fche [Thu, 11 Aug 2005 16:53:45 +0000 (16:53 +0000)]
2005-08-11 Frank Ch. Eigler <fche@elastic.org>
* translate.cxx (emit_function): Add an extra { } around the
function body visitation.
* tapset/timestamp_functions.stp: New file.
* tapset/builtin_conversions.stp: Aggregated from [hex]string.
* tapset/builtin_logging.stp: Aggregated from log/warn/printk.
roland [Thu, 11 Aug 2005 04:27:29 +0000 (04:27 +0000)]
2005-08-10 Roland McGrath <roland@redhat.com>
* 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.h: Declare it.
* loc2c-test.c (handle_variable): Grok "=" last argument to do a store.
roland [Thu, 11 Aug 2005 04:26:33 +0000 (04:26 +0000)]
2005-08-10 Roland McGrath <roland@redhat.com>
* 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.
fche [Wed, 10 Aug 2005 15:49:43 +0000 (15:49 +0000)]
2005-08-10 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx: Move around "focusing on ..." messages to print
them only for matching functions/modules.
(dwflpp ctor): Also add cu (source file) name to derived
probe point.
graydon [Tue, 9 Aug 2005 18:17:24 +0000 (18:17 +0000)]
2005-08-09 Graydon Hoare <graydon@redhat.com>
* elaborate.cxx:
(delete_statement_symresolution_info): New struct.
(symresolution_info::visit_delete_statement): Use it.
(delete_statement_typeresolution_info): New struct.
(typeresolution_info::visit_delete_statement): Use it.
(symresolution_info::find_var): Accept -1 as 'unknown' arity.
* elaborate.h: Update to reflect changes in .cxx.
* translate.cxx (mapvar::del): New method.
(c_unparser::getmap): Check arity >= 1;
(delete_statement_operand_visitor): New struct.
(c_unparser::visit_delete_statement): Use it.
* staptree.cxx (vardecl::set_arity): Accept and ignore -1.
(vardecl::compatible_arity): Likewise.
* testsuite/buildok/eight.stp: New test for 'delete' operator.
fche [Fri, 5 Aug 2005 17:04:29 +0000 (17:04 +0000)]
2005-08-05 Frank Ch. Eigler <fche@elastic.org>
PR translator/1175
* translate.cxx (*): Added unlikely() markers to most emitted error
checks.
(mapvar::get,set): Handle NULL<->"" impedance mismatch.
(itervar::get_key): Ditto. Use base index=1 for keys.
* testsuite/buildok/one.stp: Extend. And it runs with -p5 too.
* stap.1: Document use of ";" statament as mechanism for grammar
ambiguity resolution.
* stp_check.in: Set $prefix.
* systemtap.spec.in: Prereq kernel-devel, kernel-debuginfo,
and not tcl.
* tapsets.cxx: Make slightly less verbose.
* translate.cxx