llvm-project/lldb/source/API
Jason Molenda 878ae01889 This patch stops lldb from loading a .lldbinit file from the current
working directory by default -- a typical security problem that we
need to be more conservative about.

It adds a new target setting, target.load-cwd-lldbinit which may
be true (always read $cwd/.lldbinit), false (never read $cwd/.lldbinit)
or warn (warn if there is a $cwd/.lldbinit and don't read it).  The
default is set to warn.  If this is met with unhappiness, we can look
at changing the default to true (to match current behavior) on a 
different platform.

This does not affect reading of ~/.lldbinit - that will still be read,
as before.  If you run lldb in your home directory, it will not warn
about the presence of a .lldbinit file there.

I had to add two SB API - SBHostOS::GetUserHomeDirectory and 
SBFileSpec::AppendPathComponent - for the lldb driver code to be
able to get the home directory path in an OS neutral manner.

The warning text is

There is a .lldbinit file in the current directory which is not being read.
To silence this warning without sourcing in the local .lldbinit,
add the following to the lldbinit file in your home directory:
    settings set target.load-cwd-lldbinit false
To allow lldb to source .lldbinit files in the current working directory,
set the value of this variable to true.  Only do so if you understand and
accept the security risk.

<rdar://problem/24199163> 

llvm-svn: 261280
2016-02-19 00:05:17 +00:00
..
CMakeLists.txt cmake: provide flag that enables 'log enable --stack' to provide useful file/function info on POSIX systems 2015-10-14 14:52:15 +00:00
SBAddress.cpp Reduce header footprint of Target.h 2015-03-03 19:23:09 +00:00
SBAttachInfo.cpp SBTarget::Attach(SBAttachInfo &) was changed to not be asynchronous back in February and this affected Xcode's abililty to cancel an attach to process by name. 2015-10-05 22:58:37 +00:00
SBBlock.cpp Make many mangled functions that might demangle a name be allowed to specify a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. 2015-07-08 22:32:23 +00:00
SBBreakpoint.cpp Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/API and source/API; other minor fixes. 2015-10-31 01:22:59 +00:00
SBBreakpointLocation.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBBroadcaster.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBCommandInterpreter.cpp Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/API and source/API; other minor fixes. 2015-10-31 01:22:59 +00:00
SBCommandReturnObject.cpp Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/API and source/API; other minor fixes. 2015-10-31 01:22:59 +00:00
SBCommunication.cpp Create a ConnectionGenericFile class for Windows. 2014-10-06 21:23:09 +00:00
SBCompileUnit.cpp Add APIs on SBFunction and SBCompileUnit to inquire about the language type that the function/compile unit is defined in 2014-11-17 23:06:20 +00:00
SBData.cpp Included <inttypes.h> in a few headers that were 2014-04-19 03:09:28 +00:00
SBDebugger.cpp Add API to support retrieving the formatters category for a specific language 2015-12-18 21:25:24 +00:00
SBDeclaration.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBError.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBEvent.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBExecutionContext.cpp This adds a "batch mode" to lldb kinda like the gdb batch mode. It will quit the debugger 2014-10-14 01:20:07 +00:00
SBExpressionOptions.cpp Allow expresions to have unique expression prefixes: 2015-05-27 22:32:39 +00:00
SBFileSpec.cpp This patch stops lldb from loading a .lldbinit file from the current 2016-02-19 00:05:17 +00:00
SBFileSpecList.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBFrame.cpp Ignore breakpoints by default in SBFrame::EvaluateExpression 2016-01-29 10:48:11 +00:00
SBFunction.cpp Fixed TypeMemberFunctionImpl to not use clang types directly but use the new CompilerDecl class to do the job in an abstract way. 2015-11-10 17:47:04 +00:00
SBHostOS.cpp This patch stops lldb from loading a .lldbinit file from the current 2016-02-19 00:05:17 +00:00
SBInstruction.cpp [LLDB][MIPS] A small fix in GetBreakableLoadAddress() for MIPS 2016-01-27 10:16:30 +00:00
SBInstructionList.cpp Change the default disassembly format again. First attempt at 2015-02-13 23:24:21 +00:00
SBLanguageRuntime.cpp Move things from the LanguageRuntime that obviously belong in the new Language plugin instead. 2015-09-02 01:06:46 +00:00
SBLaunchInfo.cpp Refactor many file functions to use FileSpec over strings. 2015-05-29 19:52:29 +00:00
SBLineEntry.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBListener.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBModule.cpp Now that SymbolFileDWARF supports having types in completely separate .pcm file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: 2016-02-10 21:28:13 +00:00
SBModuleSpec.cpp Made all other "operator bool"s explicit and ensured 2013-10-04 21:35:29 +00:00
SBPlatform.cpp Fix warnings detected by -Wpessimizing-move 2015-07-28 09:18:32 +00:00
SBProcess.cpp Fix -Wformat-pedantic warning 2016-01-13 22:40:26 +00:00
SBQueue.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBQueueItem.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBSection.cpp Added functions to the C++ API, for the benefit of non-8-bit byte architectures. 2014-10-22 07:22:56 +00:00
SBSourceManager.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBStream.cpp First pass at LLDBRPC.framework 2015-12-15 23:03:22 +00:00
SBStringList.cpp
SBSymbol.cpp Make many mangled functions that might demangle a name be allowed to specify a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. 2015-07-08 22:32:23 +00:00
SBSymbolContext.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SBSymbolContextList.cpp
SBTarget.cpp Now that SymbolFileDWARF supports having types in completely separate .pcm file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: 2016-02-10 21:28:13 +00:00
SBThread.cpp Adding an SBThread::StepInto that takes an end-line, also moved the code that figures 2016-02-13 00:31:47 +00:00
SBThreadCollection.cpp Expose ThreadCollection in SB API 2014-09-06 01:21:19 +00:00
SBThreadPlan.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBType.cpp Fixed TypeMemberFunctionImpl to not use clang types directly but use the new CompilerDecl class to do the job in an abstract way. 2015-11-10 17:47:04 +00:00
SBTypeCategory.cpp Reapply r253423 and r253424 (which cleanup the data formatters iteration model, as well as the type X list commands), along with a change by Zachary Turner to bypass a MSVC bug with SFINAE 2015-11-18 19:42:44 +00:00
SBTypeEnumMember.cpp Reduce inclusion of clang headers. 2015-09-18 17:02:48 +00:00
SBTypeFilter.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBTypeFormat.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBTypeNameSpecifier.cpp ClangASTType is now CompilerType. 2015-08-11 22:53:00 +00:00
SBTypeSummary.cpp Add an 'internal' kind of summary to support one-off subclasses of TypeSummaryImpl 2015-10-29 18:58:13 +00:00
SBTypeSynthetic.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
SBUnixSignals.cpp Refactor Unix signals. 2015-07-14 01:09:28 +00:00
SBValue.cpp Make the error return more explicit when an SBValue has no value. 2015-10-30 21:43:15 +00:00
SBValueList.cpp Fix warnings found by -Wextra-semi 2015-07-22 08:12:01 +00:00
SBVariablesOptions.cpp Revert "Revert "I had recently added a new SBFrame::GetVariables() overload with yet another bool argument"" 2015-02-17 17:55:50 +00:00
SBWatchpoint.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
SystemInitializerFull.cpp Strip trailing whitespace 2016-01-04 01:43:47 +00:00
liblldb.exports Fix OSX cmake build 2016-02-18 17:01:40 +00:00
liblldb.xcode.exports Only export public symbols with the cmake build. 2015-09-04 00:00:41 +00:00