From 98e45bcea73ee4642e6bfda672f5266089cb5586 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 23 Feb 2009 09:45:24 -0600 Subject: Made probe_start()/probe_exit() function definitions match their declarations. 2009-02-23 David Smith * translate.cxx (translate_pass): Made probe_start()/probe_exit() function definitions match their declarations. --- translate.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index 530b077d..e6985504 100644 --- a/translate.cxx +++ b/translate.cxx @@ -5009,11 +5009,11 @@ translate_pass (systemtap_session& s) s.op->newline(); // XXX impedance mismatch - s.op->newline() << "static int probe_start () {"; + s.op->newline() << "static int probe_start (void) {"; s.op->newline(1) << "return systemtap_module_init () ? -1 : 0;"; s.op->newline(-1) << "}"; s.op->newline(); - s.op->newline() << "static void probe_exit () {"; + s.op->newline() << "static void probe_exit (void) {"; s.op->newline(1) << "systemtap_module_exit ();"; s.op->newline(-1) << "}"; s.op->assert_0_indent(); -- cgit From cfba34fccd99924a47622c5082706867f0a34b12 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 24 Feb 2009 11:04:00 +0100 Subject: Adjust extra_offset address against module base. * translate.cxx (dump_unwindsyms): Adjust extra_offset always against module base as workaround for buggy elfutils < 0.138. --- translate.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index e6985504..135830df 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4534,6 +4534,10 @@ dump_unwindsyms (Dwfl_Module *m, ki = dwfl_module_relocate_address (m, &extra_offset); dwfl_assert ("dwfl_module_relocate_address extra_offset", ki >= 0); + // Sadly dwfl_module_relocate_address is broken on + // elfutils < 0.138, so we need to adjust for the module + // base address outself. (see also below). + extra_offset = sym.st_value - base; if (c->session.verbose > 2) clog << "Found kernel _stext 0x" << hex << extra_offset << dec << endl; } -- cgit