summaryrefslogtreecommitdiffstats
path: root/main.cxx
Commit message (Collapse)AuthorAgeFilesLines
* PR11275: be less verbose in case of command line option parsingFrank Ch. Eigler2010-02-191-18/+23
| | | | | * main.cxx (main): exit() instead of printing usage for most errors. Also support --help.
* PR11281 Allow negative values for -D argument.Mark Wielaard2010-02-141-1/+1
| | | | | | | Change regexp match to "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$". * main.cxx (main): case 'D' allow optional single minus sign after equal in assert_regexp_match().
* PR11105 part 2a, fix buggy \\. in -r option regexpFrank Ch. Eigler2010-02-121-1/+1
|
* PR11105 part 2: tighten constraints on stap-server parameters passed to makeFrank Ch. Eigler2010-02-121-11/+13
| | | | | | | * util.h, util.cxx (assert_match_regexp): New function. * main.cxx (main): Constrain -R, -r, -a, -D, -S, -q, -B flags. * stap-serverd (listen): Harden stap-server-connect with ulimit/loop. * testsuite/systemtap.server/{client,server}_args.exp: Revised.
* undocumented, obfuscated, *evil* option to suppress -Werror during module ↵Przemysław Pawełczyk2010-02-061-1/+13
| | | | | | | | building * session.h (omit_werror): New flag. * buildrun.cxx (compile_pass): Use it. * main.cxx (main): Set it.
* rhbz 560890: preserve -L/-l variable orderingNobuhiro Tachino2010-02-021-12/+41
| | | | | | Switch to list<string> from set<string> for collecting available $var lists. Use O(N**2) list-uniqueifier that preserves initial ordering.
* PR11105: robustify stap-serverFrank Ch. Eigler2010-01-151-2/+9
| | | | | | | | | | | * main.cxx (main): Always downgrade client-provided -p5 to -p4. * stap-client (unpack_response): Sanitize stdout due to same. * stap-server-connect.c: Eliminate a bunch of globals. (handle_connection): Make things locals instead. Base tmp files on $TMPDIR. (spawn_and_wait): New helper function. (handleRequest): New monster function to inline rest of old stap-server-request.
* Fix rawhide compile problem.David Smith2010-01-141-1/+1
| | | | | * main.cxx (getmemusage): On rawhide systems, 'getpagesize()' has been deprecated. Substitute 'sysconf(_SC_PAGESIZE)'.
* tweak stap argument checkingFrank Ch. Eigler2010-01-121-38/+22
| | | | * main.cxx (checkOptions): Inline into main(), abeam other option checks.
* Rework filtering of client options. Add testsuite.Dave Brolley2010-01-111-59/+27
|
* Filter options for unprivileged use after --stap-client is seen.Dave Brolley2010-01-111-1/+58
|
* Accept relative user module paths for -d.Mark Wielaard2009-11-131-5/+13
| | | | | | | | | | | | When using relative (non-canonical) paths for user modules one would get a confusing WARNING: missing unwind/symbol data for module 'bin/test'. Also unless the path started with '/' the task_finder wouldn't start. By checking that the given file can be made absolute (canonicalized) both issues are resolved and the user module will be correctly identified at both translation and runtime. * main.cxx (main): case 'd' try canonicalize_file_name() the argument first to identify user modules.
* PR10466: print the set-intersection of variables retrieved from each branchWenji Huang2009-11-041-11/+35
| | | | | | | * elaborate.h: Remove printargs and add getargs. * tapset-mark.cxx (mark_derived_probe): Ditto. * tapsets.cxx (dwarf_derived_probe,tracepoint_derived_probe): Ditto. * main.cxx (printscript): Make intersection before printing.
* PR10702: preprocessor conditional for kernel CONFIG_fooFrank Ch. Eigler2009-10-081-3/+29
| | | | | | | | * session.h (kernel_config[]): New session field. * main.cxx (parse_kernel_config): Populate it. * parse.cxx (eval_comparison): Use it. * testsuite/buildok/utrace.stp, testsuite/parseok/kconfig.stp: New tests. * NEWS, stap.1.in, doc/langref.tex: Mention it.
* Print total memory usage in verbose mode after pass 1, 2 and 3.Mark Wielaard2009-10-011-6/+35
| | | | | | | Makes it easier to see which probe queries use lots of memory. * main.cxx (getmemusage): New function. (main): Use new function printing passes in verbose mode.
* Simplify copy_file callsJosh Stone2009-09-281-8/+2
| | | | | | | | | | | | | | Every single copy_file call we had was converting strings to char*, printing the same error message, and optionally printing the same verbose string. Let's canonicalize that. * util.cxx (copy_file): Take string filenames, add a verbose flag, and consolidate the message printing. * cache.cxx (add_to_cache): Pass strings and remove message printing. (get_from_cache): Ditto. * main.cxx (main): Ditto. * tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto. (dwarf_cast_expanding_visitor::filter_special_modules): Ditto.
* Check for unprivileged options conflicts on the server side.Dave Brolley2009-09-171-41/+5
| | | | Gneral work on options in the client and server.
* 2009-09-14 Dave Brolley <brolley@redhat.com>Dave Brolley2009-09-141-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modsign.cxx (init_cert_db_path): Use 'system' call. (sign_module): Renamed to 'main'. This is now an independant program. Check for arguments. Return 1 on error. * buildrun.cxx (modsign.h): Don't #include it. (compile_pass): Don't sign the module. * main.cxx (main): Don't copy the module signature. * cache.cxx (add_to_cache): Don't cache the module signature. * Makefile.am (bin_PROGRAMS): Add stap-sign-module. (stap_SOURCES): Remove modsign.cxx and nsscommon.c. (stap_sign_module_SOURCES): New variable. (stap_sign_module_CPPFLAGS): New variable. (stap_sign_module_LDFLAGS): New variable. (stap_sign_module_LDADD): New variable. * stap-server (initialization): Initialize unprivileged. (parse_options): Handle --unprivileged. (create_response): Call stap-sign-module if --unprivileged was specified. * systemtap.spec: Add stap-sign-module to stap-server. * Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated. * grapher/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * aclocal.m4: Likewise. * testsuite/aclocal.m4: Likewise. * configure: Likewise. * testsuite/configure: Likewise.
* Unify lex_cast* and avoid string copiesJosh Stone2009-09-021-2/+2
| | | | | | | | | | | | | | | We always use lex_cast either to string or from string, so I made that explicit, and got rid of some string copies in the process. There was also stringify(), which was redundant to lex_cast<string>. We also always used lex_cast_hex to string, so that's now hard-coded and again eliminated a string copy. For lex_cast_qstring<string>, there's no need to write the streamify the input, so a specialization now operates directly on the input. Hopefully this is a bit cleaner, and I do measure it to be a little faster on scripts with many probes.
* PR10552: Removed references to the merge ('-M') option.David Smith2009-09-011-18/+1
| | | | | | | | | | | * hash.cxx (find_script_hash): Removed unused merge option. * main.cxx (checkOptions): Removed merge option checks. (main): Removed merge option. * session.h: Ditto. * initscript/README.initscript: Removed reference to '-M' option. * initscript/systemtap.in (stap_getopt): Ditto. * testsuite/parseko/cmdline01.stp: Removed merge option test. * testsuite/parseko/cmdline05.stp: Ditto.
* PR4186 cont'd: option #2: standardize on kernel ARCH/SUBARCH throughoutFrank Ch. Eigler2009-08-251-7/+20
| | | | | | | | * main.cxx (main): Perform equivalent sed by hand on uname()->machine. * stap.1.in: Clarify -a ARCH slightly. * tapsets.cxx (validate_module_elf): Accept "arm*"for EM_ARM. * tapset/**, testsuite/**: Removed/collapsed "i386"/"i686" branches, renamed "ppc64"->"powerpc" and "s390x"->"s390".
* PR4186 cont'd: fix 32-bit i386 buildsFrank Ch. Eigler2009-08-241-0/+5
| | | | | * main.cxx (main): Initialize s.architecture to value as if from `uname -i`. Specifically, squash i?86 -> i386.
* PR4186: cross-architecture probe buildingFrank Ch. Eigler2009-08-241-2/+12
| | | | | | | | | | | * main.cxx (main): Add 'a:' and 'B:' options. * session.h (kbuildflags): New place to store -B args. * testsuite/systemtap.base/cmd_parse.exp: Test them lightly. * buildrun.cxx (run_make_cmd): Use "--no-print-directory" rather than ">/dev/null" in kbuild invocations. Pass '-a' and '-B' flags along. * hash.cxx (find_script_hash): Add them. * NEWS, stap.1.in: Mention this.
* PR10543: do module cache cleaning before copying new file into the cacheFrank Ch. Eigler2009-08-211-1/+1
| | | | | | ... otherwise the new stuff can get cleaned before use. * cache.cxx (add_to_cache): Do clean_cache() first, not last.
* PR10544: clean up stap child process error handlingFrank Ch. Eigler2009-08-211-4/+2
| | | | | | | * util.cxx (stap_system): Take extra verbosity value. Standardize error handling / tracing. * util.h: Corresponding changes. * buildrun.cxx, main.cxx, modsign.cxx: Update callers.
* PR10228: use task_finder_vma for -d /user/object files.Frank Ch. Eigler2009-08-141-0/+5
| | | | | | | | | | | | * main.cxx (main): For "-d /path" arguments, enable task finder. * runtime/sym.h (_stp_module): Add *vmcb member. * task_finder{.cxx,.h} (emit_vma_callback_probe_decl): Zap. * tapset-itrace.cxx, tapset-utrace.cxx: Use unwindsyms_modules instead. * tapsets.cxx (uprobe::emit_module_decls): Ditto. * translate.cxx (emit_module_init): Emit task finder registrations for vmcb's associated with _stp_modules. (dump_unwindsyms): Associate vmcbs with user-space unwindsyms entries.
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-08-041-10/+39
|\ | | | | | | | | | | Conflicts: cache.cxx
| * PR10204: Place userspace markers in systemtap itselfKent Sebastian2009-07-311-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | * cache.cxx (add_to_cache,clean_cache): add static markers * main.cxx (main): likewise * runtime/staprun/common.c (send_request): likewise * runtime/staprun/mainloop.c (stp_main_loop): likewise * runtime/staprun/staprun.c (remove_module): likewise * runtime/staprun/staprun.h: include sdt.h * runtime/staprun/staprun_funcs.c (insert_module): likewise * util.cxx (stap_system): likewise * tapset/stap_staticmarkers.stp: new file
| * Use a real session flag for -LJosh Stone2009-07-291-10/+13
| | | | | | | | | | | | | | | | | | Rather than relying on 'unoptimized' to tell us that the listing mode should print the variables too, this adds an explicit listing_mode_vars. * session.h (systemtap_session): Add listing_mode_vars * main.cxx (main): Set s.listing_mode_vars appropriately. (printscript): Use the new flag for deciding whether to print locals
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-141-27/+1
|\| | | | | | | | | | | Conflicts: main.cxx
| * Remove -O[0123s] gcc optimization flags for gcc pass 4 speedups again.Mark Wielaard2009-07-141-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We cannot guarantee that (un)optimized code compiles and/or generates fully functional code, so don't tempt the user to try it out. * session.h (struct systemtap_session): Remove gcc_flags string field. * hash.cxx (find_script_hash): Don't add gcc_flags. * main.cxx (usage): Remove -O[0123s] documentation. (main): Don't use gcc_flags. * buildrun.cxx (compile_pass): Don't add gcc_flags to EXTRA_CFLAGS. * stap1.in: Remove -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Remove tests for -O[0123s].
| * Make kernel opt-level the default again.Mark Wielaard2009-07-141-2/+2
| | | | | | | | | | | | | | * main.cxx (main): Default gcc_flags to kernel opt-level (empty). * buildrun.cxx (compile_pass): Add -freorder-blocks back, document choices. * stap.1.in: Document new default opt-level. * testsuite/systemtap.base/cache.exp: Adjust for new caching results.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-131-1/+27
|\| | | | | | | | | | | Conflicts: main.cxx
| * Add -O[0123s] gcc optimization flags for gcc pass 4 speedup.Mark Wielaard2009-07-111-1/+26
| | | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Add gcc_flags string field. * main.cxx (usage): Document -O[0123s]. (main): Default gcc_flags to -O0. Add O:: to getopt_long. Handle case 'O' to set gcc_flags. * buildrun.cxx (compile_pass): Add gcc_flags to EXTRA_CFLAGS. * stap1.in: Add -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Add tests for -O[0123s].
* | Check for options conflicts with --unprivileged.Dave Brolley2009-06-181-32/+87
| |
* | Ensure signature file exists before copying it to the temp directory.Dave Brolley2009-06-151-8/+11
| |
* | Respect SYSTEMTAP_DIR when looking for nss certificate databases.Dave Brolley2009-06-101-8/+8
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-271-0/+4
|\|
| * Suggest rpms to install using debuginfo-install.William Cohen2009-05-271-0/+4
| | | | | | | | | | | | | | | | | | The patch makes use of the RPM libraries to determine which rpm supplied the executable and from that information suggest a command to install the appropriate debuginfo rpm. This is enabled using the "--with-rpm" option for configure. Can be explicitly disabled with "--without-rpm".
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-191-5/+11
|\|
| * Enhance -x option checking to only accept valid pidSunzen Wang2009-05-191-1/+6
| | | | | | | | Fix: Enhance -x option checking to only accept valid pid
| * Enhance -s option checking to only accept valid size numberSunzen Wang2009-05-191-2/+2
| | | | | | | | Fix: Enhance -s option checking to only accept valid size number
| * Fix: Enhance -p option checking so as to just accept valid numberSunzen Wang2009-05-191-2/+3
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-051-0/+8
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: modsign.cxx runtime/staprun/modverify.c runtime/staprun/staprun_funcs.c stap-authorize-server-cert stap-authorize-signing-cert stap-serverd systemtap.spec
| * Module signing and verification using a separate file for the module signature.Dave Brolley2009-05-041-0/+22
| |
* | 2009-04-30 Dave Brolley <brolley@redhat.com>Dave Brolley2009-04-301-43/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * modsign.cxx (unistd.h,sts/stat.h,systypes.h,pwd.h): #include them. (check_cert_file_permissions, check_db_file_permissions) (check_cert_db_permissions): New functions. (check_cert_db_path): Don't check for keyFiles. * main.cxx (usage): Remove --signing-cert option. (main): Likewise. * cache.cxx (cassert): #include it. (add_to_cache): Assume the module is signed. * buildrun.cxx (compile_pass): Always sign the module. * stap-server.8.in: Update documentation.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-271-50/+30
|\| | | | | | | | | | | | | Conflicts: configure testsuite/configure
| * PR10082: refactor duplicated codeKent Sebastian2009-04-241-50/+30
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-231-2/+1
|\| | | | | | | | | | | Conflicts: Makefile.in
| * PR 9821: Use genuine strftime in staprun/stapioMasami Hiramatsu2009-04-221-2/+1
| | | | | | | | | | | | | | | | | | | | * Makefile.am: Add -fno-builtin-strftime to stapio_CFLAGS. * Makefile.in: Ditto. * runtime/staprun/common.c (stap_strfloctime): Use strftime(3). (parse_args): Remove strftime format limitation message. * main.cxx (usage): Ditto. * stap.1.in: Ditto. * staprun.8.in: Ditto.