aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-03-22 21:07:54 +0000
committerEnrico Granata <egranata@apple.com>2016-03-22 21:07:54 +0000
commit660764a060805dc4bb85d4d693fd58b54c800e41 (patch)
tree4a9fe31a7d2e83a1103fa26e2b8210cc8b2d9ad0 /lldb/source/Interpreter/CommandInterpreter.cpp
parent00294b34a3c99f3540214a148c0bd15e68f9d7fd (diff)
downloadllvm-660764a060805dc4bb85d4d693fd58b54c800e41.zip
llvm-660764a060805dc4bb85d4d693fd58b54c800e41.tar.gz
llvm-660764a060805dc4bb85d4d693fd58b54c800e41.tar.bz2
Fix a bug caused by my alias refactoring where, if an alias was defined in terms of another alias, trying to run the nested command would actually cause a crash in the command interpreter
llvm-svn: 264096
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index c2ea5ef..78c37a6 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1359,8 +1359,9 @@ CommandInterpreter::BuildAliasResult (const char *alias_name,
if (alias_cmd_obj && alias_cmd_obj->IsAlias())
{
- OptionArgVectorSP option_arg_vector_sp = ((CommandAlias*)alias_cmd_obj)->GetOptionArguments();
- alias_cmd_obj = ((CommandAlias*)alias_cmd_obj)->GetUnderlyingCommand().get();
+ std::pair<CommandObjectSP, OptionArgVectorSP> desugared = ((CommandAlias*)alias_cmd_obj)->Desugar();
+ OptionArgVectorSP option_arg_vector_sp = desugared.second;
+ alias_cmd_obj = desugared.first.get();
std::string alias_name_str = alias_name;
if ((cmd_args.GetArgumentCount() == 0)
|| (alias_name_str.compare (cmd_args.GetArgumentAtIndex(0)) != 0))