This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/1982] New: int type print out format
- From: "bibo dot mao at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 6 Dec 2005 01:15:46 -0000
- Subject: [Bug translator/1982] New: int type print out format
- Reply-to: sourceware-bugzilla at sourceware dot org
Test case testsuite/buildok/printf.stp failed to run in IA64 platform in
snapshot1203 version, because int type print out format is different is
different platform. Here is the patch, I test it in IA32/EM64T/IA64 platform,
but I have not tested on other platform because I have no such machine.
diff -Nruap src.org/staptree.cxx src/staptree.cxx
--- src.org/staptree.cxx 2005-12-05 03:38:54.000000000 +0800
+++ src/staptree.cxx 2005-12-05 03:39:19.000000000 +0800
@@ -15,7 +15,15 @@
#include <cassert>
using namespace std;
-
+#if __WORDSIZE == 64
+ #ifdef __x86_64__
+ #define PRi64 "ll"
+ #else
+ #define PRi64 "l"
+ #endif
+#else
+ #define PRi64 "ll"
+#endif
expression::expression ():
type (pe_unknown), tok (0)
@@ -367,23 +375,23 @@ print_format::components_to_string(vecto
switch (i->type)
{
case conv_signed_decimal:
- oss << "lld";
+ oss << PRi64"d";
break;
case conv_unsigned_decimal:
- oss << "llu";
+ oss << PRi64"u";
break;
case conv_unsigned_octal:
- oss << "llo";
+ oss << PRi64"o";
break;
case conv_unsigned_uppercase_hex:
- oss << "llX";
+ oss << PRi64"X";
break;
case conv_unsigned_lowercase_hex:
- oss << "llx";
+ oss << PRi64"x";
break;
case conv_string:
--
Summary: int type print out format
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: bibo dot mao at intel dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=1982
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.