diff options
| author | Enrico Granata <egranata@apple.com> | 2016-03-15 01:57:10 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2016-03-15 01:57:10 +0000 |
| commit | ee88b615007d848e3a37bf3b341fc05ea1282b49 (patch) | |
| tree | 6156027c9072e292162687002c07e4d4aa4b3fe1 /lldb/source/Interpreter/CommandInterpreter.cpp | |
| parent | a4b1ace4610fb6ec2a1d06b3b978285f3dafbb20 (diff) | |
| download | llvm-ee88b615007d848e3a37bf3b341fc05ea1282b49.zip llvm-ee88b615007d848e3a37bf3b341fc05ea1282b49.tar.gz llvm-ee88b615007d848e3a37bf3b341fc05ea1282b49.tar.bz2 | |
Workaround the fact that "b" is now a separate command object from "_regexp-break", and thus "help b" doesn't show the possible syntaxes
It would be nice to have a longer-term plan for how to handle help for regular expression commands, since their syntax is highly irregular. I can see a few options (*), but for now this is a reasonable stop-gag measure for the most blatant regression.
(*) the simplest is, of course, to detect a regex command and inherit the syntax for any aliases thereof; it would be nice if this also didn't show the underlying regex command name when the alias is used
llvm-svn: 263523
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
| -rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 5127d19..08c864c 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -217,7 +217,7 @@ CommandInterpreter::Initialize () cmd_obj_sp = GetCommandSPExact ("_regexp-break",false); if (cmd_obj_sp) - AddAlias ("b", cmd_obj_sp); + AddAlias ("b", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact ("_regexp-tbreak",false); if (cmd_obj_sp) @@ -1049,7 +1049,7 @@ CommandInterpreter::UserCommandExists (const char *cmd) return m_user_dict.find(cmd) != m_user_dict.end(); } -bool +CommandAlias* CommandInterpreter::AddAlias (const char *alias_name, lldb::CommandObjectSP& command_obj_sp, const char *args_string) @@ -1064,11 +1064,11 @@ CommandInterpreter::AddAlias (const char *alias_name, if (command_alias_up && command_alias_up->IsValid()) { - m_alias_dict[alias_name] = CommandObjectSP(command_alias_up.release()); - return true; + m_alias_dict[alias_name] = CommandObjectSP(command_alias_up.get()); + return command_alias_up.release(); } - return false; + return nullptr; } bool |
