summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorDeepak Panickal <deepak@codeplay.com>2014-03-03 15:39:47 +0000
committerDeepak Panickal <deepak@codeplay.com>2014-03-03 15:39:47 +0000
commit99fbc07600b16093ac2875a461a1c086ae1db5ee (patch)
treecaa3aa183d1a4d2acc0021abc38de58c260fb9e7 /lldb/source/Commands
parent6fa32b6f545477a2d539499cb3c8702c3a47f870 (diff)
downloadbcm5719-llvm-99fbc07600b16093ac2875a461a1c086ae1db5ee.tar.gz
bcm5719-llvm-99fbc07600b16093ac2875a461a1c086ae1db5ee.zip
Fix Windows build using portable types for formatting the log outputs
llvm-svn: 202723
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectArgs.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp16
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp12
6 files changed, 26 insertions, 26 deletions
diff --git a/lldb/source/Commands/CommandObjectArgs.cpp b/lldb/source/Commands/CommandObjectArgs.cpp
index 3b919d11a56..cbfd05568c6 100644
--- a/lldb/source/Commands/CommandObjectArgs.cpp
+++ b/lldb/source/Commands/CommandObjectArgs.cpp
@@ -255,7 +255,7 @@ CommandObjectArgs::DoExecute (Args& args, CommandReturnObject &result)
for (arg_index = 0; arg_index < num_args; ++arg_index)
{
- result.GetOutputStream ().Printf ("%zu (%s): ", arg_index, args.GetArgumentAtIndex (arg_index));
+ result.GetOutputStream ().Printf ("%" PRIu64 " (%s): ", (uint64_t)arg_index, args.GetArgumentAtIndex (arg_index));
value_list.GetValueAtIndex (arg_index)->Dump (&result.GetOutputStream ());
result.GetOutputStream ().Printf("\n");
}
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index c20da7f3ec5..ce977fac4e3 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -1078,7 +1078,7 @@ protected:
{
// No breakpoint selected; enable all currently set breakpoints.
target->EnableAllBreakpoints ();
- result.AppendMessageWithFormat ("All breakpoints enabled. (%zu breakpoints)\n", num_breakpoints);
+ result.AppendMessageWithFormat ("All breakpoints enabled. (%" PRId64 " breakpoints)\n", num_breakpoints);
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -1197,7 +1197,7 @@ protected:
{
// No breakpoint selected; disable all currently set breakpoints.
target->DisableAllBreakpoints ();
- result.AppendMessageWithFormat ("All breakpoints disabled. (%zu breakpoints)\n", num_breakpoints);
+ result.AppendMessageWithFormat ("All breakpoints disabled. (%" PRId64 " breakpoints)\n", num_breakpoints);
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -1699,7 +1699,7 @@ protected:
else
{
target->RemoveAllBreakpoints ();
- result.AppendMessageWithFormat ("All breakpoints removed. (%zu %s)\n", num_breakpoints, num_breakpoints > 1 ? "breakpoints" : "breakpoint");
+ result.AppendMessageWithFormat ("All breakpoints removed. (%" PRId64 " %s)\n", num_breakpoints, num_breakpoints > 1 ? "breakpoints" : "breakpoint");
}
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index cb7398fb955..3925768eb17 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 %zu), not both.\n", end_addr, item_count);
+ result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %" PRId64 "), not both.\n", end_addr, item_count);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -708,7 +708,7 @@ protected:
}
if (bytes_read < total_byte_size)
- result.AppendWarningWithFormat("Not all bytes (%zu/%zu) were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
+ result.AppendWarningWithFormat("Not all bytes (%" PRId64 "/%" PRId64 ") were able to be read from 0x%" PRIx64 ".\n", bytes_read, 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 %zu is not supported", item_byte_size);
+ result.AppendErrorWithFormat("reading memory as characters of size %" PRId64 " is not supported", 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 %zu byte unsigned integer value.\n", 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.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 %zu byte unsigned integer value.\n", 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.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 %zu byte signed integer value.\n", 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.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 %zu byte unsigned integer value.\n", 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.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 %zu byte unsigned integer value.\n", 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.SetStatus(eReturnStatusFailed);
return false;
}
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index deaf2ab3793..035fcf901aa 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -202,7 +202,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat ("invalid register set index: %zu\n", set_idx);
+ result.AppendErrorWithFormat("invalid register set index: %" PRIu64 "\n", (uint64_t)set_idx);
result.SetStatus (eReturnStatusFailed);
break;
}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 308b72f355d..3c2d5f113eb 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -1763,7 +1763,7 @@ LookupFunctionInModule (CommandInterpreter &interpreter,
if (num_matches)
{
strm.Indent ();
- strm.Printf("%zu match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+ strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches, num_matches > 1 ? "es" : "");
DumpFullpath (strm, &module->GetFileSpec(), 0);
strm.PutCString(":\n");
DumpSymbolContextList (interpreter.GetExecutionContext().GetBestExecutionContextScope(), strm, sc_list, verbose);
@@ -1794,7 +1794,7 @@ LookupTypeInModule (CommandInterpreter &interpreter,
if (num_matches)
{
strm.Indent ();
- strm.Printf("%zu match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+ strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches, num_matches > 1 ? "es" : "");
DumpFullpath (strm, &module->GetFileSpec(), 0);
strm.PutCString(":\n");
for (TypeSP type_sp : type_list.Types())
@@ -2200,7 +2200,7 @@ protected:
const size_t num_modules = target->GetImages().GetSize();
if (num_modules > 0)
{
- result.GetOutputStream().Printf("Dumping symbol table for %zu modules.\n", num_modules);
+ result.GetOutputStream().Printf("Dumping symbol table for %" PRIu64 " modules.\n", (uint64_t)num_modules);
for (size_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
if (num_dumped > 0)
@@ -2333,7 +2333,7 @@ protected:
const size_t num_modules = target->GetImages().GetSize();
if (num_modules > 0)
{
- result.GetOutputStream().Printf("Dumping sections for %zu modules.\n", num_modules);
+ result.GetOutputStream().Printf("Dumping sections for %" PRIu64 " modules.\n", (uint64_t)num_modules);
for (size_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
num_dumped++;
@@ -2441,7 +2441,7 @@ protected:
const size_t num_modules = target_modules.GetSize();
if (num_modules > 0)
{
- result.GetOutputStream().Printf("Dumping debug symbols for %zu modules.\n", num_modules);
+ result.GetOutputStream().Printf("Dumping debug symbols for %" PRIu64 " modules.\n", (uint64_t)num_modules);
for (uint32_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
if (DumpModuleSymbolVendor (result.GetOutputStream(), target_modules.GetModulePointerAtIndexUnlocked(image_idx)))
@@ -3402,9 +3402,9 @@ protected:
ref_count = module_sp.use_count() - 1;
}
if (width)
- strm.Printf("{%*zu}", width, ref_count);
+ strm.Printf("{%*" PRIu64 "}", width, ref_count);
else
- strm.Printf("{%zu}", ref_count);
+ strm.Printf("{%" PRIu64 "}", (uint64_t)ref_count);
}
break;
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index e55b2ee4d7d..bc8325bcec7 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -397,7 +397,7 @@ protected:
{
// No watchpoint selected; enable all currently set watchpoints.
target->EnableAllWatchpoints();
- result.AppendMessageWithFormat("All watchpoints enabled. (%zu watchpoints)\n", num_watchpoints);
+ result.AppendMessageWithFormat("All watchpoints enabled. (%" PRId64 " watchpoints)\n", num_watchpoints);
result.SetStatus(eReturnStatusSuccessFinishNoResult);
}
else
@@ -476,7 +476,7 @@ protected:
// No watchpoint selected; disable all currently set watchpoints.
if (target->DisableAllWatchpoints())
{
- result.AppendMessageWithFormat("All watchpoints disabled. (%zu watchpoints)\n", num_watchpoints);
+ result.AppendMessageWithFormat("All watchpoints disabled. (%" PRId64 " watchpoints)\n", num_watchpoints);
result.SetStatus(eReturnStatusSuccessFinishNoResult);
}
else
@@ -564,7 +564,7 @@ protected:
else
{
target->RemoveAllWatchpoints();
- result.AppendMessageWithFormat("All watchpoints removed. (%zu watchpoints)\n", num_watchpoints);
+ result.AppendMessageWithFormat("All watchpoints removed. (%" PRId64 " watchpoints)\n", num_watchpoints);
}
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
@@ -706,7 +706,7 @@ protected:
if (command.GetArgumentCount() == 0)
{
target->IgnoreAllWatchpoints(m_options.m_ignore_count);
- result.AppendMessageWithFormat("All watchpoints ignored. (%zu watchpoints)\n", num_watchpoints);
+ result.AppendMessageWithFormat("All watchpoints ignored. (%" PRId64 " watchpoints)\n", num_watchpoints);
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -1099,7 +1099,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%zu, variable expression='%s').\n",
+ result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRId64 ", variable expression='%s').\n",
addr, size, command.GetArgumentAtIndex(0));
if (error.AsCString(NULL))
result.AppendError(error.AsCString());
@@ -1308,7 +1308,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%zu).\n",
+ result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRId64 ").\n",
addr, size);
if (error.AsCString(NULL))
result.AppendError(error.AsCString());
OpenPOWER on IntegriCloud