diff options
author | Enrico Granata <egranata@apple.com> | 2013-01-21 19:20:50 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-01-21 19:20:50 +0000 |
commit | 6b4ddc655a3dafc53e98efd9560ee8185ae717fc (patch) | |
tree | 754719972dbd38cab3e3dec13af9478ade7e9561 /lldb/source/Interpreter/OptionGroupFormat.cpp | |
parent | 2cec01916c47a097f8777c85c22e66a88b684949 (diff) | |
download | bcm5719-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.cpp | 2 |
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; } |