diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-01-23 14:28:47 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-01-23 14:28:47 +0100 |
commit | c3bad3042df505a3470f1e20b09822a9df1d4761 (patch) | |
tree | 6842e8eaa705e406379d34cf07a85431b6d71344 /translate.cxx | |
parent | 750b1f2f5c84acaf0776de5239dc81e2e95c1dec (diff) | |
parent | f120873cb40cfc16cc94f06fd722abc927b96227 (diff) | |
download | systemtap-steved-c3bad3042df505a3470f1e20b09822a9df1d4761.tar.gz systemtap-steved-c3bad3042df505a3470f1e20b09822a9df1d4761.tar.xz systemtap-steved-c3bad3042df505a3470f1e20b09822a9df1d4761.zip |
Merge branch 'master' into pr6866.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/translate.cxx b/translate.cxx index 1640d87e..cfd83438 100644 --- a/translate.cxx +++ b/translate.cxx @@ -26,6 +26,9 @@ extern "C" { #include <elfutils/libdwfl.h> +#ifdef HAVE_ELFUTILS_VERSION_H +#include <elfutils/version.h> +#endif } using namespace std; @@ -4180,7 +4183,8 @@ c_unparser::visit_print_format (print_format* e) prec_ix = arg_ix++; /* Generate a noop call to deref_buffer for %m. */ - if (components[i].type == print_format::conv_memory) { + if (components[i].type == print_format::conv_memory + || components[i].type == print_format::conv_memory_hex) { this->probe_or_function_needs_deref_fault_handler = true; o->newline() << "deref_buffer (0, " << tmp[arg_ix].value() << ", "; if (prec_ix == -1) @@ -4241,7 +4245,8 @@ c_unparser::visit_print_format (print_format* e) o->line() << ", (int)" << tmp[arg_ix++].value(); /* The type of the %m argument is 'char*'. */ - if (components[i].type == print_format::conv_memory) + if (components[i].type == print_format::conv_memory + || components[i].type == print_format::conv_memory_hex) o->line() << ", (char*)(uintptr_t)" << tmp[arg_ix++].value(); /* The type of the %c argument is 'int'. */ else if (components[i].type == print_format::conv_char) @@ -4473,8 +4478,15 @@ dump_unwindsyms (Dwfl_Module *m, (const unsigned char **)&build_id_bits, &build_id_vaddr)) > 0) { - /* XXX: But see https://bugzilla.redhat.com/show_bug.cgi?id=465872; - dwfl_module_build_id was not intended to return the end address. */ + // Enable workaround for elfutils dwfl bug. + // see https://bugzilla.redhat.com/show_bug.cgi?id=465872 + // 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. + build_id_vaddr += build_id_len; +#endif +#endif if (c->session.verbose > 1) { clog << "Found build-id in " << name << ", length " << build_id_len; |