summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-10-11 01:05:37 +0000
committerGreg Clayton <gclayton@apple.com>2010-10-11 01:05:37 +0000
commit6eee5aa0671b8aea82930424ac11fceaba809bd3 (patch)
treeb4149d8831211c0bd1672e74bd6d83b6a8169a81 /lldb/source/Interpreter/CommandInterpreter.cpp
parent46747022d292d2d1568eb0b8044030f4aee6a5b6 (diff)
downloadbcm5719-llvm-6eee5aa0671b8aea82930424ac11fceaba809bd3.tar.gz
bcm5719-llvm-6eee5aa0671b8aea82930424ac11fceaba809bd3.zip
Added a "--no-lldbinit" option (-n for short (which magically matches
what gdb uses)) so we can tell our "lldb" driver program to not automatically parse any .lldbinit files. llvm-svn: 116179
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index f0704f767c4..64bdfcd5b80 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -59,7 +59,8 @@ CommandInterpreter::CommandInterpreter
) :
Broadcaster ("CommandInterpreter"),
m_debugger (debugger),
- m_synchronous_execution (synchronous_execution)
+ m_synchronous_execution (synchronous_execution),
+ m_skip_lldbinit_files (false)
{
const char *dbg_name = debugger.GetInstanceName().AsCString();
std::string lang_name = ScriptInterpreter::LanguageToString (script_language);
@@ -1060,6 +1061,10 @@ CommandInterpreter::GetOptionArgumentPosition (const char *in_string)
void
CommandInterpreter::SourceInitFile (bool in_cwd, CommandReturnObject &result)
{
+ // Don't parse any .lldbinit files if we were asked not to
+ if (m_skip_lldbinit_files)
+ return;
+
const char *init_file_path = in_cwd ? "./.lldbinit" : "~/.lldbinit";
FileSpec init_file (init_file_path);
// If the file exists, tell HandleCommand to 'source' it; this will do the actual broadcasting
OpenPOWER on IntegriCloud