diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-08-19 12:18:48 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-08-19 12:21:54 -0400 |
commit | ba8bd130e0482d1cae1b98480372b8c605e3eb2c (patch) | |
tree | d684121e4046fdbb773922602ff97edde605f9d8 | |
parent | 834b027898f9597f8a12488044555eba3175b391 (diff) | |
download | systemtap-steved-ba8bd130e0482d1cae1b98480372b8c605e3eb2c.tar.gz systemtap-steved-ba8bd130e0482d1cae1b98480372b8c605e3eb2c.tar.xz systemtap-steved-ba8bd130e0482d1cae1b98480372b8c605e3eb2c.zip |
PR10228: fix non-utrace building regression
* translate.cxx (dump_unwindsyms): Decide based on modname[] not
mainfile[] to emit a vmcb.
* runtime/task_finder.c (non-UTRACE): Include dummy stap_{start,stop}_*
functions.
-rw-r--r-- | runtime/task_finder.c | 3 | ||||
-rw-r--r-- | translate.cxx | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/runtime/task_finder.c b/runtime/task_finder.c index 672b21f1..5ef27eef 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -4,6 +4,9 @@ #if ! defined(CONFIG_UTRACE) /* Dummy definitions for use in sym.c */ struct stap_task_finder_target { }; +static int stap_start_task_finder(void) { return -EINVAL; } +static void stap_stop_task_finder(void) { } + #else #include <linux/utrace.h> diff --git a/translate.cxx b/translate.cxx index 57e7e7ce..1c6d4fdb 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4858,13 +4858,15 @@ dump_unwindsyms (Dwfl_Module *m, mainfile = canonicalize_file_name(mainfile); // PR10228: populate the task_finder_vmcb. - if (mainfile[0] == '/') // user-space module + if (modname[0] == '/') // user-space module { // NB: runtime/sym.c c->output << "static struct stap_task_finder_target _stp_vmcb_" << stpmod_idx << "= {\n"; + c->output << "#ifdef CONFIG_UTRACE\n"; c->output << ".pathname = " << lex_cast_qstring (mainfile) << ",\n"; c->output << ".mmap_callback = &_stp_tf_mmap_cb,\n"; c->output << ".munmap_callback = &_stp_tf_munmap_cb,\n"; + c->output << "#endif\n"; c->output << "};\n"; } @@ -4873,7 +4875,7 @@ dump_unwindsyms (Dwfl_Module *m, c->output << ".path = " << lex_cast_qstring (mainfile) << ",\n"; // PR10228: populate the task_finder_vmcb. - if (mainfile[0] == '/') // user-space module + if (modname[0] == '/') // user-space module c->output << ".vmcb = & _stp_vmcb_" << stpmod_idx << ",\n"; c->output << ".dwarf_module_base = 0x" << hex << base << dec << ", \n"; |