]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rename M_VG_ERRTXT as VG_ERRTXT_LEN, which is more consistent with other
authorNicholas Nethercote <njn@valgrind.org>
Fri, 25 Mar 2005 23:47:16 +0000 (23:47 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 25 Mar 2005 23:47:16 +0000 (23:47 +0000)
names.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3430

coregrind/core.h
coregrind/stacktrace.c
coregrind/vg_errcontext.c
coregrind/vg_symtab2.c

index 481d4f7cdbc3344b95c82db165bcc8654b2aed1c..95553261ad4d5a32cbebfe99f89689f7e68b9de6 100644 (file)
@@ -106,7 +106,7 @@ typedef struct _ThreadState ThreadState;
    ------------------------------------------------------------------ */
 
 /* Max length of a text fragment used to construct error messages. */
-#define M_VG_ERRTXT 4096
+#define VG_ERRTXT_LEN 4096
 
 /* The maximum number of calls we're prepared to save in a
    backtrace. */
index 692a035d9e4c833b7ee5fb14769c2110ea58ce61..fb6c8dc5d90f0e7b418621260510290e1572d5ca 100644 (file)
@@ -143,9 +143,9 @@ UInt VG_(get_StackTrace) ( ThreadId tid, StackTrace ips, UInt n_ips )
 
 static void printIpDesc(UInt n, Addr ip)
 {
-   static UChar buf[M_VG_ERRTXT];
+   static UChar buf[VG_ERRTXT_LEN];
 
-   VG_(describe_IP)(ip, buf, M_VG_ERRTXT);
+   VG_(describe_IP)(ip, buf, VG_ERRTXT_LEN);
    VG_(message)(Vg_UserMsg, "   %s %s", ( n == 0 ? "at" : "by" ), buf);
 }
 
index a28e34ed22a9b51fcc11d5abba6d3470d72a8cc6..1f360b8240558b2a31230a64a40ec412efff6177 100644 (file)
@@ -343,11 +343,11 @@ void construct_error ( Error* err, ThreadId tid, ErrorKind ekind, Addr a,
 
 static void printSuppForIp(UInt n, Addr ip)
 {
-   static UChar buf[M_VG_ERRTXT];
+   static UChar buf[VG_ERRTXT_LEN];
 
-   if ( VG_(get_fnname_nodemangle) (ip, buf,  M_VG_ERRTXT) ) {
+   if ( VG_(get_fnname_nodemangle) (ip, buf,  VG_ERRTXT_LEN) ) {
       VG_(printf)("   fun:%s\n", buf);
-   } else if ( VG_(get_objname)(ip, buf+7, M_VG_ERRTXT-7) ) {
+   } else if ( VG_(get_objname)(ip, buf+7, VG_ERRTXT_LEN-7) ) {
       VG_(printf)("   obj:%s\n", buf);
    } else {
       VG_(printf)("   ???:???       "
@@ -982,7 +982,7 @@ static
 Bool supp_matches_callers(Error* err, Supp* su)
 {
    Int i;
-   Char caller_name[M_VG_ERRTXT];
+   Char caller_name[VG_ERRTXT_LEN];
    StackTrace ips = VG_(extract_StackTrace)(err->where);
 
    for (i = 0; i < su->n_callers; i++) {
@@ -990,13 +990,13 @@ Bool supp_matches_callers(Error* err, Supp* su)
       vg_assert(su->callers[i].name != NULL);
       switch (su->callers[i].ty) {
          case ObjName: 
-            if (!VG_(get_objname)(a, caller_name, M_VG_ERRTXT))
+            if (!VG_(get_objname)(a, caller_name, VG_ERRTXT_LEN))
                return False;
             break; 
 
          case FunName: 
             // Nb: mangled names used in suppressions
-            if (!VG_(get_fnname_nodemangle)(a, caller_name, M_VG_ERRTXT))
+            if (!VG_(get_fnname_nodemangle)(a, caller_name, VG_ERRTXT_LEN))
                return False;
             break;
          default: VG_(tool_panic)("supp_matches_callers");
index 1ec15ae0117e16aae32786d34cccd17c0b663d9f..4bf2d218d371d47be24428a88ffad0036f2461b8 100644 (file)
@@ -2181,13 +2181,13 @@ Char* VG_(describe_IP)(Addr eip, Char* buf, Int n_buf)
    UInt  lineno; 
    UChar ibuf[20];
    UInt  n = 0;
-   static UChar buf_fn[M_VG_ERRTXT];
-   static UChar buf_obj[M_VG_ERRTXT];
-   static UChar buf_srcloc[M_VG_ERRTXT];
-   Bool  know_fnname  = VG_(get_fnname) (eip, buf_fn,  M_VG_ERRTXT);
-   Bool  know_objname = VG_(get_objname)(eip, buf_obj, M_VG_ERRTXT);
-   Bool  know_srcloc  = VG_(get_filename_linenum)(eip, buf_srcloc, M_VG_ERRTXT, 
-                                                  &lineno);
+   static UChar buf_fn[VG_ERRTXT_LEN];
+   static UChar buf_obj[VG_ERRTXT_LEN];
+   static UChar buf_srcloc[VG_ERRTXT_LEN];
+   Bool  know_fnname  = VG_(get_fnname) (eip, buf_fn,  VG_ERRTXT_LEN);
+   Bool  know_objname = VG_(get_objname)(eip, buf_obj, VG_ERRTXT_LEN);
+   Bool  know_srcloc  = VG_(get_filename_linenum)(eip, buf_srcloc,
+                                                  VG_ERRTXT_LEN, &lineno);
    VG_(sprintf)(ibuf,"0x%llx: ", (ULong)eip);
    APPEND(ibuf);
    if (know_fnname) {