|
From: <sv...@va...> - 2014-08-05 19:34:44
|
Author: philippe
Date: Tue Aug 5 19:34:35 2014
New Revision: 14236
Log:
fix 338024 inlined functions are not shown if DW_AT_ranges is used
Based on investigation and patch by Matthias Schwarzott.
(no small test found that reproduced the problem,
but the equivalent patch given in bug 338024 fixed the inlined stack
trace in a big shared lib).
Would be nice however to have a small test case ...
Modified:
trunk/NEWS
trunk/coregrind/m_debuginfo/readdwarf3.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Aug 5 19:34:35 2014
@@ -202,6 +202,7 @@
337094 ifunc wrapper is broken on ppc64
337285 fcntl commands F_OFD_SETLK, F_OFD_SETLKW, and F_OFD_GETLK not supported
337528 leak check heuristic for block prefixed by length as 64bit number
+338024 inlined functions are not shown if DW_AT_ranges is used
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
n-i-bz s390x: Fix memory corruption for multithreaded applications
n-i-bz vex arm->IR: allow PC as basereg in some LDRD cases
Modified: trunk/coregrind/m_debuginfo/readdwarf3.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readdwarf3.c (original)
+++ trunk/coregrind/m_debuginfo/readdwarf3.c Tue Aug 5 19:34:35 2014
@@ -2608,14 +2608,18 @@
Word j;
HChar *inlfnname = get_inlFnName (inlinedfn_abstract_origin, cc, td3);
- /* Why is get_range_list biasing with cc->cu_svma and
- not with text_debug_bias ? */
+ /* Ranges are biased for the inline info using the same logic
+ as what is used for biasing ranges for the var info, for which
+ ranges are read using cc->cu_svma (see parse_var_DIE).
+ Then text_debug_bias is added when a (non global) var
+ is recorded (see just before the call to ML_(addVar)) */
ranges = get_range_list( cc, td3,
rangeoff, cc->cu_svma );
for (j = 0; j < VG_(sizeXA)( ranges ); j++) {
AddrRange* range = (AddrRange*) VG_(indexXA)( ranges, j );
ML_(addInlInfo) (cc->di,
- range->aMin, range->aMax+1,
+ range->aMin + cc->di->text_debug_bias,
+ range->aMax+1 + cc->di->text_debug_bias,
// aMax+1 as range has its last bound included
// while ML_(addInlInfo) expects last bound not
// included.
|