diff options
author | Greg Clayton <gclayton@apple.com> | 2013-03-13 18:25:49 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-03-13 18:25:49 +0000 |
commit | e4ca515ae1c8cfabe101f20406b56f27dd2f381d (patch) | |
tree | a7a7c65e67a480ef10ed4b6eee316fb4de3e4496 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 682b60e4b4c61d2e49a600436ac437ecb8f36603 (diff) | |
download | bcm5719-llvm-e4ca515ae1c8cfabe101f20406b56f27dd2f381d.tar.gz bcm5719-llvm-e4ca515ae1c8cfabe101f20406b56f27dd2f381d.zip |
<rdar://problem/13404189>
Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command:
(lldb) l -10
Which gets turned into:
(lldb) source list --reverse --count 10
Also simplified the code that is used to track showing more source from the last file and line.
llvm-svn: 176961
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 631ed691bb6..ef1cdb63b7e 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -579,6 +579,7 @@ CommandInterpreter::LoadCommandDictionary () list_regex_cmd_ap->AddRegexCommand("^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "source list --file '%1' --line %2") && list_regex_cmd_ap->AddRegexCommand("^\\*?(0x[[:xdigit:]]+)[[:space:]]*$", "source list --address %1") && list_regex_cmd_ap->AddRegexCommand("^-[[:space:]]*$", "source list --reverse") && + list_regex_cmd_ap->AddRegexCommand("^-([[:digit:]]+)[[:space:]]*$", "source list --reverse --count %1") && list_regex_cmd_ap->AddRegexCommand("^(.+)$", "source list --name \"%1\"") && list_regex_cmd_ap->AddRegexCommand("^$", "source list")) { |