|
From: <sv...@va...> - 2005-12-28 15:19:43
|
Author: sewardj
Date: 2005-12-28 15:19:39 +0000 (Wed, 28 Dec 2005)
New Revision: 5456
Log:
Tentative fix for #117332: No line numbers printed by Valgrind 3.1.0
for programs compiled with Intel compiler.
Modified:
trunk/coregrind/m_debuginfo/symtab.c
Modified: trunk/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/symtab.c 2005-12-28 04:18:20 UTC (rev 545=
5)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-12-28 15:19:39 UTC (rev 545=
6)
@@ -127,6 +127,15 @@
symbols from the rwx segment -- which overlaps the r-x segment in the
file -- causes the redirection mechanism to redirect to addresses in
that third segment, which is wrong and causes crashes.
+
+ ------
+ JRS 28 Dec 05: unfortunately icc 8.1 on x86 has been seen to
+ produce executables with a single rwx segment rather than a
+ (r-x,rw-) pair. That means the rules have to be modified thusly:
+
+ x86-linux: consider if r and x
+ all others: consider if r and x and NOT w
+
*/
=20
static void nuke_syms_in_range ( Addr start, SizeT length )
@@ -144,7 +153,8 @@
curr =3D segInfo_list;
while (True) {
if (curr =3D=3D NULL) break;
- if (start+length-1 < curr->start || curr->start+curr->size-1 < =
start) {
+ if (start+length-1 < curr->start=20
+ || curr->start+curr->size-1 < start) {
/* no overlap */
} else {
found =3D True;
@@ -155,7 +165,6 @@
=20
if (!found) break;
unload_symbols( curr->start, curr->size );
-
}
}
=20
@@ -172,6 +181,14 @@
HChar* filename;
Bool ok;
=20
+ /* See comment at start of section for explanation of this do/don't
+ logic. */
+# if defined(VGP_x86_linux)
+ Bool require_no_W =3D False;
+# else
+ Bool require_no_W =3D True;
+# endif
+
seg =3D VG_(am_find_nsegment)(a);
vg_assert(seg);
=20
@@ -186,7 +203,7 @@
&& seg->fnIdx !=3D -1
&& seg->hasR
&& seg->hasX
- && !seg->hasW
+ && (require_no_W ? (!seg->hasW) : True)
&& is_elf_object_file( (const void*)seg->start );
=20
if (!ok) {
|