diff options
author | Jim Ingham <jingham@apple.com> | 2011-08-13 00:22:20 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-08-13 00:22:20 +0000 |
commit | 06942690b12724d7e419be8f555e09fd4cea1857 (patch) | |
tree | d2d900863d66bc11832056652435c36cb904994c /lldb/tools/driver/Driver.cpp | |
parent | 60726fab7802d2dc85448acf5946eb6e8a109edb (diff) | |
download | bcm5719-llvm-06942690b12724d7e419be8f555e09fd4cea1857.tar.gz bcm5719-llvm-06942690b12724d7e419be8f555e09fd4cea1857.zip |
Add a version of SBDebugger::Create which allows us to specify whether to source
in the init files or not.
llvm-svn: 137541
Diffstat (limited to 'lldb/tools/driver/Driver.cpp')
-rw-r--r-- | lldb/tools/driver/Driver.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 77899c353db..77b37d45643 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -83,7 +83,7 @@ static OptionDefinition g_options[] = 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 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) } } + // 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 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) case 'n': m_debugger.SkipLLDBInitFiles (true); + m_debugger.SkipAppInitFiles (true); break; case 'f': |