2005-09-07 Martin Hunt * stap.1.in: Document current "-c" and "-x" options. 2005-09-07 Frank Ch. Eigler * systemtap.spec.in: Remove kernel-debuginfo dependency. 2005-09-07 Frank Ch. Eigler * main.cxx (main): Choose getpid()-based module names. * tapsets.cxx: Make timer.jiffies' use of task_pt_regs __i386__-only. 2005-09-07 Frank Ch. Eigler * stap.1.in: Oops, && and || do short-circuit. 2005-09-06 Frank Ch. Eigler * stap.1.in: Clarify absence of short-circuiting in && and ||. * translate.cxx (emit_function): Improve "array locals" message. * tapset/timestamp.stp: Add gettimeofday_us function. Correct arithmetic typing in other functions. * stapfuncs.5.in: Document new function. 2005-09-06 Martin Hunt * systemtap.spec.in: Bump elfutils_version to .115. 2005-09-05 Roland McGrath * loc2c.h: Comment fix. 2005-09-06 Frank Ch. Eigler * configure.ac: Require elfutils 0.115+. * tapsets.cxx: Restore graydon's PR 1244 code. * testsuite/buildok/eighteen.stp: Correct typing. * configure: Regenerated. 2005-09-06 Martin Hunt * 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 descriptions 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. 2005-09-06 Frank Ch. Eigler * tapsets.cxx (emit_probe_entries): Disable fault_handler for now. 2005-09-05 Frank Ch. Eigler 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. 2005-09-05 Frank Ch. Eigler 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_qstring): New function. (*::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. 2005-09-04 Frank Ch. Eigler * translate.cxx (visit_literal_string): \-prefix double-quotes. 2005-09-04 Martin Hunt * testsuite/buildok/context_test.stp: New test. * tapset/logging.stp (log): Call _stp_printf(). * stapfuncs.5.in: Add contextinfo funcs. * tapset/context.stp: Minor cleanup. 2005-09-03 Frank Ch. Eigler PR 1187 prime * tapset.cxx (literal_stmt_for_local): Don't automgaically copy target char*'s to systemtap strings. * tapset/conversions.stp (user_string, kernel_string): New functions. * stapfuncs.5.in: Document new functions. 2005-09-03 Frank Ch. Eigler PR 1292, by popular request. * parse.cxx (parse_functiondecl): Allow optional value/param type declarations. * stap.1.in: Document this. * tapset/*.stp: Convert most functions accordingly. * testsuite/parseok/twelve.stp, semok/seven.stp, semko/twenty.stp: Test this. 2005-09-02 Frank Ch. Eigler * 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. 2005-09-02 Martin Hunt * tapset/logging.stp: Make log() be same as print(). 2005-09-02 Frank Ch. Eigler * tapsets.cxx: Temporarily rolled back graydon's changes. 2005-09-02 Frank Ch. Eigler * tapset/*.stp: Renamed several files to simplify names. 2005-09-01 Graydon Hoare PR systemtap/1244 * testsuite/buildok/eighteen.stp: New test. * tapsets.cxx (dwflpp::literal_stmt_for_local) (query_statement, query_inline_instance_info) (query_func_info, query_srcfile_line, query_cu) (var_expanding_copy_visitor, visit_target_symbol) (dwarf_derived_probe): Fix 1244. 2005-09-01 Martin Hunt * tapset/builtin_logging.stp: Add print. * tapset/context.stp: New file. First cut at some context info. 2005-09-01 Martin Hunt * 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(). 2005-08-31 Graydon Hoare 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. 2005-08-31 Graydon Hoare * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Correct segv reported in PR 1270. 2005-08-31 Frank Ch. Eigler * 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. 2005-08-30 Roland McGrath * Makefile.am (install-data-local): Use mkdir -p, not -mkdir. * Makefile.in: Regenerated. 2005-08-30 Graydon Hoare * 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. 2005-08-30 Frank Ch. Eigler PR systemtap/1268 * translator (varlock): Add deadlock detection code. (emit_common_header): Add a new MAXTRYLOCK configuration macro. 2005-08-29 Graydon Hoare PR translator/1265 * tapsets.cxx (func_info::decl_file) (func_info::decl_line) (inline_instance_info::decl_file) (inline_instance_info::decl_line): New fields. (dwflpp::function_srcfile): Remove. (dwflpp::function_file): Add. (dwflpp::function_line): Add. (dwarf_derived_probe::dwarf_derived_probe): Update. (query_statement): Pass func, file, line through. (query_inline_instance_info): Likewise. (query_func_info): Likewise. (query_srcfile_line): Query statement lines if statement_str exists, rather than *_info. (query_dwarf_inline_instance): Extract file and line. (query_dwarf_func): Likewise. (query_cu): Pass empty func, file, line, for address-based queries. 2005-08-29 Frank Ch. Eigler * runtest.sh: Tolerate relative $SRCDIR. 2005-08-29 Frank Ch. Eigler * 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. 2005-08-28 Frank Ch. Eigler * tapsets.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. 2005-08-27 Roland McGrath * loc2c-test.c (print_type): New function. (print_vars): Use it. * loc2c-test.c (paddr, print_vars): New functions. (main): If given no variable name argument, print out variables. 2005-08-26 Graydon Hoare * translate.cxx: Revert tmp initialization changes. 2005-08-26 Graydon Hoare * 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. 2005-08-25 Roland McGrath * Makefile.am (EXTRA_DIST): List .h files explicitly. Automake really does not like wildcards. * Makefile.in: Regenerated. 2005-08-25 Frank Ch. Eigler * Makefile.am (docs): Removed target. * Makefile.in: Regenerated. 2005-08-24 Graydon Hoare * tapsets.cxx (dwflpp::literal_stmt_for_local): Fetch pointer types, array types, strings, from target. 2005-08-24 Roland McGrath * loc2c-test.c (handle_variable): Iterate on const_type/volatile_type. 2005-08-24 Frank Ch. Eigler * configure.ac: Require elfutils 0.114. * tapsets.cxx: Brought back graydon's changes. * configure: Regenerated. 2005-08-24 Roland McGrath * systemtap.spec.in: Update elfutils requirement. 2005-08-24 Frank Ch. Eigler * translate.cxx (emit_global, emit_module_init): Use 2.6.9-compatible rwlock initialization. 2005-08-24 Frank Ch. Eigler * 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. 2005-08-23 Graydon Hoare * tapsets.cxx: Re-implement dwarf probe-pattern resolution. 2005-08-22 Frank Ch. Eigler 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. 2005-08-21 Frank Ch. Eigler 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-19 Frank Ch. Eigler PR systemtap/1213 * translate.cxx (visit_if_statement): Translate else arms. 2005-08-19 Frank Ch. Eigler PR systemtap/1209 * elaborate.cxx (derived_probe_builder): Add get_param function. * elaborate.h: Declare them. * tapsets.cxx (dwarf_query::get_*_param): Call them. (timer_derived_probe, timer_builder): New classes. (register_standard_tapsets): Register timer.jiffies(N) and friend. * translate.cxx (translate_pass): #include . * stap.1.in: Document timer.jiffies(N) probe points. * testsuite/buildok/fourteen.stp: New test. 2005-08-19 Frank Ch. Eigler * elaborate.cxx (find_var): Remove $pid/$tid builtin logic. 2005-08-19 Martin Hunt * stp_check.in: Remove stp-control. 2005-08-18 Roland McGrath * loc2c.c (c_translate_addressof): Take TYPEDIE instead of TYPEATTR. * loc2c.h: Update decl. * loc2c-test.c (handle_variable): Handle DW_TAG_pointer_type target for fetch. 2005-08-18 Will Cohen * stp_check.in: See if relayfs available filesystem. 2005-08-18 Roland McGrath * 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. 2005-08-17 Roland McGrath 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. PR systemtap/1205, systemtap/1206 * loc2c.c (c_translate_fetch): Take TYPEDIE instead of TYPEATTR. (c_translate_store): Likewise. * loc2c.h: Update decls. * loc2c-test.c (handle_variable): Update callers. Look up type, resolve typedefs, and check that it's DW_TAG_base_type. * tapsets.cxx (dwflpp::literal_stmt_for_local): Likewise. * loc2c.c (base_byte_size): Add assert on expected DIE tag. (c_translate_array, c_translate_pointer): Likewise. * loc2c.h: Amend comments to explicitly state type DIE tags expected. * loc2c.c: #include "loc2c.h". 2005-08-16 Frank Ch. Eigler 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. 2005-08-16 Frank Ch. Eigler * main.cxx: Don't print library parse trees if last_pass=1. 2005-08-14 Roland McGrath * systemtap.spec.in: Update elfutils_version requirement to 0.113; restore bundled_elfutils setting to 1. 2005-08-12 Graydon Hoare * translate.cxx (c_tmpcounter::visit_array_in): Implement. (c_unparser::visit_array_in): Likewise. (mapvar::exists): New method. 2005-08-12 Frank Ch. Eigler PR systemtap/1122 et alii * parse.cxx (parse_literal): Parse and range-limit 64-bit numbers. (parse_unary): Correct precedence glitch. * staptree.h (literal_number): Store an int64_t. * staptree.cxx: Corresponding changes. * translate.cxx (check_dbz): Remove - insufficient. (emit_function): Define CONTEXT macro sibling for THIS. (c_typename): pe_long -> int64_t. (visit_literal_number): Format literal rigorously and uglily. (c_assignop, visit_binary_expression): Handle div/mod via new helper functions in runtime. * tapset/builtin_logging.stp: Add error, exit builtins. * testsuite/buildok/ten,eleven.stp: New tests. * testsuite/parse{ko,ok}/six.stp: Modify for larger numbers. * testsuite/transok/one.stp: Add more ";"s, maybe unnecessarily. 2005-08-11 Frank Ch. Eigler * systemtap.spec.in: Tweak to turn into fedora-flavoured spec. Don't build/install runtime docs. 2005-08-11 Frank Ch. Eigler * Makefile.am (uninstall-local): New target. * Makefile.in: Regenerate. 2005-08-11 Frank Ch. Eigler * 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. 2005-08-11 Frank Ch. Eigler * tapsets.cxx: Tweak hex/decimal printing for consistency. (emit_registrations): Remove module-specific code, anticipating that libelf gives us run-time addresses already. 2005-08-10 Roland McGrath * 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. * loc2c.c (c_translate_location): Increment INDENT. (c_translate_pointer): Likewise. (emit_loc_value): Increment INDENT after emit_header. 2005-08-10 Graydon Hoare * tapsets.cxx (dwflpp::literal_stmt_for_local): Copy code from loc2c-test to implement target member variable access. 2005-08-10 Graydon Hoare * tapsets.cxx (dwflpp::global_addr_of_line_in_cu): Implement next-line heuristic. (dwarf_query::get_number_param): Dwarf_Addr variant. (query_cu): Add line-selecting variant for function iteration. 2005-08-10 Frank Ch. Eigler PR translator/1186 * elaborate.cxx (resolve_2types): Accept a flag to tolerate unresolved expression types. (visit_functioncall): Call it thusly. * translate.cxx (emit_function): Tolerate void functions. * stap.1.in: Document possibility of void functions. * tapset/builtin_{log,printk,warn}.stp: Make these void functions. * testsuite/buildok/nine.stp, semok/eighteen.stp: New tests. 2005-08-10 Frank Ch. Eigler * tapsets.cxx: Correct hex/decimal misformatting of verbose messages. * main.cxx: Add formal "-h" and "-V" options. * stap.1.in: Document them. 2005-08-10 Frank Ch. Eigler * 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. 2005-08-09 Graydon Hoare * testsuite/parseok/nine.stp: Update * testsuite/semok/{six,seven,eleven,seventeen}.stp: Update. 2005-08-09 Graydon Hoare * staptree.{cxx,h} (target_symbol): New struct. (*_visitor::visit_target_symbol): Support it. (visitor::active_lvalues) (visitor::is_active_lvalue) (visitor::push_active_lvalue) (visitor::pop_active_lvalue): Support lvalue-detection. (delete_statement::visit) (pre_crement::visit) (post_crement::visit) (assignment::visit): Push and pop lvalue expressions. * elaborate.{cxx,h} (lvalule_aware_traversing_visitor): Remove class. (no_map_mutation_during_iteration_check) (mutated_map_collector): Update lvalue logic. (typeresolution_info::visit_target_symbol): Add, throw error. * parse.{cxx,h} (tt2str) (tok_is) (parser::expect_*) (parser::peek_*): New helpers. (parser::parse_symbol): Rewrite, support target_symbols. * translate.cxx (c_unparser::visit_target_symbol): Implement. * tapsets.cxx (var_expanding_copy_visitor): Update lvalue logic, change visit_symbol to visit_target_symbol. 2005-08-09 Martin Hunt PR 1174 * stp_check.in: Supply path for lsmod. * stp_check: Removed. 2005-08-09 Graydon Hoare * 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. 2005-08-08 Roland McGrath * loc2c-test.c: New file. * Makefile.am (noinst_PROGRAMS): Add loc2c-test. (loc2c_test_SOURCES, loc2c_test_LDADD): New variables. * Makefile.in, aclocal.m4: Regenerated. 2005-08-08 Frank Ch. Eigler * stap.1.in: Autoconfify old man page. * configure.ac: Make it so. * stap.1: Removed. * configure, Makefile.in, aclocal.m4: Regenerated. 2005-08-05 Frank Ch. Eigler * runtest.sh: Keep around log files from crashed processes, those whose rc is neither 0 nor 1. 2005-08-05 Frank Ch. Eigler * tapsets.cxx (query_statement|function|cu|module): Add explicit nested try/catch, since elfutils iteration seems to block exception catching. 2005-08-05 Frank Ch. Eigler 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. 2005-08-03 Graydon Hoare * tapsets.cxx (dwflpp): Fix address calculation logic a bit, and use prologue-end addresses for function probes. 2005-08-03 Frank Ch. Eigler * stap.1: More meat, all stub sections filled. * elaborate.cxx (visit_assignment): Add numerous missing cases. * parse.cxx: Parse ".=" operator. * testsuite/semok/sixteen.stp: Check them. * main.cxx (usage): Don't show incompletely supported options. 2005-08-03 Martin Hunt * stp_check.in : Copy sources to /var/cache/systemtap. * systemtap.spec.in: Install stp_check. * Makefile.am (install-exec-local): Install stp_check. 2005-08-03 Martin Hunt * configure.ac: Add stp_check to AC_CONFIG_FILES. * stp_check.in : New file. 2005-08-03 Frank Ch. Eigler * README: Be more specific about prerequisites. * tapset/builtin_string.stp: New builtin. * testsuite/buildok/seven.stp, semko/eighteen.stp: New tests. 2005-08-03 Roland McGrath * configure.ac, systemtap.spec.in: Version 0.2.1. * Makefile.in, aclocal.m4, configure: Regenerated. 2005-08-02 Roland McGrath * loc2c.c (emit_bitfield): Return bool, value from emit_base_fetch. (c_translate_fetch): Update caller. (c_translate_pointer): Never ignore emit_base_fetch return value. * systemtap.spec.in (%install): Remove parameters after %makeinstall. 2005-08-02 Frank Ch. Eigler * loc2.c (emit_loc_address): Emit interleaved declaration into its own nested { } block. * tapsets.cxx (literal_stmt_for_local): Emit deref_fault block unconditionally. * tapset/builtin_hexstring.stp: New builtin. * testsuite/buildok/six.stp: New test. 2005-08-02 Frank Ch. Eigler * tapsets.cxx (emit_registrations): Treat module_name="kernel" as if module_name="". 2005-08-01 Graydon Hoare * staptree.{cxx,h} (probe_point::component): Add a ctor. * tapsets.cxx (dwarf_derived_probe): Synthesize concrete probe_point for matched pattern. (dwarf_probe_type) (dwarf_query::add_kernel_probe) (dwarf_query::add_module_probe): Remove, they were noise. (dwflpp::module_name_matches): Don't call get_module_dwarf(). 2005-08-01 Frank Ch. Eigler * tapsets.cxx: Support ".return" option for function probe points. * testuite/buildok/five.stp: Try it. 2005-08-01 Frank Ch. Eigler * elaborate.cxx (derive_probes, semantic_pass_symbols): Improve error message specificity. * translate.cxx (emit_module_init): Compact partial registration recovery code. (emit_module_exit): Invert deregistration sequence. * testsuite/buildok/four.stp: Some module() test case. 2005-08-01 Frank Ch. Eigler * elaborate.cxx (derive_probes): Print error if results empty. * tapsets.cxx (dwflpp_assert): Handle positive RCs, which likely came from errno. (dwflpp::setup): Improve missing debug-info messages. * testsuite/semko/sixteen,seventeen.stp: New tests. * runtest.sh: Save stdout/stderr of FAIL/XPASS test cases. * Makefile.am (clean-local): Clean up testsuite/. * Makefile.in, aclocal.m4: Regenerated. 2005-07-29 Frank Ch. Eigler From Graydon Hoare * Makefile.am: Make sure stpd goes into libexec/systemtap/ * Makefile.in: Regenerated. 2005-07-29 Frank Ch. Eigler * configure.ac: Fail configure stage if elfutils 0.111+ is not found. * Makefile.am, elaborate.cxx, tapsets.cxx: Unconditionalize. * configure, Makefile.in, config.in: Regenerated. 2005-07-29 Roland McGrath * Version 0.2 distribution. * systemtap.spec.in: Include %{_datadir}/systemtap/tapset directory. (%check): Add section, run make check. * Makefile.am (EXTRA_DIST): Add runtest.sh. * Makefile.in: Regenerated. * systemtap.spec.in: Include man pages. * Makefile.am (man_MANS): Renamed to dist_man_MANS. * configure.ac: Add AM_CONDITIONAL definition of HAVE_LIBDW. * Makefile.am [HAVE_LIBDW] (stap_SOURCES_libdw): New variable. (stap_SOURCES): Use it, moving loc2c.c there. * configure, config.in: Regenerated. * tapsets.cxx: -> * loc2c.c, loc2c.h: Likewise. * main.cxx (main): Check return value of system. * systemtap.spec.in (LDFLAGS): Punt using $ORIGIN here, just hard-code %{_libdir}. (elfutils_version): Bump to 0.111. [bundled_elfutils]: Don't massage libdwfl.h header any more. * configure.ac: Don't check for libelf.h, not actually #include'd. Update -ldw check for merged libdwfl+libdw. (stap_LIBS): New substituted variable. Set only this, not LIBS, with -ldw check. * Makefile.am (stap_LDADD): New variable, use @stap_LIBS@. * Makefile.am (AM_CPPFLAGS): Use ${pkgdatadir}. (AM_CFLAGS): Use -W instead of -Wextra, for gcc 3 compatibility. (stpd_LDFLAGS): Variable removed. (AM_MAKEFLAGS): Variable removed. 2005-07-28 Frank Ch. Eigler * elaborate.cxx (find_var): Correct array dereferencing thinko. 2005-07-28 Graydon Hoare * 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 Frank Ch. Eigler * stap.1: Beginnings of a man page. * Makefile.am: Install it. Comment out stpd LDADD goodies. * configure.ac: Futilely complain about non-stpd LIBS. * Makefile.in, configure.in: Regenerated. * main.cxx (usage): Remove ARGS from help text, as nothing is done with these yet. 2005-07-28 Frank Ch. Eigler * translate.cxx: Add "pt_regs*" field to context. * tapsets.cxx (*): Correct kprobes API interface. * testsuite/buildok/three.stp: New test, copied from semok. * Makefile.am (install-data-local): Also install runtime/relayfs, so scripts can build against headers located thereunder. * Makefile.in: Regenerated. 2005-07-28 Frank Ch. Eigler translator/1120 * main.cxx (main): Preset -R and -I options from environment variables (if set). Pass guru mode flags to parser. * parse.cxx (privileged): New parser operation flag. Update callers. (parse_embeddedcode): Throw an error if !privileged. (parse_functiondecl): Change signature. Prevent duplicates. (parse_globals): Ditto. * parse.h: Corresponding changes. * tapset/*.stp: Beginnings of real tapset library, to replace previous builtins. * tapsets.cxx: Greatly reduce verbose mode output. * Makefile.am: Install & dist it. * runtest.sh: Refer to it. * Makefile.in, aclocal.m4: Regenerated. * testsuite/*/*.stp: Set guru mode via /bin/sh if needed. * testusite/*/*ko.stp: Homogenize shell scripts. 2005-07-28 Frank Ch. Eigler translator/1120 translator/1123 * elaborate.cxx (semantic_pass_symbols): Print a more helpful error message around exceptions. * elaborate.h (systemtap_session): Add guru_mode field. * main.cxx (main): Initialize it to false. Add version-sensitive script library searching. Add more failure messages. * tapsets.cxx (dwflpp_assert): Add a decorative text parameter. Update callers. 2005-07-28 Martin Hunt * Makefile.am (install-data-local): Add runtime/transport. * Makefile.in: regenerated. 2005-07-26 Graydon Hoare * elaborate.cxx: Revert builtin-function code. * translate.cxx: Likewise. * tapsets.{h,cxx}: Likewise. 2005-07-26 Martin Hunt * buildrun.cxx (compile_pass): Add -Wno-unused to CFLAGS because usually a module doesn't use every function in the runtime. 2005-07-26 Martin Hunt * Makefile.am (stpd_LDFLAGS): Set rpath correclty because otherwise automake doesn't seem to get it right when binaries are in libexec subdirs. (AM_CPPFLAGS): revert. * systemtap.spec.in (LDFLAGS): Set libexecdir here instead. 2005-07-26 Frank Ch. Eigler Support %{ embedded-c %} * staptree.h (embeddedcode): New statement subtype. Stub support in visitors. * staptree.cxx: Ditto. * parse.cxx: Parse %{ / %}. Accept "_" as identifier leading char. (parse_probe): Simplify calling convention. * elaborate.h: Store embedded code. * elaborate.cxx: Pass it. * translate.cxx: Transcribe it. Return some dropped module init/exit code. * Makefile.am: Add buildok/buildko tests. * Makefile.in: Regenerated. * main.cxx: Return EXIT_SUCCESS/FAILURE even for weird rc. * testsuite/parseok/nine.stp: Test _identifiers. * testsuite/transko/*.stp: Tweak to force -p3 rather than -p2 errors. * testsuite/semok/transko.stp: ... and keep it that way in the future. * testsuite/parse*/*: Some new tests for %{ %}. * testsuite/build*/*: New tests for -p4. 2005-07-26 Martin Hunt * Makefile.am (AM_CPPFLAGS): Set PKGLIBDIR correctly. 2005-07-26 Martin Hunt * systemtap.spec.in: Stpd goes in libexec/systemtap. * Makefile.am (libexecdir): Set to libexecdir/systemtap. * aclocal.m4, Makefile.in: Regenerated 2005-07-25 Roland McGrath * configure.ac: Don't define PKGLIBDIR and PKGDATADIR here. * Makefile.am (AM_CPPFLAGS): New variable, use -D here instead. (dist-hook): Don't remove ChangeLog files. (install-data-local): Don't install docs, just runtime stuff. (rpm, clean-local): Use make variables instead of @substitution@s. * configure, config.in, aclocal.m4, Makefile.in: Regenerated 2005-07-22 Graydon Hoare * translate.cxx (itervar): New class. (*::visit_foreach_loop): Implement. Various bug fixes. * staptree.cxx (deep_copy_visitor::*): Copy tok fields. * elaborate.cxx (lvalue_aware_traversing_visitor): (mutated_map_collector): (no_map_mutation_during_iteration_check): New classes. (semantic_pass_maps): New function to check map usage. (semantic_pass): Call it. * testsuite/transok/eight.stp: Test 'foreach' loop translation. * testsuite/semko/{thirteen,fourteen,fifteen}.stp: Test prohibited forms of foreach loops. 2005-07-21 Martin Hunt * Makefile.am (EXTRA_DIST): Add systemtap.spec. (install-data-local): Install docs and probes. (docs): New target. (rpm): New target. * configure.ac: Set initial version to 0.1.1. (pkglibdir): Set to libexec. * Makefile.in: Regenerated. 2005-07-20 Graydon Hoare * elaborate.{cxx,h} (find_array): Remove. (find_scalar): Rename to find_var, add array support. * staptree.{cxx,h} (vardecl::compatible_arity): New method. * translate.cxx: Refactor, add array read/write support. * testsuite/transok/three.stp: Uncomment array uses. * testsuite/transok/seven.stp: New test of array r/w. 2005-07-20 Frank Ch. Eigler * tapsets.cxx (*::emit_[de]registrations): Add logic for probe lifecycle control (session_state). * translate.cxx (emit_common_header,emit_module_{init,exit}): Ditto. (visit_*): Use per-context errorcount. 2005-07-19 Frank Ch. Eigler * Makefile.am (dist-hook): Complete the resulting tarball. * Makefile.in: Regenerated. 2005-07-19 Frank Ch. Eigler * translate.cxx (emit_module_init/exit, translate_pass): Conform to newer runtime startup/shutdown hooks. 2005-07-15 Frank Ch. Eigler * Makefile.am (install-data-local): Correct typo. * buildrun.cxx (compile_pass): Ditto. * main.cxx (main): Print errors if passes 4 or 5 fail. 2005-07-14 Frank Ch. Eigler * buildrun.cxx (compile_pass, run_pass): Get closer to a working test_mode. * translate.cxx (emit_module_init, emit_common_header): Ditto. (translate_pass): Ditto. 2005-07-14 Frank Ch. Eigler * Makefile.am (stpd): Install in $pkglibdir. (runtime): Copy to $pkgdatadir. * configure.ac: Pass along pkgdatadir and pkglibdir. * main.cxx: Default runtime_path from pkgdatadir. * buildrun.cxx (run_pass): Correct stpd directory. * Makefile.in, configure, config.in: Regenerated. 2005-07-12 Graydon Hoare * elaborate.cxx (semantic_pass_symbols): Only enter body if non-null. (semantic_pass_types): Likewise. (semantic_pass): Pass session to register_standard_tapsets. * translate.cxx (builtin_collector): New struct. (hookup_builtins): New function. (translate_pass): Only translate functions with bodies. (c_unparser::emit_common_header): Likewise, and call hookup_builtins. * tapsets.hh (builtin_function): New class. (register_standard_tapsets): Change parameter to session. * tapsets.cc (bultin_function::*): Implement class. (register_standard_tapsets): Register printk, log, warn. * testsuite/transok/six.stp: New test. 2005-07-12 Frank Ch. Eigler * buildrun.cxx (compile_pass): Make non-verbose mode quieter. (run_pass): Spawn stpd for dirty work. * Makefile.am: Also build stpd into libexecdir. * configure.ac: Pass LIBEXECDIR. * Makefile.in, configure, config.in: Regenerated. * AUTHORS: Update. 2005-07-11 Graydon Hoare * staptree.cxx (require): Generally handle null pointers in src. (deep_copy_visitor::visit_if_statement): Revert fche's change. 2005-07-11 Frank Ch. Eigler * parse.cxx (parse_literal): Compile cleanly on 64-bit host. * staptree.cxx (deep_copy_visitor::visit_if_statement): Don't freak on a null if_statement.elseblock. 2005-07-07 Graydon Hoare * staptree.{h,cxx} (deep_copy_visitor): New visitor. * elaborate.cxx (derived_probe::derived_probe): (alias_expansion_builder::build): Use it. * testsuite/semok/fifteen.stp: New test which relies on deep copy. 2005-07-07 Frank Ch. Eigler * Makefile.am (dist): Package up the source tree, including testsuite and runtime. * main.cxx: Use clog instead of cerr for logging messages. * buildrun.cxx: Ditto. (compile_pass): Add -Iruntime/user for test mode. * translate.cxx (*): Commonalize test/real mode output. * Makefile.in: Regenerated. 2005-07-05 Graydon Hoare * elaborate.{h,cxx}: Revert previous changes. * tapsets.{h,cxx}: Adapt to verbose as a member of session. * elaborate.cxx (alias_expansion_builder::build): Avoid copying locals between alias definition and use. * testsuite/semok/{twelve,thirteen,fourteen}.stp: New tests. * staptree.cxx (probe_alias::printsig): Print equals sign. 2005-07-05 Frank Ch. Eigler * elaborate.h (systemtap_session): Add more command-line arguments. * staptree.h (verbose): Bad global, no donut. * elaborate.cxx: Temporarily disable verbose variable access. * main.cxx: Support more arguments, build/run passes. Revamp temporary file generation and partial-pass output generation. * tapsets.cxx, translate.cxx: Emit just enough extra punctuation and fluff to make generated probe pass -Werror. * buildrun.cxx, buildrun.h: New files for passes 4/5. Partial support for build pass, nothing on probe execution yet. * testsuite/transok/*.stp: Force just -p3, now that -p4/5 exist. * Makefile.am, Makefile.in: Corresponding changes. 2005-07-04 Graydon Hoare * elaborate.h (symresolution_info::current_derived_probe): New field. (symresolution_info::current_probe): Change type. * elaborate.cxx (semantic_pass_symbols): Add passes for resolving locals in pre-derivation base probes and pre-expansion aliases. (symresolution_info::visit_symbol): (symresolution_info::find_scalar): Update to match new field. 2005-06-27 Graydon Hoare * staptree.{h,cxx} (probe_alias): New structure. * parse.{h,cxx} (parser::parse): Parse probes or probe aliases. (parser::parse_probe): Likewise. * tapsets.{h,cxx}: (derived_probe_builder): (match_key): (match_node): (alias_derived_probe): Move from here, * elaborate.{h,cxx}: to here. * elaborate.h (systemtap_session::pattern_root): New member. (register_library_aliases): New function. * tapsets.cxx: Build one dwarf_derived_probe per target address. 2005-06-23 Graydon Hoare * tapsets.cxx (probe_type): New enum. (probe_spec): New struct. (dwarf_derived_probe): Reorganize a bit, interpret .return. (query_statement): Translate addresses back to module space. (probe_entry_function_name): (probe_entry_struct_kprobe_name): (foreach_dwarf_probe_entry): (declare_dwarf_kernel_entry): (deregister_dwarf_kernel_entry): (register_dwarf_kernel_entry): (register_dwarf_module): (declare_dwarf_module_entry): (deregister_dwarf_module_entry): (register_dwarf_module_entry): New functions. (dwarf_derived_probes::emit_probe_entries): (dwarf_derived_probes::emit_registrations): (dwarf_derived_probes::emit_deregistrations): Implement. 2005-06-21 Frank Ch. Eigler * config.in, configure: Regenerated. * tapsets.cxx: Make dwarf code conditional on new elfutils header. 2005-06-20 Graydon Hoare * configure.ac: Scan for libdwfl. * staptree.h (verbose): New global. * main.cxx (usage, main): Implement -v option. * tapsets.cxx (dwflpp): New struct. (query_statement): New function. (query_function): New function. (query_cu): New function. (query_module): New function. (dwarf_derived_probe): Implement primary forms. 2005-06-14 Graydon Hoare * tapsets.h: New file. (derived_probe_builder): Callback for making derived probes. (match_key): Component of pattern-matching tree. (match_node): Other component of pattern-matching tree. * tapsets.cxx: Add pattern-matching system for probes. (alias_derived_probe): Skeleton for alias probes. (dwarf_derived_probe): Skeleton for dwarf probes. (register_standard_tapsets): Registry for standard tapsets. 2005-06-13 Frank Ch. Eigler Start separating out translator-side probe point recognition. * tapsets.cxx: New file. (be_derived_probe): Support for begin/end probes. (derive_probe): Ditto. Reject anything unrecognized. * translator.cxx: Move out old code. * Makefile.am: Add new source file. * testsuite/semok/*: Switch to begin/end probes only. 2005-06-08 Frank Ch. Eigler systemtap/916 Implement all basic scalar operators, including modify-assignment. * parse.cxx (lexer): Allow multi-character lookahead in order to scan 1/2/3-character operators. (parse_boolean_or/and/xor/shift): New routines. * translate.cxx (visit_assignment, visit_binary_expression, visit_*_crement): Generally rewrote. (visit_*): Added more parentheses in output. (emit_module_init): Initialize globals. * staptree.h, elaborate.cxx, elaborate.h: Remove exponentiation. * main.cxx (main): Add an end-of-line to output file. * testsuite/*: Several new tests. 2005-06-05 Frank Ch. Eigler Implement for/next/continue/break/while statements. * staptree.h: Declare new 0-arity statement types. Tweak for_loop. * parse.cxx: Parse them all. * translate.cxx (c_unparser): Maintain break/continue label stack. (visit_for_loop, *_statement): New implementations. * elaborate.*, staptree.cxx: Mechanical changes. * testsuite/parseok/ten.stp, semko/twelve.stp, transko/two.stp, transok/five.stp: New tests. 2005-06-03 Frank Ch. Eigler * elaborate.cxx (find_*): Remove arity checks from here ... * staptree.cxx (set_arity): Put arity match assertion here. * testsuite/semko/{six,nine}.stp: Confirm logic. * testsuite/transko/one.stp: First translation-time ko test. 2005-06-03 Frank Ch. Eigler * TODO: Removed entries already represented in bugzilla. * elaborate.cxx: Rewrite type inference for several operators. * main.cxx (main): For -p2 runs, print types of function/probe locals. * parse.cxx (scan): Identify more two-character operators. (parse_comparison): Support the whole suite. * translate.cxx (visit_unary_expression, logical_or_expr, logical_and_expr, comparison,ternary_expression): New support. * testsuite/parseok/semok.stp: Clever new test. * testsuite/transok/four.stp: New test. * testsuite/*: Some tweaked tests for syntax changes. 2005-06-03 Frank Ch. Eigler * parse.cxx (scan): Support C and C++ comment styles. * testsuite/parseok/four.stp: Test them some ... * testsuite/parseko/nine.stp: ... and some more. 2005-06-02 Frank Ch. Eigler * translate.cxx (visit_concatenation, visit_binary_expression): New basic implementation. (*): Reduce emitted whitespace and remove `# LINE "FILE"' lines. 2005-06-02 Frank Ch. Eigler Parse foreach construct. Added fuller copyright notices throughout. * staptree.h (foreach_loop): New tree node type. * staptree.cxx: Print it, visit it, love it, leave it. * parse.cxx: Parse it. (parse_stmt_block): Don't require ";" separators between statements. (parse_array_in): Use [] as index group operator instead of (). * elaborate.cxx (visit_foreach_loop): New code. * translate.cxx: Slightly tighten errorcount/actioncount handling. * main.cxx: Accept "-" as script file name standing for stdin. (visit_arrayindex): Switch to simpler set_arity call. * configure.ac: Generate DATE macro. * Makefile.in, configure, config.in: Regenerated. * testsuite/*: New/updated tests for syntax changes, foreach (). 2005-05-30 Frank Ch. Eigler More fully parse & elaborate "expr in array" construct. * staptree.h (array_in): Make this unary. Update .cxx to match. * parse.cxx (parse_array_in): Rewrite. (parse_symbol_plain): Removed. Update .h to match. * elaborate.cxx (typeresolution_info::visit_array_in): New function. (find_array): Tentatively, accept arity=0. * translate.cxx (c_unparser::c_assign): New functions to eliminate much ugly duplication. Use throughout. (visit_symbol): Correct function formal argument search. (c_tmpcounter*::visit): Add missing recursion in several functions. * testsuite/*: Add new tests for array-in construct. Add the first "transok" test. * Makefile.am: Add transok tests. * Makefile.in: Regenerated. 2005-05-26 Frank Ch. Eigler * translate.cxx: Traverse trees just for common-header generation, to emit explicit temp variables into context. Switch to explicit "frame" pointer in generated function/probe bodies. Initialize locals in function bodies. Rename "test_unparser" to "c_unparser" throughout. 2005-05-24 Frank Ch. Eigler * elaborate.cxx (find_array): Support automagic tapset globals. * testsuite/semok/nine.stp: Test it. * staptree.cxx (stapfile print): List globals. 2005-05-24 Frank Ch. Eigler * testsuite/semlib/*: New tapset library chunks for "-I" testing. * testsuite/semok/eight.stp, nine.stp: New tests. 2005-05-22 Frank Ch. Eigler * Makefile.am (gcov): New target to generate test-coverage data from a testsuite run. * Makefile.in: Regenerated. 2005-05-20 Frank Ch. Eigler Many changes throughout. Partial sketch of translation output. * elaborate.*: Elaboration pass. * translate.*: Translation pass. * staptree.*: Simplified for visitor concept. * main.cxx: Translator mainline. * *test.cxx: Removed. * testsuite/*: Some new tests, some changed for newer syntax. 2005-05-05 Frank Ch. Eigler * parse.cxx (parse): Add helper methods. (lexer::scan, parse_assignment): Parse "<<<" operator. Fix assignment associativity. (parse_symbol): Permit function with empty arg list. (parse_global, parse_statement, parse_functiondecl): Expect unconsumed leading keyword. (parse_global): Don't use ";" termination. * parse.h: Corresponding changes. * staptree.cxx (binary_expression::resolve_types): Fix <<< type inference. (translator_output): Improve pretty-printing. (*): Add general visitors to statement/expression types. * staptree.h: Corresponding changes. Tweak symresolution_info fields. Add semantic_error class. * semtest.cxx: Adapt to this. * testsuite/parseok/two.stp, semok/*.stp: Adapt to syntax changes. 2005-03-15 Frank Ch. Eigler * semtest.cxx: Print probe signatures properly. * staptree.cxx (probe::printsig): New function. 2005-03-15 Frank Ch. Eigler * TODO: New file. Include some probe-point-provider syntax examples. * parse.cxx (lexer::scan, parser::parse_literal): Support hex, octal numbers via strtol. (parse_probe, parse_probe_point): Modify for dotted syntax. * staptree.cxx: Ditto. * parsetest.cxx, semtest.cxx: Print parse/sem results even if .stp files were given on command line. * parse.h, staptree.h: Rename probe_point_spec -> probe_point. * runtest.sh: New test-runner front-end script. * Makefile.am: Use it for TESTS_ENVIRONMENT. * testsuite/*: Update probe point syntax. Add a bunch of new tests. 2005-03-04 Frank Ch. Eigler * parse.cxx (scan): Support '$' characters in identifiers. (parse_symbol): Support thread-> / process-> shorthand. * staptree.cxx (symresolution_info::find): Split up into find_scalar, find_array, find_function. (resolve_symbols): Call the above for symbol/arrayindex/functioncall. (find_scalar): Add stub support for synthetic builtin variables. * staptree.h: Corresponding changes. * testsuite/*: Some new tests. 2005-03-03 Frank Ch. Eigler * parse.cxx (parse_assignment): Assert lvalueness of left operand. * staptree.h (expression): Add is_lvalue member. * staptree.cxx (functioncall::resolve_types): Don't crash on formal-vs-actual argument count mismatch. (*): Add some is_lvalue stub functions. * testsuite/*: Some new tests. 2005-03-01 Frank Ch. Eigler * parse.cxx: Implement left-associativity for several types of operators. Add some more statement types. Parse functions. Be able to print tokens. Simplify error generating functions. Save tokens in all parse tree nodes. * parse.h: Corresponding changes. * staptree.cxx: Move tree-printing functions here. Add many new functions for symbol and type resolution. * staptree.h: Corresponding changes. * semtest.cxx: New semantic analysis pass & test driver. * testsuite/sem*/*: New tests. * parsetest.cxx: Separated parse test driver. * testsuite/parse*/*: Adapt tests to parsetest driver. * Makefile.am: Build semtest. Run its tests. * Makefile.in: Regenerated. 2005-02-11 Frank Ch. Eigler * parse.cxx, parse.h: New files: parser. * staptree.h: New file: semantic object declarations. * staptree.cxx: New dummy driver file.