diff options
author | Dave Brolley <brolley@redhat.com> | 2009-07-01 10:25:11 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-07-01 10:25:11 -0400 |
commit | 22e3ee0face9f1b470fa7089dc662adf75bba5bc (patch) | |
tree | 2aa06c0ab130d11432011fbd3f1067ab8ad46fed /translate.cxx | |
parent | e5a9a77a535be94e915470eab5453e8976bc911c (diff) | |
parent | 3f6b6682ecfbdebefd93bfa503b8f6bd70fee005 (diff) | |
download | systemtap-steved-22e3ee0face9f1b470fa7089dc662adf75bba5bc.tar.gz systemtap-steved-22e3ee0face9f1b470fa7089dc662adf75bba5bc.tar.xz systemtap-steved-22e3ee0face9f1b470fa7089dc662adf75bba5bc.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/translate.cxx b/translate.cxx index 9e2bd99d..f4c2412b 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4547,7 +4547,7 @@ dump_unwindsyms (Dwfl_Module *m, // and http://sourceware.org/ml/systemtap/2008-q4/msg00579.html #ifdef _ELFUTILS_PREREQ #if _ELFUTILS_PREREQ(0,138) - // Let's standardize to the buggy "end of build-id bits" behavior. + // Let's standardize to the buggy "end of build-id bits" behavior. build_id_vaddr += build_id_len; #endif #if !_ELFUTILS_PREREQ(0,141) @@ -4662,7 +4662,7 @@ dump_unwindsyms (Dwfl_Module *m, { // This is a symbol within a (possibly relocatable) // kernel image. - + // We only need the function symbols to identify kernel-mode // PC's, so we omit undefined or "fake" absolute addresses. // These fake absolute addresses occur in some older i386 @@ -4875,10 +4875,10 @@ dump_unwindsyms (Dwfl_Module *m, for (int j=0; j<build_id_len;j++) c->output << "\\x" << hex << (unsigned short) *(build_id_bits+j) << dec; - + c->output << "\",\n"; c->output << ".build_id_len = " << build_id_len << ",\n"; - + /* XXX: kernel data boot-time relocation works differently from text. This hack disables relocation altogether, but that's not necessarily correct either. We may instead need a relocation basis different @@ -4892,7 +4892,7 @@ dump_unwindsyms (Dwfl_Module *m, << dec << ",\n"; } else c->output << ".build_id_len = 0,\n"; - + //initialize the note section representing unloaded c->output << ".notes_sect = 0,\n"; @@ -5035,8 +5035,13 @@ emit_symbol_data_done (unwindsym_dump_context *ctx, systemtap_session& s) ctx->output << "};\n"; ctx->output << "static unsigned _stp_num_modules = " << ctx->stp_module_index << ";\n"; - ctx->output << "static unsigned long _stp_kretprobe_trampoline = 0x" - << hex << ctx->stp_kretprobe_trampoline_addr << dec << ";\n"; + ctx->output << "static unsigned long _stp_kretprobe_trampoline = "; + // Special case for -1, which is invalid in hex if host width > target width. + if (ctx->stp_kretprobe_trampoline_addr == (unsigned long) -1) + ctx->output << "-1;\n"; + else + ctx->output << "0x" << hex << ctx->stp_kretprobe_trampoline_addr << dec + << ";\n"; // Some nonexistent modules may have been identified with "-d". Note them. for (set<string>::iterator it = ctx->undone_unwindsym_modules.begin(); |