diff options
author | Greg Clayton <gclayton@apple.com> | 2014-03-03 19:15:20 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-03-03 19:15:20 +0000 |
commit | 6fea17e8740b0c0687e0f945a3dd19eea32ec8e9 (patch) | |
tree | 68ec1ece80c357f12891d4c6c9c74f9b7443eee1 /lldb/source/Commands/CommandObjectMemory.cpp | |
parent | e6d398189e81533427e5ec0d6602310f67747603 (diff) | |
download | bcm5719-llvm-6fea17e8740b0c0687e0f945a3dd19eea32ec8e9.tar.gz bcm5719-llvm-6fea17e8740b0c0687e0f945a3dd19eea32ec8e9.zip |
"size_t" isn't always 64 bit, it is 32 bit on 32 bit systems. All printf style statements that were assuming size_t were 64 bit were changed, and they were also changed to display them as unsigned values as "size_t" isn't signed.
If you print anything with 'size_t', please cast it to "uint64_t" in the printf and use PRIu64 or PRIx64.
llvm-svn: 202738
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 3925768eb17..58c0bfcdccb 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -651,7 +651,7 @@ protected: } else if (m_format_options.GetCountValue().OptionWasSet()) { - result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %" PRId64 "), not both.\n", end_addr, item_count); + result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %" PRIu64 "), not both.\n", end_addr, (uint64_t)item_count); result.SetStatus(eReturnStatusFailed); return false; } @@ -708,7 +708,7 @@ protected: } if (bytes_read < total_byte_size) - result.AppendWarningWithFormat("Not all bytes (%" PRId64 "/%" PRId64 ") were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr); + result.AppendWarningWithFormat("Not all bytes (%" PRIu64 "/%" PRIu64 ") were able to be read from 0x%" PRIx64 ".\n", (uint64_t)bytes_read, (uint64_t)total_byte_size, addr); } else { @@ -878,7 +878,7 @@ protected: // here we passed a count, and it was not 1 // so we have a byte_size and a count // we could well multiply those, but instead let's just fail - result.AppendErrorWithFormat("reading memory as characters of size %" PRId64 " is not supported", item_byte_size); + result.AppendErrorWithFormat("reading memory as characters of size %" PRIu64 " is not supported", (uint64_t)item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1536,7 +1536,7 @@ protected: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat("Value 0x%" PRIx64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat("Value 0x%" PRIx64 " is too large to fit in a %" PRIu64 " byte unsigned integer value.\n", uval64, (uint64_t)item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1564,7 +1564,7 @@ protected: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat("Value 0x%" PRIx64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat("Value 0x%" PRIx64 " is too large to fit in a %" PRIu64 " byte unsigned integer value.\n", uval64, (uint64_t)item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1604,7 +1604,7 @@ protected: } else if (!SIntValueIsValidForSize (sval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %" PRId64 " byte signed integer value.\n", sval64, item_byte_size); + result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %" PRIu64 " byte signed integer value.\n", sval64, (uint64_t)item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1621,7 +1621,7 @@ protected: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %" PRIu64 " byte unsigned integer value.\n", uval64, (uint64_t)item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1638,7 +1638,7 @@ protected: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %" PRIu64 " byte unsigned integer value.\n", uval64, (uint64_t)item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } |