Add a version of SBDebugger::Create which allows us to specify whether to source
in the init files or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137541 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/driver/Driver.cpp b/tools/driver/Driver.cpp
index 77899c3..77b37d4 100644
--- a/tools/driver/Driver.cpp
+++ b/tools/driver/Driver.cpp
@@ -83,7 +83,7 @@
Driver::Driver () :
SBBroadcaster ("Driver"),
- m_debugger (SBDebugger::Create()),
+ m_debugger (SBDebugger::Create(false)),
m_editline_pty (),
m_editline_slave_fh (NULL),
m_editline_reader (),
@@ -478,6 +478,15 @@
}
}
+ // This is kind of a pain, but since we make the debugger in the Driver's constructor, we can't
+ // know at that point whether we should read in init files yet. So we don't read them in in the
+ // Driver constructor, then set the flags back to "read them in" here, and then if we see the
+ // "-n" flag, we'll turn it off again. Finally we have to read them in by hand later in the
+ // main loop.
+
+ m_debugger.SkipLLDBInitFiles (false);
+ m_debugger.SkipAppInitFiles (false);
+
// Prepare for & make calls to getopt_long.
#if __GLIBC__
optind = 0;
@@ -542,6 +551,7 @@
case 'n':
m_debugger.SkipLLDBInitFiles (true);
+ m_debugger.SkipAppInitFiles (true);
break;
case 'f':