diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-25 14:58:50 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-25 14:58:50 -0500 |
commit | a367e8991d2faf7d803b79309f80943339b0c284 (patch) | |
tree | 57da85463473069f7c029adc2837545e92486b01 | |
parent | 721e5826eebac2a3c781b339d2203eea418d7a21 (diff) | |
parent | aa8c86d6eb940dc06d90a926a262070dd400f9ad (diff) | |
download | systemtap-steved-a367e8991d2faf7d803b79309f80943339b0c284.tar.gz systemtap-steved-a367e8991d2faf7d803b79309f80943339b0c284.tar.xz systemtap-steved-a367e8991d2faf7d803b79309f80943339b0c284.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
-rw-r--r-- | loc2c.c | 6 | ||||
-rw-r--r-- | runtime/staprun/staprun_funcs.c | 2 | ||||
-rw-r--r-- | runtime/sym.c | 21 |
3 files changed, 21 insertions, 8 deletions
@@ -85,6 +85,8 @@ alloc_location (struct obstack *pool, struct location *origin) loc->emit_address = origin->emit_address; loc->byte_size = 0; loc->frame_base = NULL; + loc->ops = NULL; + loc->nops = 0; return loc; } @@ -669,6 +671,8 @@ location_from_address (struct obstack *pool, loc->emit_address = *input == NULL ? emit_address : (*input)->emit_address; loc->byte_size = 0; loc->frame_base = NULL; + loc->ops = NULL; + loc->nops = 0; bool need_fb = false; size_t loser; @@ -1189,6 +1193,8 @@ c_translate_constant (struct obstack *pool, loc->address.stack_depth = 0; loc->address.declare = NULL; loc->address.used_deref = false; + loc->ops = NULL; + loc->nops = 0; switch (dwarf_whatform (attr)) { diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c index 36496fb7..75d56b50 100644 --- a/runtime/staprun/staprun_funcs.c +++ b/runtime/staprun/staprun_funcs.c @@ -12,9 +12,7 @@ #include "config.h" #include "staprun.h" -#if HAVE_NSS #include "modverify.h" -#endif #include <sys/mount.h> #include <sys/utsname.h> diff --git a/runtime/sym.c b/runtime/sym.c index fd9863dd..953161bc 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -35,7 +35,9 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt, "mmap_cb: tsk %d:%d path %s, addr 0x%08lx, length 0x%08lx, offset 0x%lx, flags 0x%lx\n", tsk->pid, tsk->tgid, path, addr, length, offset, vm_flags); #endif - if (path != NULL) { + // We are only interested in the first load of the whole module that + // is executable. But see below for the comment about PR11015. + if (path != NULL && offset == 0 && (vm_flags & VM_EXEC)) { for (i = 0; i < _stp_num_modules; i++) { if (strcmp(path, _stp_modules[i]->path) == 0) { @@ -56,11 +58,18 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt, // in (especially the "section" naming is // slightly confusing since what we really // seem to mean are elf segments (which can - // contain multiple elf sections). - if ((strcmp(".dynamic", - module->sections[0].name) == 0) - && module->sections[0].addr == 0) - module->sections[0].addr = addr; + // contain multiple elf sections). PR11015. + if (strcmp(".dynamic", + module->sections[0].name) == 0) + { + if (module->sections[0].addr == 0) + module->sections[0].addr = addr; + else if (module->sections[0].addr != addr) + _stp_error ("Reloaded module '%s'" + " at 0x%lx, was 0x%lx\n", + path, addr, + module->sections[0].addr); + } break; } } |