|
From: <sv...@va...> - 2005-08-25 00:21:01
|
Author: njn
Date: 2005-08-25 01:20:56 +0100 (Thu, 25 Aug 2005)
New Revision: 4511
Log:
Only show the "line number too large" warning once.
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-08-24 23:09:19 UTC (rev 451=
0)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-08-25 00:20:56 UTC (rev 451=
1)
@@ -273,23 +273,29 @@
/* vg_assert(this < si->start + si->size && next-1 >=3D si->start); *=
/
if (this >=3D si->start + si->size || next-1 < si->start) {
if (0)
- VG_(message)(Vg_DebugMsg,=20
- "warning: ignoring line info entry falling "
- "outside current SegInfo: %p %p %p %p",
- si->start, si->start + si->size,=20
- this, next-1);
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: ignoring line info entry falling "
+ "outside current SegInfo: %p %p %p %p",
+ si->start, si->start + si->size,=20
+ this, next-1);
return;
}
=20
vg_assert(lineno >=3D 0);
if (lineno > MAX_LINENO) {
- VG_(message)(Vg_UserMsg,=20
- "warning: ignoring line info entry with "
- "huge line number (%d)", lineno);
- VG_(message)(Vg_UserMsg,=20
- " Can't handle line numbers "
- "greater than %d, sorry", MAX_LINENO);
- return;
+ static Bool complained =3D False;
+ if (!complained) {
+ complained =3D True;
+ VG_(message)(Vg_UserMsg,=20
+ "warning: ignoring line info entry with "
+ "huge line number (%d)", lineno);
+ VG_(message)(Vg_UserMsg,=20
+ " Can't handle line numbers "
+ "greater than %d, sorry", MAX_LINENO);
+ VG_(message)(Vg_UserMsg,=20
+ "(Nb: this message is only shown once)");
+ }
+ return;
}
=20
loc.addr =3D this;
|