From 6274464ec4e095cd42238d0b4b5dc1d45bf100da Mon Sep 17 00:00:00 2001 From: kenistoj Date: Mon, 8 Oct 2007 21:52:12 +0000 Subject: PR 5709 * main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes * buildrun.cxx: Add uprobes_enabled() and make_uprobes(). Factor run_make_cmd() out of compile_pass(). * buildrun.h: Add uprobes_enabled and make_uprobes decls. * tapsets.cxx: Do correct #include for modprobed uprobes.ko; set need_uprobes in pass 2. * session.h: Add need_uprobes * runtime/staprun/common.c: Add -u option -> need_uprobes * runtime/staprun/staprun_funcs.c: Generalize insert_module() to support inserting uprobes.ko. * runtime/staprun/staprun.c: Add enable_uprobes(). insert_module call becomes insert_stap_module(). * runtime/staprun/staprun.h: Reflect insert_module() and need_uprobes changes * runtime/uprobes/*.[c,h]: uprobes is built as a module, rather than included into the source of the stap-generated module. * runtime/uprobes/Makefile: Added --- runtime/staprun/common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/staprun/common.c') diff --git a/runtime/staprun/common.c b/runtime/staprun/common.c index 9056c710..d3f8835a 100644 --- a/runtime/staprun/common.c +++ b/runtime/staprun/common.c @@ -23,6 +23,7 @@ char *target_cmd; char *outfile_name; int attach_mod; int load_only; +int need_uprobes; /* module variables */ char *modname = NULL; @@ -44,9 +45,13 @@ void parse_args(int argc, char **argv) outfile_name = NULL; attach_mod = 0; load_only = 0; + need_uprobes = 0; - while ((c = getopt(argc, argv, "ALvb:t:d:c:o:x:")) != EOF) { + while ((c = getopt(argc, argv, "ALuvb:t:d:c:o:x:")) != EOF) { switch (c) { + case 'u': + need_uprobes = 1; + break; case 'v': verbose++; break; -- cgit