Fix a redundant computation.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162794 91177308-0d34-0410-b5e6-96231b3b80d8
Fix wrong logic with respect to warning messages.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162795 91177308-0d34-0410-b5e6-96231b3b80d8
rdar://problem/11374963

Fix a subtle ArchSpec::cores_match() logic issue which prevents the add-dsym command
to add a debug symbol file to one of the target's current modules.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162802 91177308-0d34-0410-b5e6-96231b3b80d8
Instead of using re.split and requiring two spaces between the "regname: regvalue" pairs,
use re.findall and specify the regexp of regname: regvalue that we're interested in.
<rdar://problem/12188752> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162806 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/11757916>

Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes:
- Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". 
- modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly
- Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was.
- modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile()

Cleaned up header includes a bit as well.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162860 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed a potential crash in PlatformLinux if
ModuleList::GetSharedModule() returned NULL.

<rdar://problem/12182971>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162871 91177308-0d34-0410-b5e6-96231b3b80d8
OptionValueFileSpec had an accessor to read the contents of the file and return the data. This can end up being used to get the string contents of a text file and could end up not being NULL terminated. I added accessors to get the file contents raw, or with a null terminator. Added the needed calls to make this happen in the FileSpec and File classes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162921 91177308-0d34-0410-b5e6-96231b3b80d8
Pushing a new llvm.zip that enables the clang UTF conversion routines

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162924 91177308-0d34-0410-b5e6-96231b3b80d8
Added the ability to verify the LLDB API on MacOSX using a script. Usage is:

./verify_api.py --library ./LLDB.framework/LLDB --api-regex lldb --arch x86_64 /Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB

So you specify a library with the "--library" option, then you specify an API regular expression that you want to match the executables against with "--api-regex <regex>", here we specify "lldb" to catch all undefined external API functions from the binary we want to test, then we specify the architectures to check with "--arch <arch>" (this can be specified more than once), and you give one or more executables.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162941 91177308-0d34-0410-b5e6-96231b3b80d8
Added an example that show correct usage of the async process event API.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162967 91177308-0d34-0410-b5e6-96231b3b80d8
Added command lists that can be executed on launch, stop, crash and exit. Added code to auto import the lldb module that we can use on many stand alone modules.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162972 91177308-0d34-0410-b5e6-96231b3b80d8
Fix indentation.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163011 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12202862>

Added a fix for incorrect dynamic typing. Before when asking if a C++ class could be dynamic, we would answer yes for incomplete C++ classes. This turned out to have issues where if a class was not virtual, yet had its first ivar be an instance of a virtual class, we would incorrectly say that a class was virtual and we would downcast it to be a pointer to the first ivar. We now ask the class to complete itself prior to answering the question. We need to test the effects on memory of this change prior to submission. It is the safest and best fix, but it does have a potential downside of higher memory consumption.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163014 91177308-0d34-0410-b5e6-96231b3b80d8
Make the tab character in the thread frame lines optional.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163037 91177308-0d34-0410-b5e6-96231b3b80d8
Add a convenience function to get the range containing a given PC specified as load address + Target.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163038 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12069589>

Fixed an issue where not all text would always be seen when running any of the functions in heap.py in Xcode. Now we put the text directly into the command result object and skip STDIO since we have issues with STDIO right now in python scripts.

Also fixed an issue with the "--stack-history" option where MallocStackLoggingNoCompact was assumed to have to be enabled... It doesn't, just MallocStackLogging.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163042 91177308-0d34-0410-b5e6-96231b3b80d8
Made it so changes to the prompt via "settings set prompt" get noticed by the command line. 

Added the ability for OptionValueString objects to take flags. The only flag is currently for parsing escape sequences. Not the prompt string can have escape characters translate which will allow colors in the prompt.

Added functions to Args that will parse the escape sequences in a string, and also re-encode the escape sequences for display. This was looted from other parts of LLDB (the Debugger::FormatString() function).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163043 91177308-0d34-0410-b5e6-96231b3b80d8
Initial check-in of "fancy" inlined stepping.  Doesn't do anything useful unless you switch LLDB_FANCY_INLINED_STEPPING to true.  With that
on, basic inlined stepping works, including step-over of inlined functions.  But for some as yet mysterious reason i386 debugging gets an
assert and dies immediately.  So for now its off.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163044 91177308-0d34-0410-b5e6-96231b3b80d8
Improved "objc_refs" a bit to be able to find all instances of a class'
superclasses on top of finding the exact class. The current attempt is still
too slow, but it lays the groundwork.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163135 91177308-0d34-0410-b5e6-96231b3b80d8
Patch from info from Daniel Malea that should fix the build on linux after fixes committed with revision 162860.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163139 91177308-0d34-0410-b5e6-96231b3b80d8