* [Bug translator/1982] New: int type print out format
@ 2005-12-06 1:15 bibo dot mao at intel dot com
2005-12-06 1:26 ` [Bug translator/1982] " fche at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: bibo dot mao at intel dot com @ 2005-12-06 1:15 UTC (permalink / raw)
To: systemtap
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-06 1:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 1:15 [Bug translator/1982] New: int type print out format bibo dot mao at intel dot com
2005-12-06 1:26 ` [Bug translator/1982] " fche at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).