[Lldb-commits] [PATCH] D66581: [lldb] Construct the dummy target when the first Dummy object is constructed

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 26 02:20:03 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL369885: [lldb] Construct the dummy target when the first Debugger object is constructed (authored by teemperor, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D66581?vs=216581&id=217095#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66581/new/

https://reviews.llvm.org/D66581

Files:
  lldb/trunk/include/lldb/Core/Debugger.h
  lldb/trunk/source/Core/Debugger.cpp


Index: lldb/trunk/source/Core/Debugger.cpp
===================================================================
--- lldb/trunk/source/Core/Debugger.cpp
+++ lldb/trunk/source/Core/Debugger.cpp
@@ -721,6 +721,9 @@
   assert(default_platform_sp);
   m_platform_list.Append(default_platform_sp, true);
 
+  m_dummy_target_sp = m_target_list.GetDummyTarget(*this);
+  assert(m_dummy_target_sp.get() && "Couldn't construct dummy target?");
+
   m_collection_sp->Initialize(g_debugger_properties);
   m_collection_sp->AppendProperty(
       ConstString("target"),
@@ -1603,10 +1606,6 @@
   }
 }
 
-Target *Debugger::GetDummyTarget() {
-  return m_target_list.GetDummyTarget(*this).get();
-}
-
 Target *Debugger::GetSelectedOrDummyTarget(bool prefer_dummy) {
   Target *target = nullptr;
   if (!prefer_dummy) {
Index: lldb/trunk/include/lldb/Core/Debugger.h
===================================================================
--- lldb/trunk/include/lldb/Core/Debugger.h
+++ lldb/trunk/include/lldb/Core/Debugger.h
@@ -311,7 +311,7 @@
   // selected target, or if no target is present you want to prime the dummy
   // target with entities that will be copied over to new targets.
   Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
-  Target *GetDummyTarget();
+  Target *GetDummyTarget() { return m_dummy_target_sp.get(); }
 
   lldb::BroadcasterManagerSP GetBroadcasterManager() {
     return m_broadcaster_manager_sp;
@@ -400,6 +400,7 @@
   Broadcaster m_sync_broadcaster;
   lldb::ListenerSP m_forward_listener_sp;
   llvm::once_flag m_clear_once;
+  lldb::TargetSP m_dummy_target_sp;
 
   // Events for m_sync_broadcaster
   enum {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66581.217095.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190826/3be62620/attachment.bin>


More information about the lldb-commits mailing list