summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tapsets.cxx16
-rw-r--r--testsuite/systemtap.exelib/exelib.exp3
2 files changed, 8 insertions, 11 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 0707e052..79a7aa93 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -692,8 +692,8 @@ dwarf_builder::probe_table::probe_table(string& mark_name, systemtap_session & s
Dwarf_Addr bias;
size_t shstrndx;
- elf = (dwarf_getelf (dwfl_module_getdwarf (dw->module, &bias))
- ?: dwfl_module_getelf (dw->module, &bias));
+ // Explicitly look in the main elf file first.
+ elf = dwfl_module_getelf (dw->module, &bias);
Elf_Scn *probe_scn = NULL;
dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx));
@@ -713,17 +713,15 @@ dwarf_builder::probe_table::probe_table(string& mark_name, systemtap_session & s
}
}
- if (!have_probes)
- return;
-
// Older versions put .probes section in the debuginfo dwarf file,
- // so check if it actually exists, if not take the main elf file
- if (have_probes && shdr->sh_type == SHT_NOBITS)
+ // so check if it actually exists, if not take a look in the debuginfo file
+ if (! have_probes || (have_probes && shdr->sh_type == SHT_NOBITS))
{
- elf = dwfl_module_getelf (dw->module, &bias);
+ elf = dwarf_getelf (dwfl_module_getdwarf (dw->module, &bias));
+ if (! elf)
+ return;
dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx));
probe_scn = NULL;
- have_probes = false;
while ((probe_scn = elf_nextscn (elf, probe_scn)))
{
shdr = gelf_getshdr (probe_scn, &shdr_mem);
diff --git a/testsuite/systemtap.exelib/exelib.exp b/testsuite/systemtap.exelib/exelib.exp
index 0a4ee8b0..960ebbfa 100644
--- a/testsuite/systemtap.exelib/exelib.exp
+++ b/testsuite/systemtap.exelib/exelib.exp
@@ -2,8 +2,7 @@
# (with gcc/g++, -O0/-O3, prelinked/pie, seperate debuginfo)
# Then runs tests with a list of execs.
-set subtestlist {lib uname ustack cleanup}
-#set subtestlist {mark} # Currently disabled, fails sep-debug case.
+set subtestlist {lib mark uname ustack cleanup}
proc seperate_debuginfo {elffile} {
set objcopy [list "objcopy" "--only-keep-debug"]