You must use PRIx64 for 64 bit types.  %ll isn't right on windows <br><div class="gmail_quote">On Fri, Mar 13, 2015 at 8:21 AM Ilia K <<a href="mailto:ki.stfu@gmail.com">ki.stfu@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In some places address is printed as "int" instead of "long long". I suppose that we should use "%llx" instead of "%x".<br>
<br>
But perhaps would be better to use PRIx64 (or PRIxPTR) macro.<br>
<br>
<br>
================<br>
Comment at: tools/lldb-mi/MICmdCmdBreak.<u></u>cpp:337<br>
@@ -336,3 +336,3 @@<br>
     // MI print<br>
-    // "^done,bkpt={number=\"%d\",<u></u>type=\"breakpoint\",disp=\"%s\<u></u>",enabled=\"%c\",addr=\"0x%<u></u>08x\",func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,thread-groups=[\"%s\"],times=<u></u>\"%d\",original-location=\"%s\<u></u>"}"<br>
+    // "^done,bkpt={number=\"%d\",<u></u>type=\"breakpoint\",disp=\"%s\<u></u>",enabled=\"%c\",addr=\"0x%<u></u>016x\",func=\"%s\",file=\"%s\"<u></u>,fullname=\"%s/%s\",line=\"%d\<u></u>",thread-groups=[\"%s\"],<u></u>times=\"%d\",original-<u></u>location=\"%s\"}"<br>
     CMICmnMIValueTuple miValueTuple;<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/MICmdCmdData.<u></u>cpp:642<br>
@@ -641,3 +641,3 @@<br>
 {<br>
-    // MI: memory=[{begin=\"0x%08x\",<u></u>offset=\"0x%08x\",end=\"0x%<u></u>08x\",contents=\" \" }]"<br>
-    const CMICmnMIValueConst miValueConst(CMIUtilString::<u></u>Format("0x%08llx", m_nAddrStart));<br>
+    // MI: memory=[{begin=\"0x%016x\",<u></u>offset=\"0x%016x\",end=\"0x%<u></u>016x\",contents=\" \" }]"<br>
+    const CMICmnMIValueConst miValueConst(CMIUtilString::<u></u>Format("0x%016llx", m_nAddrStart));<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
begin=\"0x%016llx\",offset=...<u></u>,end=...<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/MICmdCmdGdbInfo.<u></u>cpp:212<br>
@@ -211,3 +211,3 @@<br>
             const CMIUtilString strHasSymbols = (module.GetNumSymbols() > 0) ? "Yes" : "No";<br>
-            lldb::addr_t addrLoadS = 0xffffffff;<br>
+            lldb::addr_t addrLoadS = 0xffffffffffffffff;<br>
             lldb::addr_t addrLoadSize = 0;<br>
----------------<br>
I am worried about how it will work in case of 32 bit arch.<br>
<br>
================<br>
Comment at: tools/lldb-mi/MICmdCmdGdbInfo.<u></u>cpp:232<br>
@@ -231,3 +231,3 @@<br>
             bOk = bOk &&<br>
-                  rStdout.TextToStdout(<u></u>CMIUtilString::Format("~\"0x%<u></u>08x\t0x%08x\t%s\t\t%s\"", addrLoadS, addrLoadS + addrLoadSize,<br>
+                  rStdout.TextToStdout(<u></u>CMIUtilString::Format("~\"0x%<u></u>016x\t0x%016x\t%s\t\t%s\"", addrLoadS, addrLoadS + addrLoadSize,<br>
                                                              strHasSymbols.c_str(), strModuleFullPath.c_str()));<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
~\"0x%016llx\t0x%016llx\t..."<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebugSessionInfo.cpp:<u></u>1091<br>
@@ -1090,3 +1090,3 @@<br>
 {<br>
-    // MI print "=breakpoint-modified,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%08x\"<u></u>,<br>
+    // MI print "=breakpoint-modified,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%016x\<u></u>",<br>
     // func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,times=\"%d\",original-<u></u>location=\"%s\"}"<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebuggerHandleEvents.<u></u>cpp:348<br>
@@ -347,3 +347,3 @@<br>
<br>
-    // MI print "=breakpoint-modified,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%08x\"<u></u>,<br>
+    // MI print "=breakpoint-modified,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%016x\<u></u>",<br>
     // func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,times=\"%d\",original-<u></u>location=\"%s\"}"<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebuggerHandleEvents.<u></u>cpp:444<br>
@@ -443,3 +443,3 @@<br>
         // MI print<br>
-        // "=breakpoint-modified,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%08x\"<u></u>,func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,times=\"%d\",original-<u></u>location=\"%s\"}"<br>
+        // "=breakpoint-modified,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%016x\<u></u>",func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,times=\"%d\",original-<u></u>location=\"%s\"}"<br>
         const CMICmnMIValueResult miValueResult("bkpt", miValueTuple);<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebuggerHandleEvents.<u></u>cpp:466<br>
@@ -465,3 +465,3 @@<br>
         // MI print<br>
-        // "=breakpoint-created,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%08x\"<u></u>,func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,times=\"%d\",original-<u></u>location=\"%s\"}"<br>
+        // "=breakpoint-created,bkpt={<u></u>number=\"%d\",type=\"<u></u>breakpoint\",disp=\"%s\",<u></u>enabled=\"%c\",addr=\"0x%016x\<u></u>",func=\"%s\",file=\"%s\",<u></u>fullname=\"%s/%s\",line=\"%d\"<u></u>,times=\"%d\",original-<u></u>location=\"%s\"}"<br>
         const CMICmnMIValueResult miValueResult("bkpt", miValueTuple);<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebuggerHandleEvents.<u></u>cpp:1278<br>
@@ -1277,3 +1277,3 @@<br>
     // MI print<br>
-    // "*stopped,reason=\"breakpoint-<u></u>hit\",disp=\"del\",bkptno=\"%<u></u>d\",frame={addr=\"0x%08x\",<u></u>func=\"%s\",args=[],file=\"%s\<u></u>",fullname=\"%s\",line=\"%d\"}<u></u>,thread-id=\"%d\",stopped-<u></u>threads=\"all\""<br>
+    // "*stopped,reason=\"breakpoint-<u></u>hit\",disp=\"del\",bkptno=\"%<u></u>d\",frame={addr=\"0x%016x\",<u></u>func=\"%s\",args=[],file=\"%s\<u></u>",fullname=\"%s\",line=\"%d\"}<u></u>,thread-id=\"%d\",stopped-<u></u>threads=\"all\""<br>
     const CMICmnMIValueConst miValueConst("breakpoint-hit")<u></u>;<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebuggerHandleEvents.<u></u>cpp:1290<br>
@@ -1289,3 +1289,3 @@<br>
<br>
-    // frame={addr=\"0x%08x\",func=\"<u></u>%s\",args=[],file=\"%s\",<u></u>fullname=\"%s\",line=\"%d\"}<br>
+    // frame={addr=\"0x%016x\",func=\<u></u>"%s\",args=[],file=\"%s\",<u></u>fullname=\"%s\",line=\"%d\"}<br>
     if (bOk)<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/<u></u>MICmnLLDBDebuggerHandleEvents.<u></u>cpp:1355<br>
@@ -1354,3 +1354,3 @@<br>
     // MI print<br>
-    // "*stopped,reason=\"end-<u></u>stepping-range\",frame={addr=\<u></u>"0x%08x\",func=\"%s\",args=[\"<u></u>%s\"],file=\"%s\",fullname=\"%<u></u>s\",line=\"%d\"},thread-id=\"%<u></u>d\",stopped-threads=\"all\""<br>
+    // "*stopped,reason=\"end-<u></u>stepping-range\",frame={addr=\<u></u>"0x%016x\",func=\"%s\",args=[\<u></u>"%s\"],file=\"%s\",fullname=\"<u></u>%s\",line=\"%d\"},thread-id=\"<u></u>%d\",stopped-threads=\"all\""<br>
     lldb::SBFrame frame = thread.GetFrameAtIndex(0);<br>
----------------<br>
address should be printed as a long long value:<br>
```<br>
addr=\"0x%016llx\"<br>
```<br>
<br>
================<br>
Comment at: tools/lldb-mi/MICmnResources.<u></u>cpp:255-256<br>
@@ -254,4 +254,4 @@<br>
     {IDS_CMD_ERR_MEMORY_ALLOC_<u></u>FAILURE, "Command '%s'. Failed to allocate memory %d bytes"},<br>
-    {IDS_CMD_ERR_LLDB_ERR_NOT_<u></u>READ_WHOLE_BLK, "Command '%s'. LLDB unable to read entire memory block of %u bytes at address 0x%08x"},<br>
-    {IDS_CMD_ERR_LLDB_ERR_READ_<u></u>MEM_BYTES, "Command '%s'. Unable to read memory block of %u bytes at address 0x%08x: %s "},<br>
+    {IDS_CMD_ERR_LLDB_ERR_NOT_<u></u>READ_WHOLE_BLK, "Command '%s'. LLDB unable to read entire memory block of %u bytes at address 0x%016x"},<br>
+    {IDS_CMD_ERR_LLDB_ERR_READ_<u></u>MEM_BYTES, "Command '%s'. Unable to read memory block of %u bytes at address 0x%016x: %s "},<br>
     {IDS_CMD_ERR_INVALID_PROCESS, "Command '%s'. Invalid process during debug session"},<br>
----------------<br>
address should be printed as a long long value<br>
<br>
================<br>
Comment at: tools/lldb-mi/MICmnResources.<u></u>cpp:261-262<br>
@@ -260,4 +260,4 @@<br>
     {IDS_CMD_ERR_BRKPT_INFO_OBJ_<u></u>NOT_FOUND, "Command '%s'. Breakpoint information for breakpoint ID %d not found"},<br>
-    {IDS_CMD_ERR_LLDB_ERR_READ_<u></u>MEM_BYTES, "Command '%s'. Unable to write memory block of %u bytes at address 0x%08x: %s "},<br>
-    {IDS_CMD_ERR_LLDB_ERR_NOT_<u></u>WRITE_WHOLEBLK, "Command '%s'. LLDB unable to write entire memory block of %u bytes at address 0x%08x"},<br>
+    {IDS_CMD_ERR_LLDB_ERR_READ_<u></u>MEM_BYTES, "Command '%s'. Unable to write memory block of %u bytes at address 0x%016x: %s "},<br>
+    {IDS_CMD_ERR_LLDB_ERR_NOT_<u></u>WRITE_WHOLEBLK, "Command '%s'. LLDB unable to write entire memory block of %u bytes at address 0x%016x"},<br>
     {IDS_CMD_ERR_SET_NEW_DRIVER_<u></u>STATE, "Command '%s'. Command tried to set new MI Driver running state and failed. %s"},<br>
----------------<br>
address should be printed as a long long value<br>
<br>
<a href="http://reviews.llvm.org/D8238" target="_blank">http://reviews.llvm.org/D8238</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
</blockquote></div>