diff options
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/LanguageRuntime.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp index b1e2b3eb04f..7f386162d16 100644 --- a/lldb/source/Target/LanguageRuntime.cpp +++ b/lldb/source/Target/LanguageRuntime.cpp @@ -336,6 +336,10 @@ LanguageRuntime::InitializeCommands (CommandObject* parent) CommandObjectSP command = command_callback(parent->GetCommandInterpreter()); if (command) { + // the CommandObject vended by a Language plugin cannot be created once and cached because + // we may create multiple debuggers and need one instance of the command each - the implementing function + // is meant to create a new instance of the command each time it is invoked + assert(&command->GetCommandInterpreter() == &parent->GetCommandInterpreter() && "language plugin returned command for a mismatched CommandInterpreter"); parent->LoadSubCommand(command->GetCommandName(), command); } } |