]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added support for %o (octal format).
authorBart Van Assche <bvanassche@acm.org>
Sun, 26 Jul 2009 08:40:17 +0000 (08:40 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 26 Jul 2009 08:40:17 +0000 (08:40 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10604

coregrind/m_debuglog.c

index 2e04ab5cd7a32fd091ffb615300f66383a3bd366..cf61731831ff099208760700ab1bab145dc7513d 100644 (file)
@@ -780,6 +780,18 @@ VG_(debugLog_vprintf) (
       else                { is_long = True; }
 
       switch (format[i]) {
+         case 'o': /* %o */
+            if (flags & VG_MSG_ALTFORMAT) {
+               ret += 2;
+               send('0',send_arg2);
+            }
+            if (is_long)
+               ret += myvprintf_int64(send, send_arg2, flags, 8, width, False,
+                                      (ULong)(va_arg (vargs, ULong)));
+            else
+               ret += myvprintf_int64(send, send_arg2, flags, 8, width, False,
+                                      (ULong)(va_arg (vargs, UInt)));
+            break;
          case 'd': /* %d */
             flags |= VG_MSG_SIGNED;
             if (is_long)