summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionGroupFormat.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-01-21 19:20:50 +0000
committerEnrico Granata <egranata@apple.com>2013-01-21 19:20:50 +0000
commit6b4ddc655a3dafc53e98efd9560ee8185ae717fc (patch)
tree754719972dbd38cab3e3dec13af9478ade7e9561 /lldb/source/Interpreter/OptionGroupFormat.cpp
parent2cec01916c47a097f8777c85c22e66a88b684949 (diff)
downloadbcm5719-llvm-6b4ddc655a3dafc53e98efd9560ee8185ae717fc.tar.gz
bcm5719-llvm-6b4ddc655a3dafc53e98efd9560ee8185ae717fc.zip
<rdar://problem/12437929>
Providing a special mode of operator for "memory read -f c-str" which actually works in most common cases Where the old behavior would provide: (lldb) mem read --format s `foo` 0x100000f5d: NULL Now we do: (lldb) mem read --format s `foo` 0x100000f5d: "hello world" You can also specify a count and that many strings will be showed starting at the initial address: (lldb) mem read -c 2 -f c-str `foo` 0x100000f1d: "hello world" 0x100000f29: "short" llvm-svn: 173076
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupFormat.cpp')
-rw-r--r--lldb/source/Interpreter/OptionGroupFormat.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp
index 226f5a16f98..944bb18107d 100644
--- a/lldb/source/Interpreter/OptionGroupFormat.cpp
+++ b/lldb/source/Interpreter/OptionGroupFormat.cpp
@@ -205,6 +205,7 @@ OptionGroupFormat::SetOptionValue (CommandInterpreter &interpreter,
bool
OptionGroupFormat::ParserGDBFormatLetter (CommandInterpreter &interpreter, char format_letter, Format &format, uint32_t &byte_size)
{
+ m_has_gdb_format = true;
switch (format_letter)
{
case 'o': format = eFormatOctal; m_prev_gdb_format = format_letter; return true;
@@ -242,4 +243,5 @@ OptionGroupFormat::OptionParsingStarting (CommandInterpreter &interpreter)
m_format.Clear();
m_byte_size.Clear();
m_count.Clear();
+ m_has_gdb_format = false;
}
OpenPOWER on IntegriCloud