History log of /external/lldb/include/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8aaa52329ade20107fe28af7085b0a1f395816a8 05-Nov-2013 Todd Fiala <tfiala@google.com> Fixes for LLDB build to work around host 4.6.2+ compiler issues.

These fixes to the LLDB source add manual copy constructor and operator=()
methods for classes that use member bitfields and are used in templated
containers.

The intent is to keep this change (and related LLVM and clang changes)
local to android only until we either fix the compiler or use a new one
for host executable builds.
ldb/DataFormatters/FormatCache.h
c590c679663f093bc74355572ccfa8d40284d065 07-Aug-2013 Daniel Malea <daniel.malea@intel.com> New settings: target.use-hex-immediates and target.hex-immediates-style
- Immediates can be shown as hex (either Intel or MASM style)
- See TestSettings.py for usage examples
- Verified to cause no regressions on Linux x86_64 (Ubuntu 12.10)

Patch by Richard Mitton!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187921 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Disassembler.h
ldb/Target/Target.h
e4923ddaa18bf003e339e6ab33bfd137a632fc0f 30-Jul-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/14526890>

Fixed a crasher when using memory threads where a thread is sticking around too long and was causing problems when it didn't have a thread plan.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187395 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlan.h
cf88b95d435873bd312e716da5701cf3882c5da4 29-Jul-2013 Ed Maste <emaste@freebsd.org> Use flag instead of rwlock state to track process running state

LLDB requires that the inferior process be stopped before, and remain
stopped during, certain accesses to process state.

Previously this was achieved with a POSIX rwlock which had a write lock
taken for the duration that the process was running, and released when
the process was stopped. Any access to process state was performed with
a read lock held.

However, POSIX requires that pthread_rwlock_unlock() be called from the
same thread as pthread_rwlock_wrlock(), and lldb needs to stop and start
the process from different threads. Violating this constraint is
technically undefined behaviour, although as it happens Linux and Darwin
result in the unlock proceeding in this case. FreeBSD follows POSIX
more strictly, and the unlock would fail, resulting in a hang later upon
the next attempt to take the lock.

All read lock consumers use ReadTryLock() and handle failure to obtain
the lock (typically by logging an error "process is running"). Thus,
instead of using the lock state itself to track the running state, this
change adds an explicit m_running flag. ReadTryLock tests the flag, and
if the process is not running it returns with the read lock held.

WriteLock and WriteTryLock are renamed to SetRunning and TrySetRunning,
and (if successful) they set m_running with the lock held. This way,
read consumers can determine if the process is running and act
appropriately, and write consumers are still held off from starting the
process if read consumers are active.

Note that with this change there are still some curious access patterns,
such as calling WriteUnlock / SetStopped twice in a row, and there's no
protection from multiple threads trying to simultaneously start the
process. In practice this does not seem to be a problem, and was
exposing other undefined POSIX behaviour prior to this change.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187377 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/ProcessRunLock.h
ldb/Host/ReadWriteLock.h
ldb/Target/Process.h
6855784d6c31c060c230d99f6107c52fa22f1b3f 26-Jul-2013 Jason Molenda <jmolenda@apple.com> Add an SBFrame::FindRegister() method to make it a little
easier to retrieve a register value.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187184 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
6bea559652079732f2481054aace855a60e8c51d 26-Jul-2013 Jim Ingham <jingham@apple.com> Refine the fix in r187094 to only distrust the StackID comparision when we are starting from an address with no symbols.
If we don't do that "nexti" will stop too soon when stepping past a tail call jump.

rdar://problem/14516227


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187173 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanStepInstruction.h
f476592805f813aa7a94f7d6770481503140aae2 25-Jul-2013 Ed Maste <emaste@freebsd.org> Set thread names on FreeBSD

Also move the logic to shorten thread names from linux/Host.cpp to a new
SetShortThreadName as both FreeBSD and Linux need the functionality.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187149 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
fd024c0c769d794a1d6024f0b38fd45f4005c127 25-Jul-2013 Ed Maste <emaste@freebsd.org> Remove unused code

- ReadLocker constructors that take a lock
- Unconditional Lock::ReadLock and ReadLocker::Lock
(all consumers use TryLock)
- Make Unlock protected, as it has no external consumers


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187147 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/ReadWriteLock.h
454916c0169502e4c8cf0f27ab61923f8b533dd0 25-Jul-2013 Jim Ingham <jingham@apple.com> Handle the case where we are stepping through code with no symbols, so we can't really find the function start PC
and so the StackID changes with every step. Do so by checking the parent frame ID, and if it hasn't changed,
then we haven't stepped in.

rdar://problem/14516227


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187094 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanStepInstruction.h
0bf2d699067d434fe3dd187caf526ff94f19494f 23-Jul-2013 Ed Maste <emaste@freebsd.org> elf-core: Parse vendor-specific notes

ELF notes contain a 'name' field, which specifies a vendor who defines
the format of the note. Examples are 'FreeBSD' or 'GNU', or it may be
empty for generic notes.

Add a case for FreeBSD-specific notes, leaving Linux and GNU notes,
other vendor-specific notes, and generic notes to be handled by the
existing code for now.

Thanks to Samuel Jacob for reviewing and suggesting improvements.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186973 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataExtractor.h
008f3dc79c762b7d240b5ad6d4fb148c5cb039ca 18-Jul-2013 Jim Ingham <jingham@apple.com> This commit does two things. One, it converts the return value of the QueueThreadPlanXXX
plan providers from a "ThreadPlan *" to a "lldb::ThreadPlanSP". That was needed to fix
a bug where the ThreadPlanStepInRange wasn't checking with its sub-plans to make sure they
succeed before trying to proceed further. If the sub-plan failed and as a result didn't make
any progress, you could end up retrying the same failing algorithm in an infinite loop.

<rdar://problem/14043602>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186618 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadPlanBase.h
ldb/Target/ThreadPlanShouldStopHere.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepInstruction.h
ldb/Target/ThreadPlanStepOut.h
ldb/Target/ThreadPlanStepThrough.h
ldb/Target/ThreadPlanStepUntil.h
ldb/lldb-private-interfaces.h
801c11e786cd2c8185206ad4f1eced2b2afa3b77 16-Jul-2013 Ed Maste <emaste@freebsd.org> Remove unused RunLocker and related code

RunLocker was not used anywhere, and was the only instance of the
WriteLocker class. Remove both.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186361 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/ReadWriteLock.h
ldb/Target/Process.h
97abb6ddae805a91ccf28a3a91fa68252dcf1fe2 16-Jul-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13793059>

Added a setting to control timeout for kdp response packets. While I was at it, I also added a way to control the response timeout for gdb-remote packets.

KDP defaults to 5 seconds, and GDB defaults to 1 second. These were the default values that were in the code prior to adding these settings.

(lldb) settings set plugin.process.gdb-remote.packet-timeout 10
(lldb) settings set plugin.process.kdp-remote.packet-timeout 10



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186360 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/PluginManager.h
7980d35608225dc71b3dd946d4c3aea85bc24e85 13-Jul-2013 Greg Clayton <gclayton@apple.com> Fixed GetModuleSpecifications() to work better overall:
- MachO files now correctly extract the UUID all the time
- More file size and offset verification done for universal mach-o files to watch for truncated files
- ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files)
- lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file
- The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback
- Improved printing for ModuleSpec objects



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186211 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleSpec.h
ldb/Symbol/ObjectFile.h
95eeb63432ac232f81cf9ee3301abddd7ce2f817 12-Jul-2013 Enrico Granata <egranata@apple.com> Added Repr() and Str() member functions to our PythonObject class to allow easy conversion to-string of every PythonObject

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186205 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/PythonDataObjects.h
bcbf2b55790e851c791a983d46bfaa2a38667247 12-Jul-2013 Jim Ingham <jingham@apple.com> The correct max value for size_t variables is SIZE_MAX not UINT64_MAX. Removes lots of warnings when building on 32 bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186168 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandHistory.h
52f792329be5db8e38961350589e97e8f2823acd 12-Jul-2013 Greg Clayton <gclayton@apple.com> Huge change to clean up types.

A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error.

This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Core/DataBufferHeap.h
ldb/Core/Value.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectCast.h
ldb/Core/ValueObjectChild.h
ldb/Core/ValueObjectConstResult.h
ldb/Core/ValueObjectConstResultChild.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectMemory.h
ldb/Core/ValueObjectRegister.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Core/ValueObjectVariable.h
ldb/DataFormatters/FormatNavigator.h
ldb/Expression/ASTDumper.h
ldb/Expression/ClangASTSource.h
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionVariable.h
ldb/Expression/ClangFunction.h
ldb/Expression/DWARFExpression.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/Function.h
ldb/Symbol/SymbolFile.h
ldb/Symbol/TaggedASTType.h
ldb/Symbol/Type.h
ldb/Symbol/TypeHierarchyNavigator.h
ldb/Target/ThreadPlanStepOut.h
0c4c43c8a598e9c37dcdd00bb77c6d59e083b904 11-Jul-2013 Michael Sartain <mikesart@valvesoftware.com> Fix "source list -n printf" on Linux (printf is symbol alias for __printf)

Differential Revision: http://llvm-reviews.chandlerc.com/D1109

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186104 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
7940069905bee0b2e5f0661bf37c9f906ddf8603 10-Jul-2013 Greg Clayton <gclayton@apple.com> Cleanup on the unified section list changes. Main changes are:
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.

Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185990 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/RangeMap.h
ldb/Core/Section.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/Symbol.h
ldb/Symbol/SymbolVendor.h
ldb/Symbol/Symtab.h
b9d995d0863e1860c12c4ace0d5eb0ba832f9c99 09-Jul-2013 Enrico Granata <egranata@apple.com> Second attempt at getting the PyCallable changes in trunk

Thanks to Daniel Malea for helping test this patch for Linux happiness!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185965 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandReturnObject.h
ldb/API/SBError.h
ldb/Interpreter/CommandReturnObject.h
ldb/Interpreter/ScriptInterpreter.h
f9215bae3f7f76ad98bace0097821a12415690c5 09-Jul-2013 Greg Clayton <gclayton@apple.com> Added a way to extract the module specifications from a file. A module specification is information that is required to describe a module (executable, shared library, object file, ect). This information includes host path, platform path (remote path), symbol file path, UUID, object name (for objects in .a files for example you could have an object name of "foo.o"), and target triple. Module specification can be used to create a module, or used to add a module to a target. A list of module specifications can be used to enumerate objects in container objects (like universal mach files and BSD archive files).

There are two new classes:

lldb::SBModuleSpec
lldb::SBModuleSpecList

The SBModuleSpec wraps up a lldb_private::ModuleSpec, and SBModuleSpecList wraps up a lldb_private::ModuleSpecList.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185877 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDefines.h
ldb/API/SBFileSpec.h
ldb/API/SBModule.h
ldb/API/SBModuleSpec.h
ldb/API/SBStream.h
ldb/API/SBTarget.h
ldb/Core/ModuleSpec.h
ldb/Core/UUID.h
26bc105b1882a78de609d46d148ad2b5c4d50656 03-Jul-2013 Daniel Malea <daniel.malea@intel.com> Revert commits that cause broken builds on GCC buildbots
- build fails due to PyCallable template definition inside an extern "C" scope

This commit reverts 185240, 184893 and 184608.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185560 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandReturnObject.h
ldb/API/SBError.h
ldb/Interpreter/CommandReturnObject.h
ldb/Interpreter/ScriptInterpreter.h
5577ce043b8d766d5a12ed12a1223385eadb6da1 03-Jul-2013 Jason Molenda <jmolenda@apple.com> Remove lldb's custom copy of the C++ demangler, used only on Mac
OS X. Testsuite shows no change in results using the system runtime's
demangler.
<rdar://problem/12029914>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185510 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/cxa_demangle.h
a807ceef5dad2b24e5bae5c5a193ff03aa7ec8d9 01-Jul-2013 Michael Sartain <mikesart@valvesoftware.com> Split symbol support for ELF and Linux.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185366 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/Section.h
ldb/Core/UUID.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/SymbolVendor.h
ldb/Target/Target.h
ldb/lldb-enumerations.h
fa2cd91f47a7782b9c040058aed369e022e332d3 01-Jul-2013 Sylvestre Ledru <sylvestre@debian.org> Following the modification introduced in llvm by commit 185311

The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.
This kind of simplification is sometimes useful, but in general it's not correct.

As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the
build definitions used for FreeBSD, whereas for userland-related issues we want to
match the definitions used for other systems with Glibc.

The current modification adjusts the build system so that they can be distinguished,
and explicitly adds GNU/kFreeBSD to the build checks in which it belongs.

Fixes bug #16446.

Patch by Robert Millan in the context of Debian.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185313 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Config.h
4a20587f56a05955ea94f650cb39245a092b0c69 28-Jun-2013 Sean Callanan <scallanan@apple.com> Hitherto the IRForTarget infrastructure has mainly
been suitable for preparing a single IR function
for operation in the target. However, using blocks
and lambdas creates other IR functions that also
need to be processed.

I have audited IRForTarget to make it process
multiple functions. Where IRForTarget would add
new instructions at the beginning of the main
expression function, it now adds them on-demand
in the function where they are needed. This is
enabled by a system of FunctionValueCaches, which
invoke a lambda to create or derive the values as
needed, or report the result of that lambda if it
has already been called for the given function.

<rdar://problem/14180236>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185224 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRForTarget.h
bb14d137c082e98e8c436a5ef9238e06e3f21e22 28-Jun-2013 Greg Clayton <gclayton@apple.com> FileSpec destructor doesn't need to be virtual.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185210 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/FileSpec.h
47e3ed8707f7e49f79e2923e4d14f34dd243317c 28-Jun-2013 Greg Clayton <gclayton@apple.com> ArchSpec doesn't need a virtual destructor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185208 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ArchSpec.h
87f0261992eb2fac7a3dee5e100833972a19f22d 28-Jun-2013 Greg Clayton <gclayton@apple.com> PathMappingList doesn't need a virtual destructor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185207 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/PathMappingList.h
5f365bce232e2776898f102fccb5dfe5860ada43 27-Jun-2013 Sean Callanan <scallanan@apple.com> Cleanup of IRForTarget. Removed some relics of
the time when the IRInterpreter ran inside
IRForTarget.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185088 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRForTarget.h
e46dd5bb968f0c269ead5cbf3d05511fd2ebcf92 27-Jun-2013 Sean Callanan <scallanan@apple.com> Remove the process's reservation cache and don't
bother checking if a region is safe to use. In
cases where regions need to be synthesized rather
than properly allocated, the memory reads required
to determine whether the area is used are

- insufficient, because intermediate locations
could be in use, and

- unsafe, because on some platforms reading from
memory can trigger events.

All this only makes a difference on platforms
where memory allocation in the target is impossible.
Behavior on platforms where it is possible should
stay the same.

<rdar://problem/14023970>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185046 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
50be3f72e5531d024ed07fd05a8352c8459f46cd 26-Jun-2013 Jason Molenda <jmolenda@apple.com> Remove ifdef LLDB_CONFIGURATION_DEBUG directives around the formatter
cache ivars/methods.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184901 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/FormatCache.h
9c9a7bf57d081271c7e971decfe221561a920bcd 26-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14266411>

The semi-unofficial way of returning a status from a Python command was to return a string (e.g. return "no such variable was found") that LLDB would pick as a clue of an error having happened

This checkin changes that:
- SBCommandReturnObject now exports a SetError() call, which can take an SBError or a plain C-string
- script commands now drop any return value and expect the SBCommandReturnObject ("return object") to be filled in appropriately - if you do nothing, a success will be assumed

If your commands were relying on returning a value and having LLDB pick that up as an error, please change your commands to SetError() through the return object or expect changes in behavior



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184893 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandReturnObject.h
ldb/API/SBError.h
ldb/Interpreter/CommandReturnObject.h
ldb/Interpreter/ScriptInterpreter.h
a1f156aa2695963058615edeabedfcb0f1ca5fab 24-Jun-2013 Han Ming Ong <hanming@apple.com> <rdar://problem/14182286>

Made sure that temporary object created from HarmonizeThreadIdsForProfileData() doesn’t get passed around without creating an object first.

Reviewed by Greg

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184769 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
0bb91ef2b0f4d46b72c76076b8f7d99a7abb61f3 24-Jun-2013 Ed Maste <emaste@freebsd.org> Remove comment that is no longer applicable

Since r181446 the m_private_run_lock has been used for all platforms.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184733 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
9e0d89ef07d6318728d2f76fc943cc7710014c7c 22-Jun-2013 Han Ming Ong <hanming@apple.com> <rdar://problem/14004410>

Remove old GetNextThreadIndexID() from lldb

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184600 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
73cfdbc9c81c5eb24c5dcd34afba8e2b441cb720 21-Jun-2013 Enrico Granata <egranata@apple.com> Adding two new markers to the ${var..} specifier
- %N = show the name of the variable
- %> = show the expression path of the variable



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184502 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
001cd53e9d8d9e481ada536924ea7563b84ee9cf 21-Jun-2013 Enrico Granata <egranata@apple.com> In thread and frame format strings, it is now allowed to use Python functions to generate part or all of the output text
Specifically, the ${target ${process ${thread and ${frame specifiers have been extended to allow a subkeyword .script:<fctName> (e.g. ${frame.script:FooFunction})
The functions are prototyped as

def FooFunction(Object,unused)

where object is of the respective SB-type (SBTarget for target.script, ... and so on)

This has not been implemented for ${var because it would be akin to a Python summary which is already well-defined in LLDB



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184500 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
ldb/API/SBThread.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
d0f064d4e5ccef341ecbd6a462bbff5f085a3f77 20-Jun-2013 Sean Callanan <scallanan@apple.com> Fixed a problem with materialization and
dematerialization of registers that caused
conditional breakpoint expressions not to
work properly. Also added a testcase.

<rdar://problem/14129252>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184451 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/Materializer.h
77e67a51acb825d79d25be687c085833713d5205 19-Jun-2013 Greg Clayton <gclayton@apple.com> Implemented a types.py module that allows types to be inspected for padding.

The script was able to point out and save 40 bytes in each lldb_private::Section by being very careful where we need to have virtual destructors and also by re-ordering members.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184364 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Core/Flags.h
ldb/Core/ModuleChild.h
ldb/Core/Section.h
ldb/Core/UserID.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/Symbol.h
3e11c7ec050648ba865f1d451f8cb46fd39072a8 19-Jun-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Sort out a number of mismatched integer types in order to cut down the number of compiler warnings.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184333 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/FormatNavigator.h
ldb/DataFormatters/TypeSynthetic.h
a8b56238ce138e70433a0ce0b4218c9257beae38 19-Jun-2013 Greg Clayton <gclayton@apple.com> Added the ability to get a list of types from a SBModule or SBCompileUnit. Sebastien Metrot wanted this, and sent a hollowed out patch. I filled in the blanks and did the low level implementation. The new functions are:

//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// module.
///
/// @param[in] type_mask
/// A bitfield that consists of one or more bits logically OR'ed
/// together from the lldb::TypeClass enumeration. This allows
/// you to request only structure types, or only class, struct
/// and union types. Passing in lldb::eTypeClassAny will return
/// all types found in the debug information for this module.
///
/// @return
/// A list of types in this module that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBModule::GetTypes (uint32_t type_mask)


//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// compile unit.
///
/// @param[in] type_mask
/// A bitfield that consists of one or more bits logically OR'ed
/// together from the lldb::TypeClass enumeration. This allows
/// you to request only structure types, or only class, struct
/// and union types. Passing in lldb::eTypeClassAny will return
/// all types found in the debug information for this compile
/// unit.
///
/// @return
/// A list of types in this compile unit that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBCompileUnit::GetTypes (uint32_t type_mask = lldb::eTypeClassAny);

This lets you request types by filling out a mask that contains one or more bits from the lldb::TypeClass enumerations, so you can only get the types you really want.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184251 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCompileUnit.h
ldb/API/SBModule.h
ldb/API/SBType.h
ldb/Core/MappedHash.h
ldb/Core/UniqueCStringMap.h
ldb/Symbol/SymbolFile.h
ldb/Symbol/SymbolVendor.h
ldb/Symbol/Type.h
ldb/Symbol/TypeList.h
ldb/lldb-enumerations.h
8c3391ba76c5e3440a0cc10296dbde1b44300509 19-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14194128>

ClangASTContext was failing to retrieve fields and base class info for ObjC variables
This checkin fixes that and adds a test case



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184248 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Type.h
be2f9090cf7d64a0f021cbc4036f4172baba1cd2 18-Jun-2013 Jim Ingham <jingham@apple.com> We were getting an assert because somebody was making a watchpoint that was
neither read nor write. Tighten up the checking so this isn't possible.

<rdar://problem/14111167>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184245 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-defines.h
b6a4c565732b3a7b546ba2aa0e7aec3a4bb359a4 18-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12717717>

Modifying our data formatters matching algorithm to ensure that "const X*" is treated as equivalent to "X*"
Also, a couple improvements to the "lldb types" logging



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184215 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/FormatNavigator.h
ldb/Symbol/ClangASTType.h
c3580681c3876a323ea1b02c3dc9dde390cabfdf 18-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13270271>

Only add the — (double dash) separator to a command syntax if it has any options to be separated from arguments
Also remove the unused Translate() method from CommandObject

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184163 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
b1fb72761226817e7f687eca21cbe9c0a3ec4cf6 18-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14134716>

This is a rewrite of the command history facility of LLDB

It takes the history management out of the CommandInterpreter into its own CommandHistory class
It reimplements the command history command to allow more combinations of options to work correctly (e.g. com hist -c 1 -s 5)
It adds a new --wipe (-w) option to command history to allow clearing the history on demand
It extends the lldbtest runCmd: and expect: methods to allow adding commands to history if need be
It adds a test case for the reimplemented facility



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184140 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandHistory.h
ldb/Interpreter/CommandInterpreter.h
ldb/Utility/Range.h
3626760a2a00fc3cadc1ef57bac455581da82470 14-Jun-2013 Matt Kopec <Matt.Kopec@intel.com> Remove unused Host macro.

Patch from Ed Maste.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183998 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/linux/Config.h
ldb/Host/macosx/Config.h
ldb/Host/mingw/Config.h
ba3ebe1d3e6d13c42f7e35ff715431573af65681 13-Jun-2013 Greg Clayton <gclayton@apple.com> Added a SBSection::GetParent() to the API.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183948 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBSection.h
035ef3d0a0136f2b9028b4695a681e58ba899651 12-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/11914077>

If you type help command <word> <word> <word> <missingSubCommand> (e.g. help script import or help type summary fake), you will get help on the deepest matched command word (i.e. script or type summary in the examples)
Also, reworked the logic for commands to produce their help to make it more object-oriented



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183822 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandObjectMultiword.h
ac94caa68a4a5fa4bd939d7656a6a12d8fc06a33 12-Jun-2013 Greg Clayton <gclayton@apple.com> Huge performance improvements when one breakpoint contains many locations.

325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote.

That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly.

Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183820 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointSiteList.h
ldb/Symbol/SymbolContext.h
a9dc882693ef65ee3657b96f018fec3685d37282 11-Jun-2013 Greg Clayton <gclayton@apple.com> Use llvm::APFloat for formatting if a target is available. Each target when debugging has a "ASTContext" that helps us to use the correct floating point semantics. Now that APFloat supports toString we now use that. If we don't have a target, we still fall back on the old display methodology, but the important formatting should always have a target available and thus use the compiler floating point code.

Modified the test programs to use floating point constants that always will display correctly. We had some numbers that were being rounded, and now that we are using clang, we no longer round them and we get more correct results.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183792 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
6fb3f2c45c87de47d5058310b4ef14cc3a26727c 11-Jun-2013 Greg Clayton <gclayton@apple.com> Remove eFormatHalfFloat as it isn't needed. eFormatFloat should be used and the byte size will tell us how to display it.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183755 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
6fefc3a3915bcaf899b9179c43b1b7b2f693b3ad 11-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12876503>

Adding a new setting interpreter.stop-command-source-on-error that dictates a default behavior for whether command source should stop upon hitting an error
You can still override the setting for each individual invocation with the usual -e setting



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183719 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
01c3be1218c47f2e3aed499afa0b3a7e2d9dfd3a 11-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12783351>

Add support for half-floats, as specified by IEEE-754-2008
With this checkin, you can now say:
(lldb) x/7hf foo

to read 7 half-floats at address foo



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183716 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
13bf1b0961744c0b643a383d6f49f61eb19e165a 08-Jun-2013 Jim Ingham <jingham@apple.com> Don't retry the Connect when starting up debugserver if the reason for the previous failure was
EINTR. That means the user was trying to interrupt us, and we should just stop instead.

<rdar://problem/13184758>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183577 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Error.h
d93d9131514d1c6f849a06180ec2f01d7792a661 06-Jun-2013 Sean Callanan <scallanan@apple.com> Fixed a problem where evaluating a breakpoint
condition in two different processes (with the
same target) could cause crashes. Now the breakpoint
condition is always evaluated (and possibly parsed)
by one thread at a time.

<rdar://problem/14083737>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183440 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointLocation.h
28ad12bffb738ef9243e399d04ffe190a127d21c 05-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13239809>

Two things:
1) fixing a bug where memory read was not clearing the m_force flag after it was passed, so that subsequent memory reads would not need to be forced even if over boundary
2) adding a setting target.max-memory-read-size that you can set instead of the hardcoded 1024 bytes limit we had before



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183276 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
a4fc694105acabdb05dd758f24062aa1419cdb9a 04-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13988982>

LLDB API versioning
This checkin makes the LLDB API versioned
We are starting at version 1.0 and will then revise and update the API from there
Further details:
API versioning
---------------------------------

The LLDB API is versioned independently of the LLDB source base
Our API version numbers are composed of a major and a minor number

The major number means a complete and stable revision of the API. Major numbers are compatibility breakers
(i.e. when we change the API major number, there is no promise of compatibility with the previous major version
and we are free to remove and/or change any APIs)
Minor numbers are a work-in-progress evolution of the API. APIs will not be removed or changed across minor versions
(minors do not break compatibility). However, we can deprecate APIs in minor versions or add new APIs in minor versions
A deprecated API is supposedly going to be removed in the next major version and will generate a warning if used
APIs we add in minor versions will not be removed (at least until the following major) but they might theoretically be deprecated
in a following minor version
Users are discouraged from using the LLDB version number to test for API features and should instead use the API version checking
as discussed below

API version checking
---------------------------------

You can (optionally) sign into an API version checking feature
To do so you need to define three macros:
LLDB_API_CHECK_VERSIONING - define to any value (or no value)
LLDB_API_MAJOR_VERSION_WANTED - which major version of the LLDB API you are targeting
LLDB_API_MINOR_VERSION_WANTED - which minor version of the LLDB API you are targeting

If these macros exist - LLDB will enable version checking of the public API

If LLDB_API_MAJOR_VERSION is not equal to LLDB_API_MAJOR_VERSION_WANTED we will immediately halt your compilation with an error
This is by design, since we do not make any promise of compatibility across major versions - if you really want to test your luck, disable the versioning altogether

If the major version test passes, you have signed up for a specific minor version of the API
Whenever we add or deprecate an API in a minor version, we will mark it with either
LLDB_API_NEW_IN_DOT_x - this API is new in LLDB .x
LLDB_API_DEPRECATED_IN_DOT_x - this API is deprecated as of .x

If you are using an API new in DOT_x
if LLDB_API_MINOR_VERSION_WANTED >= x then all is well, else you will get a compilation error
This is meant to prevent you from using APIs that are newer than whatever LLDB you want to target

If you are using an API deprecated in DOT_x
if LLDB_API_MINOR_VERSION_WANTED >= x then you will get a compilation warning, else all is well
This is meant to let you know that you are using an API that is deprecated and might go away

Caveats
---------------------------------

Version checking only works on clang on OSX - you will get an error if you try to enable it on any other OS/compiler
If you want to enable version checking on other platforms, you will need to define appropriate implementations for
LLDB_API_IMPL_DEPRECATED and LLDB_API_IMPL_TOONEW and any other infrastructure your compiler needs for this purpose

We have no deprecation-as-error mode

There is no support for API versioning in Python

We reserve to use macros whose names begin with LLDB_API_ and you should not use them in your source code as they might conflict
with present or future macro names we are using to implement versioning


For API implementors:
If you need to add a new public API call, please remember to add the LLDB_API_NEW_IN_DOT_x marker in the header file
and when you are done with adding stuff, to also update LLDB_API_MINOR_VERSION
If you want to remove a function, deprecate it first, by using LLDB_API_DEPRECATED_IN_DOT_x
and when you are done with deprecating stuff, to also update LLDB_API_MINOR_VERSION
A new major version (LLDB_API_MAJOR_VERSION++) is your only chance to remove and/or change API calls
but is probably quite a big deal and you might want to consider deprecating the existing calls for a while
before doing your changes

A couple more caveats:
Currently, the lldb-tool does NOT use the version checking feature. It would be a nice future improvement to make it do that, once we have proper version checking on other OSs
APIs marked as deprecated by a comment in the source are still deprecated just that way. A good purpose for API 1.1 might be to deprecate them with appropriate markers



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183244 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDefines.h
ldb/lldb-versioning.h
04cc48eb5cff32268a822b57f87590c9dc2643f8 04-Jun-2013 Jim Ingham <jingham@apple.com> If ThreadPlanCallFunction hasn't set its notion of the "real stop info" yet, just return the current PrivateStopInfo.

Also renamed a few more places where we were using StopReason in functions that were returning StopInfo's.

<rdar://problem/14042692>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183177 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanCallFunction.h
884288bcb6824452a3c64eb772c0976501acc47a 03-Jun-2013 Matt Kopec <Matt.Kopec@intel.com> Fix various build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183140 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/Materializer.h
c350e13fd3351613345141bee7d8b2543df54636 01-Jun-2013 Matt Kopec <Matt.Kopec@intel.com> Add ability to attach/detach to multi-threaded inferiors on Linux.
All running threads will be detected and stopped on attach and all threads get resumed on detach.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183049 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
7ef39ca9e4e94b96fb20fc17200d6492639f0cac 31-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14035604>

Fixing an issue where formats would not propagate from parents to children in all cases
Details follow:
an SBValue has children and those are fetched along with their values
Now, one calls SBValue::SetFormat() on the parent
Technically, the format choices should propagate onto the children (see ValueObject::GetFormat())
But if the children values are already fetched, they won't notice the format change and won't update themselves
This commit fixes that by making ValueObject::GetValueAsCString() check if any format change intervened from the previous call to the current one
A test case is also added



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183030 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
f0e769c7f32a6568c10ef10befaf6a682136cabb 31-May-2013 Enrico Granata <egranata@apple.com> Small code cleanups

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183024 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
b50a2f360d56729c9b1082a45ec91faf7448a725 24-May-2013 Sean Callanan <scallanan@apple.com> Fixed signed operations in the IR interpreter.
Scalar now can make itself signed if needed.

<rdar://problem/13977632>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182668 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Scalar.h
d1ddde0c443e67b37f9303b5bdff19aad9f54fdc 24-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13643315>

Fixed performance issues that arose after changing SBTarget, SBProcess, SBThread and SBFrame over to using a std::shared_ptr to a ExecutionContextRef. The ExecutionContextRef doesn't store a std::weak_ptr to a stack frame because stack frames often get replaced with new version, so it held onto a StackID object that would allow us to ask the thread each time for the frame for the StackID. The linear function was too slow for large recursive stacks. We also fixed an issue where anytime the std::shared_ptr<ExecutionContextRef> in any SBTarget, SBProcess, SBThread objects was turned into an ExecutionContext object, it would try to resolve all items in the ExecutionContext which are shared pointers. Even if the StackID in the ExecutionContextRef was invalid, it was looking through all frames in every thread. This causes a lot of unnecessary frame accesses.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182627 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
0be9b3b58e6ba0929b325c4520d388aafed5891f 23-May-2013 Michael Sartain <mikesart@valvesoftware.com> ObjectFileELF::GetModuleSpecifications on Linux should work now.
Which means "platform process list" should work and list the architecture.
We are now parsing the elf build-id if it exists, which should allow us to load stripped symbols (looking at that next).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182610 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/UUID.h
17d5a0358d60922707fdab6ec9c3251ca44dd614 23-May-2013 Michael Sartain <mikesart@valvesoftware.com> Add ${ansi.XX} parsing to lldb prompt, use-color setting, and -no-use-colors command line options.
settings set use-color [false|true]
settings set prompt "${ansi.bold}${ansi.fg.green}(lldb)${ansi.normal} "
also "--no-use-colors" on the command prompt



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182609 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/Core/Debugger.h
ldb/Utility/AnsiTerminal.h
4b1b8d9e3ae7d4b858e2c1f0ed719655496e6857 23-May-2013 Sean Callanan <scallanan@apple.com> GCC gets confused by enums in bitfields, so I
removed the bitfields. This should be conforming
C++11, though, cf. C++03 9.6(3):
"
A bit-field shall have integral or enumeration
type (3.9.1).
"


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182545 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
1c52f53b131537899c4ec04aa531e81979e1b544 23-May-2013 Greg Clayton <gclayton@apple.com> Cleaned up the File API a bit.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182538 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/File.h
e15e58facd4814a2be1cc1aa385e9f9125b92993 23-May-2013 Greg Clayton <gclayton@apple.com> Added a new "lldb" log channel named "os" for the OperatingSystem plug-ins to use.

Added logging for the OS plug-in python objects in OperatingSystemPython so we can see the python dictionary returned from the plug-in when logging is enabled.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182530 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/PythonDataObjects.h
ldb/lldb-private-log.h
e7872343f18b90e4134fb91a616b138ba6bd6b92 23-May-2013 Sean Callanan <scallanan@apple.com> Fixed a bug where persistent variables did not
live as long as they needed to. This led to
equality tests involving persistent variables
often failing or succeeding when they had no
business doing so.

To do this, I introduced the ability for a
memory allocation to "leak" - that is, to
persist in the process beyond the lifetime of
the expression. Hand-declared persistent
variables do this now.

<rdar://problem/13956311>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182528 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
07e3124bfa7b1b8d782689a625e13f95402c389a 21-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13878726>

Yet another implementation of the python in dSYM autoload :)
This time we are going with a ternary setting:
true - load, do not warn
false - do not load, do not warn
warn - do not load, warn (default)




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182414 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
4d4ff9e8f7746ba1b1d597512b7cb711350c0206 21-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13892516>

LLDB can now debug across calls to exec when the architecture changes from say i386 to x86_64 (on darwin).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182345 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Memory.h
02af494c397d62f22bea65d36ad47080b6adc8af 21-May-2013 Enrico Granata <egranata@apple.com> Improving the previous checkin about target.load-script-from-symbol-file

There are two settings:
target.load-script-from-symbol-file is a boolean that says load or no load (default: false)
target.warn-on-script-from-symbol-file is also a boolean, it says whether you want to be warned when a script file is not loaded due to security (default: true)

the auto loading on change for target.load-script-from-symbol-file is preserved



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182336 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Target/Target.h
2e7f2db1b0c4c6d904811fba7d7877b19288c874 21-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13878726>

This changes the setting target.load-script-from-symbol-file to be a ternary enum value:
default (the default value) will NOT load the script files but will issue a warning suggesting workarounds
yes will load the script files
no will not load the script files AND will NOT issue any warning

if you change the setting value from default to yes, that will then cause the script files to be loaded
(the assumption is you didn't know about the setting, got a warning, and quickly want to remedy it)

if you have a settings set command for this in your lldbinit file, be sure to change "true" or "false" into an appropriate "yes" or "no" value



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182323 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
ldb/Target/Target.h
83d90c5e68f4a977150c6791a49ade7a23c92177 18-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/11398407>

Name matching was working inconsistently across many places in LLDB. Anyone doing name lookups where you want to look for all types of names should used "eFunctionNameTypeAuto" as the sole name type mask. This will ensure that we get consistent "lookup function by name" results. We had many function calls using as mask like "eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector". This was due to the function lookup by name evolving over time, but as it stands today, use eFunctionNameTypeAuto when you want general name lookups. Either ModuleList::FindFunctions() or Module::FindFunctions() will figure out the right kinds of names to lookup and remove the "eFunctionNameTypeAuto" and replace it with the exact subset of what the name can be.

This checkin also changes eFunctionNameTypeAny over to use eFunctionNameTypeAuto to reflect this.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182179 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/CPPLanguageRuntime.h
ldb/lldb-enumerations.h
b31044ef36be5678234babf27f321efc49a7655d 17-May-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Fixed the build to reflect the API name change in r182085.

- Also added a comment as lldb doesn't flush the instruction cache after dy-load.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182099 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRExecutionUnit.h
92025da7418093d2de2d7ba61717eaa802371f1d 17-May-2013 Sylvestre Ledru <sylvestre@debian.org> Fix a typo (ouput => output)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182090 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolContext.h
589d3618411e8a757992482e4d0cb3cb79480f2e 17-May-2013 Jim Ingham <jingham@apple.com> Apropos should search user commands as well as built-in commands.

rdar://problem/13916722


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182068 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
23a51623e0e866225d959506796e3d75de3a08e3 17-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13217784>

"source list -n <func>" can now show more than one location that matches a function name. It will unique multiple of the same source locations so they don't get displayed. It also handles inline functions correctly.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182067 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolContext.h
5acdec75cbdb5078de36d0bcf5b0c9bd97f46336 16-May-2013 Sean Callanan <scallanan@apple.com> Added a per-process cache for reserved memory
regions that aren't actually allocated in the
process. This cache is used by the expression
parser if the underlying process doesn't support
memory allocation, to avoid needless repeated
searches for unused address ranges.

Also fixed a silly bug in IRMemoryMap where it
would continue searching even after it found a
valid region.

<rdar://problem/13866629>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182028 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
bef2dde1407f2b7b7cf36739d23439c8f1dd0fc4 15-May-2013 Jim Ingham <jingham@apple.com> Change the mechanism around SBValue::GetSP() so that it always requires the target API lock AND the
process StopLocker (if there is a process) before it will hand out SBValues. We were doing this in
an ad hoc fashion previously, and then playing whack-a-mole whenever we found a place where we should
have been doing this but weren't. Really, it doesn't make sense to be poking at SBValues when the target
is running, the dynamic and synthetic values can't really be computed, and the underlying memory may be
incoherent.

<rdar://problem/13819378> Sometimes when stepping fast, my inferior is killed by debugserver


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181863 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
946618a80e17d210e6592e94d10a15ad592572ba 15-May-2013 Greg Clayton <gclayton@apple.com> A first pass at auto completion for variables and their children. This is currently hooked up for "frame variable" only. With a little work we can also enable it for the "expression" command and also for other things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181850 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandCompletions.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/Variable.h
375ba883a11c84b7eb27f6f04751aea878e3e9b0 14-May-2013 Daniel Malea <daniel.malea@intel.com> Fix inline stepping test case on Linux because Thread::ThreadStoppedForAReason ignored virtual steps.
- add IsVirtualStep() virtual function to ThreadPlan, and implement it for
ThreadPlanStepInRange
- make GetPrivateStopReason query the current thread plan for a virtual stop to
decide if the current stop reason needs to be preserved
- remove extra check for an existing process in GetPrivateStopReason



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181795 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepInRange.h
de0201e8b6340994303dcd29526d633dcbca676e 13-May-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Fixed expression evaluation with convenience registers.

- Also improved test coverage for passing tests to include expr/x
and a sanity check for $eax as the lower half of $rax.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181727 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RegisterValue.h
024497728739eedffc9b79c28337fba22f07f8b4 13-May-2013 Matt Kopec <Matt.Kopec@intel.com> Add setting of lldb thread names on Linux.

Patch by Mike Sartain.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181722 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
1d3db0a71f507df5158eb160aaceefb6dd5f38c2 13-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13183720>

Provide a mechanism through which users can disable loading the Python scripts from dSYM files
This relies on a target setting: target.load-script-from-symbol-file which defaults to false ("do NOT load the script")
You need to set it to true before creating your target (or in your lldbinit file if you constantly rely on this feature) to allow the scripts to load



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181709 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
ba065cab7acc8ef7fbedc27af5d18c3a694a084a 11-May-2013 Jason Molenda <jmolenda@apple.com> A couple of small fixes to make core file debugging less noisy.
Don't want about being unable to find a needed objective-c runtime
function when we're core file debugging and can't jit anything
anyway. Don't warn when quitting a debug session on a core file,
the program state can be reconstructed by re-running lldb on the
same core file again.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181653 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
addad59552c206466dea98c4a645a471a41252b4 11-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13700260>

Avoid a deadlock when using the OperatingSystemPython code and typing "process interrupt". There was a possible lock inversion between the target API lock and the process' thread list lock due to code trying to discard the thread list. This was fixed by adding a boolean to Process::Halt() that indicates if the thread plans should be discarded and doing it in the private state thread when we process the stopped state.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181651 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
0e191607adcb0ea8ebd06c278be648a7f5c0097f 10-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13854277>
<rdar://problem/13594769>

Main changes in this patch include:
- cleanup plug-in interface and use ConstStrings for plug-in names
- Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp
- Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging

The plug-in interface changes:

Modified the lldb_private::PluginInterface class that all plug-ins inherit from:

Changed:

virtual const char * GetPluginName() = 0;

To:

virtual ConstString GetPluginName() = 0;

Removed:

virtual const char * GetShortPluginName() = 0;

- Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names.
- Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc.






git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181631 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Core/Log.h
ldb/Core/Module.h
ldb/Core/ModuleSpec.h
ldb/Core/PluginInterface.h
ldb/Core/PluginManager.h
ldb/Symbol/SymbolVendor.h
ldb/Target/Platform.h
ldb/Target/Process.h
1f85fa8c8611a175819009dd83e724b6788a6587 10-May-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding support for setting thread stop state when a process stops.

This re-submission of this patch fixes a problem where the code sometimes caused a deadlock. The Process::SetPrivateState method was locking the Process::m_private_state variable and then later calling ThreadList::DidStop, which locks the ThreadList mutex. Other methods in ThreadList which were being called from other threads lock the ThreadList mutex and then call Process::GetPrivateState which locks the Process::m_private_state mutex. To avoid deadlocks, Process::SetPrivateState now locks the ThreadList mutex before locking the Process::m_private_state mutex.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181609 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadList.h
85e3c2f2f7e60a772f9fffa3fc42d46e493d198c 09-May-2013 Daniel Malea <daniel.malea@intel.com> Revert r181482 as it causes occasional hangs in LLDB buildbots

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181526 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadList.h
863aa28adf536c9c008e1590f25da662431d6f13 09-May-2013 Greg Clayton <gclayton@apple.com> Changed the formerly pure virtual function:

namespace lldb_private {
class Thread
{
virtual lldb::StopInfoSP
GetPrivateStopReason() = 0;
};
}

To not be virtual. The lldb_private::Thread now handles the correct caching and will call a new pure virtual function:

namespace lldb_private {
class Thread
{
virtual bool
CalculateStopInfo() = 0;
}
}

This function must be overridden by thead lldb_private::Thread subclass and the only thing it needs to do is to set the Thread::StopInfo() with the current stop reason and return true, or return false if there is no stop reason. The lldb_private::Thread class will take care of calling this function only when it is required. This allows lldb_private::Thread subclasses to be a bit simpler and not all need to duplicate the cache and invalidation settings.

Also renamed:

lldb::StopInfoSP
lldb_private::Thread::GetPrivateStopReason();

To:

lldb::StopInfoSP
lldb_private::Thread::GetPrivateStopInfo();

Also cleaned up a case where the ThreadPlanStepOverBreakpoint might not re-set its breakpoint if the thread disappears (which was happening due to a bug when using the OperatingSystem plug-ins with memory threads and real threads).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181501 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepOverBreakpoint.h
52e4391bf4239f770f856392869f652f5417f489 09-May-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding code to set thread state to stopped when the process stops.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181482 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadList.h
b335e7090f1c6579d8bf2915f6a4a0ba98be15ef 08-May-2013 Greg Clayton <gclayton@apple.com> Quiet g++-4.7 warnings about const issues and fix the scope of the "if (IsValid())".

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181474 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Value.h
994b86bcbf78930c309ec0e38f2d980e8c338c04 08-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13621080>

This commit changes the ${function.name-with-args} prompt keyword to also tackle structs
Previously, since aggregates have no values, this would show up as foo=(null)
This checkin changes that to instead print foo=(Foo at 0x123) (i.e. typename at address)
There are other potential choices here (summary, one-liner printout of all members, ...) and I would love to hear feedback about better options, if any



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181462 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/VariableList.h
c5bcb907e4a898783640c038b84c9f2ac10ee91d 08-May-2013 Daniel Malea <daniel.malea@intel.com> Remove distinction between Apple/Linux for Process run locks:
- Played with the current dual run lock implementation for a few days, noticed
no regressions, so enabling in trunk so we see if any problems are detected
by buildbots.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181446 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
779e6ac7d5622ad35f482633b1145c82dbc6c3ce 08-May-2013 Sean Callanan <scallanan@apple.com> Fixed IRExecutionUnit build failures due to changes
in the underlying llvm::JITMemoryManager API.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181387 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRExecutionUnit.h
7c79a27b955432dfd3ad9439640f0af2eccf37b8 08-May-2013 Jim Ingham <jingham@apple.com> Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.

Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.

Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--

M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181381 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/Target/StopInfo.h
ldb/Target/Thread.h
ldb/Target/ThreadList.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanBase.h
ldb/Target/ThreadPlanCallFunction.h
ldb/Target/ThreadPlanRunToAddress.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepInstruction.h
ldb/Target/ThreadPlanStepOut.h
ldb/Target/ThreadPlanStepOverBreakpoint.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepThrough.h
ldb/Target/ThreadPlanStepUntil.h
4e75e3533bddc7cf7264c6c7f7b4d812d4466e96 07-May-2013 Andrew Kaylor <andrew.kaylor@intel.com> Reinstating r181091 and r181106 with fix for Linux regressions.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181340 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/OperatingSystem.h
ldb/Target/Process.h
ldb/Target/ThreadList.h
95bea1dfb166a1816ee36a3453aa3ebeca248844 07-May-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Temporarily reverting r181091 and r181106 due to the vast test breakage on the Linux buildbots
while we develop a better understanding of how to manage the thread lists in a platform-independant fashion.

Reviewed by: Daniel Malea


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181323 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/OperatingSystem.h
ldb/Target/Process.h
ldb/Target/ThreadList.h
8f0f4751e12a4f8d2b6bf359ee4e0853b0d6cd23 06-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/11669154>

Make a summary format for libc++ STL containers that shows the number of items as before, but also shows the pointer value for pointer-to-container



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181236 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
7bee8abf1678cb4dade06add9036981f7249ba09 04-May-2013 Greg Clayton <gclayton@apple.com> After recent OperatingsSystem plug-in changes, the lldb_private::Process and lldb_private::Thread subclasses were changed and the API was not respected properly.

This checkin aims to fix this. The process now has two thread lists: a real thread list for threads that are created by the lldb_private::Process subclass, and the user visible threads. The user visible threads are the same as the real threas when no OS plug-in in used. But when an OS plug-in is used, the user thread can be a combination of real and "memory" threads. Real threads can be placed inside of memory threads so that a thread appears to be different, but is still controlled by the actual real thread. When the thread list needs updating, the lldb_private::Process class will call the: lldb_private::Process::UpdateThreadList() function with the old real thread list, and the function is expected to fill in the new real thread list with the current state of the process. After this function, the process will check if there is an OS plug-in being used, and if so, it will give the old user thread list, the new real thread list and the OS plug-in will create the new user thread list from both of these lists. If there is no OS plug-in, the real thread list is the user thread list.

These changes keep the lldb_private::Process subclasses clean and no changes are required.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181091 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/OperatingSystem.h
ldb/Target/Process.h
ldb/Target/ThreadList.h
08f60c88b61c42c35abf3233f0cbe19d29fbe814 04-May-2013 Jason Molenda <jmolenda@apple.com> fix a couple of clang static analyzer warnings.
Most important was a new[] + delete mismatch in ScanFormatDescriptor()
and a couple of possible memory leaks in FileSpec::EnumerateDirectory().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181080 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
42b336cd509cad89be08f78775d3b1c8c7656a1b 04-May-2013 Jason Molenda <jmolenda@apple.com> Remove the UUID::GetAsCString() method which required a buffer to save the
UUID string in; added UUID::GetAsString() which returns the uuid string in
a std::string. Updated callers to use the new method.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181078 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/UUID.h
ff1bbd78581ab2f1e43fbbc8b6e2dc23a9745967 03-May-2013 Andrew Kaylor <andrew.kaylor@intel.com> Fix logic error in ProcessInfo::SetArg0

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181049 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
0765e3274aab0551fea7678bee565c7d68e0b786 03-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/11742979>

SWIG is smart enough to recognize that C++ operators == and != mean __eq__ and __ne__ in Python and do the appropriate translation
But it is not smart enough to recognize that mySBObject == None should return False instead of erroring out
The %pythoncode blocks are meant to provide those extra smarts (and they play some SWIG&Python magic to find the right function to call behind the scenes with no risk of typos :-)
Lastly, SBBreakpoint provides an == but never provided a != operator - common courtesy is to provide both

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180987 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBBreakpoint.h
2e126c53e49aca4be40a124447851d825e572af4 02-May-2013 Daniel Malea <daniel.malea@intel.com> Add missing include to LLDB.h -- SBStream



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180954 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/LLDB.h
2cfedf5f9b1c220f229387246093e154cd574847 02-May-2013 Greg Clayton <gclayton@apple.com> We aren't ready for the assertions to be enabled on the ReadWriteLock classes yet.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180928 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/ReadWriteLock.h
761afb822b18c46b2ad84be03f372e90ac1e6143 02-May-2013 Jim Ingham <jingham@apple.com> Recommitting r180831 with trivial fix - remember to return errors if you compute.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180898 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
a46013bde54626b68cd2013b108f73a205f4b29a 01-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13700260>
<rdar://problem/13723772>

Modified the lldb_private::Thread to work much better with the OperatingSystem plug-ins. Operating system plug-ins can now return have a "core" key/value pair in each thread dictionary for the OperatingSystemPython plug-ins which allows the core threads to be contained with memory threads. It also allows these memory threads to be stepped, resumed, and controlled just as if they were the actual backing threads themselves.

A few things are introduced:
- lldb_private::Thread now has a GetProtocolID() method which returns the thread protocol ID for a given thread. The protocol ID (Thread::GetProtocolID()) is usually the same as the thread id (Thread::GetID()), but it can differ when a memory thread has its own id, but is backed by an actual API thread.
- Cleaned up the Thread::WillResume() code to do the mandatory parts in Thread::ShouldResume(), and let the thread subclasses override the Thread::WillResume() which is now just a notification.
- Cleaned up ClearStackFrames() implementations so that fewer thread subclasses needed to override them
- Changed the POSIXThread class a bit since it overrode Thread::WillResume(). It is doing the wrong thing by calling "Thread::SetResumeState()" on its own, this shouldn't be done by thread subclasses, but the current code might rely on it so I left it in with a TODO comment with an explanation.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180886 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/OperatingSystem.h
ldb/Target/RegisterContext.h
ldb/Target/StopInfo.h
ldb/Target/Thread.h
ldb/Target/ThreadList.h
0b78f4317b4fae90ca45bcf1fe6d8adfc8125990 01-May-2013 Daniel Malea <daniel.malea@intel.com> Revert 180829 as it causes hangs in TestTypeCompletion.py on 2 Linux buildbots:

http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/3810
http://lab.llvm.org:8011/builders/lldb-x86_64-debian-clang/builds/2754



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180870 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanBase.h
411ab47806a478d932926ef7a309ea37edf1f7e7 01-May-2013 Daniel Malea <daniel.malea@intel.com> Reverting 180831 as it crashes TestDefaultConstructorForAPIObjects.py



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180868 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
b4e08abf4972befc8412bc83a0205fbdc547290e 01-May-2013 Jim Ingham <jingham@apple.com> Added an option to "process detach" to keep the process stopped, if the process plugin (or in the
case of ProcessGDBRemote the stub we are talking to) know how to do that.

rdar://problem/13680832


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180831 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
8b73c976083265c4085c57ded28f70629ab8d5f8 01-May-2013 Jim Ingham <jingham@apple.com> Make "process handle -n true -s false" actually notifies of the signal.

rdar://problem/12020085


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180829 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanBase.h
10dc2a161c5a3c939a54ba0f4b98e797c5a29b56 30-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13695846>

Enabling LLDB to write to variables that are stored in registers
Previously, this would not work since the Value's Context loses the notion of the data being in a register
We now store an "original" context that comes out of DWARF parsing, and use that context's data when attempting a write



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180803 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Value.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectVariable.h
8a1e6542c5b125613ffce3039aa713ee6ea07dcf 30-Apr-2013 Greg Clayton <gclayton@apple.com> lldb_private::StopInfo now holds onto a ThreadWP (a std::weak_ptr<lldb_private::Thread>) in case the thread goes away while the stop info still exists.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180749 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StopInfo.h
97a19b21dacd9063bb5475812df7781777262198 29-Apr-2013 Greg Clayton <gclayton@apple.com> Cleanup logging to use the new "std::string FileSpec::GetPath()" function. Also added a similar function for modules:

std::string
Module::GetSpecificationDescription () const;

This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180717 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
30518e01f8e264a310050cfc0e2857637fa32063 29-Apr-2013 Greg Clayton <gclayton@apple.com> Don't return a reference to a local variable, and removed a redundant API.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180713 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/FileSpec.h
bf1fa97ab9a28890478daf70cdf6b8177ae3bbae 29-Apr-2013 Jason Molenda <jmolenda@apple.com> Add a few new methods to FileSpec to make it a little easier to work
with directories, without increasing the size of the FileSpec object.
GetPath() returns a std::string of the full pathname of the file.
IsDirectory(), IsPipe(), IsRegularFile(), IsSocket(), and IsSymbolicLink()
can be used instead of getting the FileType() and comparing it to an enum.

Update PlatformDarwinKernel to use these new methods.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180704 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/FileSpec.h
cdc3ea5398f251d3eca482595f103b1874e51538 27-Apr-2013 Sean Callanan <scallanan@apple.com> Performance optimizations to ClangUserExpression,
mostly related to management of the stack frame
for the interpreter.

- First, if the expression can be interpreted,
allocate the stack frame in the target process
(to make sure pointers are valid) but only
read/write to the copy in the host's memory.

- Second, keep the memory allocations for the
stack frame and the materialized struct as
member variables of ClangUserExpression. This
avoids memory allocations and deallocations
each time the expression runs.

<rdar://problem/13043685>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180664 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangUserExpression.h
ldb/Expression/IRInterpreter.h
5c2cd1f89c48df277a07f73822187317ac4cbae0 27-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12529989>

Synthetic children provider for NSOrderedSet

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180655 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
23df42a102f7f4c83128865e396eb9411f9a3cdd 26-Apr-2013 Andrew Kaylor <andrew.kaylor@intel.com> Fixing a typo in the SBThread::Suspend documentation

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180621 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
39ebb982b3f9de4a15744078e9c6ba231187b5dc 26-Apr-2013 Enrico Granata <egranata@apple.com> Make a synthetic children provider for the ObjC Class type



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180588 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
36b877d2d27f7d1890f2d13807a3addb216648e2 25-Apr-2013 Greg Clayton <gclayton@apple.com> Added the ability to extract a ModuleSpecList (a new class) from an ObjectFile. This is designed to be used when you have an object file that contains one or more architectures (MacOSX universal (fat) files) and/or one or more objects (BSD archive (.a files)).

There is a new static ObjectFile function you can call:

size_t
ObjectFile::GetModuleSpecifications (const FileSpec &file,
lldb::offset_t file_offset,
ModuleSpecList &specs)

This will fill in "specs" which the details of all the module specs (file + arch + UUID (if there is one) + object name (for BSD archive objects eventually) + file offset to the object in question).

This helps us when a user specifies a file that contains a single architecture, and also helps us when we are given a debug symbol file (like a dSYM file on MacOSX) that contains one or more architectures and we need to be able to match it up to an existing Module that has no debug info.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180224 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleSpec.h
ldb/Core/PluginManager.h
ldb/Symbol/ObjectFile.h
ldb/lldb-forward.h
ldb/lldb-private-interfaces.h
323c03778ea1a2b3d9bd4cb749f502e3f5792275 24-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13209140>

“plugin load” tries to be more helpful when it fails to load a plugin

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180218 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
ldb/Host/DynamicLibrary.h
d9661be3c9f884d9a7a78174038387edd04c5d93 24-Apr-2013 Enrico Granata <egranata@apple.com> Changes to the ObjC runtime



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180199 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
79e7ad84e2b31baf22e05ab24aaa11b5e0f566a5 24-Apr-2013 Sean Callanan <scallanan@apple.com> Fixed a problem where the expression parser would
not find multiple functions with the same name but
different types. Now we keep track of what types
we've already reported for a function and only elide
functions if we've already reported a conflicting
one.

Also added a test case.

<rdar://problem/11367837>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180167 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
f40162d465e7bed888b502a287da1f76c861d833 23-Apr-2013 Sylvestre Ledru <sylvestre@debian.org> Remove duplicate define

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180095 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/freebsd/Config.h
bf26ea6ffa9426b8f23c78aa8cf18b809beb364c 23-Apr-2013 Enrico Granata <egranata@apple.com> Daniel Malea reported seeing warnings for the use of anonymous namespaces in our public API.
Removing these namespace { ... } declarations (but still keeping the helper *Impl objects outside of namespace lldb proper)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180067 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/API/SBValueList.h
ac630b8ee6f36d0d2024d2dfd6525e1cdd727360 22-Apr-2013 Daniel Malea <daniel.malea@intel.com> Fix lock hierarchy violation in Listener/Broadcaster
- avoid deadlocks if Broadcaster::SignUpListenersForBroadcaster and
Listener::StartListeningForEventSpec are both called concurrently



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180050 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Broadcaster.h
ba6b37d9b893746f04aaf1a07c97fc8b161feff9 22-Apr-2013 Daniel Malea <daniel.malea@intel.com> Fix data race in Address class by wrapping m_offset in std::atomic



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180047 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Address.h
5042acfb254338f60ef8bc3a8715e229795d941f 20-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13697881>

Fixed the GDB remote with the python OS plug-in to not show core threads when they aren't desired and also to have the threads "to the right thing" when continuing.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179912 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
dbeac800550e092ce7a2386f87a1c520bec2f0cf 20-Apr-2013 Greg Clayton <gclayton@apple.com> Be sure to include initializer_list when needed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179911 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
d387b462eecb908af265ecc7006781b4532073ad 19-Apr-2013 Greg Clayton <gclayton@apple.com> Fixed some linux buildbot warnings.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179892 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Value.h
ldb/Interpreter/OptionValueProperties.h
ldb/Target/ObjCLanguageRuntime.h
06761aad61604feba2af78c873b104e0415d9361 19-Apr-2013 Sean Callanan <scallanan@apple.com> Simplified the management of the data buffer for
an Allocation to reduce heap fragmentation and
make the code less brittle (and to make some
buildbots happier).


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179868 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
347d722127cc6a19b077244305c3d350ea4ef80e 19-Apr-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Provided a variant of ReadCStringFromMemory that supports null terminators of any character width.
This prevents unbounded reads (i.e. reads of GetMaximumSizeOfStringSummary() bytes)
from causing test failures (i.e. due to ptrace EIO or EFAULT on Linux).

Note that ReadCStringFromMemory is marked as deprecated because the loop that calls
ReadMemory does not continue until the string has been completely read.
The expected behavior is to read until until max_bytes or a null terminator.

Note: As discussed on lldb-dev, further testing will be performed with ReadStringFromMemory
before further changes are made for users of ReadCStringFromMemory.

Thanks to Enrico, Matt and Andy for their review feedback.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179857 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
2ce786d8238bbfb4f1cde19d5340d646631e499f 19-Apr-2013 Sean Callanan <scallanan@apple.com> Removed 2800+ lines of code that no longer do anything
now that the IR interpreter and the JIT share the same
materialization codepaths.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179842 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/IRInterpreter.h
28195f9e55173cd06c3c5f9e69cefeb1d03cc129 19-Apr-2013 Sean Callanan <scallanan@apple.com> Optimized the way breakpoint conditions are evaluated.
Previously, the options for a breakopint or its
locations stored only the text of the breakpoint
condition (ironically, they used ClangUserExpression
as a glorified std::string) and, each time the condition
had to be evaluated in the StopInfo code, the expression
parser would be invoked via a static method to parse and
then execute the expression.

I made several changes here:

- Each breakpoint location now has its own
ClangUserExpressionSP containing a version of
the breakpoint expression compiled for that exact
location.

- Whenever the breakpoint is hit, the breakpoint
condition expression is simply re-run to determine
whether to stop.

- If the process changes (e.g., it's re-run) or
the source code of the expression changes (we use
a hash so as to avoid doing string comparisons)
the ClangUserExpressionSP is re-generated.

This should improve performance of breakpoint
conditions significantly, and takes advantage of
the recent expression re-use work.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179838 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointOptions.h
ldb/Expression/ClangUserExpression.h
73cb33aa0c9a59cfd42c3cea222378dc9d15abb0 19-Apr-2013 Sean Callanan <scallanan@apple.com> Made IRMemoryMap::FindSpace a little cleverer,
and made attempts to allocate memory in the process
fall back to FindSpace and just allocate memory on
the host (but with real-looking pointers, hence
FindSpace) if the process doesn't allow allocation.
This allows expressions to run on processes that don't
support allocation, like core files.

This introduces an extremely rare potential problem:
If all of the following are true:

- The Process doesn't support allocation;

- the user writes an expression that refers to an
address that does not yet map to anything, or is
dynamically generated (e.g., the result of calling
a function); and

- the randomly-selected address for the static data
for that specific expression runs into the
address the user was expecting to work with;

then dereferencing the pointer later results
in the user seeing something unexpected. This is
unlikely but possible; as a future piece of work,
we should have processes be able to hint to the
expression parser where it can allocate temporary data
of this kind.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179827 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
ldb/API/SBCommandReturnObject.h
ldb/API/SBDeclaration.h
ldb/API/SBError.h
ldb/API/SBExpressionOptions.h
ldb/API/SBFileSpec.h
ldb/API/SBFileSpecList.h
ldb/API/SBLineEntry.h
ldb/API/SBSourceManager.h
ldb/API/SBStream.h
ldb/API/SBStringList.h
ldb/API/SBSymbolContext.h
ldb/API/SBSymbolContextList.h
ldb/API/SBType.h
ldb/API/SBValue.h
ldb/API/SBValueList.h
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointOptions.h
ldb/Breakpoint/BreakpointSite.h
ldb/Breakpoint/Watchpoint.h
ldb/Breakpoint/WatchpointOptions.h
ldb/Core/Debugger.h
ldb/Core/Disassembler.h
ldb/Core/Event.h
ldb/Core/Log.h
ldb/Core/Module.h
ldb/Core/Section.h
ldb/Core/SourceManager.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/DataFormatters/FormatNavigator.h
ldb/DataFormatters/TypeCategory.h
ldb/DataFormatters/TypeFormat.h
ldb/DataFormatters/TypeSummary.h
ldb/DataFormatters/TypeSynthetic.h
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionParser.h
ldb/Expression/ClangExpressionVariable.h
ldb/Expression/ClangFunction.h
ldb/Expression/ClangUserExpression.h
ldb/Expression/ClangUtilityFunction.h
ldb/Expression/IRDynamicChecks.h
ldb/Expression/IRExecutionUnit.h
ldb/Expression/IRForTarget.h
ldb/Expression/IRMemoryMap.h
ldb/Expression/Materializer.h
ldb/Host/Terminal.h
ldb/Interpreter/Args.h
ldb/Interpreter/CommandInterpreter.h
ldb/Interpreter/OptionValueProperties.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/CompileUnit.h
ldb/Symbol/DWARFCallFrameInfo.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/SymbolContext.h
ldb/Symbol/SymbolVendor.h
ldb/Symbol/Type.h
ldb/Symbol/UnwindPlan.h
ldb/Target/Memory.h
ldb/Target/ObjCLanguageRuntime.h
ldb/Target/Process.h
ldb/Target/RegisterContext.h
ldb/Target/StackFrame.h
ldb/Target/StackFrameList.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Utility/PriorityPointerPair.h
ldb/Utility/SharingPtr.h
ldb/lldb-forward.h
0f0551e67d8ea8d63ace5456f7d42d951827b017 19-Apr-2013 Sean Callanan <scallanan@apple.com> This commit changes the way LLDB executes user
expressions.

Previously, ClangUserExpression assumed that if
there was a constant result for an expression
then it could be determined during parsing. In
particular, the IRInterpreter ran while parser
state (in particular, ClangExpressionDeclMap)
was present. This approach is flawed, because
the IRInterpreter actually is capable of using
external variables, and hence the result might
be different each run. Until now, we papered
over this flaw by re-parsing the expression each
time we ran it.

I have rewritten the IRInterpreter to be
completely independent of the ClangExpressionDeclMap.
Instead of special-casing external variable lookup,
which ties the IRInterpreter closely to LLDB,
we now interpret the exact same IR that the JIT
would see. This IR assumes that materialization
has occurred; hence the recent implementation of the
Materializer, which does not require parser state
(in the form of ClangExpressionDeclMap) to be
present.

Materialization, interpretation, and dematerialization
are now all independent of parsing. This means that
in theory we can parse expressions once and run them
many times. I have three outstanding tasks before
shutting this down:

- First, I will ensure that all of this works with
core files. Core files have a Process but do not
allow allocating memory, which currently confuses
materialization.

- Second, I will make expression breakpoint
conditions remember their ClangUserExpression and
re-use it.

- Third, I will tear out all the redundant code
(for example, materialization logic in
ClangExpressionDeclMap) that is no longer used.

While implementing this fix, I also found a bug in
IRForTarget's handling of floating-point constants.
This should be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179801 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionParser.h
ldb/Expression/ClangUserExpression.h
ldb/Expression/IRForTarget.h
ldb/Expression/IRInterpreter.h
ldb/Expression/Materializer.h
da0e332abdc9dbd058d2d1a02233237df6bee894 19-Apr-2013 Greg Clayton <gclayton@apple.com> Try to unbreak the lldb-x86_64-linux buildbot after recent std::auto_ptr/std::unique_ptr changes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179799 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
0b10ef61ea60e24fe7736cd98bd5fb45efe9c816 18-Apr-2013 Greg Clayton <gclayton@apple.com> Missed some cases when switching over to using our STD_UNIQUE_PTR macros.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179796 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValueList.h
ldb/Core/Log.h
ldb/Expression/IRMemoryMap.h
ldb/Expression/Materializer.h
ldb/lldb-types.h
81a96aa6242f7b559770f5dc62316253cb8cb0d4 18-Apr-2013 Greg Clayton <gclayton@apple.com> Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++.

Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179779 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
ldb/API/SBCommandReturnObject.h
ldb/API/SBDeclaration.h
ldb/API/SBError.h
ldb/API/SBExpressionOptions.h
ldb/API/SBFileSpec.h
ldb/API/SBFileSpecList.h
ldb/API/SBLineEntry.h
ldb/API/SBSourceManager.h
ldb/API/SBStream.h
ldb/API/SBStringList.h
ldb/API/SBSymbolContext.h
ldb/API/SBSymbolContextList.h
ldb/API/SBType.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointOptions.h
ldb/Breakpoint/Watchpoint.h
ldb/Breakpoint/WatchpointOptions.h
ldb/Core/Debugger.h
ldb/Core/Event.h
ldb/Core/Module.h
ldb/Core/Timer.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/DataFormatters/TypeSynthetic.h
ldb/Expression/ClangExpression.h
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionParser.h
ldb/Expression/ClangFunction.h
ldb/Expression/ClangUserExpression.h
ldb/Expression/ClangUtilityFunction.h
ldb/Expression/IRDynamicChecks.h
ldb/Expression/IRExecutionUnit.h
ldb/Expression/IRForTarget.h
ldb/Host/Terminal.h
ldb/Interpreter/CommandInterpreter.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangExternalASTSourceCallbacks.h
ldb/Symbol/CompileUnit.h
ldb/Symbol/FuncUnwinders.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/SymbolContext.h
ldb/Symbol/SymbolVendor.h
ldb/Target/Process.h
ldb/Target/StackFrameList.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Utility/PythonPointer.h
ldb/lldb-forward.h
061ca65c4b666f8352ba08700ca4e5fa71ebb4a9 18-Apr-2013 Greg Clayton <gclayton@apple.com> Re-enable m_private_run_lock changes from 179329, but only for Apple hosted builds so it doesn't break the buildbots. We will try and work the issues out in the Apple build before enabling this feature for everyone.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179772 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
6b47bca0e0472439b9c69fb16b9c6a3bcfbe783b 18-Apr-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Revert of r179378 and r179329, which introduce a private thread lock around thread enumeration,
in order to prevent consistent hangs on all 3 LLDB buildbots.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179759 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
81f4b8953db5db67bec754dc895a5a83c96c84fb 18-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Remove duplicate "friend" declaration.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179749 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
7df01f93aeb3b9109c5739e7731bd459e06a799b 17-Apr-2013 Daniel Malea <daniel.malea@intel.com> Add missing include



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179711 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRExecutionUnit.h
3a201e4eacf34418d6640dc2645165e8ae3d1ccf 17-Apr-2013 Sean Callanan <scallanan@apple.com> Added a new API to the IRInterpreter (the old API
will be gone soon!) that lets it interpret a function
using just an llvm::Module, an llvm::Function, and a
MemoryMap.

Also added an API to IRExecutionUnit to get at its
llvm::Function, so that the IRInterpreter can work
with it.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179704 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRExecutionUnit.h
ldb/Expression/IRInterpreter.h
44199f15f5b69bee8b64aa28e5e2b6d87d0fc932 17-Apr-2013 Sean Callanan <scallanan@apple.com> Made the IRInterpreter's methods static, since
it doesn't actually hold any important state.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179702 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRInterpreter.h
e804caf35c6cca4b42ff609ded7e4dc6f22c6eba 17-Apr-2013 Sean Callanan <scallanan@apple.com> Made the IRInterpreter be able to operate without
a ClangExpressionDeclMap. Any functions that
require value resolution etc. fail if the
ClangExpressionDeclMap isn't present - which is
exactly what is desired.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179695 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRInterpreter.h
13615cfef0435af28ccc1e93e13c6161e94585ed 17-Apr-2013 Sean Callanan <scallanan@apple.com> Updated the IRInterpreter to work with an
IRMemoryMap rather than through its own memory
abstraction. This considerably simplifies the
code, and makes it possible to run the
IRInterpreter multiple times on an already-parsed
expression in the absence of a ClangExpressionDeclMap.

Changes include:

- ClangExpressionDeclMap's interface methods
for the IRInterpreter now take IRMemoryMap
arguments. They are not long for this world,
however, since the IRInterpreter will soon be
working with materialized variables.

- As mentioned above, removed the Memory class
from the IR interpreter altogether. It had a
few functions that remain useful, such as
keeping track of Values that have been placed
in memory, so I moved those into methods on
InterpreterStackFrame.

- Changed IRInterpreter to work with lldb::addr_t
rather than Memory::Region as its primary
currency.

- Fixed a bug in the IRMemoryMap where it did not
report correct address byte size and byte order
if no process was present, because it was using
Target::GetDefaultArchitecture() rather than
Target::GetArchitecture().

- Made IRMemoryMap methods clear the Errors they
receive before running. Having to do this by
hand is just annoying.

The testsuite seems happy with these changes, but
please let me know if you see problems (especially
in use cases without a process).


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179675 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
86d6ac2a3d920622c1ee7a68b5ca28b09dc18142 17-Apr-2013 Sean Callanan <scallanan@apple.com> Modified the IRInterpreter to take an IRMemoryMap.
It doesn't use it yet; the next step is to make it
use the IRMemoryMap instead of its own conjured-up
Memory class.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179650 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRForTarget.h
ldb/Expression/IRInterpreter.h
a6686e36cd56843e594139324884585fb47b918b 17-Apr-2013 Sean Callanan <scallanan@apple.com> Flipped the big switch: LLDB now uses the new
Materializer for all expressions that need to
run in the target. This includes the following
changes:

- Removed a bunch of (de-)materialization code
from ClangExpressionDeclMap and assumed the
presence of a Materializer where we previously
had a fallback.

- Ensured that an IRMemoryMap is passed into
ClangExpressionDeclMap::Materialize().

- Fixed object ownership on LLVMContext; it is
now owned by the IRExecutionUnit, since the
Module and the ExecutionEngine both depend on
its existence.

- Fixed a few bugs in IRMemoryMap and the
Materializer that showed up during testing.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179649 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/IRExecutionUnit.h
ldb/Expression/Materializer.h
2c354722318f0fcad087c76f2bc0dc8db9200b4b 16-Apr-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding new Python API function to check for stopped threads.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179577 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
76f9879afa1508febd5538a63a3fad7f01c6c64f 16-Apr-2013 Sean Callanan <scallanan@apple.com> Added logging to each entity in the Materializer
to make debugging easier when things go wrong.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179576 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
ldb/Expression/Materializer.h
cecfa8fca811579fdee0ad5d5354e33e18e9bdb7 15-Apr-2013 Sean Callanan <scallanan@apple.com> Removed a duplicate copy of the contents of
Materializer.h that somehow crept in, maybe
during a patch operation.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179543 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/Materializer.h
faafd193bf7dc065e5f6fb99e4c538cc452af7e4 15-Apr-2013 Sean Callanan <scallanan@apple.com> Audited the existing Materializer code to ensure
that it works in the absence of a process. Codepaths
in the Materializer now use the best execution context
scope available to them.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179539 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRExecutionUnit.h
ldb/Expression/IRMemoryMap.h
f58438fa7751274b6f4e4b1805940127dce13b00 14-Apr-2013 Greg Clayton <gclayton@apple.com> Fixed issues with the way ELF symbols are parsed:
- Do not add symbols with no names
- Make sure that symbols from ELF symbol tables know that the byte size is correct. Previously the symbols would calculate their sizes by looking for the next symbol and take symbols that had zero size and make them have invalid sizes.
- Added the ability to dump raw ELF symbols by adding a Dump method to ELFSymbol

Also removed some unused code from lldb_private::Symtab.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179466 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Symbol.h
ldb/Symbol/Symtab.h
e287e900488e20e07ef986ec0524b872fbeafa5d 13-Apr-2013 Sean Callanan <scallanan@apple.com> Now that ValueObjects permit writing, made the
Materializer use that API when dematerializing
variables.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179443 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
5ae1418055cbf87686d097b8addc58452e54c9c1 13-Apr-2013 Sean Callanan <scallanan@apple.com> I don't know how I managed to build with that missing
semicolon.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179442 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectDynamicValue.h
ab8e00e51475b9148626bfdf99549b7ffc3d046d 13-Apr-2013 Sean Callanan <scallanan@apple.com> Added a SetData() method to ValueObject. This
lets a ValueObject's contents be set from raw
data. This has certain limitations (notably,
registers can only be set to data that is as
large as the register) but will be useful for
the new Materializer.

I also exposed this interface through SBValue.
I have added a testcase that exercises various
special cases of SBValue::SetData().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179437 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/Scalar.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectRegister.h
934d6160f5e62914c20f8e229c5e1ca4d9ead99f 12-Apr-2013 Sean Callanan <scallanan@apple.com> Implemented materialization and dematerialization
for variables in the new Materializer. This is
much easier now that the ValueObject API is solid.

I still have to implement reading bytes into a
ValueObject, but committing what I have so far.

This code is not yet used, so there will be fixes
when I switch the expression parser over to use the
new Materializer.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179416 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
9acf3699d2bea583b45c762f4cd82b2a4af6131b 12-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13491977>

Made some fixes to the OperatingSystemPython class:
- If any thread dictionary contains any "core=N" key/value pairs then the threads obtained from the lldb_private::Process itself will be placed inside the ThreadMemory threads and will be used to get the information for a thread.
- Cleaned up all the places where a thread inside a thread was causing problems



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179405 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
f4b59480e8d1056b1638141a6a627b252f657db0 12-Apr-2013 Sean Callanan <scallanan@apple.com> Replicated the materialization logic for persistent
variables in the Materializer. We don't use this
code yet, but will soon once the other materializers
are online.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179390 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRMemoryMap.h
ldb/Expression/Materializer.h
cc810f049dd284ddf63951fdfeb7441067c7b6c0 12-Apr-2013 Sean Callanan <scallanan@apple.com> Fixed a bug where a few class forward declarations
weren't in the proper namespace.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179389 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/DWARFExpression.h
3b83055d13d30e8b10a15d04cd0619265e029158 12-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13623698>

This patch fixes the issue that we were using the C stack as a measure of depth of ValueObject hierarchies, in the sense that we were assuming that recursive ValueObject operations would never be deeper than the stack allows.
This assumption is easy to prove wrong, however.
For instance, after ~10k runs through this loop:
struct node
{
int value;
node* child;
node (int x)
{
value = x;
child = nullptr;
}
};

int main ()
{
node root(1);
node* ptr = &root;
int j = 2;
while (1)
{
ptr->child = new node(j++);
ptr = ptr->child;
}
return 0;
}

the deepmost child object will be deeper than the stack on most architectures, and we would be unable to display it

This checkin fixes the issue by introducing a notion of root of ValueObject hierarchies.
In a couple cases, we have to use an iterative algorithm instead of going to the root because we want to allow deeper customizations (e.g. formats, dynamic values).
While the patch passes our test suite without regressions, it is a good idea to keep eyes open for any unexpected behavior (recursion can be subtle..)
Also, I am hesitant to introduce a test case since failing at this will not just be marked as an "F", but most definitely crash LLDB.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179330 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
0e7cff415ada6e6dc45b32b51516bca39eb69e38 12-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13370286>

Fixed a case there the OperatingSystemPython would try to access and play with SBValue objects when the process' public run lock was taken. Prior to this fix, all attempts to run any SBValue functions would fail if run from the private state thread (like updating the thread list). Now we have two run locks, one for public (all threads except the private state thread) and one for private.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179329 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
1949951ed623f31f28840af50df4a25c5ce67288 12-Apr-2013 Greg Clayton <gclayton@apple.com> Use std::unique_ptr instead of std::auto_ptr.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179328 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValueList.h
ce66f96d4329a5664561ceb6f1fc571ed497bcef 11-Apr-2013 Sean Callanan <scallanan@apple.com> Hand over the job of laying out the argument structure
to the Materializer. Materialization is still done by
the ClangExpressionDeclMap; this will be the next thing
to move.

Also fixed a layout bug that this uncovered.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179318 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/Materializer.h
3525576f2cddc2a7b82b2bec3fd885ef6b1b5a52 11-Apr-2013 Greg Clayton <gclayton@apple.com> Static variables inside classes were not being added to the RecordDecl, now they are. This gets us closer to being able to display static variables in classes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179296 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
3b16eb9d424068446fea9cd0e0fe5e7d435f5b6e 11-Apr-2013 Sean Callanan <scallanan@apple.com> Added a Materializer class that contains
information about each variable that needs to
be materialized for an expression to work. The
next step is to migrate all materialization code
from ClangExpressionDeclMap to Materializer, and
to use it for variable materialization.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179245 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangUserExpression.h
ldb/Expression/Materializer.h
ldb/lldb-forward.h
adf9e3db9be8f32e7eda7d4bb5b3b8f4d59ce46d 10-Apr-2013 Jason Molenda <jmolenda@apple.com> When ObjectFileMachO::ParseSections() notices that it has a truncated file, zero out the
SectionList so we don't try to do anything with this file. Currently we end up crashing
later in the debug session when we read past the end of the file -- this at least gets us
closer with something like ProcessMachCore printing "error: core file has no sections".
<rdar://problem/13468295>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179152 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Section.h
f95fc9e09fa0a32de0a3904a1517266df37e8bff 06-Apr-2013 Greg Clayton <gclayton@apple.com> Added support "__attribute__((__vector_size__(B)))" and "__attribute__((ext_vector_type(N)))".

Now we can:
1 - see the return value for functions that return types that use the "ext_vector_size"
2 - dump values that use the vector attributes ("expr $ymm0")
3 - modified the DWARF parser to correctly parse GNU vector types from the DWARF by turning them into clang::Type::ExtVector types instead of just standard arrays



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178924 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTType.h
12fbcf5bdbc54e49bf565ec067b3b484c28a52fe 05-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13563628>

Introducing a negative cache for ObjCLanguageRuntime::LookupInCompleteClassCache()
This helps speed up the (common) case of us looking for classes that are hidden deep within Cocoa internals and repeatedly failing at finding type information for them.
In order for this to work, we need to clean this cache whenever debug information is added. A new symbols loaded event is added that is triggered with add-dsym (before modules loaded would be triggered for both adding modules and adding symbols).
Interested parties can register for this event. Internally, we make sure to clean the negative cache whenever symbols are added.
Lastly, ClassDescriptor::IsTagged() has been refactored to GetTaggedPointerInfo() that also (optionally) returns info and value bits. In this way, data formatters can share tagged pointer code instead of duplicating the required arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178897 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
ldb/Target/ObjCLanguageRuntime.h
ldb/Target/Target.h
bbebdbe7588c6902e467e51a8b6111e0cb9c5fa7 05-Apr-2013 Jason Molenda <jmolenda@apple.com> Add support for Platform plugins to have settings.

Add two initial settings for the PlatformDarwinKernel plugin,

plugin.platform.darwin-kernel.search-locally-for-kexts [true|false]
plugin.platform.darwin-kernel.kext-directories [directory list]



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178846 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/PluginManager.h
9e6f6a6f394bb570c5f1f9a850ec0befe4a59fef 05-Apr-2013 Sean Callanan <scallanan@apple.com> Factored out memory access into the target process
from IRExecutionUnit into a superclass called
IRMemoryMap. IRMemoryMap handles all reading and
writing, ensuring that areas are kept track of and
memory is properly cached (and deleted).

Also fixed several cases where we would simply leak
binary data in the target process over time. Now
the expression objects explicitly own their
IRExecutionUnit and delete it when they go away. This
is why I had to modify ClangUserExpression,
ClangUtilityFunction, and ClangFunction.

As a side effect of this, I am removing the JIT
mutex for an IRMemoryMap. If it turns out that we
need this mutex, I'll add it in then, but right now
it's just adding complexity.

This is part of a more general project to make
expressions fully reusable. The next step is to
make materialization and dematerialization use
the IRMemoryMap API rather than writing and
reading directly from the process's memory.
This will allow the IR interpreter to use the
same data, but in the host's memory, without having
to use a different set of pointers.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178832 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpression.h
ldb/Expression/ClangExpressionParser.h
ldb/Expression/ClangFunction.h
ldb/Expression/ClangUserExpression.h
ldb/Expression/ClangUtilityFunction.h
ldb/Expression/IRExecutionUnit.h
ldb/Expression/IRMemoryMap.h
ldb/lldb-forward.h
c1238839e67d2b4ee6abfc8972588cae2d8e265b 05-Apr-2013 Jason Molenda <jmolenda@apple.com> Ah, forgot to include the header file and project file changes in r178827.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178830 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Platform.h
3f2f741bb533b78e2fac5332c4698338ea2fd3ac 04-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13457391>

LLDB now can use a single dash for all long options for all commands form the command line and from the command interpreter. This involved just switching all calls from getopt_long() to getopt_long_only().



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178789 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Options.h
00af72e395d138f459192b7f5450fa4c7854f135 03-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13384801>

Make lldb_private::RegularExpression thread safe everywhere. This was done by removing the m_matches array from the lldb_private::RegularExpression class and putting it into the new lldb_private::RegularExpression::Match class. When executing a regular expression you now have the option to create a lldb_private::RegularExpression::Match object and pass a pointer in if you want to get parenthesized matching. If you don't want any matching, you pass in NULL. The lldb_private::RegularExpression::Match object is initialized with the number of matches you desire. Any matching strings are now extracted from the lldb_private::RegularExpression::Match objects. This makes the regular expression objects thread safe and as a result many more regex objects were turned into static objects that end up using a local lldb_private::RegularExpression::Match object when executing.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178702 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RegularExpression.h
296b06d325413723f5aac5988eed977b278a7807 03-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13506727>

Symbol table function names should support lookups like symbols with debug info.

To fix this I:
- Gutted the way FindFunctions is used, there used to be way too much smarts only in the DWARF plug-in
- Made it more efficient by chopping the name up once and using simpler queries so that SymbolFile and Symtab plug-ins don't need to do as much
- Filter the results at a higher level
- Make the lldb_private::Symtab able to chop up C++ mangled names and make as much sense out of them as possible and also be able to search by basename, fullname, method name, and selector name.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178608 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointResolverName.h
ldb/Core/Module.h
ldb/Symbol/SymbolContext.h
ldb/Symbol/Symtab.h
ldb/Target/CPPLanguageRuntime.h
33d109885979d0797b334746627d2d01f0ee6804 03-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13563403>

Reimplemented the NSDictionary synthetic children provider for added performance.
Instead of generating pairs by running an expression, we now create a pair type using clang-level APIs and fill in a buffer with the pointers to key and value
This strategy takes the time required to dump a 10k items __NSDictionaryM from ~45s to <4s

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178601 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
1d4812cbb71af9e05250a4ffbcda4236275c82b4 03-Apr-2013 Jim Ingham <jingham@apple.com> Allow partial matching for alias commands as well as regular commands.

<rdar://problem/13552724>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178597 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
d11d31283b6b7fda673940df752ba297c60790a8 30-Mar-2013 Sean Callanan <scallanan@apple.com> Fixed the way ClangASTImporter deports types from
ASTContexts that will not stay around. Before, we
did this in a very half-hearted way. Now we maintain
work queues of all Decls that need to be completed
before the source ASTContext can go away; we then
expunge their origins completely.

<rdar://problem/13511875>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178410 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
f3c65b85caf3e097654f6b59c9a709507adfc254 29-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12022060>

Enable tab completion for regular expression commands.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178348 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObjectRegexCommand.h
e33bb5b0dabf62498715afe3d1cd22cda0af1d24 29-Mar-2013 Jim Ingham <jingham@apple.com> Rationalize how we do Halt-ing before Destroy and Detach.

<rdar://problem/13527167>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178325 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
d4f95f3c9462a977f8c15c5062d30bf62cd49110 29-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/11730263>

PC relative loads are missing disassembly comments when disassembled in a live process.

This issue was because some sections, like __TEXT and __DATA in libobjc.A.dylib, were being moved when they were put into the dyld shared cache. This could also affect any other system that slides sections individually.

The solution is to keep track of wether the bytes we will disassemble are from an executable file (file address), or from a live process (load address). We now do the right thing based off of this input in all cases.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178315 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataExtractor.h
ldb/Core/Disassembler.h
226484d8533b19c9a63e5df20d30c37075e51f03 28-Mar-2013 Greg Clayton <gclayton@apple.com> Be sure to take the mutex when the destructor is called in case other threads are using these lists and those other threads have the mutex locked.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178262 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/SectionLoadList.h
23ed3ad96930e0b4d587bd429dca99f1f5f8bd16 28-Mar-2013 Jim Ingham <jingham@apple.com> The other half of the checkin to produce better error messages when the ThreadPlanCallFunction isn't valid.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178203 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanCallFunction.h
952e9dc874944fcdbbb224f3ec4fc2c859376f64 28-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178191 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Log.h
ldb/Core/ModuleList.h
ldb/DataFormatters/FormatNavigator.h
ldb/Expression/ASTDumper.h
ldb/Expression/IRExecutionUnit.h
ldb/Symbol/ClangASTImporter.h
ldb/lldb-forward.h
ldb/lldb-private-log.h
1414aba4ae30f89c2513bdbbb56c281cec014902 27-Mar-2013 Enrico Granata <egranata@apple.com> Implementing the notion of externally-acquirable ScriptInterpreter lock
With this notion, if parties outside the ScriptInterpreter itself need to acquire a lock on script APIs, they can do so by a pattern like this:

{
auto lock = interpeter->AcquireInterpreterLock();
// do whatever you need to do...
} // lock will automatically be released here

This might be useful for classes that use the Python convenience objects (e.g. PythonDictionary) to ensure they keep the underlying interpreter in a safe and controlled condition while they call through the C API functions
Of course, the ScriptInterpreter still manages its internal locking correctly when necessary :-)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178189 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/lldb-forward.h
017c16aa483e6edabdbbee1bdcd1ce3f8e8a12d1 27-Mar-2013 Greg Clayton <gclayton@apple.com> Don't use a "uintptr_t" for the metadata key, use a "void *". This removes all of the casts that were being used and cleans the code up a bit. Also added the ability to dump the metadata.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178113 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/ClangExternalASTSourceCommon.h
133214fe6ebe3cf7f509047a3d297fca1f4b09ee 26-Mar-2013 Greg Clayton <gclayton@apple.com> Add a way to dump a ClangASTType to stdout for debugging purposes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178071 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTType.h
23fde4e1fafd43079e25bb17d8d00d9e546785cf 26-Mar-2013 Enrico Granata <egranata@apple.com> Data formatters cleanup:
- Making an error message more consistent
- Ensuring the element size is not zero before using it in a modulus
- Properly using target settings to cap the std::list element count
- Removing spurious element size calculations that were unused
- Removing spurious capping in std::map


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178057 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
c3f5cd817ad045cab3a79f37ab5e65f8a659b7ab 26-Mar-2013 Enrico Granata <egranata@apple.com> Our commands that end up displaying a ValueObject as part of their workflow use OptionGroupValueObjectDisplay as their currency for deciding the final representation
ValueObjects themselves use DumpValueObjectOptions as the currency for the same purpose

The code to convert between these two units was replicated (to varying degrees of correctness) in several spots in the code
This checkin provides one and only one (and hopefully correct :-) entry point for this conversion



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178044 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupValueObjectDisplay.h
59b96d5fdda21be0c7abbe7567af75239748be61 25-Mar-2013 Greg Clayton <gclayton@apple.com> Modified patch from Prabhat Verma to enable loading core files through the SBTarget API.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177932 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
2d63ae1820e622335caf58f86a86164a2a160931 22-Mar-2013 Jason Molenda <jmolenda@apple.com> Add a Reserve method to RangeVector and RangeDataVector. Have the
DWARFCallFrameInfo method which returns a RangeVector pre-size the
vector based on the number of entries it will be adding insted of
growing the vector as items are added.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177773 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RangeMap.h
40960a7953ba723190de1be397ce9679df5b7a07 21-Mar-2013 Sean Callanan <scallanan@apple.com> Modified the way we report fields of records.
Clang requires them to have complete types, but
we were previously only completing them if they
were of tag or Objective-C object types.

I have implemented a method on the ASTImporter
whose job is to complete a type. It handles not
only the cases mentioned above, but also array
and atomic types.

<rdar://problem/13446777>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177672 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
d793839192c6351a1615cf723564ef672bd8b877 21-Mar-2013 Jason Molenda <jmolenda@apple.com> Add a new method GetFunctionAddressAndSizeVector to DWARFCallFrameInfo.
This returns a vector of <file address, size> entries for all of
the functions in the module that have an eh_frame FDE.

Update ObjectFileMachO to use the eh_frame FDE function addresses if
the LC_FUNCTION_STARTS section is missing, to fill in the start
addresses of any symbols that have been stripped from the binary.

Generally speaking, lldb works best if it knows the actual start
address of every function in a module - it's especially important
for unwinding, where lldb inspects the instructions in the prologue
of the function. In a stripped binary, it is deprived of this
information and it reduces the quality of our unwinds and saved
register retrieval.

Other ObjectFile users may want to use the function addresses from
DWARFCallFrameInfo to fill in any stripped symbols like ObjectFileMachO
does already.
<rdar://problem/13365659>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177624 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/DWARFCallFrameInfo.h
4bc40781466dd9d2de0d51fec5feb342ea45e87f 21-Mar-2013 Greg Clayton <gclayton@apple.com> Fixed the ValidOffsetForDataOfSize() to use simpler logic. Fixed DataExtractor::BytesLeft() to return the correct value.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177616 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataEncoder.h
ldb/Core/DataExtractor.h
c953b5647a8c451113c21e0e367194cad9efeb0e 20-Mar-2013 Jason Molenda <jmolenda@apple.com> Change DWARFCallFrameInfo from using a vector of AddressRanges to
track the EH FDEs for the functions in a module to using a
RangeDataVector, a more light-weight data structure that only refers
to File addresses. Makes the initial FDE scan about 3x faster, uses
less memory.
<rdar://problem/13465650>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177585 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/DWARFCallFrameInfo.h
3dc2a5b732ae161b8ae51d376a8f0060a7d9e2a8 20-Mar-2013 Enrico Granata <egranata@apple.com> Cleanup to the ObjC runtime to remove the now useless ClassDescriptor_Invalid

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177558 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
ldb/Target/ObjCLanguageRuntime.h
8202fe26a2a69ccdeab9c49139e9f8c645907dbc 20-Mar-2013 Sean Callanan <scallanan@apple.com> Updated the IRExecutionUnit to keep local copies
of the data it writes down into the process even
if the process doesn't exist. This will allow
the IR interpreter to access static data allocated
on the expression's behalf.

Also cleaned up object ownership in the
IRExecutionUnit so that allocations are created
into the allocations vector. This avoids needless
data copies.

<rdar://problem/13424594>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177456 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRExecutionUnit.h
cc5d27417b9f958d596a438290a9adb17674b487 19-Mar-2013 Enrico Granata <egranata@apple.com> The formatters for std::shared_ptr, std::weak_ptr, std::list, std::vector and std::map as provided by libc++ are now written in C++ instead of Python
std::deque is still in Python but is much less commonly used



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177454 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
ldb/Symbol/ClangASTContext.h
cba09f60618744e2155bc97c9049fa9c797698ad 19-Mar-2013 Enrico Granata <egranata@apple.com> This checkin removes the last Cocoa formatters that were implemented in Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177366 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
535f53c8795b3592ce835804af5cef89be39ceea 19-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13443931>

Fixed a crasher in the SourceManager where it wasn't checking the m_target member variable for NULL.

In doing this fix, I hardened this class to have weak pointers to the debugger and target in case they do go away. I also changed SBSourceManager to hold onto weak pointers to the debugger and target so they don't keep objects alive by holding a strong reference to them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177365 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
ldb/Core/SourceManager.h
ldb/Target/Target.h
1cf3da8b0fb0cabf2431b5fe521842929fca69a3 19-Mar-2013 Sean Callanan <scallanan@apple.com> Refactored the expression parser so that the IR
and the JITted code are managed by a standalone
class that handles memory management itself.

I have removed RecordingMemoryManager and
ProcessDataAllocator, which filled similar roles
and had confusing ownership, with a common class
called IRExecutionUnit. The IRExecutionUnit
manages all allocations ever made for an expression
and frees them when it goes away. It also contains
the code generator and can vend the Module for an
expression to other clases.

The end goal here is to make the output of the
expression parser re-usable; that is, to avoid
re-parsing when re-parsing isn't necessary.

I've also cleaned up some code and used weak pointers
in more places. Please let me know if you see any
leaks; I checked myself as well but I might have
missed a case.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177364 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpression.h
ldb/Expression/ClangExpressionParser.h
ldb/Expression/ClangUserExpression.h
ldb/Expression/ClangUtilityFunction.h
ldb/Expression/IRExecutionUnit.h
ldb/Expression/IRForTarget.h
ldb/Expression/ProcessDataAllocator.h
ldb/Expression/RecordingMemoryManager.h
5782daebac56f3d5b8effdc4e6db7de93630b3c5 16-Mar-2013 Enrico Granata <egranata@apple.com> C++ formatters for NSTimeZone and for CFBitVector

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177219 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
3818e6ac2211921db522abedd43746c1de3e82b5 16-Mar-2013 Enrico Granata <egranata@apple.com> NS(Mutable)IndexSet formatter moves from Python to C++

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177217 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
dc1df6b2fd7d359753b2bcfcf2decb114f465a1d 16-Mar-2013 Enrico Granata <egranata@apple.com> Converting more data formatters to C++ - NSBundle, CFBinaryHeap, NSMachPort and NSNotification

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177213 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
1e911a03121ab57f16b017be7d8bcf580a999e29 16-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13194155>

Variables view out of sync with lldb in Xcode is now fixed. Depending on what happened stack frames could get out of date and a stale shared pointer (one that is no longer a current frame in a thread) could end up being used.

Now we don't store a weak_ptr to a frame in the ExecutionContextRef class, we just store its stack ID and we always regrab the frame from the thread by stack ID.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177208 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ExecutionContext.h
280b30f0315211c54ce1c34366b586e9700629f4 15-Mar-2013 Enrico Granata <egranata@apple.com> Porting the Objective-C Class data type’s summary from Python to C++

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177172 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
b70c6ef20cd49bd7b33736e7534db717ae75e96f 15-Mar-2013 Enrico Granata <egranata@apple.com> Moving CFBag and NSBundle summaries from Python to C++

Temporarily disabled non-code-running summaries for CF*Dictionary and NSCountedSet

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177171 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
a01b0fa183a5bd0110722bf17401882b1672635f 14-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12537646>

lldb remembers not-found source file, setting target.source-map doesn't make it re-check for it. Now this is fixed. Each time the source path remappings get updated, the modification ID in the PathMappingList gets bumped and then we know the re-check for sources.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177125 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/SourceManager.h
ldb/Target/PathMappingList.h
fe6dc6e241c52822710380cec0931351a1d7b2d3 14-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13421412>

Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177091 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Core/DataBuffer.h
ldb/Core/DataBufferHeap.h
ldb/Core/DataBufferMemoryMap.h
ldb/Core/Value.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectCast.h
ldb/Core/ValueObjectChild.h
ldb/Core/ValueObjectConstResult.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectMemory.h
ldb/Core/ValueObjectRegister.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Core/ValueObjectVariable.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/Type.h
b1f44b340f31ec747a7b6dcd299b8a6151470817 13-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13404189>

Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command:

(lldb) l -10

Which gets turned into:

(lldb) source list --reverse --count 10

Also simplified the code that is used to track showing more source from the last file and line.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176961 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/SourceManager.h
5e0e372e8b95767b0467f31f8d5ce0d394f50ded 13-Mar-2013 Jim Ingham <jingham@apple.com> Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176958 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
3aaa2c2d1ff6e944d02f3692525c25058b41db21 13-Mar-2013 Jim Ingham <jingham@apple.com> The step by running from branch to branch pretty much works with this checkin (at least for x86_64) but is still
turned off, it needs more qualification. If you want to play with it, change the initialization of m_use_fast_step
to true.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176923 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanStepRange.h
8741df3f8a430fb5670a4f3c1f468b7a7635721b 13-Mar-2013 Jim Ingham <jingham@apple.com> DoesBranch needs to compute the instruction if it isn't already done.
Handle the "alternate_isa" correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176922 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Disassembler.h
d5dc67a10267a7b7e856fb67652e70e6c5ead8be 13-Mar-2013 Jim Ingham <jingham@apple.com> More cleanup, remove an untrue comment.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176921 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
19784bd12a0beae5b7930d51dcd9ded53cb08470 11-Mar-2013 Greg Clayton <gclayton@apple.com> Buildbot was failing to build. I guess classes declared in implementation files are treated differently on various compilers causing a "friend class Foo;" to fail for forward declared classes in global namespace.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176823 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/LanguageRuntime.h
d96df0a55f0a6e19af3d61d3f7ab5103ff96c543 11-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13372857>

Fixed the exception breakpoints to always use a file filter to make setting exception breakpoint efficient.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176821 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointResolver.h
ldb/Core/SearchFilter.h
ldb/Target/LanguageRuntime.h
6741173bf58eaeab4964226ba5a42b2a9bbc21b1 08-Mar-2013 Sean Callanan <scallanan@apple.com> Added very lightweight, statically-allocated
counters for a variety of metrics associated
with expression parsing. This should give some
idea of how much work the expression parser is
doing on Clang's behalf, and help with hopefully
reducing that load over time.

<rdar://problem/13210748> Audit type search/import for expressions


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176714 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
be38b451f26afc304618f4330d936298ed904ea9 08-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13374267>

Fixed error where objective C methods with selectors names starting with ".cxx_" where causing errors for ARC built binaries.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176683 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
9c09181404cc35f65d5353231246959135fb7684 08-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13119621>

Make dynamic type detection faster by using the AST metadata to help out and allow us not to complete types when we don't need to.

After running "purge" on a MacOSX system, the Xcode variables view now populates more than 3x faster with this fix.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176676 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangExternalASTSourceCommon.h
2099b6a42713fedae3b86b2ae5dbc2ff6ec6f175 08-Mar-2013 Jason Molenda <jmolenda@apple.com> Add recognition of two more armv7 variants, armv7m and armv7em.
<rdar://problem/13361372>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176674 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ArchSpec.h
6778c99d79ae1db2d3f40a9f07d9e8ffda161799 07-Mar-2013 Sean Callanan <scallanan@apple.com> Updated Apple LLDB version to lldb-300.99.0. Also
updated the build system to support the new Apple
LLDB versioning scheme.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176662 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-defines.h
b4b4081ade73ef2d35474bee5d249ed8507874b5 06-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13184855>

Spaces in "settings set" value strings no longer cause setting failures.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176532 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Args.h
464a5063bc59755cb6ec063d0b2491097302d2ab 04-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13338643>

DWARF with .o files now uses 40-60% less memory!

Big fixes include:
- Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed.
- Removed linked address members/methods from lldb_private::Section and lldb_private::Address
- lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future
- Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason
- Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile.
- Changed how the debug map is parsed and stored to be able to:
- Lazily parse the debug map for each object file
- not require the address map for a .o file until debug information is linked for a .o file



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176454 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Address.h
ldb/Core/RangeMap.h
ldb/Core/Section.h
ldb/Expression/DWARFExpression.h
ldb/Symbol/LineTable.h
ldb/Symbol/ObjectFile.h
7d4083837c5a258375fdc185d464b4ed15759a4b 02-Mar-2013 Jim Ingham <jingham@apple.com> Convert from the C-based LLVM Disassembler shim to the full MC Disassembler API's.
Calculate "can branch" using the MC API's rather than our hand-rolled regex'es.
As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att.

<rdar://problem/11319574>
<rdar://problem/9329275>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176392 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFunction.h
ldb/API/SBSymbol.h
ldb/API/SBTarget.h
ldb/Core/Disassembler.h
ldb/Target/Target.h
ldb/lldb-enumerations.h
ldb/lldb-private-interfaces.h
eb17530206e3f501476a32c5d28c8dc36bac419a 01-Mar-2013 Jim Ingham <jingham@apple.com> Move m_destroy_in_process to Process (from ProcessKDP) since it is generally useful,
and use it to keep from doing the OS Plugin UpdateThreadList while destroying, since
if that does anything that requires the API lock it may deadlock against whoever is
running the Process::Destroy.

<rdar://problem/13308627>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176375 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
6f0165b3dc0ecc689f565c792e53dd3397b4a432 27-Feb-2013 Greg Clayton <gclayton@apple.com> Fixed a case where the result of std::string's c_str() method was being called on a local variable and returned as a const char * incorrectly. We used to cache the thread names for threads in the current host process, but we shoudn't be caching that as the names can change over time, so now a std::string is returned from Host::GetThreadName().



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176217 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
4f9103faba72fdfc4b4299d6d459bc820ee597b2 27-Feb-2013 Matt Kopec <Matt.Kopec@intel.com> Add GNU indirect function support in expressions for Linux.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176206 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Address.h
ldb/Symbol/Symbol.h
ldb/Target/Process.h
ldb/Target/ThreadPlanCallFunction.h
ldb/lldb-enumerations.h
436ca2c5c5e7a83019806af8925f468b2769fdaa 26-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13289157>

Set the exception breakpoints more efficiently by specifying two module basenames as module filters for Apple vendor targets.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176063 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FileSpecList.h
a7e864cb0a450c7ef65b6f9f6c9bae839c405906 23-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13265297>

StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175953 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolContext.h
e9a5a50885c68f0bbd5f87c610be0aea639a8d9e 22-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13265017>

The notion of Crossref command has long been forgotten, and there is nothing using CommandObjectCrossref in the current LLDB codebase
However, this was causing a conflict with process plugins and command aliases ending up in an infinite loop under situations such as:
(lldb) command alias monitor process plugin packet monitor
(lldb) process att -n Calendar
Process 28709 stopped
Executable module set to "/Applications/Calendar.app/Contents/MacOS/Calendar".
Architecture set to: x86_64-apple-macosx.
(lldb) command alias monitor process plugin packet monitor

This fixes the loop (and consequent crash) by disposing of Crossref commands and related code



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175831 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandObjectCrossref.h
ldb/Interpreter/CommandObjectMultiword.h
32d7ee3d2969211e104a27fcfcd636f249b26559 21-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/4529976>

Adding data formatters for iterators for std::map and std::vector (both libc++ and libstdcpp)
This does not include reverse iterators since they are both trickier (due to requirements the standard imposes on them) and much less useful



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175787 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/DataFormatters/CXXFormatterFunctions.h
ldb/DataFormatters/TypeSynthetic.h
6e612c3ddf614c96310573c81a21aa04f1bd78d8 21-Feb-2013 Jim Ingham <jingham@apple.com> Add some documentation on how HandleCommand work.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175717 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandInterpreter.h
63aef96637d90d7bb8e7427caf3c5fd6b492d4ef 20-Feb-2013 Enrico Granata <egranata@apple.com> Fixing a potential crasher where a synthetic value could return itself as its static value

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175574 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectSyntheticFilter.h
e0a95d986a177922846d77af0f0c84440964c623 19-Feb-2013 Enrico Granata <egranata@apple.com> ValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, we want to report that the ValueObject is dynamic since synthetic values are supposed to be just their parent with different children

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175563 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectSyntheticFilter.h
fa3a6706b42bddfece6f5ba96d82042c6494a912 19-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12529957>

Synthetic children provider for NSSet



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175468 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
132c49a1c94927a2e1da9e7b383a2512af3b75ee 17-Feb-2013 Greg Clayton <gclayton@apple.com> Added a host call to get the number of CPUs. It should work on all POSIX unixes, linux and Windows.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175405 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
ea68753ef4b8cca81cf3f5aef7bbf1ebb152a832 16-Feb-2013 Enrico Granata <egranata@apple.com> NSSet formatter is now C++ code
Split some NS* formatters in their own source files
Refactored a utility function for the C++ formatters to use
Fixed the skip-summary test case to be explicit about requiring libstdc++ for operation



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175323 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
21120ece120034450279001ff18937eb4fe1aaec 15-Feb-2013 Greg Clayton <gclayton@apple.com> Added missing include.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175279 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Timer.h
efb4aeba2bd8411ac0aee9934f08959094d50711 15-Feb-2013 Jim Ingham <jingham@apple.com> A little cleanup. {Disable/Enable}Breakpoint actually disables/enables BreakpointSites not breakpoints, it is confusing
to have it not named appropriately. Also in StopInfoMachException, we aren't testing for software or not software, just
whether the thing is a breakpoint we set. So don't use "software"...


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175241 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
8459ba986e7ddd1539b046648680f2283fde8304 14-Feb-2013 Greg Clayton <gclayton@apple.com> Centralized the expression prefixes that are used for both expressions and utility functions.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175108 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ExpressionSourceCode.h
ce490e3161b17c3f2904d6e797bb5e5517d651c2 13-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13210494>

Parse objective C information as efficiently as possible and without taking dangerous runtime locks.

Reworked the way objective C information is parsed by:
1 - don't read all class names up front, this is about 500K of data with names
2 - add a 32 bit hash map that maps a hash of a name to the Class pointer (isa)
3 - Improved name lookups by using the new hash map
4 - split up reading the objc runtime info into dynamic and shared cache since the shared cache only needs to be read once.
5 - When reading all isa values, also get the 32 bit hash instead of the name
6 - Read names lazily now that we don't need all names up front
7 - Allow the hash maps to not be there and still have this function correctly

There is dead code in here with all of the various methods I tried. I want to check this in first to not lose any of it in case we need to revert to any of the extra code. I will promptly cleanup and commit again.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175101 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/MappedHash.h
ldb/Core/Timer.h
ldb/Expression/ClangFunction.h
ldb/Target/ObjCLanguageRuntime.h
79e9f965938ec5766b9caedfa85262ecb603c453 12-Feb-2013 Sean Callanan <scallanan@apple.com> Made LLDB build with the latest Clang. This meant
changing the ClangASTSource to return a bool instead
of returning a list of results. Our testsuite mostly
works with this change, but some minor issues may
remain both on LLDB's side and on Clang's side.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174949 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangExternalASTSourceCallbacks.h
89e248f04ecb87d0df4a4b96158c3fac0a3e43c7 09-Feb-2013 Jim Ingham <jingham@apple.com> Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction interoperate to fix problems where
hitting auto-continue signals while running a thread plan would cause us to lose control of the debug
session.

<rdar://problem/12993641>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174793 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBExpressionOptions.h
ldb/API/SBProcess.h
ldb/Target/Process.h
ldb/Target/StopInfo.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanBase.h
ldb/Target/ThreadPlanCallFunction.h
ldb/Target/ThreadPlanRunToAddress.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepInstruction.h
ldb/Target/ThreadPlanStepOut.h
ldb/Target/ThreadPlanStepOverBreakpoint.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepThrough.h
ldb/Target/ThreadPlanStepUntil.h
940ca9447d84a08883d2ce77a765475f09243fc5 08-Feb-2013 Greg Clayton <gclayton@apple.com> Fixed 2 more issues found by the address sanitizer:

1 - A store off the end of a buffer in ValueObject.cpp
2 - DataExtractor had cases where bad offsets could cause invalid memory to be accessed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174757 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataExtractor.h
ldb/Core/ValueObject.h
ldb/Symbol/ClangASTType.h
979c4b526eb31cbed5475ec62ef10fe53cbf8c45 08-Feb-2013 Enrico Granata <egranata@apple.com> This checkin implements the data formatter for NSURL in C++ code



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174735 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
dcffc1a667665936b3dd33a9861a3de9d1d35636 08-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12898191>

Added a summary for NSMutableAttributedString
In the process, converted formatters for other NSString-based classes over to C++ code



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174693 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
9c7108fecfda761c8c619b6100f680355d289fbe 07-Feb-2013 Enrico Granata <egranata@apple.com> Renaming SBValueList::get() to
opaque_ptr since it returns a void* instead of an usable object.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174673 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValueList.h
ac6692008aef670d21d6671cbfb6b5d2110b5d62 07-Feb-2013 Enrico Granata <egranata@apple.com> Correct logging for function calls that return SBValueList



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174670 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValueList.h
5c1700af5ceb00fd46a97d524a83e4e43453538c 07-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13107151>

SBValueList was backed by a ValueObjectList. This caused us to lose track of the additional metadata in the ValueImpl that backs SBValue.
This checkin fixes that by backing SBValueList with ValueListImpl (that essentially wraps a vector<SBValue>).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174638 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValueList.h
cbe61bd26db663fa3036866dc33315c6ffc37910 06-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13159777>

lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules.

LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required.

Added a new logging channel for "lldb" called "mmap" to help track future regressions.

Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to.

The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174524 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ObjectContainer.h
ldb/Symbol/ObjectFile.h
ldb/lldb-private-interfaces.h
ldb/lldb-private-log.h
3cf7ab5462467121b4ac6cde09ee994030dad0c5 06-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/11109570>

The first part of the fix for having LLDB handle LTO debugging when the DWARF is in the .o files. This part separates the object file's modules into a separate cache map that maps unique C strings for the N_OSO path to the ModuleSP since one object file might be mentioned more than once in LTO binaries.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174476 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ObjectFile.h
689696c19cbf0fa8a09e2461f0aaa37409782e3b 04-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12953018>

Synthetic children and summary for std::vector<bool> (for both libcxx and libstdcpp).
std::vector<bool> is a special case and is custom-implemented to be a vector of bits, which means we failed to handle it with the standard std::vector<T> formatter.
This checkin provides custom formatters that work correctly



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174333 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/DataFormatters/CXXFormatterFunctions.h
2ddb2b8aed6d43665c6955255f6a077574a08412 01-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13092722>

Fix in loading mach files from memory when using DynamicLoaderMacOSXDYLD.

Removed the uuid mismatch warning that could be spit out and any time during debugging and removed the test case that was looking for that. Currently the "add-dsym" or "target symbols add" command will report an error when the UUID's don't match.

Be more careful when checking and resolving section + offset addresses to make sure none of the base addresses are invalid.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174222 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
dbf2fb0d760631d86ab93cc70c3bb05a4c514263 01-Feb-2013 Sean Callanan <scallanan@apple.com> Modified the expression parser's class wrapper to
support reporting "this" as a templated class. The
expression parser wraps expressions in C++ methods
as methods with the signature

$__lldb_class::$__lldb_expr(...)

and previously responded to clang's queries about
$__lldb_class with the type of *this. This didn't
work if *this was a ClassTemplateSpecializationDecl
because ClassTemplateSpecializationDecls can't be
the result of simple name queries.

Instead what we do now is respond that $__lldb_class
is a typedef and that the target of the typedef is
the (potentially templated) type of *this. That is
much more robust.

Thanks to John McCall for key insights.

<rdar://problem/10987183>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174153 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ad72e52945ee0560fc2b22dce0087d4c7274a218 01-Feb-2013 Greg Clayton <gclayton@apple.com> Allow the target to give out the size of the red zone for given ABIs.

A bit of cleanup in the heap module.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174129 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
be51f8a81ecf1f50b2843b7b3ecb8cfbc54d9787 31-Jan-2013 Jim Ingham <jingham@apple.com> Add "thread return -x" to unwind the innermost user called expression (if you happen to have stopped in it due to a crash.)
Make the message when you hit an crash while evaluating an expression a little clearer, and mention "thread return -x".

rdar://problem/13110464


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174095 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
edf0f066989c088aacf0f971dbd4e91aa6063b2f 30-Jan-2013 Greg Clayton <gclayton@apple.com> Remove debug code and commented out code that was left in.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173865 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Timer.h
f892c42725ed36c97e8ce10e758170cf6f1aff83 30-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/9141269>

Cleaned up the objective C name parsing code to use a class.

Now breakpoints that are set by name that are objective C methods without the leading '+' or '-' will resolve. We do this by expanding all the objective C names for a given string. For example:

(lldb) b [MyString cStringUsingEncoding:]

Will set a breakpoint with multiple possible names:
-[MyString cStringUsingEncoding:]
+[MyString cStringUsingEncoding:]

Also if you have a category, it will strip the category and set a breakpoint in all variants:

(lldb) [MyString(my_category) cStringUsingEncoding:]

Will resolve to the following names:

-[MyString(my_category) cStringUsingEncoding:]
+[MyString(my_category) cStringUsingEncoding:]
-[MyString cStringUsingEncoding:]
+[MyString cStringUsingEncoding:]

Likewise when we have:

(lldb) b -[MyString(my_category) cStringUsingEncoding:]

It will resolve to two names:
-[MyString(my_category) cStringUsingEncoding:]
-[MyString cStringUsingEncoding:]





git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173858 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RegularExpression.h
ldb/Core/Timer.h
ldb/Target/ObjCLanguageRuntime.h
4968ad817597891cc02c195d4b3e7c3cde1fc391 29-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12552374>

Replacing the address argument type with address-expression in cases where StringToAddress() is used, and hence an expression can be passed where previously only a numeric address was allowed
This makes the documentation more clear and helps users discover that they can truly pass in an expression in these situations.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173753 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
4ad049061813fdd19164cdc1bae552eb1a59200b 29-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12890171>

Providing a compact display mode for "po" to use where the convenience variable name and the pointer value are both hidden.
This is for convenience when dealing with ObjC instances where the description often gets it right and the debugger-provided information is not useful to most people.
If you need either of these, "expr" will still show them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173748 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
f509c5ec066599a3399fced39ea36996184939e8 29-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12978143>

Data formatters now cache themselves.
This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval.
Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization.
The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime.
Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type.
Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173728 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTypeSynthetic.h
ldb/Core/CXXFormatterFunctions.h
ldb/Core/DataVisualization.h
ldb/Core/Debugger.h
ldb/Core/FormatClasses.h
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/DataFormatters/CXXFormatterFunctions.h
ldb/DataFormatters/DataVisualization.h
ldb/DataFormatters/FormatCache.h
ldb/DataFormatters/FormatClasses.h
ldb/DataFormatters/FormatManager.h
ldb/DataFormatters/FormatNavigator.h
ldb/DataFormatters/TypeCategory.h
ldb/DataFormatters/TypeCategoryMap.h
ldb/DataFormatters/TypeFormat.h
ldb/DataFormatters/TypeSummary.h
ldb/DataFormatters/TypeSynthetic.h
ldb/lldb-forward.h
090f83176695d86197b0e86b67dee4160ec5003d 26-Jan-2013 Jim Ingham <jingham@apple.com> Add "target.process.stop-on-shared-library-events" setting, and make it work.
Add the ability to give breakpoints a "kind" string, and have the StopInfoBreakpoint
print that in the brief description if set. Also print the kind - if set - in the breakpoint
listing.
Give kinds to a bunch of the internal breakpoints.
We were deleting the Mac OS X dynamic loader breakpoint as though the id we had stored away was
a breakpoint site ID, but in fact it was a breakpoint id, so we never actually deleted it. Fixed that.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173555 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocationCollection.h
ldb/Breakpoint/BreakpointSite.h
ldb/Target/DynamicLoader.h
ldb/Target/Process.h
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBData.h
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointIDList.h
ldb/Breakpoint/BreakpointList.h
ldb/Breakpoint/BreakpointLocationCollection.h
ldb/Breakpoint/BreakpointLocationList.h
ldb/Breakpoint/BreakpointSite.h
ldb/Breakpoint/Watchpoint.h
ldb/Core/ArchSpec.h
ldb/Core/CXXFormatterFunctions.h
ldb/Core/DataExtractor.h
ldb/Core/Debugger.h
ldb/Core/Disassembler.h
ldb/Core/FileSpecList.h
ldb/Core/FormatClasses.h
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Core/MappedHash.h
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Core/PluginManager.h
ldb/Core/RegisterValue.h
ldb/Core/Scalar.h
ldb/Core/Section.h
ldb/Core/Stream.h
ldb/Core/StreamAsynchronousIO.h
ldb/Core/StreamBuffer.h
ldb/Core/StreamCallback.h
ldb/Core/StreamFile.h
ldb/Core/StreamString.h
ldb/Core/StreamTee.h
ldb/Core/StringList.h
ldb/Core/VMRange.h
ldb/Core/Value.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectCast.h
ldb/Core/ValueObjectChild.h
ldb/Core/ValueObjectConstResult.h
ldb/Core/ValueObjectConstResultChild.h
ldb/Core/ValueObjectConstResultImpl.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectList.h
ldb/Core/ValueObjectMemory.h
ldb/Core/ValueObjectRegister.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Core/ValueObjectVariable.h
ldb/Core/dwarf.h
ldb/Expression/ClangFunction.h
ldb/Expression/DWARFExpression.h
ldb/Host/File.h
ldb/Interpreter/Args.h
ldb/Interpreter/CommandInterpreter.h
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandReturnObject.h
ldb/Interpreter/OptionValueArray.h
ldb/Interpreter/OptionValueDictionary.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/Symbol/Block.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/Symbol.h
ldb/Symbol/SymbolContext.h
ldb/Symbol/SymbolVendor.h
ldb/Symbol/Symtab.h
ldb/Symbol/Variable.h
ldb/Symbol/VariableList.h
ldb/Target/Platform.h
ldb/Target/Process.h
ldb/Target/RegisterContext.h
ldb/lldb-defines.h
ldb/lldb-types.h
1a469c75c0597abc2a9abdf86b624b2e71ea8650 23-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12711206>

Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP.
This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information.
Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong.
This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays).
As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173216 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectDynamicValue.h
ldb/Symbol/Type.h
ldb/Target/LanguageRuntime.h
f2b676f66ed963e08b02d9004fed71de693fb31b 22-Jan-2013 Enrico Granata <egranata@apple.com> Replacing a "no clue why" comment with the explanation it was demanding

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173111 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
4535891c699c40710e59d8ea966c4ad3ab19c077 21-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12437929>

Providing a special mode of operator for "memory read -f c-str" which actually works in most common cases
Where the old behavior would provide:
(lldb) mem read --format s `foo`
0x100000f5d: NULL

Now we do:
(lldb) mem read --format s `foo`
0x100000f5d: "hello world"

You can also specify a count and that many strings will be showed starting at the initial address:
(lldb) mem read -c 2 -f c-str `foo`
0x100000f1d: "hello world"
0x100000f29: "short"



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173076 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupFormat.h
ldb/Target/Target.h
52ebc0aab1fdecb634801deceeddd71a14c2148c 19-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13010007>

Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method:

class OperatingSystemPlugin:
def create_thread(self, tid, context):
# Return a dictionary for a new thread to create it on demand

This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used.

Cleaned up the code in PythonDataObjects.cpp/h:
- renamed all classes that started with PythonData* to be Python*.
- renamed PythonArray to PythonList. Cleaned up the code to use inheritance where
- Centralized the code that does ref counting in the PythonObject class to a single function.
- Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object.
- Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form:
- PyObject *
- const PythonObject &
- const lldb::ScriptInterpreterObjectSP &

Cleaned up code in ScriptInterpreterPython:
- Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time.
- Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172873 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Interpreter/PythonDataObjects.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/Target/OperatingSystem.h
ldb/Target/Process.h
ldb/lldb-forward.h
c6bdc75b993e8e16c0c035e3c6a59891568f03a4 18-Jan-2013 Sean Callanan <scallanan@apple.com> Made the expression handle variables with
DW_AT_const_value instead of a location. Also
added a testcase covering "frame variable," "expr"
using the IR interpreter, and "expr" using the
LLVM JIT.

<rdar://problem/12978195>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172848 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
cec32bbcad3e99d7f797072e5e160453e29890ac 18-Jan-2013 Matt Kopec <Matt.Kopec@intel.com> Use insert instead of emplace until support/distribution improves on some platforms (ie. Linux).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172840 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionVariable.h
dcb36c76090fdbf52f020bdd3fada62e0cffcc8d 17-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12786725>

If there is any alive process being debugged, the user is asked for confirmation before quitting LLDB
This should prevent situations where the user mistakenly types "q" and LLDB slaughters their process without any mercy whatsoever
Since it can quickly get tedious, there is a new setting on the command interpreter to disable this and replicate the previous behavior



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172757 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
640d5b7744750f7d37d69c6b6012549e54a711da 17-Jan-2013 Daniel Malea <daniel.malea@intel.com> fix 'const const' typo introduced in r172647

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172724 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ec1e823a9eb7ce4205a254210f633aa894fd612a 16-Jan-2013 Greg Clayton <gclayton@apple.com> Remove std::string input arguments and replace with "const char *".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172647 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
392bd8d8356a35a0ad7a9990e1e05d0509971c4b 16-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13021266>

Adding FindFirstGlobalVariable to SBModule and SBTarget
These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172636 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
ldb/API/SBTarget.h
64742744396c966e8de770e765130629b0c78335 16-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13009943>

Added a unique integer identifier to processes. Some systems, like JTAG or other simulators, might always assign the same process ID (pid) to the processes that are being debugged. In order for scripts and the APIs to uniquely identify the processes, there needs to be another ID. Now the SBProcess class has:

uint32_t SBProcess::GetUniqueID();

This integer ID will help to truly uniquely identify a process and help with appropriate caching that can be associated with a SBProcess object.





git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172628 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
31903318116cbd66801cd2a526cc5e5873d20e4c 16-Jan-2013 Sean Callanan <scallanan@apple.com> ClangExpressionVariable previously was not capable of
handling multiple clients. However, occasionally an
expression must be run in the service of another
expression, and in this case two parsers need to access
the same list of persistent variables.

To allow this, persistent variables now provide state
for multiple parsers, and parsers must allocate, access,
and deallocate this state by providing their own ID
(at the moment, simply the value of the "this" pointer).

<rdar://problem/12914539>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172573 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionVariable.h
b794020ffbd6473c59a6e98be044df50abf7fc30 15-Jan-2013 Jim Ingham <jingham@apple.com> Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called
function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes
more sense.
Also make both these behaviors globally settable through "settings set".
Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing
and crashing. Now we just stop without calling the second command.

<rdar://problem/12986644>
<rdar://problem/9119325>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172503 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBExpressionOptions.h
ldb/Expression/ClangFunction.h
ldb/Expression/ClangUserExpression.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/Target/ThreadPlanCallFunction.h
ldb/Target/ThreadPlanCallUserExpression.h
ldb/lldb-private-enumerations.h
cd8cd61e7280b9c050a85ba29fa4d3b20737df3a 15-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12790664>

Single-character Unicode data formatters



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172492 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
15c1d3d6773de8fc5600a80b0b666eadfa5672d8 12-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12239827>

Making a summary for std::wstring as provided by libstdc++ along with a relevant test case



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172286 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
b6985793ce97364e6fa86643b942326b218dcb3d 12-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12239827>

Providing a data formatter for libc++ std::wstring
In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited
Also, providing a new API on the ValueObject to navigate a hierarchy by index-path
Lastly, an appropriate test case is included



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172282 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
ldb/Core/ValueObject.h
d9735a1b6ba4b5ff85551bf19045504e03eb3603 12-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12973809>

Fixed an issue with the auto loading of script resources in debug info files. Any platform can add support for this, and on MacOSX we allow dSYM files to contain python modules that get automatically loaded when a dSYM file is associated with an executable or shared library.

The modifications will now:
- Let the module locate the symbol file naturally instead of using a function that only works in certain cases. This helps us to locate the script resources as long as the dSYM file can be found.
- Don't try and do any of this if the script interpreter has scripting disabled.
- Allow more than one scripting resource to be found in a symbol file by returning the list
- Load the scripting resources when a symbol file is added via the "target symbols add" command.
- Be smarter about matching the dSYM mach-o file to an existing executable in the target images by stripping extensions on the symfile basname if needed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172275 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Platform.h
aad2b0f2e5da0ecbf22ab7fead4c06671f64c6c5 11-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12990038>

Fixed an issue where the platform auto select code was changing the architecture and causing the wrong architecture to be assigned to the target.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172251 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Platform.h
f5545f966367811c36e2a3db2d82b1398b58c2c4 10-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12725746>

Providing data formatters for char16_t* and char32_t* C++11-style Unicode strings
Using this chance to refactor the UTF data reader used for data formatters for added generality
Added a relevant test case



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172119 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
fac004ce7f0d5bbfaa6b59a88365bb752e31129d 09-Jan-2013 Sean Callanan <scallanan@apple.com> Added emulation of shifts to the IR interpreter.

<rdar://problem/12978619>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172013 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Scalar.h
ea0bb4d45c14447a2fe9be9f4bd8e79a84513537 09-Jan-2013 Greg Clayton <gclayton@apple.com> Expanded the flags that can be set for a command object in lldb_private::CommandObject. This list of available flags are:

enum
{
//----------------------------------------------------------------------
// eFlagRequiresTarget
//
// Ensures a valid target is contained in m_exe_ctx prior to executing
// the command. If a target doesn't exist or is invalid, the command
// will fail and CommandObject::GetInvalidTargetDescription() will be
// returned as the error. CommandObject subclasses can override the
// virtual function for GetInvalidTargetDescription() to provide custom
// strings when needed.
//----------------------------------------------------------------------
eFlagRequiresTarget = (1u << 0),
//----------------------------------------------------------------------
// eFlagRequiresProcess
//
// Ensures a valid process is contained in m_exe_ctx prior to executing
// the command. If a process doesn't exist or is invalid, the command
// will fail and CommandObject::GetInvalidProcessDescription() will be
// returned as the error. CommandObject subclasses can override the
// virtual function for GetInvalidProcessDescription() to provide custom
// strings when needed.
//----------------------------------------------------------------------
eFlagRequiresProcess = (1u << 1),
//----------------------------------------------------------------------
// eFlagRequiresThread
//
// Ensures a valid thread is contained in m_exe_ctx prior to executing
// the command. If a thread doesn't exist or is invalid, the command
// will fail and CommandObject::GetInvalidThreadDescription() will be
// returned as the error. CommandObject subclasses can override the
// virtual function for GetInvalidThreadDescription() to provide custom
// strings when needed.
//----------------------------------------------------------------------
eFlagRequiresThread = (1u << 2),
//----------------------------------------------------------------------
// eFlagRequiresFrame
//
// Ensures a valid frame is contained in m_exe_ctx prior to executing
// the command. If a frame doesn't exist or is invalid, the command
// will fail and CommandObject::GetInvalidFrameDescription() will be
// returned as the error. CommandObject subclasses can override the
// virtual function for GetInvalidFrameDescription() to provide custom
// strings when needed.
//----------------------------------------------------------------------
eFlagRequiresFrame = (1u << 3),
//----------------------------------------------------------------------
// eFlagRequiresRegContext
//
// Ensures a valid register context (from the selected frame if there
// is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
// is availble from m_exe_ctx prior to executing the command. If a
// target doesn't exist or is invalid, the command will fail and
// CommandObject::GetInvalidRegContextDescription() will be returned as
// the error. CommandObject subclasses can override the virtual function
// for GetInvalidRegContextDescription() to provide custom strings when
// needed.
//----------------------------------------------------------------------
eFlagRequiresRegContext = (1u << 4),
//----------------------------------------------------------------------
// eFlagTryTargetAPILock
//
// Attempts to acquire the target lock if a target is selected in the
// command interpreter. If the command object fails to acquire the API
// lock, the command will fail with an appropriate error message.
//----------------------------------------------------------------------
eFlagTryTargetAPILock = (1u << 5),
//----------------------------------------------------------------------
// eFlagProcessMustBeLaunched
//
// Verifies that there is a launched process in m_exe_ctx, if there
// isn't, the command will fail with an appropriate error message.
//----------------------------------------------------------------------
eFlagProcessMustBeLaunched = (1u << 6),
//----------------------------------------------------------------------
// eFlagProcessMustBePaused
//
// Verifies that there is a paused process in m_exe_ctx, if there
// isn't, the command will fail with an appropriate error message.
//----------------------------------------------------------------------
eFlagProcessMustBePaused = (1u << 7)
};

Now each command object contains a "ExecutionContext m_exe_ctx;" member variable that gets initialized prior to running the command. The validity of the target objects in m_exe_ctx are checked to ensure that any target/process/thread/frame/reg context that are required are valid prior to executing the command. Each command object also contains a Mutex::Locker m_api_locker which gets used if eFlagTryTargetAPILock is set. This centralizes a lot of checking code that was previously and inconsistently implemented across many commands.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171990 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
12b5aa0a637c6070fa0290a90fdc9d5b0b9df950 09-Jan-2013 Jim Ingham <jingham@apple.com> Add a "--reverse" or "-r" option to the "list" with no options command. This will list backwards from the
last source point listed.
Also fix the setting of the default file & line to the file containing main, when you do a plain "list".

<rdar://problem/12685226>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171945 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/SourceManager.h
0e3b98e7de6d69613a9729bac9d4b965c0635698 09-Jan-2013 Jim Ingham <jingham@apple.com> Add an SBProcess API to get the current StopID, either considering or ignoring stops caused by expression
evaluation.

<rdar://problem/12968562>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171914 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
ccd5c4ee85d1592f9ae3da02c85f5647ca02fab2 08-Jan-2013 Han Ming Ong <hanming@apple.com> <rdar://problem/12976225>

Checking in the support for doing index ids reservation when given a thread id.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171904 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/Target/ThreadList.h
2fcbf6e3d86ac0e6a95e11e5e232a9f72bd612d2 08-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12953853>

Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file.

Also fixed issues in the test suite that arose after fixing the bug.

Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171816 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
ldb/Core/Module.h
ldb/Symbol/Symtab.h
ldb/lldb-forward.h
924910ce9f0b85e54a5c5c75cdaebc7607ffe117 04-Jan-2013 Andrew Kaylor <andrew.kaylor@intel.com> Handle the case of unordered sequences in a DWARF line table.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171548 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/LineTable.h
19b646725e7d6bebda787fa3cb55ff223a00d907 04-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12928282>

Added SBTarget::EvaluateExpression() so expressions can be evaluated without needing a process.

Also fixed many functions that deal with clang AST types to be able to properly handle the clang::Type::Elaborated types ("struct foo", "class bar").



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171476 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBExpressionOptions.h
ldb/API/SBTarget.h
ldb/API/SBValue.h
aa93c931a4c1275b2fecec23ef34f231afda4773 21-Dec-2012 Jim Ingham <jingham@apple.com> Added an SBAPI to get the PythonPath (if the Host knows how to do that). And a -P option to the Driver
to print it out. Changed dotest.py to use that to find the PythonPath it should use given the lldb binary
it was told to run.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170932 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBHostOS.h
278f16e1dd4097bf3dd12b0f63f1fac0f11c4006 21-Dec-2012 Andrew Kaylor <andrew.kaylor@intel.com> Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170800 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
559bb5cacf6777cf1ad8ee32256585d049123332 20-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12446222>

Implement the ability for Python commands to be interrupted by pressing CTRL+C
Also add a new Mutex subclass that attempts to be helpful for debugging by logging actions performed on it

FYI of all interested - there is a separate deadlocking issue related to how LLDB dispatches CTRL+C that might cause LLDB to deadlock upon pressing CTRL+C while in a Python command.
This is not a regression, and was just previously masked by us not even trying to bail out of Python commands, so that it would not be clear from a user perspective whether we were
deadlocked or stuck in an inconsistent state within the Python interpreter.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170612 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Mutex.h
ldb/Interpreter/ScriptInterpreterPython.h
282c22c6a6b6e54324b0d474b90d918bbfd3a10e 20-Dec-2012 Sean Callanan <scallanan@apple.com> This patch removes the SymbolFileSymtab support
for reporting class types from Objective-C runtime
class symbols. Instead, LLDB now queries the
Objective-C runtime for class types.

We have also added a (minimal) Objective-C runtime
type vendor for Objective-C runtime version 1, to
prevent regressions when calling class methods in
the V1 runtime.

Other components of this fix include:

- We search the Objective-C runtime in a few more
places.

- We enable enumeration of all members of
Objective-C classes, which Clang does in certain
circumstances.

- SBTarget::FindFirstType and SBTarget::FindTypes
now query the Objective-C runtime as needed.

- I fixed several test cases.

<rdar://problem/12885034>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170601 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/TypeVendor.h
9c970a371511a0e31ba9360aa841d445792c1ab0 18-Dec-2012 Jim Ingham <jingham@apple.com> Adding events when watchpoints are set or changed.

<rdar://problem/11597849>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170400 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBEvent.h
ldb/API/SBFrame.h
ldb/API/SBTarget.h
ldb/API/SBWatchpoint.h
ldb/Breakpoint/Watchpoint.h
ldb/Breakpoint/WatchpointList.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/lldb-enumerations.h
bb04be12f8762500c1c308b0d1b93fe8f69c667f 15-Dec-2012 Jim Ingham <jingham@apple.com> Remove the “len” defaulted parameter from CommandReturnObject::AppendMessage, AppendWarning and AppendError. Nobody was using them, and it meant if you accidentally used the AppendWarning when you meant AppendWarningWithFormat with an integer in the format string, it would compile and then return your string plus some unknown amount of junk.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170266 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandReturnObject.h
c340ff885da973bcd6ac6cf5a598a71c31efdc5e 15-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12156204>

x/a print wouldn't always reset the word size to the size of a pointer if a previous memory read using x/<gdb-format> had been used that set it to another width.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170264 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupFormat.h
188091899842b140313b54e097f16efbe165c998 14-Dec-2012 Greg Clayton <gclayton@apple.com> Cleaned up the UUID mismatch just printing itself whenever it wants to by allowing an optional feedback stream to be passed along when getting the symbol vendor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170174 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Symbol/SymbolVendor.h
ldb/lldb-private-interfaces.h
3ce94041919b44e247c134663281acf3f696b094 14-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11689939>

Supporting a compact display syntax for ObjC pointers where 0x00.....0 is replaced by a much more legible "nil"
e.g. this would show:
(NSArray *) $2 = nil
instead of:
(NSArray *) $2 = 0x0000000000000000 <nil>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170161 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
40e278caddf5442776f9408f20d757cc85fe630a 13-Dec-2012 Sean Callanan <scallanan@apple.com> Removed the == and != operators from ArchSpec, since
equality can be strict or loose and we want code to
explicitly choose one or the other.

Also renamed the Compare function to IsEqualTo, to
avoid confusion.

<rdar://problem/12856749>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170152 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ArchSpec.h
1998778efd3b40145a70bd2a9e44da8c06b8dcd5 12-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/10898363>

Emitting a warning when defining a summary or a synthetic provider and the function/class name provided does not correspond to a valid scripting object

Also using this chance to edit a few error messages from weird "internal error" markers to actual user-legible data!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170013 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
f2ca573e8dc034ecc5050a874d8f01ace0703e18 12-Dec-2012 Jim Ingham <jingham@apple.com> Fixed a few bugs in the "step in" thread plan logic.
Added a "step-in-target" flag to "thread step-in" so if you have something like:

Process 28464 stopped
* thread #1: tid = 0x1c03, function: main , stop reason = breakpoint 1.1
frame #0: 0x0000000100000e08 a.out`main at main.c:62
61
-> 62 int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint.
63

and you want to get into "complex" skipping a, b and c, you can do:

(lldb) step -t complex
Process 28464 stopped
* thread #1: tid = 0x1c03, function: complex , stop reason = step in
frame #0: 0x0000000100000d0d a.out`complex at main.c:44
41
42 int complex (int first, int second, int third)
43 {
-> 44 return first + second + third; // Step in targetting complex should stop here
45 }
46
47 int main (int argc, char const *argv[])



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170008 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/Target/Thread.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepOverRange.h
be754e641cfee70cf7ab0c6d160e94a085416f26 12-Dec-2012 Greg Clayton <gclayton@apple.com> Allow LLDB to work with dSYM files that have a DWARF compile unit with nothing else to support clang's new -gline-tables-only mode of compiling.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169994 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/LineTable.h
729e99e4623c57c9adba85ae2e4372f1dd4bd1c3 11-Dec-2012 Enrico Granata <egranata@apple.com> Adding a validation callback mechanism to OptionValueString (such a feature might theoretically be added to the general OptionValue base class should the need arise)
Using this mechanism, making sure that the options to pass a summary string or a named summary to frame variable do not have invalid values

<rdar://problem/11576143>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169927 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionValueString.h
2e2812388b75d3c62c9518cc1a6550ce29325aa6 11-Dec-2012 Jim Ingham <jingham@apple.com> Broadcast an event when the selected thread is changed.

<rdar://problem/10976636>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169810 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/Target/Thread.h
ldb/Target/ThreadList.h
18e0830db3f7602e3b97f543161b1b1e21824a44 08-Dec-2012 Greg Clayton <gclayton@apple.com> Added GetCanonicalType() to SBType:

lldb::SBType
SBType::GetCanonicalType();



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169655 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
b9db9d5bb01963774f28540dbe2c5a11f586ff29 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix a few more clang (3.2) warnings on Linux:
- remove unused members
- add NO_PEDANTIC to selected Makefiles
- fix return values (removed NULL as needed)
- disable warning about four-char-constants
- remove unneeded const from operator*() declaration
- add missing lambda function return types
- fix printf() with no format string
- change sizeof to use a type name instead of variable name
- fix Linux ProcessMonitor.cpp to be 32/64 bit friendly
- disable warnings emitted by swig-generated C++ code

Patch by Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169645 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
ldb/Expression/IRInterpreter.h
14e71ecd9b05d3dff6e7dc3bf3148b4ad5e3989a 07-Dec-2012 Jim Ingham <jingham@apple.com> Separate initing the stdout/stderr for running the Python Script interpreter from initing the lldb.target/frame/etc globals,
and only do the latter when it makes sense to.

<rdar://problem/12554049>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169614 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreterPython.h
49d888d8c3e4de1d2f38d541559f533f1c0bcab3 06-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12820334>

I modified the "Args::StringtoAddress(...)" function to be able to evaluate address expressions. This is now used for any command line arguments or options that takes addresses like:

memory read <addr> [<end-addr>]
memory write <addr>
breakpoint set --address <addr>
disassemble --start-address <addr> --end-address <addr>

It calls the expression parser to evaluate the address expression and will also work around the issue where the compiler doesn't like to add offsets to function pointers (which is what happens when you try to evaluate "main + 12"). So there is a temp fix in the Args::StringtoAddress() to work around this until we can get special compiler support for debug expressions with function pointers.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169556 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Args.h
b912457e1eb6f97d3ee3adc74d1e0f6393e35d3c 06-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12560257>

Fixed zero sized arrays to work correctly. This will only happen once we get a clang that emits correct debug info for zero sized arrays. For now I have marked the TestStructTypes.py as an expected failure.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169465 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
8f00907e68af707b7728901f1ea1d9c40add5168 06-Dec-2012 Daniel Malea <daniel.malea@intel.com> Move isprint8() into lldb_private as per post-commit review from Stefanus



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169454 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Options.h
0b93a7546473b15fb14dbc129f1fe5ed6ee14976 05-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12749733>

Always allows getting builtin types by name even if there is no backing debug information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169424 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
ldb/API/SBTarget.h
ldb/Core/Module.h
ldb/Symbol/ClangASTType.h
2eafcaafe722598d937cc64fd5ae4a3bb49e8dcf 05-Dec-2012 Daniel Malea <daniel.malea@intel.com> Define isprint8() wrapper around isprint() in order to avoid crashes on Linux



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169417 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Options.h
8c6cf432039ef0c4dd2d10f98511438a4c204f4f 05-Dec-2012 Jason Molenda <jmolenda@apple.com> Add an LLDB_LOG_TARGET logging channel (log eanble lldb target).

Update the Target methods which can change the target log to this
channel.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169342 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-private-log.h
d891f9b872103235cfd2ed452c6f14a4394d9b3a 05-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169341 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-python.h
0bce9a22354df3f00e68ffd912119a0741753b7f 05-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12649160>

Added the ability to debug through your process exec'ing itself to the same architecture.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169340 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/Target/DynamicLoader.h
ldb/Target/Process.h
ldb/Target/StopInfo.h
ldb/Target/Target.h
ldb/lldb-enumerations.h
b3dafc6a81a014339015701c9872624f2aeddd43 04-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12750060>

Add the ability to get a symbol or symbols by name and type from a SBModule, and also the ability to get all symbols by name and type from SBTarget objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169205 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
ldb/API/SBTarget.h
6701ba375fba67e4c98ad3de742c25b8a8372f76 04-Dec-2012 Jim Ingham <jingham@apple.com> Missing #include to pick up def'n of TerminalState.h.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169203 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
6475c42148a8ea1ca86e5db465db7eca742d897d 04-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12798131>

Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.

This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169189 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupBoolean.h
ldb/Interpreter/OptionGroupFile.h
ldb/Interpreter/OptionGroupString.h
ldb/Interpreter/OptionGroupUInt64.h
ldb/Interpreter/Options.h
ldb/Symbol/VariableList.h
ldb/lldb-private-types.h
b1087a27f7babc43f332c9d49ac4554892133a41 30-Nov-2012 Jim Ingham <jingham@apple.com> Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169032 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/Core/Debugger.h
ldb/Host/Terminal.h
9ac7ce312ef8b5327a74d38edf10af86c07586b9 30-Nov-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12676084> Dump the traceback when a Python error occurs in "command script import" and the exception is not an ImportError



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169031 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
f14269add7f6fb84da7ccfd866f8e9f7e81068be 29-Nov-2012 Han Ming Ong <hanming@apple.com> <rdar://problem/12780259>

Prevent async and sync calls to get profile data from stomping on each other.
At the same time, don't use '$' as end delimiter per chunk of profile data.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168948 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
2d05dc6dc93ebe03e406ab93efeb420fa18fa25a 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Add 'class' keyword to friend definition (to fix gcc 4.6 build)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168827 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StopInfo.h
c4a8ba7b9259bcb8384b50d4d7b1442b0029e4f2 28-Nov-2012 Jim Ingham <jingham@apple.com> Cleanup - remove declarations of unimplemented functions.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168807 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
01e6a58b057676d5dc434876dbb2d54871bb962e 27-Nov-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12106825>

Allow the expression parser to see more than just data symbols. We now accept any symbol that has an address. We take precautions to only accept symbols by their mangled or demangled names only if the demangled name was not synthesized. If the demangled name is synthesized, then we now mark symbols accordingly and only compare against the mangled original name.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168668 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionVariable.h
ldb/Symbol/Symbol.h
76b258db0611dad2f5b5ae51721a4bc0abd580ae 27-Nov-2012 Jim Ingham <jingham@apple.com> The Function calling thread plan was replacing the stored stop info too soon, causing recursive entry into the
breakpoint StopInfo's PerformAction, which is bad. Reworked this so that it is now correct.

<rdar://problem/12501259>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168634 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanCallFunction.h
1a00ab35c98b2acd393bb1ceee3e0e2bf4e02768 20-Nov-2012 Filipe Cabecinhas <me@filcab.net> Remove unneeded const qualifier

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168342 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
2827e26d7d85636dd0d934a7e15d9ef5b95fac67 20-Nov-2012 Filipe Cabecinhas <me@filcab.net> Remove unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168339 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
559cf6e8b52b940f5f4362b32d628838d6301e2e 17-Nov-2012 Jason Molenda <jmolenda@apple.com> Han Ming's commit in r168228 had a bunch of 4-space tabs
in the source files. Expand to spaces. No content changes,
just whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168238 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
2529aa356e8cf9c1395da46f66ea2518dfa1982d 17-Nov-2012 Han Ming Ong <hanming@apple.com> Follow up on <rdar://12720514>. Removed commented out code.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168232 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
fb9cee64303d36d6fe5d87e63dd8701d1ddb70a9 17-Nov-2012 Han Ming Ong <hanming@apple.com> <rdar://problem/12720514> Sub-TLF: Provide service to profile the inferior

This allows client to query profiling states on the inferior.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168228 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Core/Broadcaster.h
ldb/Target/Process.h
9210fdd7ef9cb0a7461b859916b65d3a5a5681e6 16-Nov-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12712928>

Removed an assert that was for debug only.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168190 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
4e08e0ddd74e9ea4708841336a417382542cb167 16-Nov-2012 Daniel Malea <daniel.malea@intel.com> Update RecordingMemoryManager as per change to RuntimeDyld base class
made in upstream llvm (r168114)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168184 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/RecordingMemoryManager.h
d27e543e9c5f81ef1288afbc9e48de2da5976a8a 15-Nov-2012 Sean Callanan <scallanan@apple.com> In cases where the Objective-C ivar symbols are stripped out,
expressions that refer to ivars will not work because Clang
emits IR that refers to them to get the ivar offsets.
However, it is possible to search the runtime for these values.

I have added support for reading the relevant tables to the
Objective-C runtime, and extended ClangExpressionDeclMap to
query that information if and only if it doesn't find the symbols
in the binary.

Also added a testcase.

<rdar://problem/12628122>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168018 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Target/ObjCLanguageRuntime.h
9e3193a5c84b26a97fffc61de0b20dfbcfa54393 13-Nov-2012 Jim Ingham <jingham@apple.com> Revision of the patch from Andrew Kaylor <andrew.kaylor@intel.com> to prevent missing an event added in WaitForEventsInternal, narrowing the time in which we are not accepting new events. Also, made everything that was protected private, since there really isn't any good reason why subclasses would have to muck with the listener internals.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167857 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Listener.h
45454a31b7b5cb449cb75860f654d52976412eb2 13-Nov-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11814875>

If a ValueObjectDynamic has no formatter, try using its static type to figure one out



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167803 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/lldb-private-enumerations.h
1b888f8af37eb363d5026ee1bd3eea409be8eae3 12-Nov-2012 Greg Clayton <gclayton@apple.com> New compiler warnings caught issues with the m_encoding_uid field that should have been a lldb::user_id_t type, but was a uint32_t a long time ago and never got updated.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167774 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Type.h
172295062971d190d74a0118e0244e3a6e6e6ef7 12-Nov-2012 Daniel Malea <daniel.malea@intel.com> Replace const_iterator with iterator to build against libstdc++
- libstdc++ defines vector::erase(iterator) but not vector::erase(const_iterator)





git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167764 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/UniqueCStringMap.h
e727b87cb85f75ff1a6d56010c4390ccaa8152a9 12-Nov-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12153915>

When uniquing classes against one another we can't depend on any or all of the artificial functions (default ctor, dtor, copy ctor, move ctor, etc) being in each definition. Now we treat those separately and handle those to the best of our ability.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167752 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/UniqueCStringMap.h
79f7143ebc923d1eaf62d671127a9dfe4b14a942 10-Nov-2012 Jim Ingham <jingham@apple.com> how to do it correctly.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167656 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StopInfo.h
0b2f5cc32d01cf48d6216a232ec87afab1466315 08-Nov-2012 Enrico Granata <egranata@apple.com> Minor cleanups to the new ModuleList notification APIs: passing in the ModuleList as part of the callbacks, and not copying the notifier as part of copy constructing and assigning


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167592 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
ldb/Target/Target.h
146d9522c95c0c8c5409539813b55e08b99196ee 08-Nov-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12586350>

This commit does three things:
(a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions
whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress
(b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action
of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting
the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds
(c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment:
- the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself)
- if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167569 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Host/Symbols.h
ldb/Target/Platform.h
ldb/Target/Target.h
6e3f97b4bbb9ed2918215d2247067fff949d1aa4 04-Nov-2012 Jason Molenda <jmolenda@apple.com> Add new ArchSpec methods, IsCompatibleMatch() and IsExactMatch().
The operator== method is a synonym for IsExactMatch().

The essential difference between these two is that IsCompatibleMatch()
will say that armv7 and armv7s are compatible and return true.
IsExactMatch() will say that armv7 and armv7s are not a match.

An armv7s cpu can run either generic armv7 binaries or armv7s binaries
(the latter being tuned for it). When we're picking the slice of a
universal Mach-O file to load in an armv7s Target, we need to be able to
first look for an exact cpu subtype match (armv7s == armv7s) and failing
that, looking for a slice with a compatible architecture.

Update ObjectContainerUniversalMachO::GetObjectFile to prefer an exact
match of the cpu type, falling back to a compatible match if necessary.

<rdar://problem/12593515>




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167365 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ArchSpec.h
88db4597c7567be050b7a729f7306832f28428bb 02-Nov-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12585314>

LLDB now provides base class offsets (virtual and non virtual) to Clang's record layout. We previously were told this wasn't necessary, but it is when pragma pack gets involved.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167262 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTType.h
eeabe815b3d36b69b4666fbbce78a4bf950de3cc 01-Nov-2012 Greg Clayton <gclayton@apple.com> Get rid of hack by making the actual call public. This was causing the lldb-platform to not be able to link.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167253 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
34507e41794909465d168af4048ebd07ee7819e8 31-Oct-2012 Greg Clayton <gclayton@apple.com> Carlo Kok found an issue where default parameters were causing the wrong argument to be passed. I got rid of the default args so we don't run into this.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167167 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangUserExpression.h
1e4d8f06d77559e13844d116515412520b4713cc 31-Oct-2012 Sean Callanan <scallanan@apple.com> Rmoved a duplicate version of SetSelectedThreadByID
that confused external clients.

<rdar://problem/12599528>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167097 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
fd670c24e72a1425434020483689c3cb17f0d975 31-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12586188> Make ImportError a special case for "command script import", such that the error message for the exception becomes the error for the entire import operation
and silence the backtrace printout

In the process, refactor the Execute* commands in ScriptInterpreter to take an options object, and add a new setting to not mask out errors so that the callers can handle them directly
instead of having the default behavior



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167067 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterNone.h
ldb/Interpreter/ScriptInterpreterPython.h
c7f17c030eb0632a0bb1cd0ebf29900d6d97a902 31-Oct-2012 Jim Ingham <jingham@apple.com> Make blocks that capture their containing method's object pointer look like methods of
the containing class so that direct ivar access will work in the expression parser.

<rdar://problem/9797999>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167061 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
ldb/Symbol/ClangExternalASTSourceCommon.h
7c5e22f2edf0a0ef17e3a401c814a873399d108a 30-Oct-2012 Greg Clayton <gclayton@apple.com> Path from Ashok Thirumurthi:

The attached patch adds eValueTypeVector to lldb_private::Value. The nested struct Vector is patterned after RegisterValue::m_data.buffer. This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue. Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers.

An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py. In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully. On the other hand, the output is glaringly empty:
runCmd: expr $xmm0
output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {}
Expecting sub string: vector_type
Matched



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167033 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Value.h
99270577568c7829116a97094eabceaee9a21737 30-Oct-2012 Greg Clayton <gclayton@apple.com> Added the ability to get function return and argument types to SBType():

bool
SBType::IsFunctionType ();

lldb::SBType
SBType::GetFunctionReturnType ();

lldb::SBTypeList
SBType::GetFunctionArgumentTypes ();



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167023 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
db05491da80820047dc218542c88ba0d9f08fc71 29-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup
Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166967 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
ldb/Interpreter/CommandInterpreter.h
a32c5a5aa1fec0f9bc2a5b123f07ff6b8c979999 27-Oct-2012 Jim Ingham <jingham@apple.com> This is the first phase of supporting the DW_AT_object_pointer tag. I expanded the decl metadata
so it could hold this information, and then used it to look up unfound names in the object pointer
if it exists. This gets "frame var" to work for unqualified references to ivars captured in blocks.
But the expression parser is ignoring this information still.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166860 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/ClangExternalASTSourceCommon.h
ldb/lldb-forward.h
89fda00f52b06b1cfe994c0320a04562b8cc1144 27-Oct-2012 Enrico Granata <egranata@apple.com> Moving ValueObjectCast over to its own .h/.cpp files instead of sharing ValueObjectDynamic.h/.cpp
Removing the IsDynamic() and GetStaticValue() calls, so that they will default to the base class behavior:
- non-dynamic
- itself as the static value
This is in contrast with the previous behavior which could be confusing and could potentially cause issues when using those objects



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166857 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectCast.h
ldb/Core/ValueObjectDynamicValue.h
51d7a39dca300a7fa90a44a0fc5338048b49ac20 26-Oct-2012 Andrew Kaylor <andrew.kaylor@intel.com> This patch updates comments in the Predicate class to describe a subtle behavior that callers may need to be aware. It also adds documentation for one function which didn’t have any.

The subtle behavior is that the Predicate wait functions may not detect transitory changes in the predicate value. Consider the following scenario.

Thread A waits for a bit to be set in the predicate value.
Thread B sets the bit in the predicate value.
Before Thread A wakes up, Thread C clears the bit in the predicate value.
Thread A wakes, checks the value and goes back to waiting.

The mutex and condition variables protect access to the value, but they offer no guarantee that another thread will not acquire the mutex and change the value before a waiting thread is restarted after a change.

I believe that the current behavior is correct and reasonable. I just want to leave a marker to prevent possible problems in the future or to help anyone who might be unfortunate enough to encounter such a problem.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166800 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Predicate.h
fee26ee9a5db37e71f5d5aed279c634bbdab7c8c 26-Oct-2012 Jim Ingham <jingham@apple.com> Add API to get the process plugin name & short name.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166799 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
37816a3429a075e19b74f64fd642d5a5d7ec6f2f 26-Oct-2012 Jason Molenda <jmolenda@apple.com> Add a new capability to RegisterContextLLDB: To recognize when the
Full UnwindPlan is trying to do an impossible unwind; in that case
invalidate the Full UnwindPlan and replace it with the architecture
default unwind plan.

This is a scenario that happens occasionally with arm unwinds in
particular; the instruction analysis based full unwindplan can
mis-parse the functions and the stack walk stops prematurely. Now
we can do a simpleminded frame-chain walk to find the caller frame
and continue the unwind. It's not ideal but given the complicated
nature of analyzing the arm functions, and the lack of eh_frame
information on iOS, it is a distinct improvement and fixes some
long-standing problems with the unwinder on that platform.

This is fixing <rdar://problem/12091421>. I may re-use this
invalidate feature in the future if I can identify other cases where
the full unwindplan's unwind information is clearly incorrect.

This checkin also includes some cleanup for the volatile register
definition in the arm ABI plugin for <rdar://problem/10652166>
although work remains to be done for that bug.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166757 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/FuncUnwinders.h
ldb/Symbol/UnwindPlan.h
91a9f2127fa8b8e90f6ea1676d11f97f44ce22dd 25-Oct-2012 Greg Clayton <gclayton@apple.com> Allow operating system plug-ins to specify the address for registers so we don't have to create data up front.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166701 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/OperatingSystem.h
90c6cd5764ed78d4b45606f6ee648c71ec298c03 25-Oct-2012 Greg Clayton <gclayton@apple.com> Changed the V1 and V2 runtimes to be able to detect when the ISA hash table has changed, and auto update as needed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166693 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
9a91ef68c2650113da5488e09e9cb5f6aa88f6ab 24-Oct-2012 Sean Callanan <scallanan@apple.com> This is a fix for the command option parser.

There was a generic catch-all type for path arguments
called "eArgTypePath," and a specialized version
called "eArgTypeFilename." It turns out all the
cases where we used eArgTypePath we could have
used Filename or we explicitly meant a directory.

I changed Path to DirectoryName, made it use the
directory completer, and rationalized the uses of
Path.

<rdar://problem/12559915>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166533 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
ef22b90240618ed8056dac14a756dff574f8218a 24-Oct-2012 Greg Clayton <gclayton@apple.com> Objective C cleanup. Removed an cache that was no longer needed and changes the code that gets the dynamic type and class name to use our new Objective C cache.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166512 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Type.h
ldb/Target/ObjCLanguageRuntime.h
800332c3988c78ea002b64b698f38b58ed95d3ba 23-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12523238> Commit 1 of 3
This commit enables the new HasChildren() feature for synthetic children providers
Namely, it hooks up the required bits and pieces so that individual synthetic children providers can implement a new (optional) has_children call
Default implementations have been provided where necessary so that any existing providers continue to work and behave correctly

Next steps are:
2) writing smart implementations of has_children for our providers whenever possible
3) make a test case



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166495 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
ldb/Core/FormatClasses.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
9e376625d6354d77cd6240007f0d42034dd3f1ee 23-Oct-2012 Jim Ingham <jingham@apple.com> Watchpoints remember the type of the expression or variable they were set with, and use
it to print the old and new values.
Temporarily disable the "out of scope" checking since it didn't work correctly, and was
not what people generally expected watchpoints to be doing.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166472 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
ldb/Target/Target.h
54037b1488e3344575714d8358728e042fa801c7 23-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12493007>

Added a new API call to help efficiently determine if a SBValue could have children:

bool
SBValue::MightHaveChildren ();

This is inteneded to be used bui GUI programs that need to show if a SBValue needs a disclosure triangle when displaying a hierarchical type in a tree view without having to complete the type (by calling SBValue::GetNumChildren()) as completing the type is expensive.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166460 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectSyntheticFilter.h
61ff3a37c7141c672f30b32f3d94cafa2d326e3e 23-Oct-2012 Sean Callanan <scallanan@apple.com> Improved support for language types as command
options:

- added help ("help language") listing the
possible options;

- added the possibility of synonyms for language
names, in this case "ObjC" for "Objective-C";
and

- made matching against language names case
insensitive.

This should improve discoverability.

<rdar://problem/12552359>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166457 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
3d656c729a1ed0abad4e5a2d76f6e8a6904f66aa 22-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12437442>
Given our implementation of ValueObjects we could have a scenario where a ValueObject has a dynamic type of Foo* at one point, and then its dynamic type changes to Bar*
If Bar* has synthetic children enabled, by the time we figure that out, our public API is already vending SBValues wrapping a DynamicVO, instead of a SyntheticVO and there was
no trivial way for us to change the SP inside an SBValue on the fly
This checkin reimplements SBValue in terms of a wrapper, ValueImpl, that allows this substitutions on-the-fly by overriding GetSP() to do The Right Thing (TM)
As an additional bonus, GetNonSyntheticValue() now works, and we can get rid of the ForceDisableSyntheticChildren idiom in ScriptInterpreterPython
Lastly, this checkin makes sure the synthetic VOs get the correct m_value and m_data from their parents (prevented summaries from working in some cases)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166426 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectSyntheticFilter.h
b9bd4eeeb21dc4d634a61d00fa68f62c630bd38c 22-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12473003>

Allow type searches to specify a type keyword when searching for type. Currently supported type keywords are: struct, class, union, enum, and typedef.

So now you can search for types with a string like "struct foo".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166420 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Type.h
ldb/Symbol/TypeList.h
307c7fdc58d19f734991a176db972cc61d9ada16 20-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12491387>

Added commands to the KDP plug-in that allow sending raw commands through the KDP protocol. You specify a command byte and a payload as ASCII hex bytes, and the packet is created with a valid header/sequenceID/length and sent. The command responds with a raw ASCII hex string that contains all bytes in the reply including the header.

An example of sending a read register packet for the GPR on x86_64:

(lldb) process plugin packet send --command 0x07 --payload 0100000004000000



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166346 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupString.h
87e9d32a982a0fb76b8657a897ad5781f9a5d25e 19-Oct-2012 Greg Clayton <gclayton@apple.com> Added the infrastructure necessary for plug-ins to be able to add their own settings instead of having settings added to existing ones. In particular "target.disable-kext-loading" was added to "target" where it should actually be specific to the the dynamic loader plugin. Now the plug-in manager has the ability to create settings at the root level starting with "plugin". Each plug-in type can add new sub dictionaries, and then each plug-in can register a setting dictionary under its own short name. For example the DynamicLoaderDarwinKernel plug-in now registers a setting dictionary at:

plugin
dynamic-loader
macosx-kernel
(bool) disable-kext-loading

To settings can be set using:

(lldb) settings set plugin.dynamic-loader.macosx-kernel.disable-kext-loading true

I currently only hooked up the DynamicLoader plug-ins, but the code is very easy to duplicate when and if we need settings for other plug-ins.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166294 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/PluginManager.h
ldb/Core/UserSettingsController.h
ldb/Interpreter/OptionValueProperties.h
ldb/Target/Target.h
ldb/lldb-private-interfaces.h
127291c8222625f1c8e31dfbb41c95103251ff56 19-Oct-2012 Jason Molenda <jmolenda@apple.com> Add a new target setting to disable automatic loading of kext images
in a kernel debug session:

settings set target.disable-kext-loading true

<rdar://problem/12490623>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166262 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Stream.h
ldb/Target/Target.h
3b924561d38937c991f9558bb23a03dc46d59734 19-Oct-2012 Jason Molenda <jmolenda@apple.com> typeo fix in comment

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166259 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Stream.h
62377463542bd94bbec63bd374233fab0b9d7c0c 19-Oct-2012 Jason Molenda <jmolenda@apple.com> Change CommunicationKDP::SendRequestWriteMemory to append data as binary
instead of asciified bytes. <rdar://problem/12522978>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166258 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Stream.h
2e7f313dc473b036788319690116b324cb44b765 19-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12491420>

Added a new setting that allows a python OS plug-in to detect threads and provide registers for memory threads. To enable this you set the setting:

settings set target.process.python-os-plugin-path lldb/examples/python/operating_system.py

Then run your program and see the extra threads.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166244 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterNone.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/Target/Process.h
ed0a0fbd021e44727469d6fa20cc337c58bd04c3 18-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12462048>
<rdar://problem/12068650>

More fixes to how we handle paths that are used to create a target.

This modification centralizes the location where and how what the user specifies gets resolved. Prior to this fix, the TargetList::CreateTarget variants took a FileSpec object which meant everyone had the opportunity to resolve the path their own way. Now both CreateTarget variants take a "const char *use_exe_path" which allows the TargetList::CreateTarget to centralize where the resolving happens and "do the right thing".




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166186 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/FileSpec.h
ldb/Target/TargetList.h
0c8446cc220c429fb51f8f9864275c8b1c768533 18-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12462048>

LLDB changes argv[0] when debugging a symlink. Now we have the notion of argv0 in the target settings:

target.arg0 (string) =

There is also the program argument that are separate from the first argument that have existed for a while:

target.run-args (arguments) =

When running "target create <exe>", we will place the untouched "<exe>" into target.arg0 to ensure when we run, we run with what the user typed. This has been added to the ProcessLaunchInfo and all other needed places so we always carry around the:
- resolved executable path
- argv0
- program args

Some systems may not support separating argv0 from the resolved executable path and the ProcessLaunchInfo needs to carry all of this information along so that each platform can make that decision.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166137 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/Target/Target.h
7b6950331083ad156a433bdcc0a6d015e1491714 18-Oct-2012 Enrico Granata <egranata@apple.com> Improvements to the data formatters logging - plus, new log messages when our dynamic type changes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166133 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
6a97d425a9bb1a137a7dcf7be90edd37d21f4dbb 18-Oct-2012 Sean Callanan <scallanan@apple.com> Fixed ClangASTContext to own its TargetOptions
using a reference-counted pointer. This avoids
memory-management problems when the TargetOptions
are deleted.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166132 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
0b2be9dd62618a8e0fd88599b5e081a9c3c47e7e 17-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective-C pointer changed but we still reported the one-true-definition for the previous type. This was causing issues where a variable could be reported as being of an entirely different type after an assignment

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166119 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
75a443b04197d18c7034968e11ce831166df3703 17-Oct-2012 Greg Clayton <gclayton@apple.com> API cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166070 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBExpressionOptions.h
47beabb1386be44e3f90dbc30a0b22c23b93a4dc 16-Oct-2012 Jim Ingham <jingham@apple.com> Add the ability to set timeout & "run all threads" options both from the "expr" command and from
the SB API's that evaluate expressions.

<rdar://problem/12457211>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166062 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDefines.h
ldb/API/SBExpressionOptions.h
ldb/API/SBFrame.h
ldb/API/SBValue.h
ldb/Expression/ClangFunction.h
ldb/Expression/ClangUserExpression.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/lldb-forward.h
b8fda50a3e97699af76a406f03d139ee1bd94d01 16-Oct-2012 Enrico Granata <egranata@apple.com> Removing the two extra GetXSize(bool) calls since we do not desire to support them long-term

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166060 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandReturnObject.h
c2bc7944f7c2f10114426f447259a35acb0b1e18 16-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12446320> Fixing an issue with our Driver where setting an immediate output would not cause suppression of the final printout. This allows effective output redirection for Python commands

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166058 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandReturnObject.h
5d30ea748f55faa7542c1b3ba31fe36f402beee2 16-Oct-2012 Jason Molenda <jmolenda@apple.com> Add a new ABI plugin method which specifies whether the architecture
must push something on the stack for a function call or not. In
x86, the stack pointer is decremented when the caller's pc is saved
on the stack. In arm, the stack pointer and frame pointer don't
necessarily have to change for a function call, although most
functions need to use some stack space during their execution.

Use this information in the RegisterContextLLDB to detect invalid
unwind scenarios more accurately.

<rdar://problem/12348574>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166005 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ABI.h
6bc24c10080b624a2782e6e42f683e5d65c6903c 16-Oct-2012 Jim Ingham <jingham@apple.com> Patch from Matt Kopec <matt.kopec@intel.com> to fix the problem that if two breakpoints were set on consecutive addresses, the continue from the
first breakpoint would skip the second.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166000 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
13193d5ae15f194102c14a5ccdc46e8db5c3d95f 13-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12491387>

I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override:

virtual CommandObject *
GetPluginCommandObject();

This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165861 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandObjectCrossref.h
ldb/Interpreter/CommandObjectMultiword.h
ldb/Target/Process.h
949b7178cf48cc4cf8533c729999a6c90785773d 13-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12490588>

From SBType, we can now get a lldb::BasicType enumeration out of an existing type.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165857 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Symbol/ClangASTContext.h
ldb/lldb-enumerations.h
82560f25ae1b4a55c927df9ccf1bd1becc01b1c1 13-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12490558>

SBProcess::SetSelectedThreadByID() had a "uint32_t tid" parameter which would truncate 64 bit thread IDs (lldb::tid_t is 64 bit).


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165852 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
6f01c93497df194b6f2194630a81e87d806ce0e0 12-Oct-2012 Jim Ingham <jingham@apple.com> Bunch of cleanups for warnings found by the llvm static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165808 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/VariableList.h
a510437e795477e5f629263d3d191d982c991733 11-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12331741>

Dynamic type code must be efficient and fast. Now it is.

Added ObjC v1 support for getting the complete list of ISA values.

The main flow of the AppleObjCRuntime subclasses is now they must override "virtual bool UpdateISAToDescriptorMap_Impl();". This function will update the complete list of ISA values and create ClassDescriptorSP objects for each one. Now we have the complete list of valid ISA values which we can use for verification when doing dynamic typing.

Refactored a bunch of stuff so that the AppleObjCRuntime subclasses don't have to implement as many functions as they used to.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165730 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
ldb/Target/ObjCLanguageRuntime.h
49306144bb37f0b3423d992f17cdcc24703374b4 11-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12462744> Implement a new SBDeclaration class to wrap an lldb_private::Declaration - make a GetDeclaration() API on SBValue to return a declaration. This will only work for vroot variables as they are they only objects for which we currently provide a valid Declaration

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165672 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/LLDB.h
ldb/API/SBDeclaration.h
ldb/API/SBDefines.h
ldb/API/SBFileSpec.h
ldb/API/SBStream.h
ldb/API/SBValue.h
94a5d0de4433dce556db59758f3d6124eb0e1a2a 10-Oct-2012 Jim Ingham <jingham@apple.com> Change the Thread constructor over to take a Process& rather than a ProcessSP. We can't create Threads with a NULL ProcessSP, so it makes no sense to use the SP.
Then make the Thread a Broadcaster, and get it to broadcast when the selected frame is changed (but only from the Command Line) and when Thread::ReturnFromFrame
changes the stack.
Made the Driver use this notification to print the new thread status rather than doing it in the command.
Fixed a few places where people were setting their broadcaster class by hand rather than using the static broadcaster class call.

<rdar://problem/12383087>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165640 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBEvent.h
ldb/API/SBThread.h
ldb/Core/Broadcaster.h
ldb/Target/Thread.h
65529e3a02d91c25a779d8bac0c5bcd97c503ebd 10-Oct-2012 Sean Callanan <scallanan@apple.com> Thinned the AppleObjCRuntimeV2's class descriptors.
The following are now derived lazily:

- The name of the class (cached);
- the instance size of the class (not cached);

The following have been removed entirely:

- Whether the class is realized. This is an
implementation detail.
- The contents of the objc_class object. That
object can be read as needed.
- Whether the class is valid. The fact that
we vended a class to begin with means it's
valid. We will only give up looking parts
of it up if they are not in the format we
expect.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165567 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
be2f3aac39c2f7e3e6cce513800b35fa4b8f5429 09-Oct-2012 Greg Clayton <gclayton@apple.com> Changes to clean up the runtime and how the ISA caches are managed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165516 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
d6d45ceeae51b6dbb9221a3cf82441afa212a7dc 09-Oct-2012 Jason Molenda <jmolenda@apple.com> Add a parameter to Symbols::DownloadObjectAndSymbolFile() to control
whether we try to call an external program to load symbols unconditionally,
or if we check the user's preferences before calling it.

ProcessMachCore now sets CanJIT to false - we can't execute code in a core file.

DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule changed
to load the kernel from an on-disk file if at all possible.
Don't load the kext binaries out of memory from the remote systems - their linkedit doesn't
seem to be in a good state and we'll error out down in SymbolVendorMacOSX if we try to use
the in-memory images.
Call Symbols::DownloadObjectAndSymbolFile to get the kext/kernel binary -- the external
program may be able to give us a file path on the local filesystem instead of reading
the binary / dSYM over a network drive every time. Fall back to calling
Target::GetSharedModule() like before if DownloadObjectAndSymbolFile fails.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165471 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Symbols.h
f737d372a9672c9feaedf4b2cd7b16e31357d38e 09-Oct-2012 Greg Clayton <gclayton@apple.com> Added a new "module" log channel which covers module creation, deletion, and common module list actions.

Also added a new option for "log enable" which is "--stack" which will print out a stack backtrace for each log line.

This was used to track down the leaking module issue I fixed last week.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165438 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Log.h
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandObjectMultiword.h
ldb/lldb-private-log.h
3051ed73a487e92f12f8b6062f8415781453da21 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165396 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRDynamicChecks.h
ldb/Expression/IRForTarget.h
2753a024a5a314232baa579c0ada87551aa86988 05-Oct-2012 Jim Ingham <jingham@apple.com> Add one-shot breakpoints (-o option to "break set") and a tbreak alias for our gdb friends.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165328 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBBreakpoint.h
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointOptions.h
d49b8e7b75e889e38a01aefba5bfaf4eca8ec64d 05-Oct-2012 Enrico Granata <egranata@apple.com> A tweak to the previous commit to ensure that we don't try to use -> on a NULL pointer (should not happen but better be safe than sorry)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165272 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectSyntheticFilter.h
6dc553b7f4d092e52d91d66a783914a640fc38a0 05-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12413390> Fixing an issue where synthetic ValueObjects do not properly resolve their value

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165271 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectSyntheticFilter.h
bf41e19c78f0c84671d21eadec3954ab6db550c1 05-Oct-2012 Jason Molenda <jmolenda@apple.com> Ran the sources through the compiler with -Wshadow warnings
enabled after we'd found a few bugs that were caused by shadowed
local variables; the most important issue this turned up was
a common mistake of trying to obtain a mutex lock for the scope
of a code block by doing

Mutex::Locker(m_map_mutex);

This doesn't assign the lock object to a local variable; it is
a temporary that has its dtor called immediately. Instead,

Mutex::Locker locker(m_map_mutex);

does what is intended. For some reason -Wshadow happened to
highlight these as shadowed variables.

I also fixed a few obivous and easy shadowed variable issues
across the code base but there are a couple dozen more that
should be fixed when someone has a free minute.
<rdar://problem/12437585>




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165269 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Core/ValueObject.h
a787c1ad2a5ab1d5be6be1936d776c8406bc8d53 04-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12424824> Making sure that we correctly update our synthetic children provider for NSDictionary - providing better support for dynamic types by letting the filter recalculate itself when the type of the object changes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165260 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectSyntheticFilter.h
9abbfba957db139beed19866f61599424ddcd37a 04-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12099592> Adding back a bunch of code-running summaries

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165186 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
4952db8c76f619e3d8a0cf13456097128009d67b 02-Oct-2012 Jason Molenda <jmolenda@apple.com> Handle KASLR kernel loading for kernel corefiles.
Reduce the amount of output that DynamicLoaderDarwinKernel
prints for each kext it loads.
<rdar://problem/7714201>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164985 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Symbols.h
b0e3c7c4d063da2cc6a2550ad4979d5c342c8306 29-Sep-2012 Jason Molenda <jmolenda@apple.com> Add the RelocateOrLoadKernel and LoadKernel methods to ProcessGDBRemote::DoRemoteConnect().
When attaching to a remote system that does not look like a typical vendor system, and no
executable binary was specified to lldb, check a couple of fixed locations where kernels
running in ASLR mode (slid in memory to a random address) store their load addr when booted
in debug mode, and relocate the symbols or load the kernel wholesale from the host computer
if we can find it.

<rdar://problem/7714201>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164888 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
fac2e62f08719ba800a440b7ad0d5a55a26dc620 29-Sep-2012 Jason Molenda <jmolenda@apple.com> Add support for debugging KASLR kernels via kdp (the kernel being
loaded at a random offset).

To get the kernel's UUID and load address I need to send a kdp
packet so I had to implement the kernel relocation (and attempt to
find the kernel if none was provided to lldb already) in ProcessKDP
-- but this code really properly belongs in DynamicLoaderDarwinKernel.

I also had to add an optional Stream to ConnectRemote so
ProcessKDP::DoConnectRemote can print feedback about the remote kernel's
UUID, load address, and notify the user if we auto-loaded the kernel via
the UUID.

<rdar://problem/7714201>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164881 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
6d101887bb427b3c879c0c06775ab4dcb1cd265b 29-Sep-2012 Enrico Granata <egranata@apple.com> Implementing plugins that provide commands.
This checkin adds the capability for LLDB to load plugins from external dylibs that can provide new commands
It exports an SBCommand class from the public API layer, and a new SBCommandPluginInterface

There is a minimal load-only plugin manager built into the debugger, which can be accessed via Debugger::LoadPlugin.

Plugins are loaded from two locations at debugger startup (LLDB.framework/Resources/PlugIns and ~/Library/Application Support/LLDB/PlugIns) and more can be (re)loaded via the "plugin load" command

For an example of how to make a plugin, refer to the fooplugin.cpp file in examples/plugins/commands

Caveats:
Currently, the new API objects and features are not exposed via Python.
The new commands can only be "parsed" (i.e. not raw) and get their command line via a char** parameter (we do not expose our internal Args object)
There is no unloading feature, which can potentially lead to leaks if you overwrite the commands by reloading the same or different plugins
There is no API exposed for option parsing, which means you may need to use getopt or roll-your-own


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164865 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandInterpreter.h
ldb/API/SBCommandReturnObject.h
ldb/API/SBDebugger.h
ldb/API/SBDefines.h
ldb/API/SBError.h
ldb/Core/Debugger.h
ldb/Host/DynamicLibrary.h
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandObjectMultiword.h
ldb/lldb-forward.h
d123b989d453c70244b04d4c9ef7792214e9010a 28-Sep-2012 Sean Callanan <scallanan@apple.com> Improved the runtime reading to also get data
out of the metaclass, so as to enumerate class
methods for an object.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164808 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
437b5bccea45a5981edbbbeb4e23424aec4ce774 28-Sep-2012 Greg Clayton <gclayton@apple.com> Wrapped up the work I am going to do for now for the "add-dsym" or "target symfile add" command.

We can now do:

Specify a path to a debug symbols file:
(lldb) add-dsym <path-to-dsym>

Go and download the dSYM file for the "libunc.dylib" module in your target:
(lldb) add-dsym --shlib libunc.dylib

Go and download the dSYM given a UUID:
(lldb) add-dsym --uuid <UUID>

Go and download the dSYM file for the current frame:
(lldb) add-dsym --frame



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164806 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/UUID.h
ldb/Interpreter/OptionGroupBoolean.h
ldb/Interpreter/OptionValueFileSpec.h
ldb/Interpreter/OptionValueUUID.h
b924eb6c5250a9909dc55ac736d231f7ccae423b 27-Sep-2012 Greg Clayton <gclayton@apple.com> Added the ability to download a symboled executable and symbol file given a UUID.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164753 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/StreamBuffer.h
ldb/Host/Host.h
ldb/Host/Symbols.h
3fcc297c999218b19d7d5ad049e9c955c4bc481d 26-Sep-2012 Jim Ingham <jingham@apple.com> Add an API to figure out whether a breakpoint is internal or not.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164648 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBBreakpoint.h
3acaa926c8f0d32da48db61a5fcb95276e6a4006 25-Sep-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/9959501>

More KDP debugging process. We can not set breakpoints, hit them, resume, step and detach while running.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164584 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Stream.h
ldb/Target/Thread.h
4155fe6231d3f7f55aeed2cf10d0529f11cc74e1 25-Sep-2012 Enrico Granata <egranata@apple.com> Making sure we do not try to compare a NULL string - which would cause us to crash

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164574 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
06dc17f8eb821d7256fd42e56f85c2779a29f689 25-Sep-2012 Sean Callanan <scallanan@apple.com> Brought LLDB top-of-tree into sync with LLVM/Clang
top-of-tree. Removed all local patches and llvm.zip.

The intent is that fron now on top-of-tree will
always build against LLVM/Clang top-of-tree, and
that problems building will be resolved as they
occur. Stable release branches of LLDB can be
constructed as needed and linked to specific release
branches of LLVM/Clang.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164563 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRForTarget.h
ldb/Expression/RecordingMemoryManager.h
4f61ba926fdcc03d71a1b5db88c18d1e94ed9fd8 22-Sep-2012 Jim Ingham <jingham@apple.com> Change the new breakpoint creation output (primarily from "break set") to something more useful.

<rdar://problem/11333623>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164432 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
bf346eb7d6ed91a1696d5659dec1bf16302a89ce 21-Sep-2012 Sean Callanan <scallanan@apple.com> Fixed a problem where persistent variables did
not correctly store the contents of Objective-C
classes. This was due to a combination of
factors:

1) Types were only being completed if we were
looking inside them for specific ivars
(using FindExternalVisibleDeclsByName).
We now look the complete type up at every
FindExternalLexicalDecls.

2) Even if the types were completed properly,
ValueObjectConstResult overrode the type
of every ValueObject using the complete type
for its class from the debug information.
Superclasses of complete classes are not
guaranteed to be complete. Although "frame
variable" uses the debug information,
the expression parser does now piece together
complete types at every level (as described
in Bullet 1), so I provided a way for the
expression parser to prevent overriding.

3) Type sizes were being miscomputed by
ClangASTContext. It ignored the ISA pointer
and only counted fields. We now correctly
count the ISA in the size of an object.

<rdar://problem/12315386>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164333 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangASTImporter.h
d83ecab0aeb229504737e34b2f03c07fcb967480 20-Sep-2012 Sean Callanan <scallanan@apple.com> More work for reading the Objective-C runtime.
We can now read the relevant data structures for
the method list, and use a callback mechanism to
report their details to the AppleObjCTypeVendor,
which constructs appropriate Clang types.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164310 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
a53324d018afb71a1a53840c426aab47edb56383 20-Sep-2012 Greg Clayton <gclayton@apple.com> A patch that allows for mach-o architectures to be specified as "<number>-<number>" where the first number is the cpu type and the second is the cpu subtype. Also added code to allow use of mach-o architectures that aren't in our tables so that symbolication and static file introspection (crashlogs) can work with them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164258 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ArchSpec.h
5b9f77786d1e9fd356e1fe2d18ce6fcd74977c98 18-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12188843> Fixing a problem where a Python command created in the same module where the target function is defined causes the help string not to come out

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164172 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
81a5a09e76cfc1f110c0416e372f9f6cc27d79cf 18-Sep-2012 Sean Callanan <scallanan@apple.com> Objective-C runtime class descriptors can now
populate Clang ObjCInterfaceDecls with their
ivars, methods, and properties. The default
implementation does nothing. I have also made
sure that AppleObjCRuntimeV2 creates
ObjCInterfaceDecls that actually get queried
appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164164 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
3a08fd1ab40ac76a732836ee5b1b5aa23605f669 18-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11988289> Making C++ synthetic children provider for NSDictionary and related classes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164144 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
7adfcfdb46018d16393995276699a04505727808 18-Sep-2012 Enrico Granata <egranata@apple.com> Making ClangExpression hold on to a WP to the Process instead of a SP. This fix should enable us to have per-process maps of ClangExpressions without fear of keeping the process alive forever

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164082 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpression.h
4d0fa042181391e4fde953ebb5600d93022b3331 17-Sep-2012 Enrico Granata <egranata@apple.com> Make the Class Descriptors able to fetch the class name for unrealized classes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164050 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
f59388aa57559d7d074613d65b88abacfd699845 14-Sep-2012 Jim Ingham <jingham@apple.com> Make the unwinding of the stack part of "thread return" work, and add the thread return command.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163867 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/Target/RegisterContext.h
ldb/Target/Thread.h
3bfaad6baec573ae2facf2f2acae0948c1a422bd 13-Sep-2012 Sean Callanan <scallanan@apple.com> Made the help for the -n option on
"target image lookup" a bit better
documented by indicating that it takes
symbols OR functions.

<rdar://problem/12281325>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163839 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
ldb/lldb-enumerations.h
f91e78f58692785db4daecf8461481b95827dcf2 13-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11086338> Implementing support for synthetic children generated by running C++ code instead of Python scripts ; Adding a bunch of value-generating APIs to our private code layer ; Providing synthetic children for NSArray

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163818 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
ldb/Core/FormatClasses.h
ldb/Core/FormatNavigator.h
ldb/Core/ValueObject.h
ldb/lldb-forward.h
3e26acfe0f2f156ca4a0cf313286e723f3be1ab2 12-Sep-2012 Enrico Granata <egranata@apple.com> Fixing a potential crasher related to running regular expressions against a NULL pointer

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163742 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
95b765e8000b44644d021e95bc58eac95028573b 12-Sep-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11374963>

Partial fix for the above radar where we now resolve dsym mach-o files within the dSYM bundle when using "add-dsym" through the platform.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163676 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Symbols.h
ldb/Target/Platform.h
a17a81a1a9ff6b8d87c4a1e47dd874f6ea8a4f1d 12-Sep-2012 Jim Ingham <jingham@apple.com> Start at getting "thread return" working. Doesn't work yet.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163670 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/API/SBValue.h
ldb/Target/ABI.h
ldb/Target/Thread.h
c718b9652bb1a7aea5d133123fcc8bc87277002c 11-Sep-2012 Sean Callanan <scallanan@apple.com> This patch is part of ongoing work to extract type
information from the Objective-C runtime.

This patch takes the old AppleObjCSymbolVendor and
replaces it with an AppleObjCTypeVendor, which is
much more lightweight. Specifically, the SymbolVendor
needs to pretend that there is a backing symbol file
for the Types it vends, whereas a TypeVendor only
vends bare ClangASTTypes. These ClangASTTypes only
need to exist in an ASTContext.

The ClangASTSource now falls back to the runtime's
TypeVendor (if one exists) if the debug information
doesn't find a complete type for a particular
Objective-C interface. The runtime's TypeVendor
maintains an ASTContext full of types it knows about,
and re-uses the ISA-based type query information used
by the ValueObjects.

Currently, the runtime's TypeVendor doesn't provide
useful answers because we haven't yet implemented a
way to iterate across all ISAs contained in the target
process's runtime. That's the next step.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163651 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/TypeVendor.h
ldb/Target/LanguageRuntime.h
ldb/Target/ObjCLanguageRuntime.h
4e17f306c144419eb4ec2c14e17a11dca89895b2 11-Sep-2012 Filipe Cabecinhas <me@filcab.net> Make size_t known before including cxxabi.h (FreeBSD fix)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163640 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/cxa_demangle.h
ef9eb809246491a7a9db1f2bd35d854924525ba6 11-Sep-2012 Jason Molenda <jmolenda@apple.com> Remove LLDB_DISABLE_PYTHON ifndef around FormatManager::LoadObjCFormatters() prototype,
it is unconditionally present now.

ObjectContainerBSDArchive::CreateInstance %z8.8x is not a valid printf arg specifier, %8.8zx would work
for size_t arg but this arg is addr_t. use %8.8llx and cast up to uint64_t.

ObjectFile::FindPlugin ditto.

DynamicRegisterInfo::SetRegisterInfo ifdef this function out if LLDB_DISABLE_PYTHON.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163599 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
bb1af9ce3e25eae9916f85cb9a0c82e291c20bb4 11-Sep-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11935492>

Fixed an issue where if we call "Process::Destroy()" and the process is running, if we try to stop it and get "exited" back as the stop reason, we will still deliver the exited event.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163591 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
36de3c01c2f3ceac59b8e34b47c17fac200e27a1 08-Sep-2012 Jim Ingham <jingham@apple.com> Save and restore the current inlined depth over function calls.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163433 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
9b124c6bc79c0f650ac52d65d6366f45f30ee31d 08-Sep-2012 Jim Ingham <jingham@apple.com> Add SetCurrentInlinedDepth API.
In GetFramesUpTo, don't adjust the number of frames for the inlined depth if the number of frames in UINT32_MAX.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163432 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StackFrameList.h
45bc4a2bce24f397445ced0e8327fc0ad9a5b801 07-Sep-2012 Jim Ingham <jingham@apple.com> Ensure that the ShouldStopHere plans get called even when doing "virtual" steps.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163366 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanStepInRange.h
df83db835a5e026a2270dcc334e848452208691d 06-Sep-2012 Enrico Granata <egranata@apple.com> Restoring an API as deprecated which was removed in a previous commit

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163351 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
7eb083121db9e5d3a9a863e77b4a183c466028a7 06-Sep-2012 Enrico Granata <egranata@apple.com> Patch from Daniel Malea to fix the build on Linux. Thanks

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163332 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
d27026e46d8430fb451d85ac161a8492e1930245 05-Sep-2012 Enrico Granata <egranata@apple.com> Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163239 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
caaf010fb83b4c28bf585db2288837e6611e419e 04-Sep-2012 Enrico Granata <egranata@apple.com> Adding to files that were missing in the previous commit

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163156 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/CXXFormatterFunctions.h
ae2ae94bd72daf435204e99a0e03ccc64470a843 04-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11485744> Implement important data formatters in C++. Have the Objective-C language runtime plugin expose class descriptors objects akin to the objc_runtime.py Pythonic implementation. Rewrite the data formatters for some core Cocoa classes in C++ instead of Python.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163155 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatClasses.h
ldb/Core/Module.h
ldb/Target/ObjCLanguageRuntime.h
0c8fa2d7dd18ae1816c82846234c45f79142e3df 01-Sep-2012 Jim Ingham <jingham@apple.com> 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
ldb/Target/StackFrame.h
ldb/Target/StackFrameList.h
ldb/Target/Thread.h
ldb/Target/ThreadList.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepOverRange.h
3b1afc6cc5689b749a48a1506f17ca593b1cda42 01-Sep-2012 Greg Clayton <gclayton@apple.com> 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
ldb/Core/Debugger.h
ldb/Interpreter/Args.h
ldb/Interpreter/OptionValueProperties.h
ldb/Interpreter/OptionValueString.h
243a08c68876912c90440c0c6c0f95cb49af21c9 01-Sep-2012 Jim Ingham <jingham@apple.com> 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
ldb/Symbol/Block.h
9b90e87380cfafd7e746252588c314bcfefa4fe4 31-Aug-2012 Greg Clayton <gclayton@apple.com> <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
ldb/Symbol/ClangASTContext.h
84da01332193aac7f3bba77d09afc1f7e3fb8dfa 31-Aug-2012 Greg Clayton <gclayton@apple.com> Fix indentation.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163011 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
fc04d2463ad654c28f9ee2ee836174cc86b7f8b8 30-Aug-2012 Greg Clayton <gclayton@apple.com> 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
ldb/Host/File.h
ldb/Host/FileSpec.h
ldb/Interpreter/OptionValueFileSpec.h
49ce8969d3154e1560106cfe530444c09410f217 29-Aug-2012 Greg Clayton <gclayton@apple.com> <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
ldb/Core/FileLineResolver.h
ldb/Core/Language.h
ldb/Core/Module.h
ldb/Core/ModuleSpec.h
ldb/Core/SearchFilter.h
ldb/Host/FileSpec.h
ldb/Interpreter/CommandCompletions.h
ldb/Symbol/CompileUnit.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/Symbol.h
ldb/Symbol/SymbolFile.h
ldb/Symbol/SymbolVendor.h
ldb/Target/Target.h
43898d79d2a13db64095fcb81bcaf66e7f8de624 25-Aug-2012 Filipe Cabecinhas <me@filcab.net> Added SBDebugger's log callbacks to Python-land

- Tweaked a parameter name in SBDebugger.h so my typemap will catch it;
- Added a SBDebugger.Create(bool, callback, baton) to the swig interface;
- Added SBDebugger.SetLoggingCallback to the swig interface;
- Added a callback utility function for log callbacks;
- Guard against Py_None on both callback utility functions;

- Added a FIXME to the SBDebugger API test;
- Added a __del__() stub for SBDebugger.

We need to be able to get both the log callback and baton from an
SBDebugger if we want to protect against memory leaks (or make the user
responsible for holding another reference to the callback).
Additionally, it's impossible to revert from a callback-backed log
mechanism to a file-backed log mechanism.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162633 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
3e8388ccdc30231f86521e0d2657f80548e3daed 24-Aug-2012 Sean Callanan <scallanan@apple.com> Changed register ValueObjects to report their
expression path in a way that can actually be
resolved by "expr".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162574 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectRegister.h
b8f126a807c00e5c2d0e7faaf764c38072cd6764 24-Aug-2012 Greg Clayton <gclayton@apple.com> The OS plug-in can now get data from a python script that implements the protocol.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162540 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/PythonDataObjects.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
88b980bfd735c4691b7f0771a45a78cb75033564 24-Aug-2012 Greg Clayton <gclayton@apple.com> Added Args::StringForEncoding(), Args::StringToGenericRegister() and centralized the parsing of the string to encoding and string to generic register.

Added code the initialize the register context in the OperatingSystemPython plug-in with the new PythonData classes, and added a test OperatingSystemPython module in lldb/examples/python/operating_system.py that we can use for testing.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162530 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Args.h
ldb/Interpreter/PythonDataObjects.h
3e85b6378d312866ab25eb5623d9b8253bc498f8 24-Aug-2012 Enrico Granata <egranata@apple.com> Hooking up two more calls for the PythonOSPlugin stuff. The part of code to fetch the data and convert it to C++ objects is still missing, but will come

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162522 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
155ee91cc315888c26de1bfebd876bf35b857329 24-Aug-2012 Enrico Granata <egranata@apple.com> Adding bindings to the Script Interpreter for some basic Python OS plugin functionality (still WIP)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162513 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
12477554ee676b775ec419575e1b091fa95bdc80 24-Aug-2012 Greg Clayton <gclayton@apple.com> Switch over to using object instances for all PythonData objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162504 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/PythonDataObjects.h
258db3ab3d02fc013f8674f3c20007c1e86b503d 24-Aug-2012 Johnny Chen <johnny.chen@apple.com> Cope with the case where the user-supplied callbacks want the watchpoint itself to be disabled!
Previously we put a WatchpointSentry object within StopInfo.cpp to disable-and-then-enable the watchpoint itself
while we are performing the actions associated with the triggered watchpoint, which can cause the user-initiated
watchpoint disabling action to be negated.

Add a test case to verify that a watchpoint can be disabled during the callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162483 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
c66662664c44f34f891f39e4e416f766c7347f3c 24-Aug-2012 Enrico Granata <egranata@apple.com> A first version of a bunch of classes that wrap commonly used Python objects in a ref-counting and type-safe C++ API

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162481 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/PythonDataObjects.h
ldb/lldb-forward.h
9f282851b07ff6daee37cd3b1a3fbc43ef11da29 23-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12022079>

Added a new "interpreter" properties to encapsulate any properties for the command interpreter. Right now this contains only "expand-regex-aliases", so you can now enable (disabled by default) the echoing of the command that a regular expression alias expands to:

(lldb) b main
Breakpoint created: 1: name = 'main', locations = 1

Note that the expanded regular expression command wasn't shown by default. You can enable it if you want to:

(lldb) settings set interpreter.expand-regex-aliases true
(lldb) b main
breakpoint set --name 'main'
Breakpoint created: 1: name = 'main', locations = 1

Also enabled auto completion for enumeration option values (OptionValueEnumeration) and for boolean option values (OptionValueBoolean).

Fixed auto completion for settings names when nothing has been type (it should show all settings).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162418 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
ldb/Interpreter/OptionValueBoolean.h
ldb/Interpreter/OptionValueEnumeration.h
ee5bba0f13cac9134ab8f7d23c387891b90e14b3 23-Aug-2012 Jim Ingham <jingham@apple.com> Fix some indenting.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162406 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
d0bdddff8bc6dd5f71492452ce2bbd72fdaa147b 22-Aug-2012 Jim Ingham <jingham@apple.com> Rework how the API mutex is acquired when filling out an ExecutionContext from an ExecutionContextRef,
particularly in the SBThread & SBFrame interfaces. Instead of filling the whole context & then getting
the API mutex, we now get only the target, acquire the API mutex from it, then fill out the rest of the
context. This removes a race condition where you get a ThreadSP, then wait on the API mutex while another
command Destroy's the Thread you've just gotten.
Also fixed the ExecutionContextRef::Get*SP calls so they don't return invalid objects.
Also fixed the ExecutionContext::Has*Scope calls so they don't claim to have a scope if the object representing
that scope has been destroyed.
Also fixed a think-o in Thread::IsValid which was causing it to return the opposite of the desired value.

<rdar://problem/11995490>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162401 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ExecutionContext.h
ldb/Target/Process.h
ldb/Target/Thread.h
c6e82e4a323d7a7168b05365c53c9bc2e0d418e3 22-Aug-2012 Greg Clayton <gclayton@apple.com> Remove further outdated "settings" code and also implement a few missing things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162376 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBStringList.h
ldb/Core/UserSettingsController.h
ldb/Interpreter/OptionValueFileSpec.h
ldb/Interpreter/OptionValueProperties.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/lldb-forward.h
73844aa19a7360b662e2be710fc3c969d6c86606 22-Aug-2012 Greg Clayton <gclayton@apple.com> Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation:
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads

Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162366 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConstString.h
ldb/Core/Debugger.h
ldb/Core/Disassembler.h
ldb/Core/EmulateInstruction.h
ldb/Core/FileSpecList.h
ldb/Core/RegularExpression.h
ldb/Core/StringList.h
ldb/Core/UniqueCStringMap.h
ldb/Core/UserSettingsController.h
ldb/Interpreter/CommandCompletions.h
ldb/Interpreter/NamedOptionValue.h
ldb/Interpreter/OptionGroupBoolean.h
ldb/Interpreter/OptionGroupFile.h
ldb/Interpreter/OptionGroupFormat.h
ldb/Interpreter/OptionGroupOutputFile.h
ldb/Interpreter/OptionGroupUInt64.h
ldb/Interpreter/OptionGroupUUID.h
ldb/Interpreter/OptionGroupVariable.h
ldb/Interpreter/OptionValue.h
ldb/Interpreter/OptionValueArch.h
ldb/Interpreter/OptionValueArgs.h
ldb/Interpreter/OptionValueArray.h
ldb/Interpreter/OptionValueBoolean.h
ldb/Interpreter/OptionValueDictionary.h
ldb/Interpreter/OptionValueEnumeration.h
ldb/Interpreter/OptionValueFileSpec.h
ldb/Interpreter/OptionValueFileSpecList.h
ldb/Interpreter/OptionValueFormat.h
ldb/Interpreter/OptionValuePathMappings.h
ldb/Interpreter/OptionValueProperties.h
ldb/Interpreter/OptionValueRegex.h
ldb/Interpreter/OptionValueSInt64.h
ldb/Interpreter/OptionValueString.h
ldb/Interpreter/OptionValueUInt64.h
ldb/Interpreter/OptionValueUUID.h
ldb/Interpreter/OptionValues.h
ldb/Interpreter/Property.h
ldb/Target/PathMappingList.h
ldb/Target/Platform.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/lldb-forward.h
ldb/lldb-private-enumerations.h
ldb/lldb-private-types.h
f84e566ff66dceb58674494b26408d3c83921ab9 22-Aug-2012 Johnny Chen <johnny.chen@apple.com> Fix test failures in TestWatchpointIter.py due to http://llvm.org/viewvc/llvm-project?rev=162322&view=rev.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162328 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
f590be8aaa0aba484d828019111d61dff33b273e 20-Aug-2012 Filipe Cabecinhas <me@filcab.net> A baton isn't needed to dispatch input.

I also added a typemap to make DispatchInput usable in Python.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162204 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
f68a2050b1a85de977829ffb7e327a991fddad33 18-Aug-2012 Jason Molenda <jmolenda@apple.com> Some eh_frame unwind instructions will define a return address register;
when you want to find the caller's saved pc, you look up the return address
register and use that. On arm, for instance, this would be the contents of
the link register (lr).

If the eh_frame CIE defines an RA, record that fact in the UnwindPlan.

When we're finding a saved register, if it's the pc, lok for the location
of the return address register instead.

<rdar://problem/12062310>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162167 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/DWARFCallFrameInfo.h
ldb/Symbol/UnwindPlan.h
8165d43ee84ab51de9218ba38bea257d082cec1f 18-Aug-2012 Johnny Chen <johnny.chen@apple.com> Merge python-GIL bracnh (by filcab) back into trunk!


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162161 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreterPython.h
8121d7a8df909c2b8e9e0da92c39350b43b4dff8 18-Aug-2012 Johnny Chen <johnny.chen@apple.com> Fix a race condition where multiple PythonInputReaderManager instances could, during destruction,
tread on the m_embedded_thread_input_reader_sp singleton maintained by the script interpreter.
Furthermore, use two additional slots under the script interpreter to store the PseudoTerminal and
the InputReaderSP pertaining to the embedded python interpreter -- resulted from the
ScriptInterpreterPython::ExecuteInterpreterLoop() call -- to facilitate separation from what is being
used by the PythonInputReaderManager instances.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162147 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreterPython.h
0b09366e83f256920bb55ec7488cb58dfa85ab6b 14-Aug-2012 Johnny Chen <johnny.chen@apple.com> When trying to take snapshots of a watched variable, if the frame is unable to evaluate the variable expression,
do not take the sanpshot and forget about the stop info. It is possible that the variable expression has gone
out of scope, we'll revise the hit count due to the false alarms.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161892 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
c9c2a9b1c36e54220369c37cd8d859ed423d5b59 14-Aug-2012 Johnny Chen <johnny.chen@apple.com> Simplify the "Watchpoint ... hit" printout, make it more terse.
Change the test case, too.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161806 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
9e98559420d8c7c248b0c75b48db65ffd878402b 13-Aug-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/12007576

Record the snapshot of our watched value when the watchpoint is set or hit.
And report the old/new values when watchpoint is triggered. Add some test scenarios.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161785 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
9880efacdd3a5e855b405d89433a01170422a889 11-Aug-2012 Jim Ingham <jingham@apple.com> Add explicit casts to bool in "shared pointer is valid" constructs that return bool.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161719 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ExecutionContext.h
4fa86fef917b43f9573e5adfee4a4d005059dcae 11-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11791234>

Fixed an issue that could cause references the shared data for an object file to stay around longer than intended and could cause memory bloat when debugging multiple times.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161716 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/DWARFExpression.h
f3ec4617297810223deb545cb68214ca4dd8009c 10-Aug-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11457143 [ER] need "watchpoint command ..."

Add 'watchpoint command add/delete/list' to lldb, plus two .py test files.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161638 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointOptions.h
ldb/Breakpoint/Watchpoint.h
ldb/Breakpoint/WatchpointOptions.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/lldb-forward.h
ldb/lldb-private-interfaces.h
879de484c7ef1d0971ac6c007b319b8285723e69 10-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11578397> Adding a new --summary-string option for the frame variable command which allows the user to provide a summary string with which he wants to display the variables without having to make a named summary first

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161623 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/NamedOptionValue.h
ldb/Interpreter/OptionGroupVariable.h
535543d6104ee45b4503db6bb6c175e66d0e093b 09-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/10449092> Adding a new uppercase hex format specifier. This commit also changes the short names for formats so that uppercase hex can be 'X', which was previously assigned to hex float. hex float now has no short name.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161606 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
1e1e6cb5314a8f31630dc817a52fb68a70b623fe 09-Aug-2012 Sean Callanan <scallanan@apple.com> LLDB no longer prints <no result> by default if
the expression returns nothing. There is now a
setting, "notify-void." When the user enables
that setting, lldb prints (void) if an expression's
result is void. Otherwise, lldb is silent.

<rdar://problem/11225150>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161600 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
12213586035d4af8f200e5c8ab4642728f8c5f30 09-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11505459> Stripping off the object's type from the output of the 'po' command

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161592 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
f46695699eba3a0afa5e339aa3224e44af9cd8bf 09-Aug-2012 Greg Clayton <gclayton@apple.com> Fixed the delay that was happening when quitting lldb from the command line. We weren't initializing the command pipes when constructing a ConnectionFileDescriptor with a file descriptor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161533 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConnectionFileDescriptor.h
96abc62dcb25159dbb532e477ba2cf6d85b81700 08-Aug-2012 Sean Callanan <scallanan@apple.com> Added a 'void' format so that the user can manually
suppress all non-error output from the "expression"
command.

<rdar://problem/11225150>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161502 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-enumerations.h
b42f1c8bc38f7af2d687dc1cf5392cf51d6890b4 07-Aug-2012 Sean Callanan <scallanan@apple.com> Changed the Opcode::GetData() API so that it didn't
require an AddressClass, which is useless at this
point since it already knows the distinction between
32-bit Thumb opcodes and 32-bit ARM opcodes.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161382 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Opcode.h
1424a5e6a6baa6dc1f8e39139da2ff8b67634c91 07-Aug-2012 Sean Callanan <scallanan@apple.com> Improved raw disassembly output for Thumb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161360 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Opcode.h
5016669dbf02ab7e7f94ba5dae942e731ef00d0e 04-Aug-2012 Johnny Chen <johnny.chen@apple.com> Pull in cxa_demangle.cpp/.h from llvm's libcxxabi project. Change the namespace to lldb_cxxabiv1 for the time being.
Mangled.cpp is not wired in to call it yet.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161293 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/cxa_demangle.h
5a60f5e8c81e8263e0d8af85a4f1e6cd1594970a 04-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12027563> Making sure that some class of stop-hook commands that involve po'ing objects do not cause an endless recursion

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161271 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
4f28c31e4b652a842ce6138b70ded44ffb3e8c48 01-Aug-2012 Sean Callanan <scallanan@apple.com> Instructions generated by a disassembler can now
keep a shared pointer to their disassembler. This
is important for the LLVM-C disassembler because
it needs to lock its parent in order to disassemble
itself.

This means that every interface that returned a
Disassembler* needs to return a DisassemblerSP, so
that the instructions and any external owners share
the same reference count on the object. I changed
all clients to use this shared pointer, which also
plugged a few leaks.

<rdar://problem/12002822>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161123 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Disassembler.h
ldb/Target/ThreadPlanTracer.h
f6132ef983e8a5b98fbe5e184f5128eff8c04730 01-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11275622>

Added new API to lldb::SBTypeMember for bitfields:

bool SBTypeMember::IsBitfield();
uint32_t SBTypeMember::GetBitfieldSizeInBits();

Also added new properties for easy access. Now SBTypeMember objects in python have a "fields" property for all type fields, "bases" for all direct bases, "vbases" for all virtual base classes and "members" for a combo of all three organized by bit offset. They all return a python list() of SBTypeMember objects. Usage:
(lldb) script
>>> t = lldb.target.FindFirstType("my_type")
>>> for field in t.fields:
... print field
>>> for vbase in t.vbases:
... print vbase
>>> for base in t.bases:
... print base
>>> for member in t.members:
... print member

Also added new "is_bitfield" property to the SBTypeMember objects that will return the result of SBTypeMember::IsBitfield(), and "bitfield_bit_size" which will return the result of SBTypeMember::GetBitfieldSizeInBits();

I also fixed "SBTypeMember::GetOffsetInBytes()" to return the correct byte offset.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161091 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/Type.h
5d90ade8e8e0d776fe8e1b9e88fc1c86d02e8e4e 28-Jul-2012 Jim Ingham <jingham@apple.com> Added an lldb_private & equivalent SB API to send an AsyncInterrupt to the event loop.
Convert from calling Halt in the lldb Driver.cpp's input reader's sigint handler to sending this AsyncInterrupt so it can be handled in the
event loop.
If you are attaching and get an async interrupt, abort the attach attempt.
Also remember to destroy the process if get interrupted while attaching.
Getting this to work also required handing the eBroadcastBitInterrupt in a few more places in Process WaitForEvent & friends.

<rdar://problem/10792425>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160903 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
73f6b49b568f48755bb5058a3db679c3b9093682 25-Jul-2012 Jim Ingham <jingham@apple.com> Add a call to "sync" a thread state before checkpointing registers in preparation for
calling functions. This is necessary on Mac OS X, since bad things can happen if you set
the registers of a thread that's sitting in a kernel trap.

<rdar://problem/11145013>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160756 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/RegisterContext.h
1850f94688f9362c78c27e5472afe022a56c08df 21-Jul-2012 Sean Callanan <scallanan@apple.com> Added a fix that allows newly-constructed objects
to returned by expressions, by removing the
__cxa_atexit call that would normally cause these
objects to be destroyed. This also prevents many
errors of the form

Couldn't rewrite one of the arguments of a function call
error: Couldn't materialize struct: Structure hasn't been laid out yet

<rdar://problem/11309402>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160596 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/IRForTarget.h
3a458eb1e413d39546b664813bba9f9ac292357e 20-Jul-2012 Jim Ingham <jingham@apple.com> Add "vAttachOrWait" to debugserver, so you can implement "attach to the process if it exists OR wait for it" without race conditions. Use that in lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160578 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
ldb/Target/Process.h
02300fbed6008f033db4055f2db8dca265d42a2f 19-Jul-2012 Greg Clayton <gclayton@apple.com> Fixed the file header to match the filename.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160524 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-private-enumerations.h
40c10a5d63c29a5bd13291d234b0fc7650f91eee 19-Jul-2012 Greg Clayton <gclayton@apple.com> Fixed the comment for the lldb_private::PathType enumerations.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160523 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-private-enumerations.h
c02400422d5e644a2a486bce5517d46d435a3f02 19-Jul-2012 Greg Clayton <gclayton@apple.com> Cleaned up the lldb_private::Mangled class to get rid of the tokenizing code that has bit rotted and isn't being used. Also cleaned up the API to the "lldb_private::Mangled" to always take "const ConstString &" arguments instead of both "const ConstString &" and "const char *".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160466 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Mangled.h
9b98ffdf151138af70f184c8b5b0b32c8e5c3e31 18-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10998370>

Improved the error message when we can find a function in the current program by printing the demangled name.

Also added the ability to create lldb_private::Mangled instances with a ConstString when we already have a ConstString for a mangled or demangled name. Also added the ability to call SetValue with a ConstString and also without a boolean to indicate if the string is mangled where we will now auto-detect if the string is mangled.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160450 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Mangled.h
090d19b89ab067916de9405aa5579c947e7ce41b 18-Jul-2012 Greg Clayton <gclayton@apple.com> Cleaned up incorrect STL std::map comparison code and use the operator == on std::map objects instead of manually implementing the comparisons. Also modified the UnwindPlan::AppendRow() function to take a "const RowSP &" object so we don't have to copy shared pointers when calling this function.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160448 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/UnwindPlan.h
a092d901bec2beaed29603acad318d8d93da3f4a 17-Jul-2012 Jason Molenda <jmolenda@apple.com> Change UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly so it records
the state of the unwind instructions once the prologue has finished. If it hits an
early return epilogue in the middle of the function, re-instate the prologue after that
epilogue has completed so that we can still unwind for cases where the flow of control
goes past that early-return. <rdar://problem/11775059>

Move the UnwindPlan operator== definition into the .cpp file, expand the definition a bit.

Add some casts to a SBCommandInterpreter::HandleCompletion() log statement so it builds without
warning on 64- and 32-bit systems.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160337 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/UnwindPlan.h
b4386999feb061d76a5d24fa6731898731f1e071 17-Jul-2012 Jim Ingham <jingham@apple.com> Lock around reading as well as connecting & disconnecting so we don't start reading after
someone has set our file descriptor to -1 and crash in FD_SET...
<rdar://problem/11653966>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160336 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConnectionFileDescriptor.h
6cca9695637b27bd583eaae310d5c09dede7cc49 17-Jul-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11672978> Fixing an issue where an ObjC object might come out without a description because the expression used to obtain it would timeout before running to completion

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160326 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangUserExpression.h
ldb/Target/Target.h
68fa4ec4361d1ea5a78a8a7eba2b8015e3dd68f7 14-Jul-2012 Jason Molenda <jmolenda@apple.com> Switch nearly all of the use of the UnwindPlan::Row's to go through
a shared pointer to ease some memory management issues with a patch
I'm working on.

The main complication with using SPs for these objects is that most
methods that build up an UnwindPlan will construct a Row to a given
instruction point in a function, then add additional regsaves in
the next instruction point to that row and push it again. A little
care is needed to not mutate the previous instruction point's Row
once these are switched to being held behing shared pointers.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160214 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/UnwindPlan.h
b3a1a2bba41281ba56a99fe64887a8a04760784c 14-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11870357>

Allow "frame variable" to find ivars without the need for "this->" or "self->".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160211 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Block.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/SymbolContext.h
ldb/Symbol/VariableList.h
ldb/Target/StackFrame.h
7de2a3b03f37987c67f142ce328cc2484c831468 14-Jul-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11782789> Changes to the watchpoint implementation on ARM so that we single-step before stopping at the WP. This is necessary because on ARM the WP triggers before the opcode is actually executed, so we would be unable to continue since we would keep hitting the WP. We work around this by disabling the WP, single stepping and then putting the WP back in place.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160199 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/Target/StopInfo.h
efbdd2280873cc87634bf4f4a37ab8b99662522a 13-Jul-2012 Jim Ingham <jingham@apple.com> Add accessors on process to get & set the selected thread by IndexID (useful since that's the one that "thread list" shows and it won't get reused even if the underlying system thread ID gets reused.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160187 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
cbacba1f223ee4819a4b99924dd994c7e52fdf04 13-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11740973>

Fixed issues that could happen when the UUID doesn't change in a binary and old stale debug info could end up being used.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160145 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
bcaf99a74367d464dd38011e26b9b4be56b503ba 12-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11791234>

Fixed a case where the python interpreter could end up holding onto a previous lldb::SBProcess (probably in lldb.process) when run under Xcode. Prior to this fix, the lldb::SBProcess held onto a shared pointer to a lldb_private::Process. This in turn could cause the process to still have a thread list with stack frames. The stack frames would have module shared pointers in the lldb_private::SymbolContext objects.

We also had issues with things staying in the shared module list too long when we found things by UUID (we didn't remove the out of date ModuleSP from the global module cache).

Now all of this is fixed and everything goes away between runs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160140 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Core/ModuleList.h
ldb/Interpreter/CommandInterpreter.h
3ce4df5be58f188270210927a6e25a0192b60efc 12-Jul-2012 Jim Ingham <jingham@apple.com> Add a command channel to wait on along with the file descriptor the ConnectionFileDescriptor class is managing, so we can always pop ourselves out of our select call regardless of how well behaved the channel we are talking to is.

<rdar://problem/11448282>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160100 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConnectionFileDescriptor.h
c529786f590044117cc96f55137ea7db4e1b92ed 12-Jul-2012 Sean Callanan <scallanan@apple.com> Added a mutex to the call frame info to guard
generation of the FDE index.

<rdar://problem/11813705>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160099 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/DWARFCallFrameInfo.h
5b0afcceea3807fa8f518e0138f0a8043dfc3315 12-Jul-2012 Jason Molenda <jmolenda@apple.com> Add a new 'target modules show-unwind' command to show the different
UnwindPlans for a function. This specifically does not use any
previously-generated UnwindPlans so if any logging is performed
while creating the UnwindPlans, it will be repeated. This is
useful for when an lldb stack trace is not correct and you want
to gather diagnostic information from the user -- they can do
log enable -v lldb unwind, image show-unwind of the function, and
you'll get the full logging as the UnwindPlans are recreated.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160095 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/UnwindTable.h
941f5da5f0fd38bfe5510f54a387c833bd71d2c4 12-Jul-2012 Greg Clayton <gclayton@apple.com> Modifying the "address" format, which prints a pointer and a description of what it points to, to detect when the deref of that pointer points to something valid. So if you have:

% cat sp.cpp
#include <tr1/memory>

class A
{
public:
A (): m_i (12) {}
virtual ~A() {}
private:
int m_i;
};

int main (int argc, char const *argv[], char const *envp[])
{
A *a_pointers[2] = { NULL, NULL };
A a1;
A a2;
a_pointers[0] = &a1;
a_pointers[1] = &a2;
return 0;
}


And you stop at the "return 0", you can now read memory using the "address" format and see:

(lldb) memory read --format address `&a_pointers`
0x7fff5fbff870: 0x00007fff5fbff860 -> 0x00000001000010b0 vtable for A + 16
0x7fff5fbff878: 0x00007fff5fbff850 -> 0x00000001000010b0 vtable for A + 16
0x7fff5fbff880: 0x00007fff5fbff8d0
0x7fff5fbff888: 0x00007fff5fbff8c0
0x7fff5fbff890: 0x0000000000000001
0x7fff5fbff898: 0x36d54c275add2294
0x7fff5fbff8a0: 0x00007fff5fbff8b0
0x7fff5fbff8a8: 0x0000000100000bb4 a.out`start + 52

Note the extra dereference that was applied to 0x00007fff5fbff860 and 0x00007fff5fbff850 so we can see that these are "A" classes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160085 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Address.h
a7d3dc75ec4f46033c3f991f11fb58a058091a85 11-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11852100>

The "stop-line-count-after" and "stop-line-count-before" settings are broken. This fixes them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160071 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StackFrame.h
ldb/Target/StackFrameList.h
ldb/Target/Thread.h
b23bb8e26f227795ba89d79663d5a21951cddb9e 09-Jul-2012 Filipe Cabecinhas <me@filcab.net> Fixed typos found while reading commit logs.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159930 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/EmulateInstruction.h
7fad24a9fd7226016b28fef78930501a1bef898c 09-Jul-2012 Jason Molenda <jmolenda@apple.com> Simplify the CreateDefaultUnwindPlan methods for the x86 and arm unwinders
a bit -- we're creating the UnwindPlan here, we can set the register set to
whatever is convenient for us, no need to handle different register sets.

A handful of small comment fixes I noticed while reading through the code.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159924 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/EmulateInstruction.h
545762f7780bece4e9255e052c0a50a1ea66ce57 07-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11357711>

Fixed a crasher where the section load list was not thread safe.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159884 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/SectionLoadList.h
0d0f56d5b81afb0f3d2e71c53947658a4c667f35 07-Jul-2012 Greg Clayton <gclayton@apple.com> Make const result value objects able to return dynamic types.

Modified the heap.py to be able to correctly indentify the exact ivar for the "ptr_refs" command no matter how deep the ivar is in a class hierarchy. Also fixed the ability for the heap command to symbolicate the stack backtrace when MallocStackLogging is set in the environment and the "--stack" option was specified.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159883 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Core/ValueObjectConstResult.h
ldb/Core/ValueObjectDynamicValue.h
96f6df8db3ce08861efe8d061b1daef328a4a4c0 06-Jul-2012 Sean Callanan <scallanan@apple.com> Since SBTarget::FindFunctions returns a
SBSymbolContextList, we should include the
relevant header file.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159840 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
06b84494c72ceb559ca07ff5e2ccd2fe645b6363 04-Jul-2012 Jim Ingham <jingham@apple.com> Work around some problems destroying a process with older debugservers.

rdar://problem/11359989


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159697 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
86827fbccc9a4d1f9993d74940f724d63d826e45 02-Jul-2012 Jim Ingham <jingham@apple.com> Add an "extra-startup-commands" process setting so we can send some command strings to the actual process plugin to interpret as it wishes.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159511 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/Target/Target.h
d8746660cdb10ecf2402b5c36b82c2f6678b62ee 29-Jun-2012 Greg Clayton <gclayton@apple.com> Spelling fixes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159467 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Utility/CleanUp.h
5c5a38e7c640e9448241ec2aca0c60047ec3273c 28-Jun-2012 Greg Clayton <gclayton@apple.com> Added the ability to read the dSYM plist file with source remappings even when DebugSymbols isn't used to find the dSYM. We now parse the plist as XML in the MacOSX symbol vendor.

Added the ability to get a section load address given a target which is needed for a previous checking which saves crashlogs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159298 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBSection.h
ldb/API/SBTarget.h
ldb/Target/PathMappingList.h
839de396873071d193ed76b0206686af41540962 27-Jun-2012 Jim Ingham <jingham@apple.com> Make a way to set the result status for Python defined commands, and don't overwrite the status of the result if
the python command has set it.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159273 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandReturnObject.h
fdbd10abe4f1f0e97647355823a8e2cd5f50856b 27-Jun-2012 Jim Ingham <jingham@apple.com> Fix ignore counts on breakpoints so they actually work.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159233 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/StoppointLocation.h
088684d31c66df959fa2f3840f00b73b79b07756 09-Jun-2012 Jim Ingham <jingham@apple.com> Change the Mutex::Locker class so that it takes the Mutex object and locks it, rather
than being given the pthread_mutex_t from the Mutex and locks that. That allows us to
track ownership of the Mutex better.

Used this to switch the LLDB_CONFIGURATION_DEBUG enabled assert when we can't get the
gdb-remote sequence mutex to assert when the thread that had the mutex releases it. This
is generally more useful information than saying just who failed to get it (since the
code that had it locked often had released it by the time the assert fired.)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158240 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Mutex.h
da26bd203cbb104291b39891febf7481794f205f 08-Jun-2012 Jim Ingham <jingham@apple.com> Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an
Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how
to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs.

Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for
the overall command and moved them into the .cpp file.

Made the CommandObject flags work for raw as well as parsed commands.

Made "expr" use the flags so that it requires you to be paused to run "expr".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158235 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
ldb/Interpreter/CommandObjectCrossref.h
ldb/Interpreter/CommandObjectMultiword.h
ldb/Interpreter/CommandObjectRegexCommand.h
716a6647382d32ea9859027f7eea07e6ff2acf76 08-Jun-2012 Sean Callanan <scallanan@apple.com> Committed a change to the SectionList that introduces
a cache of address ranges for child sections,
accelerating lookups. This cache is built during
object file loading, and is then set in stone once
the object files are done loading. (In Debug builds,
we ensure that the cache is never invalidated after
that.)


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158188 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Section.h
f90b5f34b87e0c1354b4d6f3d24830e69a2949a0 08-Jun-2012 Sean Callanan <scallanan@apple.com> Added a setting (target.process.disable-memory-cache)
that controls whether memory is cached. This is off
by default (i.e., memory is cached) because it greatly
improves performance.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158173 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
a1ba314f3c8eb40424547836769e93f9b65e7969 07-Jun-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11538779> Fixing issues where Python scripts were not able to read user input and/or display output to the user in certain situations - This fix introduces a Python InputReader manager class that mimics the behavior of the interactive interpreter in terms of access to I/O and ensures access to the input and output flows

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158124 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterNone.h
ldb/Interpreter/ScriptInterpreterPython.h
07fb7b2f3eca0262ba0824cfb93c0a7e20d911fd 06-Jun-2012 Johnny Chen <johnny.chen@apple.com> Update wording for the member field m_error.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158095 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Watchpoint.h
a442da2c8213b09b6b3869c8e30b5d98023ed7ba 06-Jun-2012 Jim Ingham <jingham@apple.com> Add the SBWatchpoint::GetError back, we have clients who use it.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158092 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBWatchpoint.h
4389256aecd2693109969c21fa2f00c4612320b3 06-Jun-2012 Jim Ingham <jingham@apple.com> Make sure that when if we are going to Halt while the process is in the middle of HandlePrivateEvent we
wait till that is done. We need a stronger way to do this, but in practice this works and using some locking
strategy is harder because Halt & HandlePrivateEvent generally happen on different threads.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158042 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
9d0f5082c651aca3e828ccf64fbf84c1bccd54f7 06-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11598332

The output of 'register read' should be prettier.
Modify RegisterValue::Dump() to take an additional parameter:

uint32_t reg_name_right_align_at

which defaults to 0 (i.e., no alignment at all). Update the 'register read' command impl to pass 8
as the alignment to RegisterValue::Dump() method. If more sophisticated scheme is desired, we will
need to introduce an additional command option to 'register read' later on.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158039 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RegisterValue.h
8acac7b9c552f670b0fa2e9b618a6a69f2ea36ff 06-Jun-2012 Jim Ingham <jingham@apple.com> Whitespace cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158032 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
e4b5ec026712d56f3cc259900f13158c47cb4d73 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11597911

Fix confusing error message about "expression did not evaluate to an address" when doing 'watchpoint set expression".
Instead of using 0 as the fail_value when invoking ValueObject::GetValueAsUnsigned(), modify the API to take an addition
bool pointer (defaults to NULL) to indicate success/failure of value conversion.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158016 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
8a5ce77ad5356af485a119186fc2ad536d21149b 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> Cannot break the existing API client of SBValue::Watch(bool resolve_location, bool read, bool write).
Leave this method in the codebase for a while.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157967 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
3f883496e92fce5011f6bf585af3ac6d1cddb64f 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11584012

Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee()
now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the
operation. Update 'watchpoint set variable/expression' commands to take advantage of that.

Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for
SBTarget::WatchAddress() by passing an invalid watch_size.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157964 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
ldb/API/SBValue.h
ldb/API/SBWatchpoint.h
ldb/Target/Target.h
1e0e73a403ffbbeafa7a98e958909b56be929cf0 04-Jun-2012 Johnny Chen <johnny.chen@apple.com> Give more explicit error messages when watchpoint creation command (watchpoint set) fails,
like number of supported hardware watchpoints reached or the watch size is not allowed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157948 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupWatchpoint.h
b7b2532bf23c852ea3e43d10f2377338be5b464f 01-Jun-2012 Jim Ingham <jingham@apple.com> When the Platform launches a process for debugging, make sure it goes into a separate process group, otherwise ^C will both cause us to try to Stop it manually, AND send it a SIGINT, which can confuse us.

rdar://problem/11369230

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157791 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/lldb-enumerations.h
01bc2d493b48e4904e3241a7768e18fdd9bb6835 31-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11328896> Fixing a bug where regex commands were saved in the history even if they came from a 'command sourced' file - this fix introduces a command sourcing depth and disables history for all levels of depth > 0, which means no commands go into history when being sourced from a file. we need an integer depth because command files might themselves source other command files, ...

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157727 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandInterpreter.h
9336790a758b8f8b87d95e6658bb8fdb34766c2f 30-May-2012 Jim Ingham <jingham@apple.com> We were accessing the ModuleList in the target without locking it for tasks like
setting breakpoints. That's dangerous, since while we are setting a breakpoint,
the target might hit the dyld load notification, and start removing modules from
the list. This change adds a GetMutex accessor to the ModuleList class, and
uses it whenever we are accessing the target's ModuleList (as returned by GetImages().)

<rdar://problem/11552372>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157668 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
e23940fece748f8702bb5bc2383af19bb97275dd 29-May-2012 Johnny Chen <johnny.chen@apple.com> Fix arch_helper() to return the list of supported architectures.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157643 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/StreamString.h
dc43bbf5ec5cb2e92da9250cdea0b3ebcdccefc0 26-May-2012 Greg Clayton <gclayton@apple.com> Fixed memory management issues introduced by revision 157507.

A local std::string was being filled in and then the function would return "s.c_str()".
A local StreamString (which contains a std::string) was being filled in, and essentially also returning the c string from the std::string, though it was in a the StreamString class.

The fix was to not do this by passing a stream object into StringList::Join() and fix the "arch_helper()" function to do what it should: cache the result in a global.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157519 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/StringList.h
746323a3deff83edfc0cfd60aab136d43a78b7c8 26-May-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11535045

Make 'help arch' return the list of supported architectures.
Add a convenience method StringList::Join(const char *separator) which is called from the help function for 'arch'.
Also add a simple test case.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157507 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/StringList.h
04e6ada409d714592c7ab18b5b5472a5229d63d2 25-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11534686>

Reading memory from a file when the section is encrypted doesn't show an error. No we do.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157484 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Disassembler.h
7c09997f9a65bdfd9a0cbd7783d5a5f0a9f83646 24-May-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11457634

Supports the use-case scenario of immediately continuing the process once attached.
Add a simple completion test case from "process attach --con" to "process attach --continue ".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157361 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
191343e7213d3d717327319352d086f981fa8e58 24-May-2012 Johnny Chen <johnny.chen@apple.com> Add SBProcess::GetNumSupportedHardwareWatchpoints() API and export it through the Python scripting bridge.
Add/modify some test cases.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157353 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
7cbdcfb0cefcfd877b507ff2d83e51a1bde3fcc7 23-May-2012 Johnny Chen <johnny.chen@apple.com> Add the capability to display the number of supported hardware watchpoints to the "watchpoint list" command.

Add default Process::GetWatchpointSupportInfo() impl which returns an error of "not supported".
Add "qWatchpointSupportInfo" packet to the gdb communication layer to support this, and modify TestWatchpointCommands.py to test it.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157345 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
293b98f5e24ef736766db37feedfefd3b215a0ce 22-May-2012 Filipe Cabecinhas <me@filcab.net> Remove trailing semicolons.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157240 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Broadcaster.h
ldb/Core/Disassembler.h
ldb/Core/SearchFilter.h
ldb/Core/SourceManager.h
ldb/Target/LanguageRuntime.h
ldb/Target/Process.h
2cf5ccbbbe3343a6c973d0d65ad5de178a414e30 22-May-2012 Jim Ingham <jingham@apple.com> Also push file & line breakpoints past the prologue. Also added a "-K" argument to the relevant
"break set" commands to set this per breakpoint. Also, some CreateBreakpoint API's in the lldb_private
namespace had "internal" first and "skip_prologue" second. "internal should always be last. Fixed that.

rdar://problem/11484729


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157225 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointResolverFileLine.h
ldb/Target/Target.h
39d1af981f6a76603356fd84b2e9372a9172297c 21-May-2012 Sean Callanan <scallanan@apple.com> Fixed a nasty bug where JIT expressions didn't work
when stopped in a const method. Also updated our
testsuite to ensure that JIT is forced in this case.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157208 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
6b1763b5ab8f182029807293d74a66e1e1c6bafd 21-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11355592> Fixing a bug where we would incorrectly try and determine a dynamic type for a variable of a pointer type that is not a valid generic type for dynamic pointers.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157190 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Target/Process.h
f7d782b70647870cdf3c2683b3a027660a9534d5 19-May-2012 Filipe Cabecinhas <me@filcab.net> Fixes the case where we created a dummy target, deleted it, and then tried to evaluate an expression with no target.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157110 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
dd29b97f71187509df339596c3397dea0e429754 19-May-2012 Greg Clayton <gclayton@apple.com> Found a quick way to improve the speed with which we can read object files from memory when they are in the shared cache: always read the symbol table strings from memory and let the process' memory cache do the work.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157083 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
cf5927ee246f5e431162f2753ed9e040dd060fe5 18-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11386214>
<rdar://problem/11455913>

"target symbol add" should flush the cached frames
"register write" should flush the thread state in case registers modifications change stack




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157042 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ldb/Target/Thread.h
ldb/Target/ThreadList.h
03e5e512252fc7971430027d8ea05f64576bcbb3 17-May-2012 Jim Ingham <jingham@apple.com> If we notice that a module with a given file path is replaced by another with the same file
path on rerunning, evict the old module from the target module list, inform the breakpoints
about this so they can do something intelligent as well.

rdar://problem/11273043


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157008 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointList.h
ldb/Core/ModuleList.h
1c4ae3e669a5b2aa0ba0850f8e880eb9fefb719a 16-May-2012 Jim Ingham <jingham@apple.com> Add an accessor on SBBreakpointLocation to get its location ID.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156891 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBBreakpointLocation.h
45c47aabcb6b1b3861fd15e8cbe2fc7d7d44a71f 16-May-2012 Jason Molenda <jmolenda@apple.com> Add LLDB_DISABLE_PYTHON around newly added methods in
DataVisualization.h / DataVisualization.cpp / ValueObject.cpp
and
FormatManager.h / FormatManager.cpp


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156886 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataVisualization.h
ldb/Core/FormatManager.h
e585240956453d98413a0f9461a04500f9cba605 16-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11246147>

Make sure our debugger STDIN read thread shuts down quickly when we are done with it. We had a case where the owner of the file handle was not closing it and caused spins.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156879 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
08af5983cb349e7167f3832d00d36ca611bfa2f1 16-May-2012 Johnny Chen <johnny.chen@apple.com> Include llvm/ADT/STLExtras.h from lldb/Utility/Utils.h and use llvm::array_lengthof(), instead.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156876 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Utility/Utils.h
0cbaacd31bce2f37aaa9ecb2f31b3e8bf84d25b4 15-May-2012 Greg Clayton <gclayton@apple.com> Modified "image lookup -t <typename>" to expand typedefs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156845 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Type.h
bd5c23ddf5bacc78548bbe348c8c5d98c372aedc 15-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11240464>

Correctly unique a class' methods when we detect that a class has been uniqued to another.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156795 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Platform.h
ldb/Target/Target.h
d82bc6d623930e796d596d190399ec2450980e0f 12-May-2012 Jim Ingham <jingham@apple.com> Found one more place where the OkayToDiscard needs to be consulted.
Also changed the defaults for SBThread::Step* to not delete extant plans.
Also added some test cases to test more complex stepping scenarios.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156667 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
110b55f22f8cda703c4fb6f1c2affb8ccbef215b 11-May-2012 Jim Ingham <jingham@apple.com> Don't try to use "OkayToDiscard" to mean BOTH this plan is a user plan or not AND unwind on error.

rdar://problem/11419156


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156627 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanCallFunction.h
0fef968c843be422d6facc2e8d54d8471eee88ed 10-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11330621>

Fixed the DisassemblerLLVMC disassembler to parse more efficiently instead of parsing opcodes over and over. The InstructionLLVMC class now only reads the opcode in the InstructionLLVMC::Decode function. This can be done very efficiently for ARM and architectures that have fixed opcode sizes. For x64 it still calls the disassembler to get the byte size.

Moved the lldb_private::Instruction::Dump(...) function up into the lldb_private::Instruction class and it now uses the function that gets the mnemonic, operandes and comments so that all disassembly is using the same code.

Added StreamString::FillLastLineToColumn() to allow filling a line up to a column with a character (which is used by the lldb_private::Instruction::Dump(...) function).

Modified the Opcode::GetData() fucntion to "do the right thing" for thumb instructions.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156532 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Disassembler.h
ldb/Core/Opcode.h
ldb/Core/StreamString.h
038fa8e30621e0e55faed3479387d811986f28b7 10-May-2012 Jim Ingham <jingham@apple.com> If the ObjC Step Through Trampoline plan causes a target crash, properly propagate the error back to
the controlling plans so that they don't lose control.

Also change "ThreadPlanStepThrough" to take the return StackID for its backstop breakpoint as an argument
to the constructor rather than having it try to figure it out itself, since it might get it wrong whereas
the caller always knows where it is coming from.

rdar://problem/11402287


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156529 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadPlanCallFunction.h
ldb/Target/ThreadPlanStepThrough.h
f92ddcc2fda5ca564acc37d2fecd4b577dfc2bde 09-May-2012 Jim Ingham <jingham@apple.com> Print out a notification when the process of a target other than the currently selected target stops.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156433 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/Target/TargetList.h
07baf83fe7ae25ac87d38cd4fc19647b020adfad 08-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11338654> Fixing a bug where having a summary for a bitfield without a format specified would in certain cases crash LLDB - This has also led to refactoring the by-type accessors for the data formatter subsystem. These now belong in our internal layer, and are just invoked by the public API stratum

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156429 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTypeNameSpecifier.h
ldb/Core/DataVisualization.h
ldb/Core/FormatManager.h
651cbe2e3f6efb8bd579a5007c2d2f90f0ab7633 08-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11239650> Fixing a bug where the SetValueFromCString() method failed to operate on dynamic values. The fix consists in making the set operation fall through to the parent. We only actually allow this if the dynamic value is at a 0-offset from the parent, or the new value is 0. Other scenarios would need agreement on the actual meaning of the set operation (do we keep offsetting? do we just assume the user knows what they are doing?) so we prevent them, and let the expression parser deal with the complexity

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156422 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectRegister.h
d9488c8ba7df755686f38a91bd3f9a9270a5a128 08-May-2012 Enrico Granata <egranata@apple.com> Removing spurious friend declaration

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156398 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
4758a3ced524198d2cf9c50bab9b088adcbda9cb 08-May-2012 Enrico Granata <egranata@apple.com> First part of a fix to make GetNonSyntheticValue() work correctly

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156397 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectSyntheticFilter.h
b170aee2daacc83e3d71c3e3acc9d56c89893a7b 08-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11358639>

Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples.

Also make the selection process for auto selecting platforms based off of an arch much better.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156354 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBInstruction.h
ldb/Core/ArchSpec.h
ldb/Interpreter/OptionGroupPlatform.h
ldb/Target/Platform.h
6f4a115d1f0727f80124e2986382df202ffd3d5e 08-May-2012 Johnny Chen <johnny.chen@apple.com> Updated to a more meaningful macro name.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156340 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-defines.h
609237174ea7894f36e0af1bdb333eade79aedb7 08-May-2012 Johnny Chen <johnny.chen@apple.com> Fix the problem that 'help breakpoint set' is printing a lot of redundant lines.
Correctly specify the LLDB_OPT_SET's that the 'shlib' command option belongs to by using a newly added macro like this:

#define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM(1, 10) & ~LLDB_OPT_SET_10 )

rdar://problem/11393864


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156337 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-defines.h
8533e994d3076ef517e2cf7f3030bbc6a7273a9b 05-May-2012 Jim Ingham <jingham@apple.com> Missed a few uses of Mutex::GetMutex in template functions that don't seem to get instantiated on the Mac OS X build,
but were causing build failures on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156224 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Predicate.h
1b584ebc1de8b50fe375cffb5fb33ad13be10046 05-May-2012 Jim Ingham <jingham@apple.com> Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes.
No one was using it and Locker(pthread_mutex_t *) immediately asserts for
pthread_mutex_t's that don't come from a Mutex anyway. Rather than try to make
that work, we should maintain the Mutex abstraction and not pass around the
platform implementation...

Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor
taking a pthread_mutex_t *. You no longer need to call Mutex::GetMutex to pass
your mutex to a Locker (you can't in fact, since I made it private.)


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156221 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Condition.h
ldb/Host/Mutex.h
ldb/Host/Predicate.h
88e3de205708f14431559072ca258899b5ac31cc 03-May-2012 Jim Ingham <jingham@apple.com> Clean up the usage of "MasterPlan" status in ThreadPlans. Only user-initiated plans
should be MasterPlans that want to stay on the plan stack. So make all plans NOT
MasterPlans by default and then have the SB API's and the CommandObjectThread step
commands set this explicitly.

Also added a "clean up" phase to the Thread::ShouldStop so that if plans get stranded
on the stack, we can remove them. This is done by adding an IsPlanStale method to the
thread plans, and if the plan can know that it is no longer relevant, it returns true,
and the plan and its sub-plans will get discarded.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156101 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/Target/Thread.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepOut.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepRange.h
6a043531452d1611abbabc8de8c130ad2eadba8a 03-May-2012 Enrico Granata <egranata@apple.com> Adding a new 'type category disable *' feature that disables all categories - This is intended as a quick kill switch for data formatters for cases where the user wants as little extra processing as possible to be done on their target, or to override major data formatters bug, should they occur

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156044 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
b5d55cf7a00d0f9e31a1664d372f8e570d562777 02-May-2012 Jim Ingham <jingham@apple.com> Cleanup - removing the ThreadPlanTestCondition and its helper functions. It is not needed,
since we now run the condition in the StopInfoBreakpoint's PerformAction, and don't need
to refer it to another "continue". Actually, we haven't needed to do this for a year or
so, I just hadn't gotten around to deleting the dead wood.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155967 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointOptions.h
ldb/Target/ThreadPlanTestCondition.h
707b7a858ce66b15d01177d4a38ff1ccde44f43c 01-May-2012 Jim Ingham <jingham@apple.com> Fix reporting of stop reasons when the StepOver & StepIn plans stop because of a crash or breakpoint. Added the ability for a plan to say it is done but doesn't want to be the reason for the stop.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155927 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepRange.h
c76486cc024511ab8e96baea752e98f49c2b1da4 26-Apr-2012 Jim Ingham <jingham@apple.com> Don't call SBDebugger::SetInternalVariable in the sigwinch_handler, since that takes locks and potentially does allocations.
Just call SBDebugger::SetTerminalWidth on the driver's SBDebugger, which does the same job, but no locks.
Also add the value checking to SetTerminalWidth you get with SetInternalVariable(..., "term-width", ...).

rdar://problem/11310563


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155665 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Debugger.h
9e8865ee73f1c3decad554809368e8779b8c3e98 26-Apr-2012 Greg Clayton <gclayton@apple.com> Save more memory by not parsing the symbol table for stand alone DWARF files. We currently have SymbolFile plug-ins which all get the chance to say what they can parse in a symbol file. Prior to this fix we would ask the SymbolFileDWARF plug-in what abilities it had, and it would answer with "everything", and then we would check the SymbolFileSymtab plug-in what abilities it had, in case it had more abilities. The checking that SymbolFileSymtab does is a bit expensive as it pulls in the entire symbol table just to see if it can offer a few scraps of debug information. This causes all stand along DWARF files to pull in their symbol tables even though those symbols will never be used. This fix will check all SymbolFile plug-ins for their abilities and if any plug-in responds with "everything", then we stop the search.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155638 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolFile.h
431d26daf9c89fd34310f39dbc00f26ee39c520f 26-Apr-2012 Greg Clayton <gclayton@apple.com> Patch from Viktor Kutuzov: changes the method declarations to const for the Args::GetCommandString and Agrs::GetQuotedCommandString methods. It allows using of these methods within the other const methods.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155593 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/Args.h
ba0893fc428a475ac48410dcd51e1ccd7ff608de 25-Apr-2012 Enrico Granata <egranata@apple.com> Fixing a typo in the previous commit that broke the build

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155497 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
4d609c92183905881daf1a601474a20e6949cc9a 25-Apr-2012 Enrico Granata <egranata@apple.com> Fixing an issue where the expression parser was not correctly freeze-drying bitfields - This patch ensures that (a) freeze-drying bitfields works correctly and (b) that we actually access bitfields through IR instead of the 'frame var en lieu of expr' shortcut, for added safety in corner cases that may arise

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155494 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
73a35715708b65b1d96c1c8f439548bb0990df08 24-Apr-2012 Greg Clayton <gclayton@apple.com> Added the ability to log a message with a backtrace when verbose logging is enabled to the Module class. Used this new function in the DWARF parser.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155404 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
f0bc81575b0048a004add5e0212a6a15757dbdb0 23-Apr-2012 Greg Clayton <gclayton@apple.com> Added the ability to specify the symbol file for a module when adding it to a target.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155384 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
e787c7ea61b1d857b56a0c42a1cf7535115ecbfc 20-Apr-2012 Jim Ingham <jingham@apple.com> Make sure the "synchronous breakpoint callbacks" get called before the thread plan logic gets invoked, and if they
ask to continue that should short-circuit the thread plans for that thread. Also add a bit more explanation for
how this machinery is supposed to work.
Also pass eExecutionPolicyOnlyWhenNeeded, not eExecutionPolicyAlways when evaluating the expression for breakpoint
conditions.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155236 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointOptions.h
ldb/Target/StopInfo.h
027aaa74a914823ab4c9cf8f3274d179e97fdb53 19-Apr-2012 Jim Ingham <jingham@apple.com> Switch to setting the write side of the run lock when we call Resume. Then make a PrivateResume that doesn't switch the run-lock state, and use that where we are resuming without changing the public resume state.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155092 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
ffc9247d88dbc579f601a9168188b71c94beb001 19-Apr-2012 Jim Ingham <jingham@apple.com> Add a WriteTryLock function.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155080 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/ReadWriteLock.h
a4974db9b26cc4f33e16c990304b51f4a1d38611 18-Apr-2012 Sean Callanan <scallanan@apple.com> We now record metadata for Objective-C interfaces,
Objective-C methods, and Objective-C properties.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154972 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
a414e679c425c5bd1574f801c5bd8f516faa74cb 16-Apr-2012 Greg Clayton <gclayton@apple.com> Fixed the ability to load multiple __LINKEDIT segments at the same address for darwin shared cache entries. Now when registering the load address of a section, the DynamicLoader objects can specify if they should warn or not. This will fix the ability to load the nlist entries for shared libraries in the darwin shared caches when no on disk representation is available for a shared library.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154860 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/SectionLoadList.h
97471184b8823c949bc68bbf54ea3edf3845a750 14-Apr-2012 Greg Clayton <gclayton@apple.com> Added a new host function that allows us to run shell command and get the output from them along with the status and signal:

Error
Host::RunShellCommand (const char *command,
const char *working_dir,
int *status_ptr,
int *signo_ptr,
std::string *command_output_ptr,
uint32_t timeout_sec);

This will allow us to use this functionality in the host lldb_private::Platform, and also use it in our lldb-platform binary. It leverages the existing code in Host::LaunchProcess and ProcessLaunchInfo.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154730 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
ldb/Target/Process.h
1e58cef33bbfd953e2c9e7dc872c4c74e0d75352 13-Apr-2012 Jim Ingham <jingham@apple.com> Factor out a bunch of common code in the two ThreadPlanCallFunction constructors. Also add a sanity check - try reading the frame, and if we fail bag out.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154698 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanCallFunction.h
fafffe000eb4a3902ecefc82446d11e6838167c6 13-Apr-2012 Sean Callanan <scallanan@apple.com> Added a mechanism for keeping track of where in
the debug information individual Decls came from.

We've had a metadata infrastructure for a while,
which was intended to solve a problem we've since
dealt with in a different way. (It was meant to
keep track of which definition of an Objective-C
class was the "true" definition, but we now find
it by searching the symbols for the class symbol.)
The metadata is attached to the ExternalASTSource,
which means it has a one-to-one correspondence with
AST contexts.

I've repurposed the metadata infrastructure to
hold the object file and DIE offset for the DWARF
information corresponding to a Decl. There are
methods in ClangASTContext that get and set this
metadata, and the ClangASTImporter is capable of
tracking down the metadata for Decls that have been
copied out of the debug information into the
parser's AST context without using any additional
memory.

To see the metadata, you just have to enable the
expression log:
-
(lldb) log enable lldb expr
-
and watch the import messages. The high 32 bits
of the metadata indicate the index of the object
file in its containing DWARFDebugMap; I have also
added a log which you can use to track that mapping:
-
(lldb) log enable dwarf map
-

This adds 64 bits per Decl, which in my testing
hasn't turned out to be very much (debugging Clang
produces around 6500 Decls in my tests). To track
how much data is being consumed, I've also added a
global variable g_TotalSizeOfMetadata which tracks
the total number of Decls that have metadata in all
active AST contexts.

Right now this metadata is enormously useful for
tracking down bugs in the debug info parser. In the
future I also want to use this information to provide
more intelligent error messages instead of printing
empty source lines wherever Clang refers to the
location where something is defined.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154634 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/ClangExternalASTSourceCommon.h
7fb143064009e34dbb7a602924e9807375f72a46 13-Apr-2012 Greg Clayton <gclayton@apple.com> Expose GetAddressClass() from both the SBAddress and SBInstruction so clients can tell the difference between ARM/Thumb opcodes when disassembling ARM.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154633 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
ldb/API/SBInstruction.h
ldb/Core/Address.h
ldb/Core/Disassembler.h
ldb/Symbol/ObjectFile.h
ldb/Target/Target.h
ldb/lldb-enumerations.h
ldb/lldb-private-enumerations.h
5ba82b9dfd5b9c6b8849a56bc74a6828d1dd109b 12-Apr-2012 Jim Ingham <jingham@apple.com> Cleanup, keep private types separate from private member variables.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154600 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
50561699a9a14c716d1099ae1d38be2f31534b67 11-Apr-2012 Greg Clayton <gclayton@apple.com> Cleaned up code that was getting SBData for an SBInstruction.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154535 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Opcode.h
516f0849819d094d4eab39a1f27b770259103ff8 11-Apr-2012 Greg Clayton <gclayton@apple.com> No functionality changes, mostly cleanup.

Cleaned up the Mutex::Locker and the ReadWriteLock classes a bit.

Also cleaned up the GDBRemoteCommunication class to not have so many packet functions. Used the "NoLock" versions of send/receive packet functions when possible for a bit of performance.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154458 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Mutex.h
ldb/Host/ReadWriteLock.h
ae932359b80098532f3c3766fa9e6527352fbb67 10-Apr-2012 Greg Clayton <gclayton@apple.com> Trying to solve our disappearing thread issues by making thread list updates safer.

The current ProcessGDBRemote function that updates the threads could end up with an empty list if any other thread had the sequence mutex. We now don't clear the thread list when we can't access it, and we also have changed how lldb_private::Process handles the return code from the:

virtual bool
Process::UpdateThreadList (lldb_private::ThreadList &old_thread_list,
lldb_private::ThreadList &new_thread_list) = 0;

A bool is now returned to indicate if the list was actually updated or not and the lldb_private::Process class will only update the stop ID of the validity of the thread list if "true" is returned.

The ProcessGDBRemote also got an extra assertion that will hopefully assert when running debug builds so we can find the source of this issue.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154365 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/OperatingSystem.h
ldb/Target/Process.h
451fa8288fdf6766407906a3f83f5e11b35faebe 10-Apr-2012 Greg Clayton <gclayton@apple.com> Added a packet history object to the GDBRemoteCommunication class that is always remembering the last 512 packets that were sent/received. These packets get dumped if logging gets enabled, or when the new expr lldb::DumpProcessGDBRemotePacketHistory (void *process, const char *log_file_path) global function is called.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154354 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangNamespaceDecl.h
3847401bd6ddf7885de5bbb5e1f028868f1336c5 10-Apr-2012 Greg Clayton <gclayton@apple.com> Removed an include that wasn't needed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154353 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
2bcbaf625afd8f521da03ddaa146e7ea7650ee38 10-Apr-2012 Jim Ingham <jingham@apple.com> Rework how master plans declare themselves. Also make "PlanIsBasePlan" not rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154351 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanBase.h
ldb/Target/ThreadPlanCallFunction.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepUntil.h
860b9ea0038cdcea2dda00b1657f945363c96d00 09-Apr-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11202426>

Work around a deadlocking issue where "SBDebugger::MemoryPressureDetected ()" is being called and is causing a deadlock. We now just try and get the lock when trying to trim down the unique modules so we don't deadlock debugger GUI programs until we can find the root cause.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154339 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
621a802cc8a6d9e4f2ed26cc67e25adf0b23c185 07-Apr-2012 Jason Molenda <jmolenda@apple.com> Fix a integer trauction issue - calculating the current time in
nanoseconds in 32-bit expression would cause pthread_cond_timedwait
to time out immediately. Add explicit casts to the TimeValue::TimeValue
ctor that takes a struct timeval and change the NanoSecsPerSec etc
constants defined in TimeValue to be uint64_t so any other calculations
involving these should be promoted to 64-bit even when lldb is built
for 32-bit.

<rdar://problem/11204073>, <rdar://problem/11179821>, <rdar://problem/11194705>.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154250 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/TimeValue.h
1831e78a6253392fca1c99e555e7adaa3f372647 07-Apr-2012 Jim Ingham <jingham@apple.com> We sometimes need to be able to call functions (via Process::RunThreadPlan) from code run on the private state thread. To do that we have to
spin up a temporary "private state thread" that will respond to events from the lower level process plugins. This check-in should work to do
that, but it is still buggy. However, if you don't call functions on the private state thread, these changes make no difference.

This patch also moves the code in the AppleObjCRuntime step-through-trampoline handler that might call functions (in the case where the debug
server doesn't support the memory allocate/deallocate packet) out to a safe place to do that call.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154230 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
ldb/Target/Process.h
9f95fb63a492b53206d578f46e73899d60d70321 06-Apr-2012 Greg Clayton <gclayton@apple.com> In a prior commit, I changed the parameters around on a ModuleList::FindTypes where the old parameters that existing clients were using would have been compatible, so I renamed ModuleList::FindTypes to ModuleList::FindTypes2. Then I made fixes and verified I updated and fixed all client code, but I forgot to rename the function back to ModuleList::FindTypes(). I am doing that now and also cleaning up the C++ dynamic type code a bit.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154182 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
048a0bd021fc6cff15ba47c1e48308077af2fe3d 06-Apr-2012 Bill Wendling <isanbard@gmail.com> Silence unused warning.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154145 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/ReadWriteLock.h
a894fe78bc15344a0025c1154e414c554ab31dd9 05-Apr-2012 Greg Clayton <gclayton@apple.com> Added a new Host class: ReadWriteLock

This abstracts read/write locks on the current host system. It is currently backed by pthread_rwlock_t objects so it should work on all unix systems.

We also need a way to control multi-threaded access to the process through the public API when it is running. For example it isn't a good idea to try and get stack frames while the process is running. To implement this, the lldb_private::Process class now contains a ReadWriteLock member variable named m_run_lock which is used to control the public process state. The public process state represents the state of the process as the client knows it. The private is used to control the actual current process state. So the public state of the process can be stopped, yet the private state can be running when evaluating an expression for example.

Adding the read/write lock where readers are clients that want the process to stay stopped, and writers are clients that run the process, allows us to accurately control multi-threaded access to the process.

Switched the SBThread and SBFrame over to us shared pointers to the ExecutionContextRef class instead of making their own class to track this. This fixed an issue with assigning on SBFrame to another and will also centralize the code that tracks weak references to execution context objects into one location.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154099 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
ldb/API/SBThread.h
ldb/Host/ReadWriteLock.h
ldb/Target/ExecutionContext.h
ldb/Target/Process.h
ldb/lldb-forward.h
8d6115615f55ae38ff141f0a6859d59750da8d02 05-Apr-2012 Sean Callanan <scallanan@apple.com> Fixed a problem where we did not read properties
correctly if the setter/getter were not present
in the debug information. The fixes are as follows:

- We not only look for the method by its full name,
but also look for automatically-generated methods
when searching for a selector in an Objective-C
interface. This is necessary to find accessors.

- Extract the getter and setter name from the
DW_TAG_APPLE_Property declaration in the DWARF
if they are present; generate them if not.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154067 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
3feafabba22e8b7110d556cb1c8690461e391fdb 04-Apr-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11184458>

Found an issue where we might still have shared pointer references to lldb_private::Thread objects where the object itself is not valid and has been removed from the Process. When a thread is removed from a process, it will call Thread::DestroyThread() which well set a boolean member variable which is exposed now via:

bool
Thread::IsValid() const;

We then check the thread validity before handing out a shared pointer.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154048 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
69c540dc5b2b498e4bb9a4cb8d7cd4e3c993bbbc 04-Apr-2012 Greg Clayton <gclayton@apple.com> Change SBAddress back to using a std::auto_ptr to a lldb_private::Address as the lldb_private::Address has a weak pointer to the section which has a weak pointer back to the module, so it is safe to have just a lldb_private::Address object now.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154045 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
cfd89c466768262d23cba83898c5e4e9eca6593f 04-Apr-2012 Greg Clayton <gclayton@apple.com> Fixed the C++11 #defines that wrap std::weak_ptr to actually use std::weak_ptr.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154041 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-forward.h
63aa63418b3444bf7dd6e32e8320533390124402 04-Apr-2012 Enrico Granata <egranata@apple.com> Attempt at fixing a crasher where summary strings where looping endlessly.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154028 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
63a424f8a2bb8a1a8dea8fb3e6df212467f1c3a2 03-Apr-2012 Bill Wendling <isanbard@gmail.com> Revert accidental checkin.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153945 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/RecordingMemoryManager.h
c7a4537f45ca7c2e8831f59d91a638138d9b2718 03-Apr-2012 Bill Wendling <isanbard@gmail.com> Use the correct class/struct keyword so that they match the declarations.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153932 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/RecordingMemoryManager.h
ldb/lldb-forward.h
0be1edd34ff46e017b1b973c5a57e3de9f613baf 03-Apr-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11160171>

Fixed an issue where there were more than one way to get a CompileUnitSP created when using SymbolFileDWARF with SymbolFileDWARFDebugMap. This led to an assertion that would fire under certain conditions. Now there is only one way to create the compile unit and it will "do the right thing".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153908 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/CompileUnit.h
ldb/Symbol/SymbolVendor.h
3be42fb4ff54e71afe0b9aac83b7fa3068a3d873 02-Apr-2012 Greg Clayton <gclayton@apple.com> Export the ability to see if a symbol is externally visible and also if the symbol was synthetically added to the symbol table (the symbol was not part of the symbol table itself but came from another section).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153893 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBSymbol.h
940dd18789f83f28a618a9b588376c8bae557347 30-Mar-2012 Sean Callanan <scallanan@apple.com> Be more careful when overriding the type for a
ValueObject, and make sure that ValueObjects that
have null type names (because they have null types)
also have null qualified type names. This avoids
some potential crashes if
ValueObject::GetQualifiedTypeName tries to get the
name of their type by calling GetClangTypeImpl().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153718 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObjectRegister.h
3356d4f89e85301e5ddec2301c75b0626d50703f 30-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11082392>

Fixed an issue that could cause circular type parsing that will assert and kill LLDB.

Prior to this fix the DWARF parser would always create class types and not start their definitions (for both C++ and ObjC classes) until we were asked to complete the class later. When we had cases like:

class A
{
class B
{
};
};

We would alway try to complete A before specifying "A" as the decl context for B. Turns out we can just start the definition and still not complete the class since we can check the TagDecl::isCompleteDefinition() function. This only works for C++ types. This means we will not be pulling in the full definition of parent classes all the time and should help with our memory consumption and also reduce the amount of debug info we have to parse.

I also reduced redundant code that was checking in a lldb::clang_type_t was a possible C++ dynamic type since it was still completing the type, just to see if it was dynamic. This was fixed in another function that was checking for a type being dynamic as an ObjC or a C++ type, but there was dedicated fucntion for C++ that we missed.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153713 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
d4f16c8903d99057a0db2c5b73071261f534ec1c 29-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10103468>

Symbol files (dSYM files on darwin) can now be specified during program execution:

(lldb) target symbols add /path/to/symfile/a.out.dSYM/Contents/Resources/DWARF/a.out

This command can be used when you have a debug session in progress and want to add symbols to get better debug info fidelity.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153693 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/lldb-enumerations.h
2450cb19a85dcd4a14032bd96b16389416b4ff7f 29-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11035349>

Fixed an issue with stepping where the stack frame list could get changed out from underneath you when multiple threads start accessing frame info.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153627 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
bd5871561db60b84c38466534694ca246b60d108 29-Mar-2012 Enrico Granata <egranata@apple.com> Fixing an issue where saying 'po foo' made both the summary and the description for foo come out. If one is po'ing something they most probably only care about the description - We will not omit the summary

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153608 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
2fccde4f175aa476217730e2fbef99ee3d5a3224 28-Mar-2012 Sean Callanan <scallanan@apple.com> Updated LLVM and LLDB to fix compilation errors
with recent Clang. Clang is now stricter about
presence of complete types and about use of the
"template" keyword in C++ for template-dependent
types.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153563 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
9ab696e40530fa966e08cab7af77ea62e4fff1c0 27-Mar-2012 Greg Clayton <gclayton@apple.com> lldb_private::Section objects have a boolean flag that can be set that
indicates that the section is thread specific. Any functions the load a module
given a slide, will currently ignore any sections that are thread specific.

lldb_private::Section now has:

bool
Section::IsThreadSpecific () const
{
return m_thread_specific;
}

void
Section::SetIsThreadSpecific (bool b)
{
m_thread_specific = b;
}

The ELF plug-in has been modified to set this for the ".tdata" and the ".tbss"
sections.

Eventually we need to have each lldb_private::Thread subclass be able to
resolve a thread specific section, but for now they will just not resolve. The
code for that should be trivual to add, but the address resolving functions
will need to be changed to take a "ExecutionContext" object instead of just
a target so that thread specific sections can be resolved.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153537 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Section.h
ldb/Target/Target.h
dba1de8d585f27601162f674d30ab71d9c83ccde 27-Mar-2012 Enrico Granata <egranata@apple.com> Synthetic values are now automatically enabled and active by default. SBValue is set up to always wrap a synthetic value when one is available.
A new setting enable-synthetic-value is provided on the target to disable this behavior.
There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic.
The test suite has been changed accordingly.
Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang
Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153495 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Target/Target.h
dc0a38c5a727cae5362b218a3180d0f4265a619d 27-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11113279>

Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not).

This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method.

This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153482 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectChild.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectVariable.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/Type.h
ldb/Symbol/TypeList.h
d44c9d31d23d0b44ce40325ad69226889a9638bc 24-Mar-2012 Enrico Granata <egranata@apple.com> Adding a new API call IsTypeComplete() to SBType. This call is meant to check if the type has been previously completed or not (which is mostly interesting from a performance point of view)

Adding a test case that checks that we do not complete types before due time. This should help us track cases similar to the cascading data formatters.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153363 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Symbol/ClangASTContext.h
f2cb7f275a8669eaef30a53c282db6ce9c03b332 22-Mar-2012 Enrico Granata <egranata@apple.com> Removing cascading through inheritance chains for data formatters
This is the feature that allowed the user to have things like:

class Base { ... };
class Derived : public Base { ... };

and have formatters defined for Base work automatically for Derived.

This feature turned out to be too expensive since it requires completing types.

This patch takes care of removing cascading (other than typedefs chain cascading), updating the test suite accordingly, and adding required Cocoa class names to keep the AppKit formatters working


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153272 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
ldb/lldb-private-enumerations.h
2aaf59d0bae48c120b0b04028c2a6d125777a708 22-Mar-2012 Greg Clayton <gclayton@apple.com> Added the ability to log a value object just as a value would be display
when using the "frame variable" or "target variable" commands.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153266 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
f0c372a6b5c388889601f5c062f63994d875830f 20-Mar-2012 Enrico Granata <egranata@apple.com> Headers cleanup

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153113 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/InputReaderEZ.h
85534d990a195d9c9eb40f9f20d38d1132487fec 20-Mar-2012 Enrico Granata <egranata@apple.com> More #includes removed

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153108 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
57011acd5a610dd97170a9aa52af7bd78b8fa512 20-Mar-2012 Enrico Granata <egranata@apple.com> Removing spurious <locale> include

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153107 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataVisualization.h
b1db658333cdebca31a128be95e926d80c3c7796 20-Mar-2012 Greg Clayton <gclayton@apple.com> Platforms can now auto-select themselves if you specify a full target triple when doing a "target create" command.

Each platform now knows if it can handle an architecture and a platform can be found using an architecture. Each platform can look at the arch, vendor and OS and know if it should be used or not.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153104 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupPlatform.h
ldb/Target/Platform.h
ldb/Target/Target.h
ldb/Target/TargetList.h
ldb/lldb-private-interfaces.h
f55919b7eb74820338ba5e27cd0ea308276bcea8 20-Mar-2012 Enrico Granata <egranata@apple.com> Fixing a bug where child names in filters were not matched properly

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153101 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatClasses.h
cf09f885c201becf51acc4a5cfac00b3df53f2a8 19-Mar-2012 Enrico Granata <egranata@apple.com> Massive enumeration name changes: a number of enums in ValueObject were not following the naming pattern
Changes to synthetic children:
- the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points
this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed
- making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly)
claim to itself be synthetic
- cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible
- major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself
- removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place)
Some clean ups to the summary generation code
Centralized the code that clears out user-visible strings and data in ValueObject
More efficient summaries for libc++ containers


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153061 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatClasses.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/lldb-enumerations.h
2418fddf2e200c827da5bc6c855f3d4971b2d867 19-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11072382>

Fixed a case where the source path remappings on the module were too expensive to
use when we try to verify (stat the file system) that the remapped path points to
a valid file. Now we will use the lldb_private::Module path remappings (if any) when
parsing the debug info without verifying that the paths exist so we don't slow down
line table parsing speeds.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153059 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Target/PathMappingList.h
b451f5f1606fc5effdc809fa2261263851fff8f5 16-Mar-2012 Johnny Chen <johnny.chen@apple.com> Patch from dawn@burble.org:

GetSupportFileAtIndex(), GetNumSupportFiles(), FindSupportFileIndex():
Add API support for getting the list of files in a compilation unit.
GetNumCompileUnits(), GetCompileUnitAtIndex():
Add API support for retrieving the compilation units in a module.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152942 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCompileUnit.h
ldb/API/SBModule.h
964deba8853eb794e59263322b59b09b43669618 15-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/8196933>

Use the metadata in the dSYM bundle Info.plist to remap source paths when they keys are available.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152836 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Target/PathMappingList.h
22f44d5f0a70e43825abadcc8f475ea4b4353509 14-Mar-2012 Enrico Granata <egranata@apple.com> Committing a patch from Filipe Cabecinhas

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152733 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Predicate.h
598df88bd6fc33c6fb330bc859bdc277795501f3 14-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10434005>

Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
macros that allows us to easily compile for either C++.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointSite.h
ldb/Core/Debugger.h
ldb/Core/FormatClasses.h
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Core/Module.h
ldb/Core/Section.h
ldb/Core/SourceManager.h
ldb/Core/UserSettingsController.h
ldb/Expression/ClangExpressionVariable.h
ldb/Expression/ClangUserExpression.h
ldb/Interpreter/Args.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/DWARFCallFrameInfo.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/Type.h
ldb/Target/Memory.h
ldb/Target/Process.h
ldb/Target/RegisterContext.h
ldb/Target/StackFrame.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/Utility/PriorityPointerPair.h
ldb/lldb-forward.h
ldb/lldb-types.h
9482f05e109d617061c1ade6d9672dfcb8427547 14-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11034170>

Simplify the locking strategy for Module and its owned objects to always use the Module's mutex to avoid A/B deadlocks. We had a case where a symbol vendor was locking itself and then calling a function that would try to get it's Module's mutex and at the same time another thread had the Module mutex that was trying to get the SymbolVendor mutex. Now any classes that inherit from ModuleChild should use the module lock using code like:

void
ModuleChildSubclass::Function
{
ModuleSP module_sp(GetModule());
if (module_sp)
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
... do work here...
}
}

This will help avoid deadlocks by using as few locks as possible for a module and all its child objects and also enforce detecting if a module has gone away (the ModuleSP will be returned empty if the weak_ptr does refer to a valid object anymore).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152679 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/SymbolVendor.h
66205ce5381ab6db1f9bff83c483a4dc5854afc7 12-Mar-2012 Enrico Granata <egranata@apple.com> Added formatters for libc++ (http://libcxx.llvm.org):
std::string has a summary provider
std::vector std::list and std::map have both a summary and a synthetic children provider
Given the usage of a custom namespace (std::__1::classname) for the implementation of libc++, we keep both libstdcpp and libc++ formatters enabled at the same time since that raises no conflicts and enabled for seamless transition between the two
The formatters for libc++ reside in a libcxx category, and are loaded from libcxx.py (to be found in examples/synthetic)

The formatters-stl test cases have been divided to be separate for libcxx and libstdcpp. This separation is necessary because
(a) we need different compiler flags for libc++ than for libstdcpp
(b) libc++ inlines a lot more than libstdcpp and some code changes were required to accommodate this difference


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152570 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
e31176627725f4236c9ca049edc027756709780b 10-Mar-2012 Jim Ingham <jingham@apple.com> Fix the process of getting the ObjC runtime - if we ask for it too early (in the process of handling the
load notification for the first load) then we will set it the runtime to NULL and won't re-search for it.
Added a way for the dynamic loader to force a re-search, since it knows the world has changed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152453 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
4aa2edf602fa60693afa33d4fe0d1d459a488333 09-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11016907>

Get function boundaries from the LC_FUNCTION_STARTS load command. This helps to determine symbol sizes and also allows us to be able to debug stripped binaries.

If you have a stack backtrace that goes through a function that has been stripped from the symbol table, the variables for any functions above that stack frame will most likely be incorrect. It can also affect our ability to step in/out/through of a function.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152381 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RangeMap.h
ldb/Symbol/Symbol.h
b2cf58a817f6c0d15b2077316810c17d9c8ac173 09-Mar-2012 Jim Ingham <jingham@apple.com> First stage of implementing step by "run to next branch". Doesn't work yet, is turned off.
<rdar://problem/10975912>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152376 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointSiteList.h
ldb/Core/Disassembler.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepRange.h
ldb/Target/ThreadPlanTracer.h
ldb/lldb-forward.h
06cdb8d50b916a0ef1b8d65e3cfd48a26e3d7541 09-Mar-2012 Enrico Granata <egranata@apple.com> Changed ValueObject to use a dedicated ChildrenManager class to store its children, instead of an std::vector
This solves an issue where a ValueObject was getting a wrong children count (usually, a huge value) and trying to resize the vector of children to fit that many ValueObject*

Added a loop detection algorithm to the synthetic children provider for std::list

Added a few more checks to the synthetic children provider for std::vector

Both std::list and std::vector's synthetic children providers now cache the count of children instead of recomputing it every time
std::map has a field that stores the count, so there is little need to cache it on our side


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152371 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
6e12c7a5a851f661677b16c544aac2f93fb6e86d 08-Mar-2012 Sean Callanan <scallanan@apple.com> Updated the revision of LLVM/Clang used by LLDB.
This takes two important changes:

- Calling blocks is now supported. You need to
cast their return values, but that works fine.

- We now can correctly run JIT-compiled
expressions that use floating-point numbers.

Also, we have taken a fix that allows us to
ignore access control in Objective-C as in C++.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152286 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
66c2e19e7c343e1ff0fd31180a12f8a68fc61b6c 08-Mar-2012 Greg Clayton <gclayton@apple.com> Moved inline functions into SBTarget.cpp and made destructors for SBLaunchInfo and SBAttachInfo to avoid link warnings.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152267 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
a266491ca4bcb46339b7b59626946d3f99faf358 07-Mar-2012 Jim Ingham <jingham@apple.com> When comparing a Thread against a ThreadSpec, don't fetch the Thread's Name or QueueName if the ThreadSpec doesn't specify them.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152245 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadSpec.h
0c31d3d3a4a1d00d53346d8a23b0519f47e55d1f 07-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10997402>

This fix really needed to happen as a previous fix I had submitted for
calculating symbol sizes made many symbols appear to have zero size since
the function that was calculating the symbol size was calling another function
that would cause the calculation to happen again. This resulted in some symbols
having zero size when they shouldn't. This could then cause infinite stack
traces and many other side affects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152244 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Symbol.h
400105dd92731a0c8968d6296b0b7279b483ebf0 07-Mar-2012 Enrico Granata <egranata@apple.com> Using the new ScriptInterpreterObject in the implementation of synthetic children to enhance type safety
Several places in the ScriptInterpreter interface used StringList objects where an std::string would suffice - Fixed
Refactoring calls that generated special-purposes functions in the Python interpreter to use helper functions instead of duplicating blobs of code


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152164 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointOptions.h
ldb/Core/FormatClasses.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
a989307c1ec2ef9cd52ec65fb2c877bb2df3aa3a 06-Mar-2012 Greg Clayton <gclayton@apple.com> Added the ability to disassembly "count" instructions given a SBAddress.
This was done in SBTarget:

lldb::SBInstructionList
lldb::SBTarget::ReadInstructions (lldb::SBAddress base_addr, uint32_t count);

Also cleaned up a few files in the LLDB.framework settings.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152152 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
ldb/Core/Disassembler.h
95ec1688db0efe51509ad9356052f5004d8856e0 06-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10840355>

Fixed STDERR to not be opened as readable. Also cleaned up some of the code that implemented the file actions as some of the code was using the wrong variables, they now use the right ones (in for stdin, out for stdout, err for stderr).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152102 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
4722b10307668368bf0f12fa6b8691e4f4cb5488 06-Mar-2012 Jim Ingham <jingham@apple.com> Add a command and an SB API to create exception breakpoints. Make the break output prettier for Exception breakpoints.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152081 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
ldb/Breakpoint/BreakpointResolverName.h
ldb/Target/LanguageRuntime.h
ldb/Target/Target.h
ldb/lldb-defines.h
ldb/lldb-enumerations.h
0164b750df7e431716abfd3b26f124dfeefeae76 05-Mar-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/10976649

Add SBFrame::IsEqual(const SBFrame &that) method and export it to the Python binding.
Alos add a test case test_frame_api_IsEqual() to TestFrames.py file.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152050 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
3df164e694d4e03905f8725c46b68b8dcc104deb 05-Mar-2012 Jim Ingham <jingham@apple.com> Make it possible to set Exception breakpoints when the target doesn't yet
have a process, then fetch the right runtime resolver when the process is made.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152015 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/LanguageRuntime.h
ldb/Target/Target.h
c105362e1fd33664939811569dc4a540959e7db7 03-Mar-2012 Jim Ingham <jingham@apple.com> First step to making an LanguageRuntime Exception breakpoint API.
<rdar://problem/10196277>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151965 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointResolver.h
ldb/Breakpoint/BreakpointResolverName.h
ldb/Target/LanguageRuntime.h
ldb/Target/Target.h
9f69f982142c1c6d4dbece98879eaf746e66728b 02-Mar-2012 Greg Clayton <gclayton@apple.com> Fixed Symbol objects being able to get their byte size.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151878 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Symbol.h
3552ed0afbb58f377a4677ae5253e59b3ed80954 02-Mar-2012 Sean Callanan <scallanan@apple.com> Improved the type's handling of anonymous structs,
so that the expression parser can look up members
of anonymous structs correctly. This meant creating
all the proper IndirectFieldDecls in each Record
after it has been completely populated with members.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151868 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
c86723f0a71f5d929f4543c544d9255da52ea49d 02-Mar-2012 Han Ming Ong <hanming@apple.com> <rdar://problem/10967188>

When using launch_info for launching with a target already set, we should just prepend the target's path as the first argument.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151867 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
41ce4f1706ddd3a092c331ff15917e7f600f2e94 01-Mar-2012 Jim Ingham <jingham@apple.com> Purge a couple more uses of stack count for stepping.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151833 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanStepInstruction.h
ldb/Target/ThreadPlanStepThrough.h
3069c62fc7d3c0b857cd1e9269ff22011ed418fb 01-Mar-2012 Enrico Granata <egranata@apple.com> 1) solving a bug where, after Jim's fixes to stack frames, synthetic children were not recalculated when necessary, causing them to get out of sync with live data
2) providing an updated list of tagged pointers values for the objc_runtime module - hopefully this one is final
3) changing ValueObject::DumpValueObject to use an Options class instead of providing a bulky list of parameters to pass around
this change had been laid out previously, but some clients of DumpValueObject() were still using the old prototype and some arguments
were treated in a special way and passed in directly instead of through the Options class
4) providing new GetSummaryAsCString() and GetValueAsCString() calls in ValueObject that are passed a formatter object and a destination string
and fill the string by formatting themselves using the formatter argument instead of the default for the current ValueObject
5) removing the option to have formats and summaries stick to a variable for the current stoppoint
after some debate, we are going with non-sticky: if you say frame variable --format hex foo, the hex format will only be applied to the current command execution and not stick when redisplaying foo
the other option would be full stickiness, which means that foo would be formatted as hex for its whole lifetime
we are open to suggestions on what feels "natural" in this regard


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151801 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
142f94c8a1498c5269a9f878ed92adf0ffc71215 01-Mar-2012 Sean Callanan <scallanan@apple.com> Updated LLVM to take a new MC JIT that supports
allocations by section. We install these sections
in the target process and inform the JIT of their
new locations.

Also removed some unused variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151789 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/RecordingMemoryManager.h
441e3b9e8bed8c67afd5e520966d7ca16579eac4 01-Mar-2012 Jim Ingham <jingham@apple.com> Convert the thread plans over from using the stack count to do their logic to using StackID's. This
should be more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151780 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StackID.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepOut.h
ldb/Target/ThreadPlanStepRange.h
ldb/Target/ThreadPlanStepUntil.h
ldb/lldb-enumerations.h
f125250ba7bcaa2ea5ee95539a309e3fd2f8b5d7 29-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10605072>

Added the ability to override command line commands. In some cases GUI interfaces
might want to intercept commands like "quit" or "process launch" (which might cause
the process to re-run). They can now do so by overriding/intercepting commands
by using functions added to SBCommandInterpreter using a callback function. If the
callback function returns true, the command is assumed to be handled. If false
is returned the command should be evaluated normally.

Adopted this up in the Driver.cpp for intercepting the "quit" command.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151708 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandInterpreter.h
ldb/Interpreter/CommandObject.h
ldb/lldb-private-interfaces.h
ldb/lldb-types.h
bf97d74c0c3e9a0f7c89fe0cd4a059015ec482d5 29-Feb-2012 Jim Ingham <jingham@apple.com> Make the StackFrameList::GetFrameAtIndex only fetch as many stack frames as needed to
get the frame requested.
<rdar://problem/10943135>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151705 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/StackFrameList.h
ldb/Target/Thread.h
ldb/Target/Unwind.h
1328b1410eb0f5e03c3b3ee302e9adca3e1b0361 29-Feb-2012 Enrico Granata <egranata@apple.com> This commit:
a) adds a Python summary provider for NSDate
b) changes the initialization for ScriptInterpreter so that we are not passing a bulk of Python-specific function pointers around
c) provides a new ScriptInterpreterObject class that allows for ref-count safe wrapping of scripting objects on the C++ side
d) contains much needed performance improvements:
1) the pointer to the Python function generating a scripted summary is now cached instead of looked up every time
2) redundant memory reads in the Python ObjC runtime wrapper are eliminated
3) summaries now use the m_summary_str in ValueObject to store their data instead of passing around ( == copying) an std::string object
e) contains other minor fixes, such as adding descriptive error messages for some cases of summary generation failure


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151703 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatClasses.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/lldb-forward.h
41641f9abd85d146ff5953a93d6c78309e845aad 29-Feb-2012 Johnny Chen <johnny.chen@apple.com> Patch from Filipe Cabecinhas!

Attached is a small python fix to save the current stout and std err when starting a python session, then diverting them (as it was before), and restoring the previous values afterwards. Otherwise, a python script could suddenly find itself without output.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151693 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/ScriptInterpreterPython.h
402607fe513617c06282d4ae479522e244a53b71 29-Feb-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/10652076

Initial step -- infrastructure change -- to fix the bug. Change the RegisterInfo data structure
to contain two additional fields (uint32_t *value_rges and uint32_t *invalidate_regs) to facilitate
architectures which have register mapping.

Update all existing RegsiterInfo arrays to have two extra NULL's (the additional fields) in each row,
GDBRemoteRegisterContext.cpp is modified to add d0-d15 and q0-q15 register info entries which take
advantage of the value_regs field to specify the containment relationship:

d0 -> (s0, s1)
...
d15 -> (s30, s31)
q0 -> (d0, d1)
...
q15 -> (d30, d31)


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151686 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-private-types.h
b8cfdfc518d8f9b313e516b6ce4beeae958238a0 27-Feb-2012 Johnny Chen <johnny.chen@apple.com> Remove redundant declaration.
Patch from Dmitry Vyukov <dvyukov@google.com>!


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151534 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-private-log.h
444fe998bf707bd076a70c3a779db8575533695e 26-Feb-2012 Greg Clayton <gclayton@apple.com> Made a ModuleSpec class in Module.h which can specify a module using one or
more of the local path, platform path, associated symbol file, UUID, arch,
object name and object offset. This allows many of the calls that were
GetSharedModule to reduce the number of arguments that were used in a call
to these functions. It also allows a module to be created with a ModuleSpec
which allows many things to be specified prior to any accessors being called
on the Module class itself.

I was running into problems when adding support for "target symbol add"
where you can specify a stand alone debug info file after debugging has started
where I needed to specify the associated symbol file path and if I waited until
after construction, the wrong symbol file had already been located. By using
the ModuleSpec it allows us to construct a module with as little or as much
information as needed and not have to change the parameter list.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151476 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Host/Symbols.h
ldb/Target/Platform.h
ldb/Target/Target.h
ldb/lldb-forward.h
1d295e802c04324f18184566911e89f0388d35af 25-Feb-2012 Greg Clayton <gclayton@apple.com> Avoid a throw in case we init a lldb_private::Address with an invalid SectionSP.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151439 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Address.h
116a5cd7b8a0ec7929f10281cd708edb2bf20ffa 25-Feb-2012 Johnny Chen <johnny.chen@apple.com> Make the Watchpoint IDs unique per target, not across targets as before.
Now Each newly created target has its Watchpoint IDs as 1, 2, 3 ...


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151435 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/StoppointLocation.h
ldb/Breakpoint/Watchpoint.h
ldb/Breakpoint/WatchpointList.h
ldb/Target/Target.h
d1040dd360c07305a30d33b5d4501cb9dfb03114 25-Feb-2012 Han Ming Ong <hanming@apple.com> <rdar://problem/3535148>

Added ability to debug root processes on OS X. This uses XPC service that is available on Lion and above only.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151419 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
ldb/Target/Process.h
80efa5e90a2924575e068cc44ee53e480e1d1467 25-Feb-2012 Greg Clayton <gclayton@apple.com> Added some missing accessors to the SBAttachInfo for user and group ID
getting, setting, and checking.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151408 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
6c5438bf1d7af0f0ef1e81a30ad53e3fe93c35a8 24-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed a crasher that was happening after making ObjectFile objects have a
weak reference back to the Module. We were crashing when trying to make a
memory object file since it was trying to get the object in the Module
constructor before the "Module *" had been put into a shared pointer, and the
module was trying to initialize a weak pointer back to it.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151397 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
98ca1e668c33bad3095da78977aaa3ee0043e6d7 24-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed the launching code when using the new SBLaunchInfo.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151392 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
0a8dcacde404c520f1131c641041dceb9f68b6fa 24-Feb-2012 Greg Clayton <gclayton@apple.com> Added the new way we will eventually do all attaches and launches. First clients
will fill out either a SBLaunchInfo or SBAttachInfo class, then call:

SBProcess SBTarget::Launch (SBLaunchInfo &, SBError &);
SBProcess SBTarget::Attach (SBAttachInfo &, SBError &);

The attach is working right now and allows the ability to set many filters such
as the parent process ID, the user/group ID, the effective user/group ID, and much
more.

The launch is not yet working, but I will get this working soon. By changing our
launch and attach calls to take an object, it allows us to add more capabilities to
launching and attaching without having to have launch and attach functions that
take more and more arguments.

Once this is all working we will deprecated the older launch and attach fucntions
and eventually remove them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151344 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFileSpec.h
ldb/API/SBTarget.h
ldb/Target/Process.h
ldb/lldb-forward.h
3508c387c3f0c9ecc439d98048fd7694d41bab1b 24-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10103468>

I started work on being able to add symbol files after a debug session
had started with a new "target symfile add" command and quickly ran into
problems with stale Address objects in breakpoint locations that had
lldb_private::Section pointers into modules that had been removed or
replaced. This also let to grabbing stale modules from those sections.
So I needed to thread harded the Address, Section and related objects.

To do this I modified the ModuleChild class to now require a ModuleSP
on initialization so that a weak reference can created. I also changed
all places that were handing out "Section *" to have them hand out SectionSP.
All ObjectFile, SymbolFile and SymbolVendors were inheriting from ModuleChild
so all of the find plug-in, static creation function and constructors now
require ModuleSP references instead of Module *.

Address objects now have weak references to their sections which can
safely go stale when a module gets destructed.

This checkin doesn't complete the "target symfile add" command, but it
does get us a lot clioser to being able to do such things without a high
risk of crashing or memory corruption.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151336 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBSection.h
ldb/Breakpoint/BreakpointLocationList.h
ldb/Core/Address.h
ldb/Core/AddressRange.h
ldb/Core/Module.h
ldb/Core/ModuleChild.h
ldb/Core/Section.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectMemory.h
ldb/Core/ValueObjectVariable.h
ldb/Symbol/Block.h
ldb/Symbol/CompileUnit.h
ldb/Symbol/Function.h
ldb/Symbol/LineEntry.h
ldb/Symbol/LineTable.h
ldb/Symbol/ObjectContainer.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/Symbol.h
ldb/Symbol/SymbolContextScope.h
ldb/Symbol/SymbolVendor.h
ldb/lldb-forward.h
ldb/lldb-private-interfaces.h
8f84cfb6f46256ae98a40fd217b206f48b7345c8 24-Feb-2012 Enrico Granata <egranata@apple.com> This patch provides a set of formatters for most of the commonly used Cocoa classes.
The formatter for NSString is an improved version of the one previously shipped as an example, the others are new in design and implementation.
A more robust and OO-compliant Objective-C runtime wrapper is provided for runtime versions 1 and 2 on 32 and 64 bit.
The formatters are contained in a category named "AppKit", which is not enabled at startup.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151299 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
931acecd4e3af534028936431dc0f75a9fd6eb02 23-Feb-2012 Sean Callanan <scallanan@apple.com> Added support for looking up the complete type for
Objective-C classes. This allows LLDB to find
ivars declared in class extensions in modules other
than where the debugger is currently stopped (we
already supported this when the debugger was
stopped in the same module as the definition).

This involved the following main changes:

- The ObjCLanguageRuntime now knows how to hunt
for the authoritative version of an Objective-C
type. It looks for the symbol indicating a
definition, and then gets the type from the
module containing that symbol.

- ValueObjects now report their type with a
potential override, and the override is set if
the type of the ValueObject is an Objective-C
class or pointer type that is defined somewhere
other than the original reported type. This
means that "frame variable" will always use the
complete type if one is available.

- The ClangASTSource now looks for the complete
type when looking for ivars. This means that
"expr" will always use the complete type if one
is available.

- I added a testcase that verifies that both
"frame variable" and "expr" work.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151214 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Core/ValueObjectChild.h
ldb/Core/ValueObjectConstResult.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectMemory.h
ldb/Core/ValueObjectRegister.h
ldb/Core/ValueObjectSyntheticFilter.h
ldb/Core/ValueObjectVariable.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/Type.h
ldb/Target/ObjCLanguageRuntime.h
d8465214c43d29755822670ad21ced2506faae7a 22-Feb-2012 Jim Ingham <jingham@apple.com> Make Debugger::SetLoggingCallback public, and expose it through the SB API. Sometimes it is not
convenient to provide a log callback right when the debugger is created.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151209 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/Core/Debugger.h
e628a9f23e6ed8883e1a4ba9a2a563ccbcf2f93e 22-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove extra semicolon (breaking g++ builds).


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151199 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangExternalASTSourceCommon.h
49f4bf21e0fb7675d67f95dafe66a098d3205650 22-Feb-2012 Greg Clayton <gclayton@apple.com> Added the ability to get a ObjectFile versions from the ObjectFile
subclasses if the object files support version numbering. Exposed
this through SBModule for upcoming data formatter version checking stuff.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151190 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
ldb/Symbol/ObjectFile.h
63fd41c08cb327ce943dd3c7b1ab920f4f8426c4 22-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused python includes from headers.

Python.h is a bad c++ citizen and overwrites some functions with its own
macros. This conflicts with libc++'s locale header. I did some refactoring
to use Python.h only where it's actually needed a few months ago so
the unnecessary includes can be removed now.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151168 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatClasses.h
761133029ba2d5bb0c21c3a871dede340b2775fc 22-Feb-2012 Greg Clayton <gclayton@apple.com> For stepping performance I added the ability to outlaw all memory accesseses
to the __PAGEZERO segment on darwin. The dynamic loader now correctly doesn't
slide __PAGEZERO and it also registers it as an invalid region of memory. This
allows us to not make any memory requests from the local or remote debug session
for any addresses in this region. Stepping performance can improve when uninitialized
local variables that point to locations in __PAGEZERO are attempted to be read
from memory as we won't even make the memory read or write request.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151128 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RangeMap.h
ldb/Target/Memory.h
ldb/Target/Process.h
137e5230e8dfb1287dd7c5eaa943a39078e1fd8d 21-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove a ton of implicit narrowing conversions for C++11 compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151071 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/lldb-defines.h
2d9c2d447270048f0672280f75f76e7d62b9b5b7 21-Feb-2012 Jim Ingham <jingham@apple.com> Forgot to add two files from the last checkin.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151069 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/StreamCallback.h
c48ca82920bd333c7ccb6ec0e579207add130296 21-Feb-2012 Jason Molenda <jmolenda@apple.com> Patch Enrico's changes from r150558 on 2012-02-14 to build even if Python
is not available (LLDB_DISABLE_PYTHON is defined).

Change build-swig-Python.sh to emit an empty LLDBPythonWrap.cpp file if
this build is LLDB_DISABLE_PYTHON.

Change the "Copy to Xcode.app" shell script phase in the lldb.xcodeproj
to only do this copying for Mac native builds.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151035 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/API/SBDefines.h
ldb/API/SBTypeCategory.h
ldb/API/SBTypeSummary.h
ldb/API/SBTypeSynthetic.h
ldb/API/SBValue.h
ldb/Core/FormatManager.h
ldb/lldb-forward.h
6c530f2201be4788dedf3d5970399220fbd50b11 21-Feb-2012 Jim Ingham <jingham@apple.com> Add a logging mode that takes a callback and flush'es to that callback.
Also add SB API's to set this callback, and to enable the log channels.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151018 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/Core/Debugger.h
ldb/Core/Log.h
ldb/lldb-private-log.h
ldb/lldb-types.h
f4124deeb9532044a38c0774ced872f2709347da 21-Feb-2012 Greg Clayton <gclayton@apple.com> Thread hardening part 3. Now lldb_private::Thread objects have std::weak_ptr
objects for the backlink to the lldb_private::Process. The issues we were
running into before was someone was holding onto a shared pointer to a
lldb_private::Thread for too long, and the lldb_private::Process parent object
would get destroyed and the lldb_private::Thread had a "Process &m_process"
member which would just treat whatever memory that used to be a Process as a
valid Process. This was mostly happening for lldb_private::StackFrame objects
that had a member like "Thread &m_thread". So this completes the internal
strong/weak changes.

Documented the ExecutionContext and ExecutionContextRef classes so that our
LLDB developers can understand when and where to use ExecutionContext and
ExecutionContextRef objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151009 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/StoppointCallbackContext.h
ldb/Target/ExecutionContext.h
ldb/Target/Thread.h
ldb/Target/UnwindAssembly.h
4eeac7e20ef891636a143818ad97916fa98d0380 21-Feb-2012 Enrico Granata <granata.enrico@gmail.com> committing a patch from Dmitry Vyukov that solves compilation issues with FormatNavigator.h

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150997 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
289afcb5e26c2527a0d2e71f84e780b86bbcf90a 18-Feb-2012 Greg Clayton <gclayton@apple.com> The second part in thread hardening the internals of LLDB where we make
the lldb_private::StackFrame objects hold onto a weak pointer to the thread
object. The lldb_private::StackFrame objects the the most volatile objects
we have as when we are doing single stepping, frames can often get lost or
thrown away, only to be re-created as another object that still refers to the
same frame. We have another bug tracking that. But we need to be able to
have frames no longer be able to get the thread when they are not part of
a thread anymore, and this is the first step (this fix makes that possible
but doesn't implement it yet).

Also changed lldb_private::ExecutionContextScope to return shared pointers to
all objects in the execution context to further thread harden the internals.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150871 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ExecutionContextScope.h
ldb/Target/Process.h
ldb/Target/RegisterContext.h
ldb/Target/StackFrame.h
ldb/Target/Target.h
ldb/Target/Thread.h
70c6cf4b614cd79a54cf1a8696f7b4c963229868 18-Feb-2012 Sean Callanan <scallanan@apple.com> Ignore the constness of the object pointer when
fetching it.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150861 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Symbol/ClangASTContext.h
b4d7fc0c466d446876e5f2d701f0e574dd0be8e7 17-Feb-2012 Greg Clayton <gclayton@apple.com> This checking is part one of trying to add some threading safety to our
internals. The first part of this is to use a new class:

lldb_private::ExecutionContextRef

This class holds onto weak pointers to the target, process, thread and frame
and it also contains the thread ID and frame Stack ID in case the thread and
frame objects go away and come back as new objects that represent the same
logical thread/frame.

ExecutionContextRef objcets have accessors to access shared pointers for
the target, process, thread and frame which might return NULL if the backing
object is no longer available. This allows for references to persistent program
state without needing to hold a shared pointer to each object and potentially
keeping that object around for longer than it needs to be.

You can also "Lock" and ExecutionContextRef (which contains weak pointers)
object into an ExecutionContext (which contains strong, or shared pointers)
with code like

ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock());



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150801 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
ldb/Core/ValueObject.h
ldb/Target/ExecutionContext.h
ldb/Target/StackFrameList.h
ldb/Target/StackID.h
ldb/Target/Thread.h
ldb/lldb-forward.h
d760907c1d42726fa0c8c48efa28385ed339bb94 17-Feb-2012 Enrico Granata <granata.enrico@gmail.com> Adding formatters for several useful Objective-C/Cocoa data types. The new categories are not enabled at startup, but can be manually activated if desired.
Adding new API calls to SBValue to be able to retrieve the associated formatters
Some refactoring to FormatNavigator::Get() in order to shrink its size down to more manageable terms (a future, massive, refactoring effort will still be needed)
Test cases added for the above


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150784 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/API/SBTypeFilter.h
ldb/API/SBTypeFormat.h
ldb/API/SBTypeNameSpecifier.h
ldb/API/SBTypeSummary.h
ldb/API/SBTypeSynthetic.h
ldb/API/SBValue.h
ldb/Core/FormatClasses.h
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Symbol/Type.h
5a15e6927b5b3234fb3e688717297ba6b5dd6ad7 16-Feb-2012 Jim Ingham <jingham@apple.com> Add a general mechanism to wait on the debugger for Broadcasters of a given class/event bit set.
Use this to allow the lldb Driver to emit notifications for breakpoint modifications.
<rdar://problem/10619974>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150665 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandInterpreter.h
ldb/API/SBCommunication.h
ldb/API/SBDebugger.h
ldb/API/SBEvent.h
ldb/API/SBListener.h
ldb/API/SBProcess.h
ldb/API/SBTarget.h
ldb/Core/Broadcaster.h
ldb/Core/Communication.h
ldb/Core/Debugger.h
ldb/Core/Listener.h
ldb/Interpreter/CommandInterpreter.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/Target/TargetList.h
ldb/lldb-forward.h
16376ed044df3ee70fcf69e19f06af01e71a8e9a 15-Feb-2012 Enrico Granata <granata.enrico@gmail.com> <rdar://problem/10062621>
New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association.
This provides SB classes for each of the main object types involved in providing formatter support:
SBTypeCategory
SBTypeFilter
SBTypeFormat
SBTypeSummary
SBTypeSynthetic
plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions
For naming consistency, this patch also renames a lot of formatters-related classes.
Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side.
The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer.
An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes.
Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150558 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
ldb/API/SBDefines.h
ldb/API/SBTypeCategory.h
ldb/API/SBTypeFilter.h
ldb/API/SBTypeFormat.h
ldb/API/SBTypeNameSpecifier.h
ldb/API/SBTypeSummary.h
ldb/API/SBTypeSynthetic.h
ldb/Core/DataVisualization.h
ldb/Core/Debugger.h
ldb/Core/FormatClasses.h
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Core/ValueObject.h
ldb/Interpreter/ScriptInterpreter.h
ldb/Interpreter/ScriptInterpreterPython.h
ldb/lldb-enumerations.h
ldb/lldb-forward.h
52d0d027dd38518e4b0cfb135a5d50a6652c5daf 15-Feb-2012 Sean Callanan <scallanan@apple.com> Previoously the expression parser had to rely on the
JIT when printing the values of registers (e.g.,
"expr $pc"). Now the expression parser can do this
in the IR interpreter without running code in the
inferior process.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150554 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionVariable.h
9ce953807eb814a93b449dc243de4f7bf32c3115 14-Feb-2012 Greg Clayton <gclayton@apple.com> Full core file support has been added for mach-o core files.

Tracking modules down when you have a UUID and a path has been improved.

DynamicLoaderDarwinKernel no longer parses mach-o load commands and it
now uses the memory based modules now that we can load modules from memory.

Added a target setting named "target.exec-search-paths" which can be used
to supply a list of directories to use when trying to look for executables.
This allows one or more directories to be used when searching for modules
that may not exist in the SDK/PDK. The target automatically adds the directory
for the main executable to this list so this should help us in tracking down
shared libraries and other binaries.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150426 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
ldb/Core/UserSettingsController.h
ldb/Host/Host.h
ldb/Symbol/ObjectFile.h
ldb/Target/Platform.h
ldb/Target/Process.h
ldb/Target/Target.h
302d78c71902398ce1f422bd09216dd53a6abb88 10-Feb-2012 Sean Callanan <scallanan@apple.com> Extended function lookup to allow the user to
indicate whether inline functions are desired.
This allows the expression parser, for instance,
to filter out inlined functions when looking for
functions it can call.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150279 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Core/ModuleList.h
ldb/Symbol/SymbolFile.h
ldb/Symbol/SymbolVendor.h
ac725afac61b48d1dc0e38370d824fe45c52c3b7 10-Feb-2012 Sean Callanan <scallanan@apple.com> Improved detection of object file types, moving
detection of kernels into the object file and
adding a new category for raw binary images.
Fixed all clients who previously searched for
sections manually, making them use the object
file's facilities instead.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150272 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ObjectFile.h
dd1dcfdbad297562951169ad621f895daf32b382 10-Feb-2012 Sean Callanan <scallanan@apple.com> Fixed a bunch of ownership problems with the expression
parser. Specifically:

- ClangUserExpression now keeps weak pointers to the
structures it needs and then locks them when needed.
This ensures that they continue to be valid without
leaking memory if the ClangUserExpression is long
lived.

- ClangExpressionDeclMap, instead of keeping a pointer
to an ExecutionContext, now contains an
ExecutionContext. This prevents bugs if the pointer
or its contents somehow become stale. It also no
longer requires that ExecutionContexts be passed
into any function except its initialization function,
since it can count on the ExecutionContext still
being around.

There's a lot of room for improvement (specifically,
ClangExpressionDeclMap should also use weak pointers
insetad of shared pointers) but this is an important
first step that codifies assumptions that already
existed in the code.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150217 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangUserExpression.h
46c9a355af9b39db78c006b2a5cbf97d3c58d947 09-Feb-2012 Greg Clayton <gclayton@apple.com> First pass at mach-o core file support is in. It currently works for x86_64
user space programs. The core file support is implemented by making a process
plug-in that will dress up the threads and stack frames by using the core file
memory.

Added many default implementations for the lldb_private::Process functions so
that plug-ins like the ProcessMachCore don't need to override many many
functions only to have to return an error.

Added new virtual functions to the ObjectFile class for extracting the frozen
thread states that might be stored in object files. The default implementations
return no thread information, but any platforms that support core files that
contain frozen thread states (like mach-o) can make a module using the core
file and then extract the information. The object files can enumerate the
threads and also provide the register state for each thread. Since each object
file knows how the thread registers are stored, they are responsible for
creating a suitable register context that can be used by the core file threads.

Changed the process CreateInstace callbacks to return a shared pointer and
to also take an "const FileSpec *core_file" parameter to allow for core file
support. This will also allow for lldb_private::Process subclasses to be made
that could load crash logs. This should be possible on darwin where the crash
logs contain all of the stack frames for all of the threads, yet the crash
logs only contain the registers for the crashed thrad. It should also allow
some variables to be viewed for the thread that crashed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150154 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/RangeMap.h
ldb/Symbol/ObjectFile.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/Target/ThreadList.h
ldb/lldb-private-interfaces.h
9d4e86e20fd4b6a0bb4a3d003680ef2c4a842021 09-Feb-2012 Sean Callanan <scallanan@apple.com> Remembered to NULL out the symbol, which was
causing testsuite crashes.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150125 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionVariable.h
42404d284b22750851b26ae9a4ab42101f673089 08-Feb-2012 Johnny Chen <johnny.chen@apple.com> After discussions with Jim and Greg, modify the 'watchpoint set' command to become a mutiword command
with subcommand 'expression' and 'variable'. The first subcommand is for supplying an expression to
be evaluated into an address to watch for, while the second is for watching a variable.

'watchpoint set expression' is a raw command, which means that you need to use the "--" option terminator
to end the '-w' or '-x' option processing and to start typing your expression.

Also update several test cases to comply and add a couple of test cases into TestCompletion.py,
in particular, test that 'watchpoint set ex' completes to 'watchpoint set expression ' and that
'watchpoint set var' completes to 'watchpoint set variable '.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150109 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/OptionGroupWatchpoint.h
28e23861bedbeb5e46be7d2af4c33bf5132422c6 08-Feb-2012 Jim Ingham <jingham@apple.com> Send Breakpoint Changed events for all the relevant changes to breakpoints.
Also, provide and use accessors for the thread options on breakpoints so we
can control sending the appropriate events.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150057 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBBreakpoint.h
ldb/API/SBProcess.h
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointLocationList.h
ldb/lldb-enumerations.h
6183fccd61b67e814d9e7e85b25516a28edfe864 08-Feb-2012 Johnny Chen <johnny.chen@apple.com> Refine the 'watchpoint set' command to now require either the '-v' option (for watching of a variable) or
the '-e' option (for watching of an address) to be present.

Update some existing test cases with the required option and add some more test cases.

Since the '-v' option takes <variable-name> and the '-e' option takes <expr> as the command arg,
the existing infrastructure for generating the option usage can produce confusing help message,
like:

watchpoint set -e [-w <watch-type>] [-x <byte-size>] <variable-name | expr>
watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name | expr>

The solution adopted is to provide an extra member field to the struct CommandArgumentData called
(uint32_t)arg_opt_set_association, whose purpose is to link this particular argument data with some
option set(s). Also modify the signature of CommandObject::GetFormattedCommandArguments() to:

GetFormattedCommandArguments (Stream &str, uint32_t opt_set_mask = LLDB_OPT_SET_ALL)

it now takes an additional opt_set_mask which can be used to generate a filtered formatted command
args for help message.

Options::GenerateOptionUsage() impl is modified to call the GetFormattedCommandArguments() appropriately.
So that the help message now looks like:

watchpoint set -e [-w <watch-type>] [-x <byte-size>] <expr>
watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name>

rdar://problem/10703256


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150032 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
b7fad95031b51dde040dc8b3de7bd8db2d14f613 06-Feb-2012 Greg Clayton <gclayton@apple.com> Almost have templatized functions working (templatized classes are already
working, but not functions). I need to check on a few things to make sure
I am registering everything correctly in the right order and in the right
contexts.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149858 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ClangForward.h
ldb/Symbol/ClangASTContext.h
7dd5c51fbab8384b18f20ecc125f9a1bb3c9bcb2 06-Feb-2012 Greg Clayton <gclayton@apple.com> Removed all of the "#ifndef SWIG" from the SB header files since we are using
interface (.i) files for each class.

Changed the FindFunction class from:

uint32_t
SBTarget::FindFunctions (const char *name,
uint32_t name_type_mask,
bool append,
lldb::SBSymbolContextList& sc_list)

uint32_t
SBModule::FindFunctions (const char *name,
uint32_t name_type_mask,
bool append,
lldb::SBSymbolContextList& sc_list)

To:

lldb::SBSymbolContextList
SBTarget::FindFunctions (const char *name,
uint32_t name_type_mask = lldb::eFunctionNameTypeAny);

lldb::SBSymbolContextList
SBModule::FindFunctions (const char *name,
uint32_t name_type_mask = lldb::eFunctionNameTypeAny);

This makes the API easier to use from python. Also added the ability to
append a SBSymbolContext or a SBSymbolContextList to a SBSymbolContextList.

Exposed properties for lldb.SBSymbolContextList in python:

lldb.SBSymbolContextList.modules => list() or all lldb.SBModule objects in the list
lldb.SBSymbolContextList.compile_units => list() or all lldb.SBCompileUnits objects in the list
lldb.SBSymbolContextList.functions => list() or all lldb.SBFunction objects in the list
lldb.SBSymbolContextList.blocks => list() or all lldb.SBBlock objects in the list
lldb.SBSymbolContextList.line_entries => list() or all lldb.SBLineEntry objects in the list
lldb.SBSymbolContextList.symbols => list() or all lldb.SBSymbol objects in the list

This allows a call to the SBTarget::FindFunctions(...) and SBModule::FindFunctions(...)
and then the result can be used to extract the desired information:

sc_list = lldb.target.FindFunctions("erase")

for function in sc_list.functions:
print function
for symbol in sc_list.symbols:
print symbol

Exposed properties for the lldb.SBSymbolContext objects in python:

lldb.SBSymbolContext.module => lldb.SBModule
lldb.SBSymbolContext.compile_unit => lldb.SBCompileUnit
lldb.SBSymbolContext.function => lldb.SBFunction
lldb.SBSymbolContext.block => lldb.SBBlock
lldb.SBSymbolContext.line_entry => lldb.SBLineEntry
lldb.SBSymbolContext.symbol => lldb.SBSymbol


Exposed properties for the lldb.SBBlock objects in python:

lldb.SBBlock.parent => lldb.SBBlock for the parent block that contains
lldb.SBBlock.sibling => lldb.SBBlock for the sibling block to the current block
lldb.SBBlock.first_child => lldb.SBBlock for the first child block to the current block
lldb.SBBlock.call_site => for inline functions, return a lldb.declaration object that gives the call site file, line and column
lldb.SBBlock.name => for inline functions this is the name of the inline function that this block represents
lldb.SBBlock.inlined_block => returns the inlined function block that contains this block (might return itself if the current block is an inlined block)
lldb.SBBlock.range[int] => access the address ranges for a block by index, a list() with start and end address is returned
lldb.SBBlock.ranges => an array or all address ranges for this block
lldb.SBBlock.num_ranges => the number of address ranges for this blcok

SBFunction objects can now get the SBType and the SBBlock that represents the
top scope of the function.

SBBlock objects can now get the variable list from the current block. The value
list returned allows varaibles to be viewed prior with no process if code
wants to check the variables in a function. There are two ways to get a variable
list from a SBBlock:

lldb::SBValueList
SBBlock::GetVariables (lldb::SBFrame& frame,
bool arguments,
bool locals,
bool statics,
lldb::DynamicValueType use_dynamic);

lldb::SBValueList
SBBlock::GetVariables (lldb::SBTarget& target,
bool arguments,
bool locals,
bool statics);

When a SBFrame is used, the values returned will be locked down to the frame
and the values will be evaluated in the context of that frame.

When a SBTarget is used, global an static variables can be viewed without a
running process.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149853 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
ldb/API/SBBlock.h
ldb/API/SBBreakpoint.h
ldb/API/SBBreakpointLocation.h
ldb/API/SBBroadcaster.h
ldb/API/SBCommandInterpreter.h
ldb/API/SBCommandReturnObject.h
ldb/API/SBCompileUnit.h
ldb/API/SBData.h
ldb/API/SBDebugger.h
ldb/API/SBError.h
ldb/API/SBEvent.h
ldb/API/SBFileSpec.h
ldb/API/SBFileSpecList.h
ldb/API/SBFrame.h
ldb/API/SBFunction.h
ldb/API/SBInputReader.h
ldb/API/SBInstruction.h
ldb/API/SBInstructionList.h
ldb/API/SBLineEntry.h
ldb/API/SBListener.h
ldb/API/SBModule.h
ldb/API/SBProcess.h
ldb/API/SBSection.h
ldb/API/SBSourceManager.h
ldb/API/SBStream.h
ldb/API/SBStringList.h
ldb/API/SBSymbol.h
ldb/API/SBSymbolContext.h
ldb/API/SBSymbolContextList.h
ldb/API/SBTarget.h
ldb/API/SBThread.h
ldb/API/SBType.h
ldb/API/SBValue.h
ldb/API/SBValueList.h
ldb/Core/Module.h
ldb/Symbol/ClangASTType.h
ldb/Symbol/Function.h
ldb/Symbol/SymbolContext.h
ldb/Symbol/Type.h
ldb/lldb-enumerations.h
b5a8f1498e1ddaeed5187a878d57ea0b74af9c26 05-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10560053>

Fixed "target modules list" (aliased to "image list") to output more information
by default. Modified the "target modules list" to have a few new options:

"--header" or "-h" => show the image header address
"--offset" or "-o" => show the image header address offset from the address in the file (the slide applied to the shared library)

Removed the "--symfile-basename" or "-S" option, and repurposed it to
"--symfile-unique" "-S" which will show the symbol file if it differs from
the executable file.

ObjectFile's can now be loaded from memory for cases where we don't have the
files cached locally in an SDK or net mounted root. ObjectFileMachO can now
read mach files from memory.

Moved the section data reading code into the ObjectFile so that the object
file can get the section data from Process memory if the file is only in
memory.

lldb_private::Module can now load its object file in a target with a rigid
slide (very common operation for most dynamic linkers) by using:

bool
Module::SetLoadAddress (Target &target, lldb::addr_t offset, bool &changed)

lldb::SBModule() now has a new constructor in the public interface:

SBModule::SBModule (lldb::SBProcess &process, lldb::addr_t header_addr);

This will find an appropriate ObjectFile plug-in to load an image from memory
where the object file header is at "header_addr".




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149804 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
ldb/API/SBProcess.h
ldb/Core/Module.h
ldb/Core/PluginManager.h
ldb/Core/Section.h
ldb/Symbol/DWARFCallFrameInfo.h
ldb/Symbol/ObjectFile.h
ldb/Target/Process.h
ldb/lldb-private-interfaces.h
8f2e392e8937aaf66f91201dc5f4190d61902c67 04-Feb-2012 Sean Callanan <scallanan@apple.com> I have brought LLDB up-to-date with top of tree
LLVM/Clang. This brings in several fixes, including:

- Improvements in the Just-In-Time compiler's
allocation of memory: the JIT now allocates
memory in chunks of sections, improving its
ability to generate relocations. I have
revamped the RecordingMemoryManager to reflect
these changes, as well as to get the memory
allocation and data copying out fo the
ClangExpressionParser code. Jim Grosbach wrote
the updates to the JIT on the LLVM side.

- A new ExternalASTSource interface to allow LLDB to
report accurate structure layout information to
Clang. Previously we could only report the sizes
of fields, not their offsets. This meant that if
data structures included field alignment
directives, we could not communicate the necessary
alignment to Clang and accesses to the data would
fail. Now we can (and I have update the relevant
test case). Thanks to Doug Gregor for implementing
the Clang side of this fix.

- The way Objective-C interfaces are completed by
Clang has been made consistent with RecordDecls;
with help from Doug Gregor and Greg Clayton I have
ensured that this still works.

- I have eliminated all local LLVM and Clang patches,
committing the ones that are still relevant to LLVM
and Clang as needed.

I have tested the changes extensively locally, but
please let me know if they cause any trouble for you.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149775 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
ldb/Expression/ClangExpressionDeclMap.h
ldb/Expression/ClangExpressionVariable.h
ldb/Expression/ClangPersistentVariables.h
ldb/Expression/RecordingMemoryManager.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/ClangExternalASTSourceCallbacks.h
39f54ea7c3e0f9fb3bdc0d17a8def6781159d24f 04-Feb-2012 Greg Clayton <gclayton@apple.com> Allow a SBAddress to be created from a SBSection and an offset.

Changed the lldb.SBModule.section[<str>] property to return a single section.

Added a lldb.SBSection.addr property which returns an lldb.SBAddress object.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149755 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
0a19a1b9c25117854f226256805239d95153ed2d 04-Feb-2012 Greg Clayton <gclayton@apple.com> Convert all python objects in our API to use overload the __str__ method
instead of the __repr__. __repr__ is a function that should return an
expression that can be used to recreate an python object and we were using
it to just return a human readable string.

Fixed a crasher when using the new implementation of SBValue::Cast(SBType).

Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general
improvements to the API.

Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't
correctly handle not having a target.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149743 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/API/SBValue.h
ldb/API/SBWatchpoint.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
ldb/Core/ValueObjectVariable.h
ldb/Symbol/ClangASTType.h
d62b9c18f3fc567fa536e04faadd518cd363a22e 03-Feb-2012 Greg Clayton <gclayton@apple.com> Expose more convenience functionality in the python classes.

lldb.SBValueList now exposes the len() method and also allows item access:

lldb.SBValueList[<int>] - where <int> is an integer index into the list, returns a single lldb.SBValue which might be empty if the index is out of range
lldb.SBValueList[<str>] - where <str> is the name to look for, returns a list() of lldb.SBValue objects with any matching values (the list might be empty if nothing matches)
lldb.SBValueList[<re>] - where <re> is a compiles regular expression, returns a list of lldb.SBValue objects for containing any matches or a empty list if nothing matches

lldb.SBFrame now exposes:

lldb.SBFrame.variables => SBValueList of all variables that are in scope
lldb.SBFrame.vars => see lldb.SBFrame.variables
lldb.SBFrame.locals => SBValueList of all variables that are locals in the current frame
lldb.SBFrame.arguments => SBValueList of all variables that are arguments in the current frame
lldb.SBFrame.args => see lldb.SBFrame.arguments
lldb.SBFrame.statics => SBValueList of all static variables
lldb.SBFrame.registers => SBValueList of all registers for the current frame
lldb.SBFrame.regs => see lldb.SBFrame.registers

Combine any of the above properties with the new lldb.SBValueList functionality
and now you can do:

y = lldb.frame.vars['rect.origin.y']

or

vars = lldb.frame.vars
for i in range len(vars):
print vars[i]

Also expose "lldb.SBFrame.var(<str>)" where <str> can be en expression path
for any variable or child within the variable. This makes it easier to get a
value from the current frame like "rect.origin.y". The resulting value is also
not a constant result as expressions will return, but a live value that will
continue to track the current value for the variable expression path.

lldb.SBValue now exposes:

lldb.SBValue.unsigned => unsigned integer for the value
lldb.SBValue.signed => a signed integer for the value




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149684 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
4e6640ee7975a9b9b0854aaa1f4d2d0f08702110 03-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed casting in the lldb::SBValue::Cast(SBType) function.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149673 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
bad9753828b6e0e415e38094bb9627e41d57874c 03-Feb-2012 Enrico Granata <granata.enrico@gmail.com> Adding support for an "equivalents map". This can be useful when compilers emit multiple, different names for the same actual type. In such scenarios, one of the type names can actually be found during a type lookup, while the others are just aliases. This can cause issues when trying to work with these aliased names and being unable to resolve them to an actual type (e.g. getting an SBType for the aliased name).
Currently, no code is using this feature, since we can hopefully rely on the new template support in SBType to get the same stuff done, but the support is there just in case it turns out to be useful for some future need.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149661 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/CPPLanguageRuntime.h
3eeaf6e715784499520885535236ccff1ba56d1c 03-Feb-2012 Greg Clayton <gclayton@apple.com> Added support to SBType for getting template arguments from a SBType:

uint32_t
SBType::GetNumberOfTemplateArguments ();

lldb::SBType
SBType::GetTemplateArgumentType (uint32_t idx);

lldb::TemplateArgumentKind
SBType::GetTemplateArgumentKind (uint32_t idx);

Some lldb::TemplateArgumentKind values don't have a corresponding SBType
that will be returned from SBType::GetTemplateArgumentType(). This will
help our data formatters do their job by being able to find out the
type of template params and do smart things with those.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149658 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
ldb/Symbol/ClangASTContext.h
ldb/lldb-enumerations.h
2f2c277dd88f3e252394f70516b63f757d1a09a3 03-Feb-2012 Enrico Granata <granata.enrico@gmail.com> Added a new --omit-names (-O, uppercase letter o) option to "type summary add".
When used in conjunction with --inline-children, this option will cause the names of the values to be omitted from the output. This can be beneficial in cases such as vFloat, where it will compact the representation from
([0]=1,[1]=2,[2]=3,[3]=4) to (1, 2, 3, 4).
Added a test case to check that the new option works correctly.
Also took some time to revisit SummaryFormat and related classes and tweak them for added readability and maintainability.
Finally, added a new class name to which the std::string summary should be applied.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149644 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatClasses.h
ldb/Core/FormatNavigator.h
ca4fe802f0f8439a070e2adfb38ae2487fbde135 01-Feb-2012 Johnny Chen <johnny.chen@apple.com> Add const-ness to BreakpointLocation::IsEnabled().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149523 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointLocation.h
86ad476885a1fc5a14692534fb841be4eee7722a 01-Feb-2012 Greg Clayton <gclayton@apple.com> Added fuzz testing for when we call API calls with an invalid object.
We previously weren't catching that SBValue::Cast(...) would crash
if we had an invalid (empty) SBValue object.

Cleaned up the SBType API a bit.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149447 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBType.h
149d1f525c4744c41984d4b9dab78f6a8ba1d147 01-Feb-2012 Jim Ingham <jingham@apple.com> Threads now store their "temporary" resume state, so we know whether they were suspended in the most
recent step, and if they weren't allowed to run, don't ask questions about their state unless explicitly
requested to do so.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149443 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Thread.h
4691fc522359004738cde0646af96e0a39181b6b 31-Jan-2012 Enrico Granata <granata.enrico@gmail.com> Comments edited to better reflect what the function really does

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149390 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Stream.h
b8dc733bd264edb688129dcc3103fb5ba4c9f060 31-Jan-2012 Enrico Granata <granata.enrico@gmail.com> This commit provides a new default summary for Objective-C boolean variables, which shows YES or NO instead of the character value. A new category named objc is added to contain this summary provider. Any future Objective-C related formatters would probably fit here

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149388 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatManager.h
db9d6f47ab38e25c3efcbfa05780bf9a127fd259 31-Jan-2012 Greg Clayton <gclayton@apple.com> Cleaned up the Communication class when it tears down ConnectionFileDescriptor
instances to not pthread_cancel the read threads and wreak havoc on the mutex
in our ConnectionFileDescriptor class.

Also cleaned up some shutdown delays.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149355 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConnectionFileDescriptor.h
fd60a606f3283309a7d752e0cd3a559df7acee14 30-Jan-2012 Johnny Chen <johnny.chen@apple.com> Reverted 149277 changeset. It was coded that way for a reason.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149292 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointLocation.h
fb0026b41b6f3feea41b96e26a15ddef519c1f46 30-Jan-2012 Johnny Chen <johnny.chen@apple.com> Make BreakpointLocation::IsEnabled() consistent with the BreakpointLocation::SetEnabled() implementation.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149277 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/BreakpointLocation.h
0416bdf783a7dc2544b9ab034e225391f8f47343 30-Jan-2012 Greg Clayton <gclayton@apple.com> lldb::SBTarget and lldb::SBProcess are now thread hardened. They both still
contain shared pointers to the lldb_private::Target and lldb_private::Process
objects respectively as we won't want the target or process just going away.

Also cleaned up the lldb::SBModule to remove dangerous pointer accessors.

For any code the public API files, we should always be grabbing shared
pointers to any objects for the current class, and any other classes prior
to running code with them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149238 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
334d33a19fd28cf41cba74cc61cf149e7101a603 30-Jan-2012 Greg Clayton <gclayton@apple.com> SBFrame is now threadsafe using some extra tricks. One issue is that stack
frames might go away (the object itself, not the actual logical frame) when
we are single stepping due to the way we currently sometimes end up flushing
frames when stepping in/out/over. They later will come back to life
represented by another object yet they have the same StackID. Now when you get
a lldb::SBFrame object, it will track the frame it is initialized with until
the thread goes away or the StackID no longer exists in the stack for the
thread it was created on. It uses a weak_ptr to both the frame and thread and
also stores the StackID. These three items allow us to determine when the
stack frame object has gone away (the weak_ptr will be NULL) and allows us to
find the correct frame again. In our test suite we had such cases where we
were just getting lucky when something like this happened:

1 - stop at breakpoint
2 - get first frame in thread where we stopped
3 - run an expression that causes the program to JIT and run code
4 - run more expressions on the frame from step 2 which was very very luckily
still around inside a shared pointer, yet, not part of the current
thread (a new stack frame object had appeared with the same stack ID and
depth).

We now avoid all such issues and properly keep up to date, or we start
returning errors when the frame doesn't exist and always responds with
invalid answers.

Also fixed the UserSettingsController (not going to rewrite this just yet)
so that it doesn't crash on shutdown. Using weak_ptr's came in real handy to
track when the master controller has already gone away and this allowed me to
pull out the previous NotifyOwnerIsShuttingDown() patch as it is no longer
needed.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149231 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
ldb/API/SBProcess.h
ldb/API/SBTarget.h
ldb/Core/Debugger.h
ldb/Core/UserSettingsController.h
ldb/Target/Process.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/lldb-forward.h
90c5214bc61ee2cdf68236b36d9746ecd275302e 30-Jan-2012 Greg Clayton <gclayton@apple.com> Removed the "lldb-forward-rtti.h" header file as it was designed to contain
all RTTI types, and since we don't use RTTI anymore since clang and llvm don't
we don't really need this header file. All shared pointer definitions have
been moved into "lldb-forward.h".

Defined std::tr1::weak_ptr definitions for all of the types that inherit from
enable_shared_from_this() in "lldb-forward.h" in preparation for thread
hardening our public API.

The first in the thread hardening check-ins. First we start with SBThread.
We have issues in our lldb::SB API right now where if you have one object
that is being used by two threads we have a race condition. Consider the
following code:

1 int
2 SBThread::SomeFunction()
3 {
4 int result = -1;
5 if (m_opaque_sp)
6 {
7 result = m_opaque_sp->DoSomething();
8 }
9 return result;
10 }

And now this happens:

Thread 1 enters any SBThread function and checks its m_opaque_sp and is about
to execute the code on line 7 but hasn't yet
Thread 2 gets to run and class sb_thread.Clear() which calls m_opaque_sp.clear()
and clears the contents of the shared pointer member
Thread 1 now crashes when it resumes.

The solution is to use std::tr1::weak_ptr. Now the SBThread class contains a
lldb::ThreadWP (weak pointer to our lldb_private::Thread class) and this
function would look like:

1 int
2 SBThread::SomeFunction()
3 {
4 int result = -1;
5 ThreadSP thread_sp(m_opaque_wp.lock());
6 if (thread_sp)
7 {
8 result = m_opaque_sp->DoSomething();
9 }
10 return result;
11 }

Now we have a solid thread safe API where we get a local copy of our thread
shared pointer from our weak_ptr and then we are guaranteed it can't go away
during our function.

So lldb::SBThread has been thread hardened, more checkins to follow shortly.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149218 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDefines.h
ldb/API/SBThread.h
ldb/Core/DataVisualization.h
ldb/lldb-forward-rtti.h
ldb/lldb-forward.h
ldb/lldb-public.h
ldb/lldb-types.h
13d24fb1817faa7ccc4cfd799113ba1a2b8968eb 29-Jan-2012 Greg Clayton <gclayton@apple.com> Switching back to using std::tr1::shared_ptr. We originally switched away
due to RTTI worries since llvm and clang don't use RTTI, but I was able to
switch back with no issues as far as I can tell. Once the RTTI issue wasn't
an issue, we were looking for a way to properly track weak pointers to objects
to solve some of the threading issues we have been running into which naturally
led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared
pointer from just a pointer, which is also easily solved using the
std::tr1::enable_shared_from_this class.

The main reason for this move back is so we can start properly having weak
references to objects. Currently a lldb_private::Thread class has a refrence
to its parent lldb_private::Process. This doesn't work well when we now hand
out a SBThread object that contains a shared pointer to a lldb_private::Thread
as this SBThread can be held onto by external clients and if they end up
using one of these objects we can easily crash.

So the next task is to start adopting std::tr1::weak_ptr where ever it makes
sense which we can do with lldb_private::Debugger, lldb_private::Target,
lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
many more objects now that they are no longer using intrusive ref counted
pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
pointers).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149207 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/Breakpoint.h
ldb/Breakpoint/BreakpointLocation.h
ldb/Breakpoint/BreakpointSite.h
ldb/Core/Address.h
ldb/Core/Debugger.h
ldb/Core/FormatClasses.h
ldb/Core/FormatManager.h
ldb/Core/FormatNavigator.h
ldb/Core/Module.h
ldb/Core/SearchFilter.h
ldb/Core/SourceManager.h
ldb/Expression/ClangExpressionVariable.h
ldb/Expression/ClangUserExpression.h
ldb/Interpreter/Args.h
ldb/Symbol/ClangASTImporter.h
ldb/Symbol/DWARFCallFrameInfo.h
ldb/Symbol/ObjectFile.h
ldb/Symbol/Type.h
ldb/Target/Memory.h
ldb/Target/Process.h
ldb/Target/RegisterContext.h
ldb/Target/StackFrame.h
ldb/Target/Target.h
ldb/Target/Thread.h
ldb/Target/ThreadList.h
ldb/Utility/PriorityPointerPair.h
ldb/lldb-forward-rtti.h
ldb/lldb-types.h
1b925206e3c4867fea9eb55a4c6460962cf32564 29-Jan-2012 Greg Clayton <gclayton@apple.com> Added the ability to get the target triple, byte order and address byte size
from the SBTarget and SBModule interfaces. Also added many python properties
for easier access to many things from many SB objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149191 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBAddress.h
ldb/API/SBModule.h
ldb/API/SBTarget.h
3fc0c4f12b19f1e2bd276d2b6eb0fdd096a01414 28-Jan-2012 Greg Clayton <gclayton@apple.com> Adding the DWARF parser side for assited layout where the AST context
will ask ExternalASTSource objects to help laying out a type. This is needed
because the DWARF typically doesn't contain alignement or packing attribute
values, and we need to be able to match up types that the compiler uses
in expressions.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149160 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangExternalASTSourceCallbacks.h
d13a4dfd32e4b2a4c2b53acd1839c945a85e9b04 27-Jan-2012 Johnny Chen <johnny.chen@apple.com> Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the owner can notify InstanceSettings instances
that their owner reference is no longer valid.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149145 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/UserSettingsController.h
8a7970845318d20e840cca5185df6f2134150fd4 27-Jan-2012 Greg Clayton <gclayton@apple.com> Disable the ConnectionFileDescriptor mutex for now as it is deadlocking our
test suite and I need to investigate this.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149141 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConnectionFileDescriptor.h
08205a649cf8a94477f7f9ab8e42dd95ebfc9626 27-Jan-2012 Greg Clayton <gclayton@apple.com> Added a ModuleList::Destroy() method which will reclaim the std::vector
memory by doing a swap.

Also added a few utilty functions that can be enabled for debugging issues
with modules staying around too long when external clients still have references
to them.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149138 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
b17bf82e7f3a5e125abc79b6b75725c601f1c6ce 27-Jan-2012 Greg Clayton <gclayton@apple.com> NULL out the "ptr_" member of shared pointers for debug and release
builds (not build and integration builds) to help catch when a shared pointer
that might be in a collection class is used after the collection
has been freed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149136 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Utility/SharingPtr.h
06c6b2514755478bfcb37b4e68a4873105c872d9 27-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed a location where we would never end up unlocking our mutex in
the ClusterManager. Also switched to using Mutex::Locker where we can.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149132 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Utility/SharedCluster.h
c149c8b3a88e5c8a94febdf956551e378c531797 27-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed an issue that could happen during global object destruction in our
map that tracks all live Module classes. We must leak our mutex for our
collection class as it might be destroyed in an order we can't control.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149131 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
aa119ddd6de5a572175d56dd033181a1f3dd19f6 27-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10760649>

Fixed another double file descriptor close issue that could occur when destroying a ProcessGDBRemote() object. There was a race which was detected by our fd_interposing library:

error: /Applications/Xcode.app/Contents/MacOS/Xcode (pid=55222): close (fd=60) resulted in EBADF:
0 libFDInterposing.dylib 0x00000001082be8ca close$__interposed__ + 666
1 LLDB 0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
2 LLDB 0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
3 LLDB 0x00000001194fe249 lldb_private::ConnectionFileDescriptor::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 835
4 LLDB 0x00000001194fc320 lldb_private::Communication::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 634
5 LLDB 0x000000011959c7f4 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote&, unsigned int) + 228
6 LLDB 0x000000011959c6b5 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSeconds(StringExtractorGDBRemote&, unsigned int) + 49
7 LLDB 0x0000000119629a71 GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse(ProcessGDBRemote*, char const*, unsigned long, StringExtractorGDBRemote&) + 509
8 LLDB 0x00000001195a4076 ProcessGDBRemote::AsyncThread(void*) + 514
9 LLDB 0x0000000119568094 ThreadCreateTrampoline(void*) + 91
10 libsystem_c.dylib 0x00007fff8ca028bf _pthread_start + 335
11 libsystem_c.dylib 0x00007fff8ca05b75 thread_start + 13

fd=60 was previously closed with this event:
pid=55222: close (fd=60) => 0
0 libFDInterposing.dylib 0x00000001082be870 close$__interposed__ + 576
1 LLDB 0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
2 LLDB 0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
3 LLDB 0x00000001194fbf00 lldb_private::Communication::Disconnect(lldb_private::Error*) + 92
4 LLDB 0x00000001195a2a77 ProcessGDBRemote::StopAsyncThread() + 89
5 LLDB 0x00000001195a2bf6 ProcessGDBRemote::DoDestroy() + 310
6 LLDB 0x00000001195f938d lldb_private::Process::Destroy() + 85
7 LLDB 0x0000000118819b48 lldb::SBProcess::Kill() + 72
8 DebuggerLLDB 0x0000000117264358 DBGLLDBSessionThread(void*) + 4450
9 LLDB 0x0000000119568094 ThreadCreateTrampoline(void*) + 91
10 libsystem_c.dylib 0x00007fff8ca028bf _pthread_start + 335
11 libsystem_c.dylib 0x00007fff8ca05b75 thread_start + 13

fd=60 was created with this event:
pid=55222: socket (domain = 2, type = 1, protocol = 6) => fd=60
0 libFDInterposing.dylib 0x00000001082bc968 socket$__interposed__ + 600
1 LLDB 0x00000001194fd75f lldb_private::ConnectionFileDescriptor::ConnectTCP(char const*, lldb_private::Error*) + 179
.....







git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149103 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ConnectionFileDescriptor.h
177bc682e2b45354e8b0753e705dc84255c42173 27-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10750012>

Remove a pseudo terminal master open and slave file descriptor that was being
used for pythong stdin. It was not hooked up correctly and was causing file
descriptor leaks.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149098 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBCommandInterpreter.h
ldb/Interpreter/ScriptInterpreter.h
ccf4450f17759b2e6f15eb12134f88a0128dfde7 26-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed formats being able to be applied recursively when using:
target variable -f <format> [args]
frame variable -f <format> [args]
expression -f <format> -- expr



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149080 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ddf110d67eb3d3e621441c4383904e838bc0c403 24-Jan-2012 Sean Callanan <scallanan@apple.com> Added a mechanism for the IR interpreter to return
an error along with its boolean result. The
expression parser reports this error if the
interpreter fails and the expression could not be
run in the target.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148870 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionParser.h
ldb/Expression/IRForTarget.h
ldb/Expression/IRInterpreter.h
1c2d941ab4c3ba05888c48e25d245b099a18213a 24-Jan-2012 Johnny Chen <johnny.chen@apple.com> Minor comment change. Plus use member function instead of directly accessing member field.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148756 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/StoppointLocation.h
51b7c5ff358a6eecfc4c827a96ab301a1798c4e2 24-Jan-2012 Johnny Chen <johnny.chen@apple.com> Tiny refactoring to use member functions instead of directly accessing member fields.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148743 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/StoppointLocation.h
ebad95d436237a0ecd4e28307d7e37ce997536c1 20-Jan-2012 Sean Callanan <scallanan@apple.com> Made IsArrayOfScalarType handle typedefs correctly.

We should ultimately introduce GetAs...Type
functions in all cases where we have Is...Type
functions that know how to look inside typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148512 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
120d94de65fd5979f885768c8ddeada63897c9ba 19-Jan-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/10724187

http://llvm.org/viewvc/llvm-project?rev=148491&view=rev check in broke the argument completion
for "settings set th", followed by TAB. Provide a way for commands who want raw commands to
hook into the completion mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148500 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Interpreter/CommandObject.h
666c553ca803df25b7fc1e53cb8616449f4ce308 19-Jan-2012 Greg Clayton <gclayton@apple.com> Allow a way to track all allocations for our intrusive ref counted pointers.
It is disabled by default, but can be enabled to track down shared pointer
cycles.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148461 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Utility/SharingPtr.h
662e56733faaeee932eba120d756257682f1bf04 19-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed an issue with the Instruction subclasses where the strings might
be fetched too many times and the DisassemblerLLVM was appending to strings
when the opcode, mnemonic and comment accessors were called multiple times
and if any of the strings were empty.

Also fixed the test suite failures from recent Objective C modifications.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148460 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Disassembler.h
ldb/Target/ObjCLanguageRuntime.h
e0028b827759c5ad2cbc45947371c362193a63bc 19-Jan-2012 Sean Callanan <scallanan@apple.com> Fixed a problem where maintaining the ObjCInterfaceMap
for each ObjCInterfaceDecl was imposing performance
penalties for Objective-C apps. Instead, we now use
the normal function query mechanisms, which use the
relevant accelerator tables.

This fix also includes some modifications to the
SymbolFile which allow us to find Objective-C methods
and report their Clang Decls correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148457 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangASTImporter.h
e14d3d3209f4260acc6e84d656460d5bdeade2c2 19-Jan-2012 Greg Clayton <gclayton@apple.com> Added an extra way to chop up an objective C prototype and use it where necessary.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148445 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ObjCLanguageRuntime.h
a58a7887e423650de3fe64ca38a4ccbf6fcc3909 14-Jan-2012 Sean Callanan <scallanan@apple.com> I forgot to import a header file change. This
should fix builds.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148199 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
f03d97e519811a029578cc120a7a2725cdf2aad1 12-Jan-2012 Jim Ingham <jingham@apple.com> Discriminate between the lldb_private::Type's for ObjC Classes that come from debug info, and those that
are made up from the ObjC runtime symbols. For now the latter contain nothing but the fact that the name
describes an ObjC class, and so are not useful for things like dynamic types.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148059 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Type.h
a334c9d5f5a563bb55b424173c5c52b9295c11ba 12-Jan-2012 Jim Ingham <jingham@apple.com> Let the Module FindType do the stripping of namespace components, that's not expensive
and doing it both at the ModuleList and Module levels means we look 4 times for a negative
search. Also, don't do the search for the stripped name if that is the same as the original
one.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148054 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ModuleList.h
db2dc2b824b61ef7578dc8cdad7b338aa82b1f17 12-Jan-2012 Greg Clayton <gclayton@apple.com> Big change in the way ObjectFile file contents are managed. We now
mmap() the entire object file contents into memory with MAP_PRIVATE.
We do this because object file contents can change on us and currently
this helps alleviate this situation. It also make the code for accessing
object file data much easier to manage and we don't end up opening the
file, reading some data and closing the file over and over.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148017 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Section.h
ldb/Symbol/ObjectContainer.h
ldb/Symbol/ObjectFile.h
66a16ee233a500fac325d337f4ba679f47633826 10-Jan-2012 Jim Ingham <jingham@apple.com> As we are grubbing through memory chasing down the hierarchy of an ObjC object, protect against the possibility that that object might be just random memory with loops.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147838 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/FormatNavigator.h
0b862e488d2fab178b48dc1ea6b1e94b3ef8c7e2 10-Jan-2012 Greg Clayton <gclayton@apple.com> Fix for linux build.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147834 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
22834bef08349978a701d0c91a71990bbd49033f 09-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed a return value problem with the new ABI::FixCodeAddress () function:

it was checked in as:
virtual bool ABI::FixCodeAddress (lldb::addr_t pc);

when it should have been:

virtual lldb::addr_t ABI::FixCodeAddress (lldb::addr_t pc);





git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147790 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ABI.h
fc984a09c47b592e7cde20f163c1795a9e0f21fc 08-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10645694>

Fixed an ARM backtracing issue where if the previous frame was a thumb
function and it was a tail call so that the current frame returned to
an address that would fall into the next function, we would use the
next function as the basis for how we unwound the previous frame's
registers and of course get things wrong. We now fix the PC code
address using the current ABI plug-in, and the ARM ABI plug-in has
been modified to correctly fix the code address. So when we do the
symbol context lookup, instead of taking an address like 0x1001 and
decrementing 1, and looking up the symbol context for a frame, we
now correctly fix 0x1001 to 0x1000, then decrement that by 1 to
get the correct symbol context.

I added a bunch more logging to "log enable lldb uwnind" to help
us in the future. We now log the PC, FP and SP (if they are available),
and we also dump the "active_row" that we find for unwinding a frame.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147747 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ABI.h
ae4ca1b4c35673322847856952579b5ebc9b8a57 07-Jan-2012 Greg Clayton <gclayton@apple.com> Recursive calls to ValueObject::GetSummaryAsCString() are causing crashes.
The previous approach to controlling the recursion was doing it from
outside the function which is not reliable. Now it is being done inside
the function. This might not solve all of the crashes that we were seeing
since there are other functions that clear the bit that indicates that
the summary is in the process of being generated, but it might solve some.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147741 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
a6b7e323caa2bbd1b2835dcce775340b27c13bf3 07-Jan-2012 Greg Clayton <gclayton@apple.com> Patch from Enrico Granata that moves SBData related functions into the SBData
class instead of requiring a live process in order to be able to create useful
SBData objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147702 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBData.h
ldb/API/SBProcess.h
4b23ab33d221eaadf40f65a5b5fe3ca4475ff761 06-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10652336>

Fixed a crasher when trying to load an expression prefix file:

% touch /tmp/carp.txt
% xcrun lldb
(lldb) settings set target.expr-prefix /tmp/carp.txt
Segmentation fault



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147646 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/FileSpec.h
9f074f0e030a74a3efd716a476b436f2d32bdf74 06-Jan-2012 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11619
Allow creating SBData values from arrays or primitives in Python

Patch submitted by Enrico Granata.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147639 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBData.h
ldb/API/SBProcess.h
c61349681fa2923bd30ad16afce450a0da6108cf 06-Jan-2012 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11618
lldb::SBValue::AddressOf does not work on dereferenced registers in synthetic children provider

Patch submitted by Enrico Granata.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147637 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionVariable.h
cc152b20d7b07aa4c229977b7b0d8d94cbda2ff5 06-Jan-2012 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11715
comma at end of enumerator list


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147633 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolFile.h
7e9964783acae183c23a7ea470cedd64472eb233 05-Jan-2012 Johnny Chen <johnny.chen@apple.com> This patch combines common code from Linux and FreeBSD into
a new POSIX platform. It also contains fixes for 64bit FreeBSD.

The patch is based on changes by Mark Peek <mp@FreeBSD.org> and
"K. Macy" <kmacy@freebsd.org> in their github repo located at
https://github.com/fbsd/lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147609 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Host/Host.h
df6dc88322f103b263092d752db4490e628a1cbd 05-Jan-2012 Greg Clayton <gclayton@apple.com> Added code in the Host layer that can report system log messages
so that we don't have "fprintf (stderr, ...)" calls sprinkled everywhere.
Changed all needed locations over to using this.

For non-darwin, we log to stderr only. On darwin, we log to stderr _and_
to ASL (Apple System Log facility). This will allow GUI apps to have a place
for these error and warning messages to go, and also allows the command line
apps to log directly to the terminal.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147596 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Host/Host.h
ldb/Symbol/SymbolFile.h
2f28ece553d2ef0d7b3e8d1419020591ec3818f9 04-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10507811>

Be better at detecting when DWARF changes and handle this more
gracefully than asserting and exiting.

Also fixed up a bunch of system calls that weren't properly checking
for EINTR.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147559 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBFrame.h
ldb/Expression/DWARFExpression.h
ldb/Host/File.h
0fea0512e47d1820dd78de2748b874c81eea77d6 30-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10368163>

Watch for empty symbol tables by doing a lot more error checking on
all mach-o symbol table load command values and data that is obtained.
This avoids a crash that was happening when there was no string table.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147358 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/DataExtractor.h
1716ad73618aab3cff4d82c3adc11a88ef76273d 29-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10546739>

Fixed SBValue::GetValueAsUnsigned() and SBValue::GetValueAsSigned() calls to
work for bitfields.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147332 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Scalar.h
d2909b4fdbf504f5c182fad7dbee0c1b0f6f5c68 29-Dec-2011 Greg Clayton <gclayton@apple.com> Centralize the code the reads the CFI so that we always log.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147330 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/DWARFCallFrameInfo.h
d3850ab15ed119ae36136656df0bae4feb0c9fc1 28-Dec-2011 Greg Clayton <gclayton@apple.com> Save a little bit of memory that was being reserved in a UniqueCStringMap
vector that can be sized to fit.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147324 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Symbol.h
ldb/Symbol/Variable.h
016ef8886cd429f8a53bff967e601f831e409eaa 22-Dec-2011 Jim Ingham <jingham@apple.com> Improve the x86_64 return value decoder to handle most structure returns.
Switch from GetReturnValue, which was hardly ever used, to GetReturnValueObject
which is much more convenient.
Return the "return value object" as a persistent variable if requested.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147157 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ABI.h
ldb/Target/ThreadPlanCallFunction.h
daa6efe771f5f068e29328a774fa5bf2358ce14a 21-Dec-2011 Sean Callanan <scallanan@apple.com> The "desired result type" code in the expression
parser has hitherto been an implementation waiting
for a use. I have now tied the '-o' option for
the expression command -- which indicates that the
result is an Objective-C object and needs to be
printed -- to the ExpressionParser, which
communicates the desired type to Clang.

Now, if the result of an expression is determined
by an Objective-C method call for which there is
no type information, that result is implicitly
cast to id if and only if the -o option is passed
to the expression command. (Otherwise if there
is no explicit cast Clang will issue an error.
This behavior is identical to what happened before
r146756.)

Also added a testcase for -o enabled and disabled.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147099 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ASTResultSynthesizer.h
ldb/Expression/ClangExpression.h
ldb/Expression/ClangUserExpression.h
ldb/Target/Target.h
e0bd571a8050da2b3462c35c9f209cbc9755c750 19-Dec-2011 Jim Ingham <jingham@apple.com> Add needed Clear methods.
<rdar://problem/10596340>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146902 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBModule.h
ldb/API/SBValue.h
ldb/API/SBValueList.h
bcbefa8de7877c5d0674d5816cf96db48b103e6f 17-Dec-2011 Johnny Chen <johnny.chen@apple.com> Fixed code rot pointed out by Jim.
SBThread::GetStopReasonDataCount/GetStopReasonDataAtIndex() need to handle eStopReasonWatchpoint.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146812 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
1586d9720002e407a3a097baf302de5fa4ca9c1b 17-Dec-2011 Jim Ingham <jingham@apple.com> Add the ability to capture the return value in a thread's stop info, and print it
as part of the thread format output.
Currently this is only done for the ThreadPlanStepOut.
Add a convenience API ABI::GetReturnValueObject.
Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
trying to hand out one of its subsidiary object's pointers. That way this will always
be good.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146806 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBThread.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectConstResult.h
ldb/Target/ABI.h
ldb/Target/StopInfo.h
ldb/Target/Thread.h
ldb/Target/ThreadPlan.h
ldb/Target/ThreadPlanStepOut.h
dfafa141aa9d0dd0596bf08b3f941be8c308316d 17-Dec-2011 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11588
valobj.AddressOf() returns None when an address is expected in a SyntheticChildrenProvider

Patch from Enrico Granata:

The problem was that the frozen object created by the expression parser was a copy of the contents of the StgClosure, rather than a pointer to it. Thus, the expression parser was correctly computing the result of the arithmetic&cast operation along with its address, but only saving it in the live object. This meant that the frozen copy acted as an address-less variable, hence the problem.

The fix attached to this email lets the expression parser store the "live address" in the frozen copy of the address when the object is built without a valid address of its own.
Doing so, along with delegating ValueObjectConstResult to calculate its own address when necessary, solves the issue. I have also added a new test case to check for regressions in this area, and checked that existing test cases pass correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146768 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
ldb/Core/ValueObjectConstResult.h
ldb/Core/ValueObjectConstResultImpl.h
0539a80ae9cdb243d1db3cfd34b504b391658703 16-Dec-2011 Sean Callanan <scallanan@apple.com> Updated Clang to take an enhancement to the way
we handle Objective-C method calls. Currently,
LLDB treats the result of an Objective-C method
as unknown if the type information doesn't have
the method's signature. Now Clang can cast the
result to id if it isn't explicitly cast.

I also added a test case for this, as well as a
fix for a type import problem that this feature
exposed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146756 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
a5fd1761e694de335770b29fb66ce8794b0f34f9 16-Dec-2011 Greg Clayton <gclayton@apple.com> Handle all of the "thumb" target triple architecture variants that llvm
handles.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146746 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ArchSpec.h
c5486870833244b1c705901f678f0aa2dca5b67c 15-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10584789>

Added a static memory pressure function in SBDebugger:

void SBDebugger::MemoryPressureDetected ()

This can be called by applications that detect memory pressure to cause LLDB to release cached information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146640 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBDebugger.h
4a2e33769873d68d5703da5742c0e248f46e3a72 15-Dec-2011 Greg Clayton <gclayton@apple.com> Expose new read memory fucntion through python in SBProcess:

size_t
SBProcess::ReadCStringFromMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);

uint64_t
SBProcess::ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error);

lldb::addr_t
SBProcess::ReadPointerFromMemory (addr_t addr, lldb::SBError &error);

These ReadCStringFromMemory() has some SWIG type magic that makes it return the
python string directly and the "buf" is not needed:

error = SBError()
max_cstr_len = 256
cstr = lldb.process.ReadCStringFromMemory (0x1000, max_cstr_len, error)
if error.Success():
....

The other two functions behave as expteced. This will make it easier to get integer values
from the inferior process that are correctly byte swapped. Also for pointers, the correct
pointer byte size will be used.

Also cleaned up a few printf style warnings for the 32 bit lldb build on darwin.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146636 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBProcess.h
ldb/Target/Process.h
ef1f690aa23e81a14654d4a6fe9df7810f4eda06 15-Dec-2011 Sean Callanan <scallanan@apple.com> I have added a function to SBTarget that allows
clients to disassemble a series of raw bytes as
demonstrated by a new testcase.

In the future, this API will also allow clients
to provide a callback that adds comments for
addresses in the disassembly.

I also modified the SWIG harness to ensure that
Python ByteArrays work as well as strings as
sources of raw data.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146611 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBInstructionList.h
ldb/API/SBTarget.h
ldb/Core/Disassembler.h
84985174d8b0fe4913caf446f7789f1531317650 14-Dec-2011 Jason Molenda <jmolenda@apple.com> On Mac OS X the Objective-C runtime (libobjc) has many critical
dispatch functions that are implemented in hand-written assembly.
There is also hand-written eh_frame instructions for unwinding
from these functions.

Normally we don't use eh_frame instructions for the currently
executing function, prefering the assembly instruction profiling
method. But in these hand-written dispatch functions, the
profiling is doomed and we should use the eh_frame instructions.

Unfortunately there's no easy way to flag/extend the eh_frame/debug_frame
sections to annotate if the unwind instructions are accurate at
all addresses ("asynchronous") or if they are only accurate at locations
that can throw an exception ("synchronous" and the normal case for
gcc/clang generated eh_frame/debug_frame CFI).

<rdar://problem/10508134>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146551 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/DynamicLoader.h
1f9c39c3c146f3c057575f53707e97019f402c46 13-Dec-2011 Jason Molenda <jmolenda@apple.com> When unwinding from the first frame, try to ask the remote debugserver
if this is a mapped/executable region of memory. If it isn't, we've jumped
through a bad pointer and we know how to unwind the stack correctly based
on the ABI.

Previously I had 0x0 special cased but if you jumped to 0x2 on x86_64 one
frame would be skipped because the unwinder would try using the x86_64
ArchDefaultUnwindPlan which relied on the rbp.

Fixes <rdar://problem/10508291>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146477 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Process.h
5ed59a78c1970fab44b393cd9d20f0e6fc2e326a 13-Dec-2011 Sean Callanan <scallanan@apple.com> I have modified the part of the code that finds and
validates the "self," "this," and "_cmd" pointers
that get passed into expressions. It used to check
them aggressively for validity before allowing the
expression to run as an object method; now, this
functionality is gated by a bool and off by default.

Now the default is that when LLDB is stopped in a
method of a class, code entered using "expr" will
always masquerade as an instance method. If for
some reason "self," "this," or "_cmd" is unavailable
it will be reported as NULL. This may cause the
expression to crash if it relies on those pointers,
but for example getting the addresses of ivars will
now work as the user would expect.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146465 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangUserExpression.h
931449ee91b1a3acf0cd8ab2e1dd1285d7c42ad4 12-Dec-2011 Johnny Chen <johnny.chen@apple.com> rdar://problem/10227672

There were two problems associated with this radar:
1. "settings show target.source-map" failed to show the source-map after, for example,
"settings set target.source-map /Volumes/data/lldb/svn/trunk/test/source-manager /Volumes/data/lldb/svn/trunk/test/source-manager/hidden"
has been executed to set the source-map.
2. "list -n main" failed to display the source of the main() function after we properly set the source-map.

The first was fixed by adding the missing functionality to TargetInstanceSettings::GetInstanceSettingsValue (Target.cpp)
and updating the support files PathMappingList.h/.cpp; the second by modifying SourceManager.cpp to fix several places
with incorrect logic.

Also added a test case test_move_and_then_display_source() to TestSourceManager.py, which moves main.c to hidden/main.c,
sets target.source-map to perform the directory mapping, and then verifies that "list -n main" can still show the main()
function.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146422 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/PathMappingList.h
c5d14e6146ccacd8e00f1c247e21cd86ebfac21d 10-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/9958446>
<rdar://problem/10561406>

Stopped the SymbolFileDWARF::FindFunctions (...) from always calculating
the line table entry for all functions that were found. This can slow down
the expression parser if it ends up finding a bunch of matches. Fixed the
places that were relying on the line table entry being filled in.

Discovered a recursive stack blowout that happened when "main" didn't have
line info for it and there was no line information for "main"



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146330 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Address.h
7c53768e700f9181082072017976472e3ad9cc37 10-Dec-2011 Jim Ingham <jingham@apple.com> Don't try to cache the ExecutionContextScope in the ValueObject::EvaluationPoint, it is too
hard to ensure it doesn't get invalidated out from under us. Instead look it up from the ThreadID
and StackID when asked for it.
<rdar://problem/10554409>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146309 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/ValueObject.h
b2027ec7cc8c15dfdc7c945dc6aed4b5d684321e 09-Dec-2011 Sean Callanan <scallanan@apple.com> If the expression parser is unable to complete a TagDecl
in the context in which it was originally found, the
expression parser now goes hunting for it in all modules
(in the appropriate namespace, if applicable). This means
that forward-declared types that exist in another shared
library will now be resolved correctly.

Added a test case to cover this. The test case also tests
"frame variable," which does not have this functionality
yet.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146204 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
1b42575189379cb0c1441f74a48127e9ab7335e3 08-Dec-2011 Jim Ingham <jingham@apple.com> Add SBValue::GetDynamicValue and SBValue::GetStaticValue API's.
<rdar://problem/10545069>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146173 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBValue.h
ldb/Core/ValueObject.h
ldb/Core/ValueObjectDynamicValue.h
434b7dde31ae8b59f20add4dd27e051dd71fbe2c 08-Dec-2011 Sean Callanan <scallanan@apple.com> Tightened up the variable list to deal with
variables that might not have valid names.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146133 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionVariable.h
37bb8ddd443da172f42bb8657f15ec856a525c84 08-Dec-2011 Greg Clayton <gclayton@apple.com> Added a new class called lldb_private::SymbolFileType which is designed to
take a SymbolFile reference and a lldb::user_id_t and be used in objects
which represent things in debug symbols that have types where we don't need
to know the true type yet, such as in lldb_private::Variable objects. This
allows us to defer resolving the type until something is used. More specifically
this allows us to get 1000 local variables from the current function, and if
the user types "frame variable argc", we end up _only_ resolving the type for
"argc" and not for the 999 other local variables. We can expand the use of this
as needed in the future.

Modified the DWARFMappedHash class to be able to read the HashData that has
more than just the DIE offset. It currently will read the atoms in the header
definition and read the data correctly. Currently only the DIE offset and
type flags are supported. This is needed for adding type flags to the
.apple_types hash accelerator tables.

Fixed a assertion crash that would happen if we have a variable that had a
DW_AT_const_value instead of a location where "location.LocationContains_DW_OP_addr()"
would end up asserting when it tried to parse the variable location as a
DWARF opcode list.

Decreased the amount of memory that LLDB would use when evaluating an expression
by 3x - 4x for clang. There was a place in the namespace lookup code that was
parsing all namespaces with a certain name in a DWARF file instead of stopping
when it found the first match. This was causing all of the compile units with
a matching namespace to get parsed into memory and causing unnecessary memory
bloat.

Improved "Target::EvaluateExpression(...)" to not try and find a variable
when the expression contains characters that would certainly cause an expression
to need to be evaluated by the debugger.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146130 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/MappedHash.h
ldb/Symbol/Type.h
ldb/Symbol/Variable.h
ldb/lldb-forward-rtti.h
ldb/lldb-forward.h
e1301a62783cf0d5457350b90830917841cbf6fc 06-Dec-2011 Sean Callanan <scallanan@apple.com> As part of the work to make Objective-C type information
from symbols more accessible, I have added a second
map to the ClangASTImporter: the ObjCInterfaceMetaMap.
This map keeps track of all type definitions found for
a particular Objective-C interface, allowing the
ClangASTSource to refer to all possible sources when
looking for method definitions.

There is a bug in lookup that I still need to figure out,
but after that we should be able to report full method
information for Objective-C classes shown in symbols.

Also fixed some errors I ran into when enabling the maps
for the persistent type store. The persistent type store
previously did not use the ClangASTImporter to import
types, instead using ASTImporters that got allocated each
time a type needed copying. To support the requirements
of the persistent type store -- namely, that types must be
copied, completed, and then completely severed from their
origin in the parser's AST context (which will go away) --
I added a new function called DeportType which severs all
these connections.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145914 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ASTResultSynthesizer.h
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangASTImporter.h
31ad9cc8eab4d183ebfc5a0ef0bb952cacb1bc50 06-Dec-2011 Jim Ingham <jingham@apple.com> Correct typo in method name (AddSymbolFileRepresendation...)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145884 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolVendor.h
16d2187c0c3992f22e9cb011f863dc0fe35e3cde 03-Dec-2011 Greg Clayton <gclayton@apple.com> Added the ability for clients to grab a set of symbol table indexes and then
add them to a fast lookup map. lldb_private::Symtab now export the following
public typedefs:

namespace lldb_private {

class Symtab {
typedef std::vector<uint32_t> IndexCollection;
typedef UniqueCStringMap<uint32_t> NameToIndexMap;
};
}

Clients can then find symbols by name and or type and end up with a
Symtab::IndexCollection that is filled with indexes. These indexes can then
be put into a name to index lookup map and control if the mangled and
demangled names get added to the map:

bool add_demangled = true;
bool add_mangled = true;
Symtab::NameToIndexMap name_to_index;
symtab->AppendSymbolNamesToMap (indexes, add_demangled, add_mangled, name_to_index).

This can be repeated as many times as needed to get a lookup table that
you are happy with, and then this can be sorted:

name_to_index.Sort();

Now name lookups can be done using a subset of the symbols you extracted from
the symbol table. This is currently being used to extract objective C types
from object files when there is no debug info in SymbolFileSymtab.

Cleaned up how the objective C types were being vended to be more efficient
and fixed some errors in the regular expression that was being used.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145777 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/Symtab.h
d0b7cfa22722fdaf4111a61d6eeb02a587710e16 03-Dec-2011 Sean Callanan <scallanan@apple.com> Testcase fixes with the new symbol lookup code for
Objective-C, making symbol lookups for various raw
Objective-C symbols work correctly. The IR interpreter
makes these lookups because Clang has emitted raw
symbol references for ivars and classes.

Also improved performance in SymbolFiles, caching the
result of asking for SymbolFile abilities.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145758 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/SymbolFile.h
2fc7e8d0d392fe85f22d9c75212ebca4cbce547f 03-Dec-2011 Sean Callanan <scallanan@apple.com> Added ClangExternalASTSourceCommon, a local superclass
for all our external AST sources that lets us associate
arbitrary flags with the types we put into the AST
contexts. Also added an API on ClangASTContext that
allows access to these flags given only an ASTContext
and a type.

Because we don't have access to RTTI, and because at
some point in the future we might encounter external
AST sources that we didn't make (so they don't subclass
ClangExternalASTSourceCommon) I added a magic number
that we check before doing anything else, so that we
can catch that problem as soon as it appears.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145748 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangASTSource.h
ldb/Symbol/ClangASTContext.h
ldb/Symbol/ClangExternalASTSourceCallbacks.h
ldb/Symbol/ClangExternalASTSourceCommon.h
3f69eacbb218a37390822c89d3675bd740590382 03-Dec-2011 Greg Clayton <gclayton@apple.com> Added new symbol types for Objective C classes, metaclasses, and ivars. Each
object file can correctly make these symbols which will abstract us from the
file format and ABI and we can then ask for the objective C class symbol for
a class and find out which object file it was defined in.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145744 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Mangled.h
ldb/lldb-enumerations.h
ad382c523709e86f01bfea27f1991df9afeef2dd 03-Dec-2011 Jim Ingham <jingham@apple.com> Make the ThreadPlanStepThrough set a backstop breakpoint on the return address from
the function it is being asked to step through, so that even if we get the trampoline
target wrong (for instance) we will still not lose control.

The other fix here is to tighten up the handling of the case where the current plan
doesn't explain the stop, but a plan above us does. In that case, if the plan that
does explain the stop says it is done, we need to clean up the plans below it and
continue on with our processing.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145740 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadPlanStepInRange.h
ldb/Target/ThreadPlanStepOut.h
ldb/Target/ThreadPlanStepOverRange.h
ldb/Target/ThreadPlanStepRange.h
ldb/Target/ThreadPlanStepThrough.h
bae39c554644de9f319f59c25a76ad64bd266f84 03-Dec-2011 Greg Clayton <gclayton@apple.com> Fixed some extra warnings that show up with the new clang.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145735 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Breakpoint/StoppointLocation.h
d5b0b447221ab6e1fe5c5223c6bf7604d4377e8b 02-Dec-2011 Greg Clayton <gclayton@apple.com> After moving lldb::pid_t to 64 bits, keep a deprecated version around for
previous binaries that link against this for a few builds to make sure we
can continue to run against previous binaries.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145668 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/API/SBTarget.h
d9919d3f46c5069eef065a27f96abc021330d5f3 02-Dec-2011 Greg Clayton <gclayton@apple.com> Process IDs (lldb::pid_t) and thread IDs (lldb::tid_t) are now 64 bit. This
will allow us to represent a process/thread ID using a pointer for the OS
plug-ins where they might want to represent the process or thread ID using
the address of the process or thread structure.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145644 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/ThreadList.h
ldb/Utility/PseudoTerminal.h
ldb/lldb-types.h
21ef5bb658e4582339bedf5befc10c13953bdac0 01-Dec-2011 Sean Callanan <scallanan@apple.com> Made symbol lookup in the expression parser more
robust:

- Now a client can specify what kind of symbols
are needed; notably, this allows looking up
Objective-C class symbols specifically.

- In the class of symbols being looked up, if
one is non-NULL and others are NULL, LLDB now
prefers the non-NULL one.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145554 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
fa21ffd0c50efce27bfa084c6fb33dff255288b0 01-Dec-2011 Johnny Chen <johnny.chen@apple.com> rdar://problem/10501020

ClangASTSource::~ClangASTSource() was calling

ClangASTContext *scratch_clang_ast_context = m_target->GetScratchClangASTContext();

which had the side effect of deleting this very ClangASTSource instance. Not good.
Change it to

// We are in the process of destruction, don't create clang ast context on demand
// by passing false to Target::GetScratchClangASTContext(create_on_demand).
ClangASTContext *scratch_clang_ast_context = m_target->GetScratchClangASTContext(false);

The Target::GetScratchClangASTContext(bool create_on_demand=true) has a new signature.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145537 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Target/Target.h
673f3dbea64b116166dfa668006cdc84224a27c0 30-Nov-2011 Sean Callanan <scallanan@apple.com> Added support to the Objective-C language runtime
to find Objective-C class types by looking in the
symbol tables for the individual object files.

I did this as follows:

- I added code to SymbolFileSymtab that vends
Clang types for symbols matching the pattern
"_OBJC_CLASS_$_NSMyClassName," making them
appear as Objective-C classes. This only occurs
in modules that do not have debug information,
since otherwise SymbolFileDWARF would be in
charge of looking up types.

- I made a new SymbolVendor subclass for the
Apple Objective-C runtime that is in charge of
making global lookups of Objective-C types. It
currently just sends out type lookup requests to
the appropriate SymbolFiles, but in the future we
will probably extend it to query the runtime more
completely.

I also modified a testcase whose behavior is changed
by the fact that we now actually return an Objective-C
type for __NSCFString.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145526 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTContext.h
ldb/Symbol/SymbolFile.h
ldb/Target/ObjCLanguageRuntime.h
ed5a4b1628d68cc66e71b41320c6749ae97762f8 29-Nov-2011 Sean Callanan <scallanan@apple.com> Added #ifdef wrappers around the contents of
ASTDumper.h.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145446 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ASTDumper.h
89e7df3ebb2591e93a92913be4d483c30df777a3 29-Nov-2011 Sean Callanan <scallanan@apple.com> Modified ClangExpressionDeclMap to use existing
ValueObjects when creating variables referring to
live data rather than constructing
ValueObjectConstResults.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145437 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Expression/ClangExpressionDeclMap.h
a3d044783843585481742aace4af7962c843ffe7 29-Nov-2011 Sean Callanan <scallanan@apple.com> Changed ClangASTImporter to allow finer-grained
management of what allocations remain after an
expression finishes executing. This saves around
2.5KiB per expression for simple expressions.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145342 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Symbol/ClangASTImporter.h
75d8c2591f6c56a09338bf4967a41510165a907e 28-Nov-2011 Greg Clayton <gclayton@apple.com> CommandObjectProcess was recently changed to automatically use the platform
to launch a process for debugging. Since this isn't supported on all platforms,
we need to do what we used to do if this isn't supported. I added:

bool
Platform::CanDebugProcess ();

This will get checked before trying to launch a process for debugging and then
fall back to launching the process through the current host debugger. This
should solve the issue for linux and keep the platform code clean.

Centralized logging code for logging errors, warnings and logs when reporting
things for modules or symbol files. Both lldb_private::Module and
lldb_private::SymbolFile now have the following member functions:

void
LogMessage (Log *log, const char *format, ...);

void
ReportWarning (const char *format, ...);

void
ReportError (const char *format, ...);

These will all output the module name and object (if any) such as:

"error: lldb.so ...."
"warning: my_archive.a(foo.o) ...."

This will keep the output consistent and stop a lot of logging calls from
having to try and output all of the information that uniquely identifies
a module or symbol file. Many places in the code were grabbing the path to the
object file manually and if the module represented a .o file in an archive, we
would see log messages like:

error: foo.a - some error happened



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145219 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/Module.h
ldb/Symbol/SymbolFile.h
ldb/Target/Platform.h
ce04560e6affff2342d931cab4e904605119c742 28-Nov-2011 Greg Clayton <gclayton@apple.com> Remove incorrect return type from SetHeaderDataByteSize accessor (partial
patch from Dawn).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145212 91177308-0d34-0410-b5e6-96231b3b80d8
ldb/Core/MappedHash.h
2eb5122c6aa0f4e1eae0f19563741bb3cb68d32e 22-Nov-2011