diff options
author | Dave Brolley <brolley@redhat.com> | 2009-06-25 11:51:29 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-06-25 11:51:29 -0400 |
commit | a2958e68a76148370e8aaf41dafcb6a5726fc595 (patch) | |
tree | 76727b8f5ab14c9abdbd00ce92898fb9e0ae49a9 /tapsets.cxx | |
parent | 313db8e6d1e62f372d168b7368f220cb432d07d6 (diff) | |
parent | f1d04fa79e3c8664e8e6b2d1d3f38e1e51effcbf (diff) | |
download | systemtap-steved-a2958e68a76148370e8aaf41dafcb6a5726fc595.tar.gz systemtap-steved-a2958e68a76148370e8aaf41dafcb6a5726fc595.tar.xz systemtap-steved-a2958e68a76148370e8aaf41dafcb6a5726fc595.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 0a07e7a8..39255f50 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -989,8 +989,9 @@ dwarf_query::query_module_dwarf() else addr = statement_num_val; - // NB: we don't need to add the module base address or bias - // value here (for reasons that may be coincidental). + // Translate to an actual symbol address. + addr = dw.literal_addr_to_sym_addr (addr); + Dwarf_Die* cudie = dw.query_cu_containing_address(addr); if (cudie) // address could be wildly out of range query_cu(cudie, this); @@ -1549,6 +1550,11 @@ query_dwarf_func (Dwarf_Die * func, base_query * bq) Dwarf_Die d; q->dw.function_die (&d); + // Translate literal address to symbol address, then + // compensate for dw bias. + query_addr = q->dw.literal_addr_to_sym_addr(query_addr); + query_addr -= q->dw.module_bias; + if (q->dw.die_has_pc (d, query_addr)) record_this_function = true; } @@ -1579,6 +1585,12 @@ query_dwarf_func (Dwarf_Die * func, base_query * bq) else if (q->has_statement_num) { func.entrypc = q->statement_num_val; + + // Translate literal address to symbol address, then + // compensate for dw bias (will be used for query dw funcs). + func.entrypc = q->dw.literal_addr_to_sym_addr(func.entrypc); + func.entrypc -= q->dw.module_bias; + q->filtered_functions.push_back (func); if (q->dw.function_name_final_match (q->function)) return DWARF_CB_ABORT; |