summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 6f1c74fde9e..31a10142ca8 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -114,6 +114,9 @@ CommandInterpreter::Initialize ()
HandleCommand ("command alias p frame variable", false, result);
HandleCommand ("command alias print frame variable", false, result);
HandleCommand ("command alias po expression -o --", false, result);
+ HandleCommand ("command alias up regexp-up", false, result);
+ HandleCommand ("command alias down regexp-down", false, result);
+
}
const char *
@@ -197,6 +200,36 @@ CommandInterpreter::LoadCommandDictionary ()
m_command_dict[break_regex_cmd_sp->GetCommandName ()] = break_regex_cmd_sp;
}
}
+
+ std::auto_ptr<CommandObjectRegexCommand>
+ down_regex_cmd_ap(new CommandObjectRegexCommand (*this,
+ "regexp-down",
+ "Go down \"n\" frames in the stack (1 frame by default).",
+ "down [n]", 2));
+ if (down_regex_cmd_ap.get())
+ {
+ if (down_regex_cmd_ap->AddRegexCommand("^$", "frame select -r -1") &&
+ down_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "frame select -r -%1"))
+ {
+ CommandObjectSP down_regex_cmd_sp(down_regex_cmd_ap.release());
+ m_command_dict[down_regex_cmd_sp->GetCommandName ()] = down_regex_cmd_sp;
+ }
+ }
+
+ std::auto_ptr<CommandObjectRegexCommand>
+ up_regex_cmd_ap(new CommandObjectRegexCommand (*this,
+ "regexp-up",
+ "Go up \"n\" frames in the stack (1 frame by default).",
+ "up [n]", 2));
+ if (up_regex_cmd_ap.get())
+ {
+ if (up_regex_cmd_ap->AddRegexCommand("^$", "frame select -r 1") &&
+ up_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "frame select -r %1"))
+ {
+ CommandObjectSP up_regex_cmd_sp(up_regex_cmd_ap.release());
+ m_command_dict[up_regex_cmd_sp->GetCommandName ()] = up_regex_cmd_sp;
+ }
+ }
}
int
OpenPOWER on IntegriCloud