]> sourceware.org Git - systemtap.git/commitdiff
PR13284 Failure to resolve kernel global e.g. jiffies.
authorMark Wielaard <mjw@redhat.com>
Tue, 18 Oct 2011 12:28:59 +0000 (14:28 +0200)
committerMark Wielaard <mjw@redhat.com>
Tue, 18 Oct 2011 12:28:59 +0000 (14:28 +0200)
* dwflpp.cxx (vardie_from_symtable): Also accept STT_NOTYPE. Some global
  don't have a type associated with them.
* testsuite/buildok/pr13284.stp: New testcase.

dwflpp.cxx
testsuite/buildok/pr13284.stp [new file with mode: 0644]

index 5e193e71967f27f34879d86cefa050a5c3937630..e42a90fd68b1d8ac70d1a7311818826120d15c48 100644 (file)
@@ -2746,7 +2746,8 @@ dwflpp::vardie_from_symtable (Dwarf_Die *vardie, Dwarf_Addr *addr)
       if (symname
          && ! strcmp (name, symname)
          && sym.st_shndx != SHN_UNDEF
-         && GELF_ST_TYPE (sym.st_info) == STT_OBJECT)
+         && (GELF_ST_TYPE (sym.st_info) == STT_NOTYPE // PR13284
+             || GELF_ST_TYPE (sym.st_info) == STT_OBJECT))
        *addr = sym.st_value;
     }
 
diff --git a/testsuite/buildok/pr13284.stp b/testsuite/buildok/pr13284.stp
new file mode 100644 (file)
index 0000000..44358b5
--- /dev/null
@@ -0,0 +1,4 @@
+#! stap -p4
+
+# jiffies is a global that needs to be pulled from the symbol table.
+probe kernel.function("schedule_timeout") { println($jiffies) }
This page took 0.031673 seconds and 5 git commands to generate.