|
From: <sv...@va...> - 2009-11-16 09:07:19
|
Author: tom
Date: 2009-11-16 09:07:07 +0000 (Mon, 16 Nov 2009)
New Revision: 10944
Log:
Make sure isIFunc is initialised whenever we add a symbol.
Modified:
trunk/coregrind/m_debuginfo/readmacho.c
trunk/coregrind/m_debuginfo/readpdb.c
trunk/coregrind/m_debuginfo/readxcoff.c
Modified: trunk/coregrind/m_debuginfo/readmacho.c
===================================================================
--- trunk/coregrind/m_debuginfo/readmacho.c 2009-11-16 09:06:50 UTC (rev 10943)
+++ trunk/coregrind/m_debuginfo/readmacho.c 2009-11-16 09:07:07 UTC (rev 10944)
@@ -369,6 +369,7 @@
di->text_avma+di->text_size - sym_addr;
risym.name = ML_(addStr)(di, name, -1);
risym.isText = True;
+ risym.isIFunc = False;
// Lots of user function names get prepended with an underscore. Eg. the
// function 'f' becomes the symbol '_f'. And the "below main"
// function is called "start". So we skip the leading underscore, and
Modified: trunk/coregrind/m_debuginfo/readpdb.c
===================================================================
--- trunk/coregrind/m_debuginfo/readpdb.c 2009-11-16 09:06:50 UTC (rev 10943)
+++ trunk/coregrind/m_debuginfo/readpdb.c 2009-11-16 09:07:07 UTC (rev 10944)
@@ -1273,6 +1273,7 @@
vsym.size = sym->data_v1.p_name.namelen;
// FIXME: .namelen is sizeof(.data) including .name[]
vsym.isText = (sym->generic.id == S_PUB_V1);
+ vsym.isIFunc = False;
ML_(addSym)( di, &vsym );
n_syms_read++;
}
@@ -1299,6 +1300,7 @@
// not size of function!
vsym.isText = !!(IMAGE_SCN_CNT_CODE
& sectp[sym->data_v2.segment-1].Characteristics);
+ vsym.isIFunc = False;
ML_(addSym)( di, &vsym );
n_syms_read++;
}
@@ -1331,6 +1333,7 @@
// .text of the function
vsym.isText = !!(IMAGE_SCN_CNT_CODE
& sectp[sym->data_v2.segment-1].Characteristics);
+ vsym.isIFunc = False;
ML_(addSym)( di, &vsym );
n_syms_read++;
}
@@ -1362,6 +1365,7 @@
vsym.name = nmstr;
vsym.size = sym->proc_v1.proc_len;
vsym.isText = True;
+ vsym.isIFunc = False;
if (debug)
VG_(message)(Vg_UserMsg,
"Adding function %s addr=%#lx length=%d\n",
@@ -1382,6 +1386,7 @@
vsym.name = nmstr;
vsym.size = sym->proc_v2.proc_len;
vsym.isText = True;
+ vsym.isIFunc = False;
if (debug)
VG_(message)(Vg_UserMsg,
"Adding function %s addr=%#lx length=%d\n",
@@ -1404,6 +1409,7 @@
vsym.name = nmstr;
vsym.size = sym->proc_v3.proc_len;
vsym.isText = 1;
+ vsym.isIFunc = False;
ML_(addSym)( di, &vsym );
n_syms_read++;
}
Modified: trunk/coregrind/m_debuginfo/readxcoff.c
===================================================================
--- trunk/coregrind/m_debuginfo/readxcoff.c 2009-11-16 09:06:50 UTC (rev 10943)
+++ trunk/coregrind/m_debuginfo/readxcoff.c 2009-11-16 09:07:07 UTC (rev 10944)
@@ -1521,10 +1521,11 @@
/* Actually add the symbol (finallyatlast) */
if (sane) {
UInt nlen;
- dis.addr = addr;
- dis.size = size;
- dis.tocptr = s->r2known ? s->r2value : 0;
- dis.isText = True;
+ dis.addr = addr;
+ dis.size = size;
+ dis.tocptr = s->r2known ? s->r2value : 0;
+ dis.isText = True;
+ dis.isIFunc = False;
vg_assert(!is_empty_Name(s->name));
nlen = s->name.len;
vg_assert(nlen > 0);
|