<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 5, 2016, at 4:57 PM, Jim Ingham <<a href="mailto:jingham@apple.com" class="">jingham@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Feb 5, 2016, at 4:43 PM, Enrico Granata via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:<br class=""><br class="">Modified: lldb/trunk/source/Target/LanguageRuntime.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=259964&r1=259963&r2=259964&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=259964&r1=259963&r2=259964&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/source/Target/LanguageRuntime.cpp (original)<br class="">+++ lldb/trunk/source/Target/LanguageRuntime.cpp Fri Feb 5 18:43:07 2016<br class="">@@ -336,6 +336,10 @@ LanguageRuntime::InitializeCommands (Com<br class=""> CommandObjectSP command = command_callback(parent->GetCommandInterpreter());<br class=""> if (command)<br class=""> {<br class="">+ // the CommandObject vended by a Language plugin cannot be created once and cached because<br class="">+ // we may create multiple debuggers and need one instance of the command each - the implementing function<br class="">+ // is meant to create a new instance of the command each time it is invoked<br class="">+ assert(&command->GetCommandInterpreter() == &parent->GetCommandInterpreter() && "language plugin returned command for a mismatched CommandInterpreter");<br class=""></blockquote><br class="">Should CommandObject::LoadSubCommand do this check?<br class=""><br class=""><blockquote type="cite" class=""> parent->LoadSubCommand(command->GetCommandName(), command);<br class=""> }<br class=""> }<br class=""></blockquote><br class="">Jim<br class=""><br class=""></div></div></blockquote></div><br class=""><div class="">You mean the assert? The point of the assert is that the language plugin was creating a command once and caching it and then returning the cached version to a different debugger</div><div class="">Hence I am doing the check specifically for those commands.</div><div class=""><br class=""></div><div class="">But maybe I am missing what you’re trying to suggest here.</div><div class="">
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">Thanks,</div><div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div>
</div>
<br class=""></body></html>