]> sourceware.org Git - systemtap.git/commitdiff
* tapsets.cxx (sdt_query::record_semaphore): Adjust addr relative to
authorStan Cox <scox@redhat.com>
Tue, 29 Sep 2009 02:40:33 +0000 (22:40 -0400)
committerStan Cox <scox@redhat.com>
Tue, 29 Sep 2009 02:40:33 +0000 (22:40 -0400)
relocation base.

tapsets.cxx

index abd46aee0a11ddee04f0465133de4ce3737efe77..fdbddd9e7fe90f552b715032eac5c7572da6fc97 100644 (file)
@@ -3708,8 +3708,12 @@ sdt_query::record_semaphore (vector<derived_probe *> & results, unsigned start)
   string semaphore = probe_name + "_semaphore";
   Dwarf_Addr addr = lookup_symbol_address(dw.module, semaphore.c_str());
   if (addr)
-    for (unsigned i = start; i < results.size(); ++i)
-      sess.sdt_semaphore_addr.insert(make_pair(results[i], addr));
+    {
+      if (dwfl_module_relocations (dw.module) > 0)
+       dwfl_module_relocate_address (dw.module, &addr);
+      for (unsigned i = start; i < results.size(); ++i)
+       sess.sdt_semaphore_addr.insert(make_pair(results[i], addr));
+    }
 }
 
 
This page took 0.062384 seconds and 5 git commands to generate.