summaryrefslogtreecommitdiffstats
path: root/tools/jdwpspy
diff options
context:
space:
mode:
authorSangWook Han <sangwook.han@gmail.com>2012-07-15 22:51:02 +0900
committerSangWook Han <sangwook.han@gmail.com>2012-07-31 11:02:59 +0900
commitac8ed5e0893043a91a08e7fbf840fd3eff38a188 (patch)
treeeb9838b2b6c180be1fa3ee379641b217cd1883c2 /tools/jdwpspy
parent43eb9a78c3ca49c0e4de95a3f048bc0b9c6acc82 (diff)
downloadandroid_development-ac8ed5e0893043a91a08e7fbf840fd3eff38a188.tar.gz
android_development-ac8ed5e0893043a91a08e7fbf840fd3eff38a188.tar.bz2
android_development-ac8ed5e0893043a91a08e7fbf840fd3eff38a188.zip
Use uintptr_t for cast pointer to integer.
On 64bit host, sizeof pointer is not equal to sizeof int. Need for host tools. Change-Id: I848ceb878b873e6764a077e8a4ee31e756f30017
Diffstat (limited to 'tools/jdwpspy')
-rw-r--r--tools/jdwpspy/Main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/jdwpspy/Main.cpp b/tools/jdwpspy/Main.cpp
index 0f68d52c3..b53f99b8c 100644
--- a/tools/jdwpspy/Main.cpp
+++ b/tools/jdwpspy/Main.cpp
@@ -7,6 +7,7 @@
#include "Common.h"
#include <stdlib.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
@@ -35,7 +36,7 @@ void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
{
const unsigned char* addr = reinterpret_cast<const unsigned char*>(vaddr);
char out[77]; /* exact fit */
- unsigned int offset; /* offset to show while printing */
+ uintptr_t offset; /* offset to show while printing */
char* hex;
char* asc;
int gap;
@@ -43,7 +44,7 @@ void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
if (mode == kHexDumpLocal)
offset = 0;
else
- offset = (int) addr;
+ offset = (uintptr_t) addr;
memset(out, ' ', sizeof(out)-1);
out[8] = ':';