|
From: <sv...@va...> - 2005-06-11 05:04:52
|
Author: njn
Date: 2005-06-11 06:04:09 +0100 (Sat, 11 Jun 2005)
New Revision: 3886
Log:
Remove VG_ERRTXT_LEN from core.h.
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_debuginfo/symtab.c
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/core.h
=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/core.h 2005-06-11 04:58:29 UTC (rev 3885)
+++ trunk/coregrind/core.h 2005-06-11 05:04:09 UTC (rev 3886)
@@ -81,13 +81,6 @@
#include "pub_core_scheduler.h" // for types 'ThreadArchState'
=20
/* ---------------------------------------------------------------------
- Global macros.
- ------------------------------------------------------------------ */
-
-/* Max length of a text fragment used to construct error messages. */
-#define VG_ERRTXT_LEN 4096
-
-/* ---------------------------------------------------------------------
Environment variables
------------------------------------------------------------------ */
=20
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-06-11 04:58:29 UTC (rev 388=
5)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-06-11 05:04:09 UTC (rev 388=
6)
@@ -2467,17 +2467,18 @@
n =3D putStr(n, n_buf, buf, _str);
# define APPEND_ESC(_str) \
n =3D putStrEsc(n, n_buf, buf, _str);
+# define BUF_LEN 4096
=20
UInt lineno;=20
UChar ibuf[50];
Int n =3D 0;
- static UChar buf_fn[VG_ERRTXT_LEN];
- static UChar buf_obj[VG_ERRTXT_LEN];
- static UChar buf_srcloc[VG_ERRTXT_LEN];
- Bool know_fnname =3D VG_(get_fnname) (eip, buf_fn, VG_ERRTXT_LEN);
- Bool know_objname =3D VG_(get_objname)(eip, buf_obj, VG_ERRTXT_LEN);
+ static UChar buf_fn[BUF_LEN];
+ static UChar buf_obj[BUF_LEN];
+ static UChar buf_srcloc[BUF_LEN];
+ Bool know_fnname =3D VG_(get_fnname) (eip, buf_fn, BUF_LEN);
+ Bool know_objname =3D VG_(get_objname)(eip, buf_obj, BUF_LEN);
Bool know_srcloc =3D VG_(get_filename_linenum)(eip, buf_srcloc,
- VG_ERRTXT_LEN, &lineno=
);
+ BUF_LEN, &lineno);
=20
if (VG_(clo_xml)) {
=20
Modified: trunk/coregrind/m_errormgr.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_errormgr.c 2005-06-11 04:58:29 UTC (rev 3885)
+++ trunk/coregrind/m_errormgr.c 2005-06-11 05:04:09 UTC (rev 3886)
@@ -365,13 +365,15 @@
vg_assert( tid < VG_N_THREADS );
}
=20
+#define ERRTXT_LEN 4096
+
static void printSuppForIp(UInt n, Addr ip)
{
- static UChar buf[VG_ERRTXT_LEN];
+ static UChar buf[ERRTXT_LEN];
=20
- if ( VG_(get_fnname_nodemangle) (ip, buf, VG_ERRTXT_LEN) ) {
+ if ( VG_(get_fnname_nodemangle) (ip, buf, ERRTXT_LEN) ) {
VG_(printf)(" fun:%s\n", buf);
- } else if ( VG_(get_objname)(ip, buf, VG_ERRTXT_LEN) ) {
+ } else if ( VG_(get_objname)(ip, buf, ERRTXT_LEN) ) {
VG_(printf)(" obj:%s\n", buf);
} else {
VG_(printf)(" ???:??? "
@@ -1062,7 +1064,7 @@
Bool supp_matches_callers(Error* err, Supp* su)
{
Int i;
- Char caller_name[VG_ERRTXT_LEN];
+ Char caller_name[ERRTXT_LEN];
StackTrace ips =3D VG_(extract_StackTrace)(err->where);
=20
for (i =3D 0; i < su->n_callers; i++) {
@@ -1070,13 +1072,13 @@
vg_assert(su->callers[i].name !=3D NULL);
switch (su->callers[i].ty) {
case ObjName:=20
- if (!VG_(get_objname)(a, caller_name, VG_ERRTXT_LEN))
+ if (!VG_(get_objname)(a, caller_name, ERRTXT_LEN))
return False;
break;=20
=20
case FunName:=20
// Nb: mangled names used in suppressions
- if (!VG_(get_fnname_nodemangle)(a, caller_name, VG_ERRTXT_LE=
N))
+ if (!VG_(get_fnname_nodemangle)(a, caller_name, ERRTXT_LEN))
return False;
break;
default: VG_(tool_panic)("supp_matches_callers");
Modified: trunk/coregrind/m_stacktrace.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_stacktrace.c 2005-06-11 04:58:29 UTC (rev 3885)
+++ trunk/coregrind/m_stacktrace.c 2005-06-11 05:04:09 UTC (rev 3886)
@@ -193,9 +193,11 @@
=20
static void printIpDesc(UInt n, Addr ip)
{
- static UChar buf[VG_ERRTXT_LEN];
+ #define BUF_LEN 4096
+ =20
+ static UChar buf[BUF_LEN];
=20
- VG_(describe_IP)(ip, buf, VG_ERRTXT_LEN);
+ VG_(describe_IP)(ip, buf, BUF_LEN);
=20
if (VG_(clo_xml)) {
VG_(message)(Vg_UserMsg, " %s", buf);
|