• Home
  • History
  • Annotate
  • only in /external/lldb/include/lldb/
History log of /external/lldb/include/lldb/
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.
ataFormatters/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
ore/Disassembler.h
arget/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
arget/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
ost/ProcessRunLock.h
ost/ReadWriteLock.h
arget/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
PI/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
arget/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
ost/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
ost/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
arget/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
ore/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
arget/Thread.h
arget/ThreadPlanBase.h
arget/ThreadPlanShouldStopHere.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepInstruction.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepThrough.h
arget/ThreadPlanStepUntil.h
ldb-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
ost/ReadWriteLock.h
arget/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
ore/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
ore/ModuleSpec.h
ymbol/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
nterpreter/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
nterpreter/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
PI/SBType.h
ore/DataBufferHeap.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectCast.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectConstResultChild.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectMemory.h
ore/ValueObjectRegister.h
ore/ValueObjectSyntheticFilter.h
ore/ValueObjectVariable.h
ataFormatters/FormatNavigator.h
xpression/ASTDumper.h
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangFunction.h
xpression/DWARFExpression.h
ymbol/ClangASTContext.h
ymbol/ClangASTImporter.h
ymbol/ClangASTType.h
ymbol/Function.h
ymbol/SymbolFile.h
ymbol/TaggedASTType.h
ymbol/Type.h
ymbol/TypeHierarchyNavigator.h
arget/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
ore/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
ore/Module.h
ore/RangeMap.h
ore/Section.h
ymbol/ObjectFile.h
ymbol/Symbol.h
ymbol/SymbolVendor.h
ymbol/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
PI/SBCommandReturnObject.h
PI/SBError.h
nterpreter/CommandReturnObject.h
nterpreter/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
PI/SBDefines.h
PI/SBFileSpec.h
PI/SBModule.h
PI/SBModuleSpec.h
PI/SBStream.h
PI/SBTarget.h
ore/ModuleSpec.h
ore/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
PI/SBCommandReturnObject.h
PI/SBError.h
nterpreter/CommandReturnObject.h
nterpreter/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
ore/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
ore/Module.h
ore/Section.h
ore/UUID.h
ymbol/ObjectFile.h
ymbol/SymbolVendor.h
arget/Target.h
ldb-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
ost/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
xpression/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
ost/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
ore/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
arget/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
xpression/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
arget/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
ataFormatters/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
PI/SBCommandReturnObject.h
PI/SBError.h
nterpreter/CommandReturnObject.h
nterpreter/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
arget/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
arget/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
arget/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
ore/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
PI/SBTarget.h
PI/SBThread.h
nterpreter/ScriptInterpreter.h
nterpreter/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
xpression/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
PI/SBType.h
ore/Flags.h
ore/ModuleChild.h
ore/Section.h
ore/UserID.h
ymbol/ClangASTType.h
ymbol/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
ataFormatters/FormatNavigator.h
ataFormatters/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
PI/SBCompileUnit.h
PI/SBModule.h
PI/SBType.h
ore/MappedHash.h
ore/UniqueCStringMap.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
ymbol/Type.h
ymbol/TypeList.h
ldb-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
ymbol/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-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
ataFormatters/FormatNavigator.h
ymbol/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
nterpreter/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
nterpreter/CommandHistory.h
nterpreter/CommandInterpreter.h
tility/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
ost/linux/Config.h
ost/macosx/Config.h
ost/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
PI/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
nterpreter/CommandObject.h
nterpreter/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
reakpoint/BreakpointSiteList.h
ymbol/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
ymbol/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-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
nterpreter/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-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
ore/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
reakpoint/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
arget/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
PI/SBDefines.h
ldb-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
arget/ThreadPlan.h
arget/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
xpression/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
ost/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
ore/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
ore/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
ore/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
arget/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
ore/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
PI/SBDebugger.h
ore/Debugger.h
tility/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
xpression/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
ost/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
nterpreter/PythonDataObjects.h
ldb-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
xpression/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
arget/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
arget/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
ore/Module.h
ore/ModuleList.h
arget/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
ore/ModuleList.h
arget/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
arget/CPPLanguageRuntime.h
ldb-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
xpression/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
ymbol/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
nterpreter/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
ymbol/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
arget/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
PI/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
nterpreter/CommandCompletions.h
ymbol/ClangASTType.h
ymbol/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
arget/Thread.h
arget/ThreadPlan.h
arget/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
ore/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
ost/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
arget/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
arget/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
arget/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
PI/SBProcess.h
ore/Log.h
ore/Module.h
ore/ModuleSpec.h
ore/PluginInterface.h
ore/PluginManager.h
ymbol/SymbolVendor.h
arget/Platform.h
arget/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
arget/Thread.h
arget/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
arget/Thread.h
arget/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
arget/Thread.h
arget/ThreadPlan.h
arget/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
arget/Thread.h
arget/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
ore/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
ymbol/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
arget/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
xpression/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
arget/Process.h
arget/StopInfo.h
arget/Thread.h
arget/ThreadList.h
arget/ThreadPlan.h
arget/ThreadPlanBase.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanRunToAddress.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepInstruction.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverBreakpoint.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepThrough.h
arget/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
arget/OperatingSystem.h
arget/Process.h
arget/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
arget/OperatingSystem.h
arget/Process.h
arget/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
ataFormatters/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
arget/OperatingSystem.h
arget/Process.h
arget/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
arget/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
ore/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
arget/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
PI/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
PI/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
ost/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
PI/SBProcess.h
arget/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
arget/OperatingSystem.h
arget/RegisterContext.h
arget/StopInfo.h
arget/Thread.h
arget/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
arget/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
PI/SBProcess.h
arget/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
PI/SBProcess.h
arget/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
arget/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
ore/Value.h
ore/ValueObject.h
ore/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
arget/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
ore/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
ost/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
ost/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
xpression/ClangUserExpression.h
xpression/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
ataFormatters/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
PI/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
ataFormatters/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
ore/ModuleSpec.h
ore/PluginManager.h
ymbol/ObjectFile.h
ldb-forward.h
ldb-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
ore/Debugger.h
ost/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
arget/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
xpression/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
ost/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
PI/SBValue.h
PI/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
ore/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
ore/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
arget/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
ore/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
ore/Value.h
nterpreter/OptionValueProperties.h
arget/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
xpression/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
arget/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
xpression/ClangExpressionDeclMap.h
xpression/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
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
xpression/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
xpression/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
PI/SBAddress.h
PI/SBCommandReturnObject.h
PI/SBDeclaration.h
PI/SBError.h
PI/SBExpressionOptions.h
PI/SBFileSpec.h
PI/SBFileSpecList.h
PI/SBLineEntry.h
PI/SBSourceManager.h
PI/SBStream.h
PI/SBStringList.h
PI/SBSymbolContext.h
PI/SBSymbolContextList.h
PI/SBType.h
PI/SBValue.h
PI/SBValueList.h
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
reakpoint/BreakpointSite.h
reakpoint/Watchpoint.h
reakpoint/WatchpointOptions.h
ore/Debugger.h
ore/Disassembler.h
ore/Event.h
ore/Log.h
ore/Module.h
ore/Section.h
ore/SourceManager.h
ore/ValueObjectSyntheticFilter.h
ataFormatters/FormatNavigator.h
ataFormatters/TypeCategory.h
ataFormatters/TypeFormat.h
ataFormatters/TypeSummary.h
ataFormatters/TypeSynthetic.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/ClangExpressionVariable.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRDynamicChecks.h
xpression/IRExecutionUnit.h
xpression/IRForTarget.h
xpression/IRMemoryMap.h
xpression/Materializer.h
ost/Terminal.h
nterpreter/Args.h
nterpreter/CommandInterpreter.h
nterpreter/OptionValueProperties.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ymbol/ClangASTContext.h
ymbol/ClangASTImporter.h
ymbol/CompileUnit.h
ymbol/DWARFCallFrameInfo.h
ymbol/ObjectFile.h
ymbol/SymbolContext.h
ymbol/SymbolVendor.h
ymbol/Type.h
ymbol/UnwindPlan.h
arget/Memory.h
arget/ObjCLanguageRuntime.h
arget/Process.h
arget/RegisterContext.h
arget/StackFrame.h
arget/StackFrameList.h
arget/Target.h
arget/Thread.h
arget/ThreadPlanStepInRange.h
tility/PriorityPointerPair.h
tility/SharingPtr.h
ldb-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
xpression/ClangExpressionParser.h
xpression/ClangUserExpression.h
xpression/IRForTarget.h
xpression/IRInterpreter.h
xpression/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
xpression/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
PI/SBValueList.h
ore/Log.h
xpression/IRMemoryMap.h
xpression/Materializer.h
ldb-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
PI/SBAddress.h
PI/SBCommandReturnObject.h
PI/SBDeclaration.h
PI/SBError.h
PI/SBExpressionOptions.h
PI/SBFileSpec.h
PI/SBFileSpecList.h
PI/SBLineEntry.h
PI/SBSourceManager.h
PI/SBStream.h
PI/SBStringList.h
PI/SBSymbolContext.h
PI/SBSymbolContextList.h
PI/SBType.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
reakpoint/Watchpoint.h
reakpoint/WatchpointOptions.h
ore/Debugger.h
ore/Event.h
ore/Module.h
ore/Timer.h
ore/ValueObjectSyntheticFilter.h
ataFormatters/TypeSynthetic.h
xpression/ClangExpression.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRDynamicChecks.h
xpression/IRExecutionUnit.h
xpression/IRForTarget.h
ost/Terminal.h
nterpreter/CommandInterpreter.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ymbol/ClangASTContext.h
ymbol/ClangExternalASTSourceCallbacks.h
ymbol/CompileUnit.h
ymbol/FuncUnwinders.h
ymbol/ObjectFile.h
ymbol/SymbolContext.h
ymbol/SymbolVendor.h
arget/Process.h
arget/StackFrameList.h
arget/Target.h
arget/Thread.h
arget/ThreadPlanStepInRange.h
tility/PythonPointer.h
ldb-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
arget/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
arget/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
arget/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
xpression/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
xpression/IRExecutionUnit.h
xpression/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
xpression/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
xpression/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
xpression/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
xpression/IRForTarget.h
xpression/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
xpression/ClangExpressionDeclMap.h
xpression/IRExecutionUnit.h
xpression/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
PI/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
xpression/IRMemoryMap.h
xpression/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
xpression/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
xpression/IRExecutionUnit.h
xpression/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
ymbol/Symbol.h
ymbol/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
xpression/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
ore/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
PI/SBValue.h
ore/Scalar.h
ore/ValueObject.h
ore/ValueObjectDynamicValue.h
ore/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
xpression/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
arget/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
xpression/IRMemoryMap.h
xpression/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
xpression/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
ore/ValueObject.h
ore/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
arget/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
PI/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
xpression/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
ymbol/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
xpression/ClangExpressionDeclMap.h
xpression/ClangUserExpression.h
xpression/Materializer.h
ldb-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
ore/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
ymbol/ClangASTContext.h
ymbol/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
PI/SBTarget.h
arget/ObjCLanguageRuntime.h
arget/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
ore/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
xpression/ClangExpression.h
xpression/ClangExpressionParser.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRExecutionUnit.h
xpression/IRMemoryMap.h
ldb-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
arget/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
nterpreter/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
ore/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
reakpoint/BreakpointResolverName.h
ore/Module.h
ymbol/SymbolContext.h
ymbol/Symtab.h
arget/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
ataFormatters/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
nterpreter/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
ymbol/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
nterpreter/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
arget/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
ore/DataExtractor.h
ore/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
arget/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
arget/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
ore/Log.h
ore/ModuleList.h
ataFormatters/FormatNavigator.h
xpression/ASTDumper.h
xpression/IRExecutionUnit.h
ymbol/ClangASTImporter.h
ldb-forward.h
ldb-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
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ldb-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
xpression/ClangASTSource.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/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
ymbol/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
ataFormatters/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
nterpreter/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
PI/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
ore/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
ymbol/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
ymbol/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
ore/DataEncoder.h
ore/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
ymbol/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
ymbol/ClangASTContext.h
arget/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
xpression/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
ataFormatters/CXXFormatterFunctions.h
ymbol/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
ataFormatters/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
ore/Debugger.h
ore/SourceManager.h
arget/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
xpression/ClangExpression.h
xpression/ClangExpressionParser.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRExecutionUnit.h
xpression/IRForTarget.h
xpression/ProcessDataAllocator.h
xpression/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
ataFormatters/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
ataFormatters/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
ataFormatters/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
arget/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
ataFormatters/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
ataFormatters/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
ore/SourceManager.h
arget/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
PI/SBType.h
ore/DataBuffer.h
ore/DataBufferHeap.h
ore/DataBufferMemoryMap.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectCast.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectMemory.h
ore/ValueObjectRegister.h
ore/ValueObjectSyntheticFilter.h
ore/ValueObjectVariable.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/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
ore/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
arget/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
arget/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
ore/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
arget/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
arget/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
reakpoint/BreakpointResolver.h
ore/SearchFilter.h
arget/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
ymbol/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
ymbol/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
ymbol/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
ore/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-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
nterpreter/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
ore/Address.h
ore/RangeMap.h
ore/Section.h
xpression/DWARFExpression.h
ymbol/LineTable.h
ymbol/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
PI/SBFunction.h
PI/SBSymbol.h
PI/SBTarget.h
ore/Disassembler.h
arget/Target.h
ldb-enumerations.h
ldb-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
arget/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
ost/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
ore/Address.h
ymbol/Symbol.h
arget/Process.h
arget/ThreadPlanCallFunction.h
ldb-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
ore/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
ymbol/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
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/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
ore/ValueObject.h
ataFormatters/CXXFormatterFunctions.h
ataFormatters/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
PI/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
ore/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
ore/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
ataFormatters/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
ost/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
ataFormatters/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
ore/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
arget/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
xpression/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
ore/MappedHash.h
ore/Timer.h
xpression/ClangFunction.h
arget/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
xpression/ClangASTSource.h
ymbol/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
PI/SBExpressionOptions.h
PI/SBProcess.h
arget/Process.h
arget/StopInfo.h
arget/ThreadPlan.h
arget/ThreadPlanBase.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanRunToAddress.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepInstruction.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverBreakpoint.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepThrough.h
arget/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
ore/DataExtractor.h
ore/ValueObject.h
ymbol/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
ataFormatters/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
ataFormatters/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
PI/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
PI/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
PI/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
ymbol/ObjectContainer.h
ymbol/ObjectFile.h
ldb-private-interfaces.h
ldb-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
ymbol/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
ataFormatters/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
arget/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
xpression/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
PI/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
arget/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
ore/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
ore/RegularExpression.h
ore/Timer.h
arget/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-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
ore/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
PI/SBTypeSynthetic.h
ore/CXXFormatterFunctions.h
ore/DataVisualization.h
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ore/FormatNavigator.h
ore/ValueObject.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectSyntheticFilter.h
ataFormatters/CXXFormatterFunctions.h
ataFormatters/DataVisualization.h
ataFormatters/FormatCache.h
ataFormatters/FormatClasses.h
ataFormatters/FormatManager.h
ataFormatters/FormatNavigator.h
ataFormatters/TypeCategory.h
ataFormatters/TypeCategoryMap.h
ataFormatters/TypeFormat.h
ataFormatters/TypeSummary.h
ataFormatters/TypeSynthetic.h
ldb-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
reakpoint/Breakpoint.h
reakpoint/BreakpointLocationCollection.h
reakpoint/BreakpointSite.h
arget/DynamicLoader.h
arget/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
PI/SBData.h
reakpoint/Breakpoint.h
reakpoint/BreakpointIDList.h
reakpoint/BreakpointList.h
reakpoint/BreakpointLocationCollection.h
reakpoint/BreakpointLocationList.h
reakpoint/BreakpointSite.h
reakpoint/Watchpoint.h
ore/ArchSpec.h
ore/CXXFormatterFunctions.h
ore/DataExtractor.h
ore/Debugger.h
ore/Disassembler.h
ore/FileSpecList.h
ore/FormatClasses.h
ore/FormatManager.h
ore/FormatNavigator.h
ore/MappedHash.h
ore/Module.h
ore/ModuleList.h
ore/PluginManager.h
ore/RegisterValue.h
ore/Scalar.h
ore/Section.h
ore/Stream.h
ore/StreamAsynchronousIO.h
ore/StreamBuffer.h
ore/StreamCallback.h
ore/StreamFile.h
ore/StreamString.h
ore/StreamTee.h
ore/StringList.h
ore/VMRange.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectCast.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectConstResultChild.h
ore/ValueObjectConstResultImpl.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectList.h
ore/ValueObjectMemory.h
ore/ValueObjectRegister.h
ore/ValueObjectSyntheticFilter.h
ore/ValueObjectVariable.h
ore/dwarf.h
xpression/ClangFunction.h
xpression/DWARFExpression.h
ost/File.h
nterpreter/Args.h
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandReturnObject.h
nterpreter/OptionValueArray.h
nterpreter/OptionValueDictionary.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ymbol/Block.h
ymbol/ClangASTContext.h
ymbol/ObjectFile.h
ymbol/Symbol.h
ymbol/SymbolContext.h
ymbol/SymbolVendor.h
ymbol/Symtab.h
ymbol/Variable.h
ymbol/VariableList.h
arget/Platform.h
arget/Process.h
arget/RegisterContext.h
ldb-defines.h
ldb-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
ore/ValueObjectDynamicValue.h
ymbol/Type.h
arget/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
ore/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
nterpreter/OptionGroupFormat.h
arget/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
PI/SBProcess.h
nterpreter/PythonDataObjects.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
arget/OperatingSystem.h
arget/Process.h
ldb-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
xpression/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
xpression/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
nterpreter/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
nterpreter/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
nterpreter/ScriptInterpreter.h
nterpreter/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
PI/SBModule.h
PI/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
PI/SBProcess.h
arget/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
xpression/ClangExpressionDeclMap.h
xpression/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
PI/SBExpressionOptions.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
arget/Process.h
arget/Target.h
arget/Thread.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanCallUserExpression.h
ldb-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
ore/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
ore/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
ore/CXXFormatterFunctions.h
ore/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
arget/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
arget/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
ore/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
ore/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
nterpreter/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
ore/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
PI/SBProcess.h
arget/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
arget/Process.h
arget/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
ore/Debugger.h
ore/Module.h
ymbol/Symtab.h
ldb-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
ymbol/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
PI/SBExpressionOptions.h
PI/SBTarget.h
PI/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
PI/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-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
ost/Mutex.h
nterpreter/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
ymbol/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
PI/SBEvent.h
PI/SBFrame.h
PI/SBTarget.h
PI/SBWatchpoint.h
reakpoint/Watchpoint.h
reakpoint/WatchpointList.h
arget/Process.h
arget/Target.h
ldb-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
nterpreter/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
nterpreter/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
ore/Module.h
ymbol/SymbolVendor.h
ldb-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
ore/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
ore/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
nterpreter/ScriptInterpreter.h
nterpreter/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
PI/SBThread.h
arget/Thread.h
arget/ThreadPlanStepInRange.h
arget/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
ymbol/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
nterpreter/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
PI/SBThread.h
arget/Thread.h
arget/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
PI/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
ore/CXXFormatterFunctions.h
xpression/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
nterpreter/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
nterpreter/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
ymbol/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
nterpreter/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
PI/SBModule.h
PI/SBTarget.h
ore/Module.h
ymbol/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
nterpreter/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-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-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
PI/SBThread.h
arget/DynamicLoader.h
arget/Process.h
arget/StopInfo.h
arget/Target.h
ldb-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
PI/SBModule.h
PI/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
ore/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
nterpreter/OptionGroupBoolean.h
nterpreter/OptionGroupFile.h
nterpreter/OptionGroupString.h
nterpreter/OptionGroupUInt64.h
nterpreter/Options.h
ymbol/VariableList.h
ldb-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
PI/SBDebugger.h
ore/Debugger.h
ost/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
nterpreter/ScriptInterpreter.h
nterpreter/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
arget/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
arget/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
nterpreter/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
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
ymbol/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
arget/Thread.h
arget/ThreadPlan.h
arget/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
arget/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
arget/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
arget/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
arget/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
PI/SBProcess.h
ore/Broadcaster.h
arget/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
arget/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
xpression/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
xpression/ClangExpressionDeclMap.h
arget/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
ore/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
ore/FormatNavigator.h
ore/ValueObjectSyntheticFilter.h
ldb-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
ymbol/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
ore/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
ore/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
arget/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
ore/ModuleList.h
arget/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
ore/Module.h
ore/ModuleList.h
ost/Symbols.h
arget/Platform.h
arget/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
ore/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
ymbol/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
PI/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
xpression/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
PI/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
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/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
PI/SBFrame.h
ymbol/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
ore/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
PI/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
ore/CXXFormatterFunctions.h
nterpreter/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
xpression/ClangASTSource.h
ymbol/ClangASTContext.h
ymbol/ClangASTImporter.h
ymbol/ClangExternalASTSourceCommon.h
ldb-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
ore/ValueObjectCast.h
ore/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
ost/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
PI/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
ymbol/FuncUnwinders.h
ymbol/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
arget/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
arget/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-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
ymbol/Type.h
arget/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
ore/CXXFormatterFunctions.h
ore/FormatClasses.h
ore/ValueObjectSyntheticFilter.h
nterpreter/ScriptInterpreter.h
nterpreter/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
reakpoint/Watchpoint.h
arget/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
PI/SBValue.h
ore/ValueObject.h
ore/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-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
PI/SBValue.h
ore/ValueObject.h
ore/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
ymbol/Type.h
ymbol/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
nterpreter/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
ore/PluginManager.h
ore/UserSettingsController.h
nterpreter/OptionValueProperties.h
arget/Target.h
ldb-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
ore/Stream.h
arget/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
ore/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
ore/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
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/ScriptInterpreterPython.h
arget/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
ost/FileSpec.h
arget/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
arget/Process.h
arget/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
ore/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
ymbol/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
ore/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
PI/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
PI/SBDefines.h
PI/SBExpressionOptions.h
PI/SBFrame.h
PI/SBValue.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
arget/Process.h
arget/Target.h
ldb-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
PI/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
PI/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
arget/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
arget/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
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/CommandObjectMultiword.h
arget/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
PI/SBType.h
ymbol/ClangASTContext.h
ldb-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
PI/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
ymbol/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
ore/FormatNavigator.h
arget/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
PI/LLDB.h
PI/SBDeclaration.h
PI/SBDefines.h
PI/SBFileSpec.h
PI/SBStream.h
PI/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
PI/SBEvent.h
PI/SBThread.h
ore/Broadcaster.h
arget/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
arget/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
arget/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
ost/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
ore/Log.h
nterpreter/CommandObject.h
nterpreter/CommandObjectMultiword.h
ldb-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
xpression/IRDynamicChecks.h
xpression/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
PI/SBBreakpoint.h
reakpoint/Breakpoint.h
reakpoint/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
ore/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
ore/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
ore/FormatManager.h
ore/FormatNavigator.h
ore/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
ore/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
ore/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
ost/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
arget/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
arget/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
PI/SBCommandInterpreter.h
PI/SBCommandReturnObject.h
PI/SBDebugger.h
PI/SBDefines.h
PI/SBError.h
ore/Debugger.h
ost/DynamicLibrary.h
nterpreter/CommandObject.h
nterpreter/CommandObjectMultiword.h
ldb-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
arget/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
ore/UUID.h
nterpreter/OptionGroupBoolean.h
nterpreter/OptionValueFileSpec.h
nterpreter/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
ore/StreamBuffer.h
ost/Host.h
ost/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
PI/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
ore/Stream.h
arget/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
arget/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
xpression/IRForTarget.h
xpression/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-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
ore/ValueObject.h
xpression/ClangASTSource.h
ymbol/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
arget/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
ore/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
nterpreter/CommandObject.h
nterpreter/ScriptInterpreter.h
nterpreter/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
arget/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
ore/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
xpression/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
arget/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
PI/SBThread.h
arget/RegisterContext.h
arget/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
arget/ObjCLanguageRuntime.h
ldb-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
ore/CXXFormatterFunctions.h
ore/FormatClasses.h
ore/FormatNavigator.h
ore/ValueObject.h
ldb-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
ore/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
ost/Symbols.h
arget/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
PI/SBThread.h
PI/SBValue.h
arget/ABI.h
arget/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
ymbol/TypeVendor.h
arget/LanguageRuntime.h
arget/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
ore/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
ore/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
arget/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
arget/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
arget/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
arget/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
PI/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
ore/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
arget/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
ore/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
ore/FormatClasses.h
ore/Module.h
arget/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
arget/StackFrame.h
arget/StackFrameList.h
arget/Thread.h
arget/ThreadList.h
arget/ThreadPlanStepInRange.h
arget/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
ore/Debugger.h
nterpreter/Args.h
nterpreter/OptionValueProperties.h
nterpreter/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
ymbol/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
ymbol/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
nterpreter/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
ost/File.h
ost/FileSpec.h
nterpreter/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
ore/FileLineResolver.h
ore/Language.h
ore/Module.h
ore/ModuleSpec.h
ore/SearchFilter.h
ost/FileSpec.h
nterpreter/CommandCompletions.h
ymbol/CompileUnit.h
ymbol/ObjectFile.h
ymbol/Symbol.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
arget/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
PI/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
ore/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
nterpreter/PythonDataObjects.h
nterpreter/ScriptInterpreter.h
nterpreter/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
nterpreter/Args.h
nterpreter/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
nterpreter/ScriptInterpreter.h
nterpreter/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
PI/SBProcess.h
nterpreter/ScriptInterpreter.h
nterpreter/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
nterpreter/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
reakpoint/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
nterpreter/PythonDataObjects.h
ldb-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
nterpreter/CommandInterpreter.h
nterpreter/OptionValueBoolean.h
nterpreter/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
arget/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
arget/ExecutionContext.h
arget/Process.h
arget/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
PI/SBStringList.h
ore/UserSettingsController.h
nterpreter/OptionValueFileSpec.h
nterpreter/OptionValueProperties.h
arget/Process.h
arget/Target.h
arget/Thread.h
ldb-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
ore/ConstString.h
ore/Debugger.h
ore/Disassembler.h
ore/EmulateInstruction.h
ore/FileSpecList.h
ore/RegularExpression.h
ore/StringList.h
ore/UniqueCStringMap.h
ore/UserSettingsController.h
nterpreter/CommandCompletions.h
nterpreter/NamedOptionValue.h
nterpreter/OptionGroupBoolean.h
nterpreter/OptionGroupFile.h
nterpreter/OptionGroupFormat.h
nterpreter/OptionGroupOutputFile.h
nterpreter/OptionGroupUInt64.h
nterpreter/OptionGroupUUID.h
nterpreter/OptionGroupVariable.h
nterpreter/OptionValue.h
nterpreter/OptionValueArch.h
nterpreter/OptionValueArgs.h
nterpreter/OptionValueArray.h
nterpreter/OptionValueBoolean.h
nterpreter/OptionValueDictionary.h
nterpreter/OptionValueEnumeration.h
nterpreter/OptionValueFileSpec.h
nterpreter/OptionValueFileSpecList.h
nterpreter/OptionValueFormat.h
nterpreter/OptionValuePathMappings.h
nterpreter/OptionValueProperties.h
nterpreter/OptionValueRegex.h
nterpreter/OptionValueSInt64.h
nterpreter/OptionValueString.h
nterpreter/OptionValueUInt64.h
nterpreter/OptionValueUUID.h
nterpreter/OptionValues.h
nterpreter/Property.h
arget/PathMappingList.h
arget/Platform.h
arget/Process.h
arget/Target.h
arget/Thread.h
ldb-forward.h
ldb-private-enumerations.h
ldb-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
reakpoint/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
PI/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
ymbol/DWARFCallFrameInfo.h
ymbol/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
nterpreter/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
nterpreter/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
reakpoint/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
reakpoint/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
reakpoint/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
arget/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
xpression/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
reakpoint/BreakpointOptions.h
reakpoint/Watchpoint.h
reakpoint/WatchpointOptions.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ldb-forward.h
ldb-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
nterpreter/NamedOptionValue.h
nterpreter/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-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
ore/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
ore/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
ore/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-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
ore/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
ore/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
ore/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
arget/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
ore/Disassembler.h
arget/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
PI/SBType.h
ymbol/ClangASTContext.h
ymbol/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
PI/SBProcess.h
arget/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
arget/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
xpression/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
PI/SBTarget.h
arget/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-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-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
ore/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
ore/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
ymbol/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
ymbol/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
ore/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
xpression/ClangUserExpression.h
arget/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
ymbol/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
ymbol/Block.h
ymbol/ClangASTContext.h
ymbol/SymbolContext.h
ymbol/VariableList.h
arget/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
arget/Process.h
arget/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
PI/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
ore/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
PI/SBProcess.h
ore/ModuleList.h
nterpreter/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
ore/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
ymbol/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
ymbol/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
ore/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
arget/StackFrame.h
arget/StackFrameList.h
arget/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
ore/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
ore/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
arget/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
ore/ValueObject.h
ore/ValueObjectConstResult.h
ore/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
PI/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
arget/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
arget/Process.h
arget/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
tility/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
PI/SBSection.h
PI/SBTarget.h
arget/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
PI/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
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/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
ost/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
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/CommandObjectMultiword.h
nterpreter/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
ore/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
arget/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
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/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
reakpoint/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
PI/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
arget/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
ore/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
ore/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
ore/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
PI/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
PI/SBTarget.h
PI/SBValue.h
PI/SBWatchpoint.h
arget/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
nterpreter/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
arget/Process.h
ldb-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
nterpreter/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
ore/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
ore/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
ore/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
ore/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
ore/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
arget/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
PI/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
arget/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
ore/Broadcaster.h
ore/Disassembler.h
ore/SearchFilter.h
ore/SourceManager.h
arget/LanguageRuntime.h
arget/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
reakpoint/BreakpointResolverFileLine.h
arget/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
xpression/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
ore/ValueObject.h
arget/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
arget/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
arget/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
arget/Process.h
arget/Thread.h
arget/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
reakpoint/Breakpoint.h
reakpoint/BreakpointList.h
ore/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
PI/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
ore/DataVisualization.h
ore/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
ore/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
tility/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
ymbol/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
arget/Platform.h
arget/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
PI/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
arget/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
ore/Disassembler.h
ore/Opcode.h
ore/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
arget/Thread.h
arget/ThreadPlanCallFunction.h
arget/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
PI/SBDebugger.h
arget/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
PI/SBTypeNameSpecifier.h
ore/DataVisualization.h
ore/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
PI/SBValue.h
ore/ValueObject.h
ore/ValueObjectDynamicValue.h
ore/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
PI/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
PI/SBValue.h
ore/ValueObject.h
ore/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
PI/SBInstruction.h
ore/ArchSpec.h
nterpreter/OptionGroupPlatform.h
arget/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-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-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
ost/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
ost/Condition.h
ost/Mutex.h
ost/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
PI/SBThread.h
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverRange.h
arget/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
ore/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
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
arget/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
arget/ThreadPlan.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepOverRange.h
arget/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
ore/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
ymbol/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
nterpreter/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
ore/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
ore/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
ore/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
PI/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
reakpoint/BreakpointOptions.h
arget/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
arget/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
ost/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
ymbol/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
arget/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
ost/Host.h
arget/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
arget/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
ymbol/ClangASTContext.h
ymbol/ClangASTImporter.h
ymbol/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
PI/SBAddress.h
PI/SBInstruction.h
ore/Address.h
ore/Disassembler.h
ymbol/ObjectFile.h
arget/Target.h
ldb-enumerations.h
ldb-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
arget/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
ore/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
ost/Mutex.h
ost/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
arget/OperatingSystem.h
arget/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
ymbol/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
ore/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
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanBase.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanStepOverRange.h
arget/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
ore/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
ost/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
ost/Host.h
arget/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
ore/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
ost/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
PI/SBFrame.h
PI/SBThread.h
ost/ReadWriteLock.h
arget/ExecutionContext.h
arget/Process.h
ldb-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
ymbol/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
arget/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
PI/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-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
ore/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
xpression/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
xpression/RecordingMemoryManager.h
ldb-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
ymbol/CompileUnit.h
ymbol/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
PI/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
ore/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
ymbol/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
ore/Module.h
ldb-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
arget/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
ore/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
ymbol/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
ore/Section.h
arget/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
PI/SBValue.h
ore/ValueObjectSyntheticFilter.h
arget/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
ore/FormatNavigator.h
ore/Module.h
ore/ModuleList.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectVariable.h
ymbol/ClangASTType.h
ymbol/Type.h
ymbol/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
PI/SBType.h
ymbol/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
ore/FormatNavigator.h
ldb-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
ore/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
ore/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
ore/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
ore/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
nterpreter/OptionGroupPlatform.h
arget/Platform.h
arget/Target.h
arget/TargetList.h
ldb-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
ore/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
ore/FormatClasses.h
ore/ValueObject.h
ore/ValueObjectSyntheticFilter.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ldb-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
ore/Module.h
arget/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
PI/SBCompileUnit.h
PI/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
ore/Module.h
ore/ModuleList.h
arget/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
ost/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
PI/SBFrame.h
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointSite.h
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ore/FormatNavigator.h
ore/Module.h
ore/Section.h
ore/SourceManager.h
ore/UserSettingsController.h
xpression/ClangExpressionVariable.h
xpression/ClangUserExpression.h
nterpreter/Args.h
ymbol/ClangASTImporter.h
ymbol/DWARFCallFrameInfo.h
ymbol/ObjectFile.h
ymbol/Type.h
arget/Memory.h
arget/Process.h
arget/RegisterContext.h
arget/StackFrame.h
arget/Target.h
arget/Thread.h
tility/PriorityPointerPair.h
ldb-forward.h
ldb-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
ore/Module.h
ymbol/ObjectFile.h
ymbol/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
ore/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
arget/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
ore/RangeMap.h
ymbol/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
reakpoint/BreakpointSiteList.h
ore/Disassembler.h
arget/ThreadPlan.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepRange.h
arget/ThreadPlanTracer.h
ldb-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
ore/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
arget/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
PI/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
arget/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
ymbol/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
reakpoint/BreakpointOptions.h
ore/FormatClasses.h
nterpreter/ScriptInterpreter.h
nterpreter/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
PI/SBTarget.h
ore/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
arget/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
PI/SBTarget.h
reakpoint/BreakpointResolverName.h
arget/LanguageRuntime.h
arget/Target.h
ldb-defines.h
ldb-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
PI/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
arget/LanguageRuntime.h
arget/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
reakpoint/BreakpointResolver.h
reakpoint/BreakpointResolverName.h
arget/LanguageRuntime.h
arget/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
ymbol/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
ymbol/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
arget/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
arget/ThreadPlanStepInstruction.h
arget/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
ore/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
xpression/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
arget/StackID.h
arget/ThreadPlan.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepRange.h
arget/ThreadPlanStepUntil.h
ldb-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
PI/SBCommandInterpreter.h
nterpreter/CommandObject.h
ldb-private-interfaces.h
ldb-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
arget/StackFrameList.h
arget/Thread.h
arget/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
ore/FormatClasses.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ldb-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
nterpreter/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-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-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
ore/Module.h
ore/ModuleList.h
ost/Symbols.h
arget/Platform.h
arget/Target.h
ldb-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
ore/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
reakpoint/StoppointLocation.h
reakpoint/Watchpoint.h
reakpoint/WatchpointList.h
arget/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
ost/Host.h
arget/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
PI/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
ore/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
PI/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
PI/SBFileSpec.h
PI/SBTarget.h
arget/Process.h
ldb-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
PI/SBSection.h
reakpoint/BreakpointLocationList.h
ore/Address.h
ore/AddressRange.h
ore/Module.h
ore/ModuleChild.h
ore/Section.h
ore/ValueObject.h
ore/ValueObjectMemory.h
ore/ValueObjectVariable.h
ymbol/Block.h
ymbol/CompileUnit.h
ymbol/Function.h
ymbol/LineEntry.h
ymbol/LineTable.h
ymbol/ObjectContainer.h
ymbol/ObjectFile.h
ymbol/Symbol.h
ymbol/SymbolContextScope.h
ymbol/SymbolVendor.h
ldb-forward.h
ldb-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
ore/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
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectMemory.h
ore/ValueObjectRegister.h
ore/ValueObjectSyntheticFilter.h
ore/ValueObjectVariable.h
ymbol/ClangASTContext.h
ymbol/Type.h
arget/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
PI/SBDebugger.h
ore/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
ymbol/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
PI/SBModule.h
ymbol/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
ore/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
ore/RangeMap.h
arget/Memory.h
arget/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-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
ore/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
PI/SBDebugger.h
PI/SBDefines.h
PI/SBTypeCategory.h
PI/SBTypeSummary.h
PI/SBTypeSynthetic.h
PI/SBValue.h
ore/FormatManager.h
ldb-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
PI/SBDebugger.h
ore/Debugger.h
ore/Log.h
ldb-private-log.h
ldb-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
reakpoint/StoppointCallbackContext.h
arget/ExecutionContext.h
arget/Thread.h
arget/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
ore/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
arget/ExecutionContextScope.h
arget/Process.h
arget/RegisterContext.h
arget/StackFrame.h
arget/Target.h
arget/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
xpression/ClangExpressionDeclMap.h
ymbol/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
ore/FormatNavigator.h
ore/ValueObject.h
arget/ExecutionContext.h
arget/StackFrameList.h
arget/StackID.h
arget/Thread.h
ldb-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
PI/SBType.h
PI/SBTypeFilter.h
PI/SBTypeFormat.h
PI/SBTypeNameSpecifier.h
PI/SBTypeSummary.h
PI/SBTypeSynthetic.h
PI/SBValue.h
ore/FormatClasses.h
ore/FormatManager.h
ore/FormatNavigator.h
ymbol/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
PI/SBCommandInterpreter.h
PI/SBCommunication.h
PI/SBDebugger.h
PI/SBEvent.h
PI/SBListener.h
PI/SBProcess.h
PI/SBTarget.h
ore/Broadcaster.h
ore/Communication.h
ore/Debugger.h
ore/Listener.h
nterpreter/CommandInterpreter.h
arget/Process.h
arget/Target.h
arget/TargetList.h
ldb-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
PI/SBDebugger.h
PI/SBDefines.h
PI/SBTypeCategory.h
PI/SBTypeFilter.h
PI/SBTypeFormat.h
PI/SBTypeNameSpecifier.h
PI/SBTypeSummary.h
PI/SBTypeSynthetic.h
ore/DataVisualization.h
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ore/FormatNavigator.h
ore/ValueObject.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ldb-enumerations.h
ldb-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
xpression/ClangExpressionDeclMap.h
xpression/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
ore/ModuleList.h
ore/UserSettingsController.h
ost/Host.h
ymbol/ObjectFile.h
arget/Platform.h
arget/Process.h
arget/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
ore/Module.h
ore/ModuleList.h
ymbol/SymbolFile.h
ymbol/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
ymbol/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
xpression/ClangExpressionDeclMap.h
xpression/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
ore/RangeMap.h
ymbol/ObjectFile.h
arget/Process.h
arget/Target.h
arget/ThreadList.h
ldb-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
xpression/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
nterpreter/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
PI/SBBreakpoint.h
PI/SBProcess.h
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointLocationList.h
ldb-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
nterpreter/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
ore/ClangForward.h
ymbol/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
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBBroadcaster.h
PI/SBCommandInterpreter.h
PI/SBCommandReturnObject.h
PI/SBCompileUnit.h
PI/SBData.h
PI/SBDebugger.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBFileSpecList.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBInputReader.h
PI/SBInstruction.h
PI/SBInstructionList.h
PI/SBLineEntry.h
PI/SBListener.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSection.h
PI/SBSourceManager.h
PI/SBStream.h
PI/SBStringList.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBSymbolContextList.h
PI/SBTarget.h
PI/SBThread.h
PI/SBType.h
PI/SBValue.h
PI/SBValueList.h
ore/Module.h
ymbol/ClangASTType.h
ymbol/Function.h
ymbol/SymbolContext.h
ymbol/Type.h
ldb-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
PI/SBModule.h
PI/SBProcess.h
ore/Module.h
ore/PluginManager.h
ore/Section.h
ymbol/DWARFCallFrameInfo.h
ymbol/ObjectFile.h
arget/Process.h
ldb-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
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangPersistentVariables.h
xpression/RecordingMemoryManager.h
ymbol/ClangASTImporter.h
ymbol/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
PI/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
PI/SBType.h
PI/SBValue.h
PI/SBWatchpoint.h
ore/ValueObject.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectVariable.h
ymbol/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
PI/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
ore/ValueObject.h
ore/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
arget/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
PI/SBType.h
ymbol/ClangASTContext.h
ldb-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
ore/FormatClasses.h
ore/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
reakpoint/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
PI/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
arget/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
ore/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
ore/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
ore/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
reakpoint/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
reakpoint/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
PI/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
PI/SBFrame.h
PI/SBProcess.h
PI/SBTarget.h
ore/Debugger.h
ore/UserSettingsController.h
arget/Process.h
arget/Target.h
arget/Thread.h
ldb-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
PI/SBDefines.h
PI/SBThread.h
ore/DataVisualization.h
ldb-forward-rtti.h
ldb-forward.h
ldb-public.h
ldb-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
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointSite.h
ore/Address.h
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ore/FormatNavigator.h
ore/Module.h
ore/SearchFilter.h
ore/SourceManager.h
xpression/ClangExpressionVariable.h
xpression/ClangUserExpression.h
nterpreter/Args.h
ymbol/ClangASTImporter.h
ymbol/DWARFCallFrameInfo.h
ymbol/ObjectFile.h
ymbol/Type.h
arget/Memory.h
arget/Process.h
arget/RegisterContext.h
arget/StackFrame.h
arget/Target.h
arget/Thread.h
arget/ThreadList.h
tility/PriorityPointerPair.h
ldb-forward-rtti.h
ldb-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
PI/SBAddress.h
PI/SBModule.h
PI/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
ymbol/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
ore/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
ore/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
ore/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
tility/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
tility/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
ore/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
ore/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
PI/SBCommandInterpreter.h
nterpreter/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
ore/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
xpression/ClangExpressionParser.h
xpression/IRForTarget.h
xpression/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
reakpoint/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
reakpoint/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
ymbol/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
nterpreter/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
tility/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
ore/Disassembler.h
arget/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
xpression/ClangASTSource.h
ymbol/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
arget/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
ymbol/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
ymbol/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
ore/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
ore/Section.h
ymbol/ObjectContainer.h
ymbol/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
ore/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
ost/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
arget/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
arget/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
ore/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
PI/SBData.h
PI/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
ost/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
PI/SBData.h
PI/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
xpression/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
ymbol/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
ost/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
ore/Module.h
ost/Host.h
ymbol/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
PI/SBFrame.h
xpression/DWARFExpression.h
ost/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
ore/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
ore/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
ymbol/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
ymbol/Symbol.h
ymbol/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
arget/ABI.h
arget/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
xpression/ASTResultSynthesizer.h
xpression/ClangExpression.h
xpression/ClangUserExpression.h
arget/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
PI/SBModule.h
PI/SBValue.h
PI/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
PI/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
PI/SBThread.h
ore/ValueObject.h
ore/ValueObjectConstResult.h
arget/ABI.h
arget/StopInfo.h
arget/Thread.h
arget/ThreadPlan.h
arget/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
ore/ValueObject.h
ore/ValueObjectConstResult.h
ore/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
ymbol/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
ore/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
PI/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
PI/SBProcess.h
arget/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
PI/SBInstructionList.h
PI/SBTarget.h
ore/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
arget/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
arget/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
xpression/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
arget/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
ore/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
ore/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
ymbol/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
PI/SBValue.h
ore/ValueObject.h
ore/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
xpression/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
ore/MappedHash.h
ymbol/Type.h
ymbol/Variable.h
ldb-forward-rtti.h
ldb-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
xpression/ASTResultSynthesizer.h
xpression/ClangASTSource.h
ymbol/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
ymbol/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
ymbol/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
ymbol/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
xpression/ClangASTSource.h
ymbol/ClangASTContext.h
ymbol/ClangExternalASTSourceCallbacks.h
ymbol/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
ore/Mangled.h
ldb-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
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepRange.h
arget/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
reakpoint/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
PI/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
arget/ThreadList.h
tility/PseudoTerminal.h
ldb-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
xpression/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
arget/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
ymbol/ClangASTContext.h
ymbol/SymbolFile.h
arget/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
xpression/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
xpression/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
ymbol/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
ore/Module.h
ymbol/SymbolFile.h
arget/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
ore/MappedHash.h
2eb5122c6aa0f4e1eae0f19563741bb3cb68d32e 22-Nov-2011 Greg Clayton <gclayton@apple.com> Got the sizeof(lldb_private::Symbol) down to 64 bytes (from 72 bytes) by not
having the enumeration take up 32 bits for the type and by putting it into the
bitfields that were already being used.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145084 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symbol.h
0c496cd73b30842b49dcc26975fb50c0c77ad34f 22-Nov-2011 Greg Clayton <gclayton@apple.com> 12% allocated memory savings when debugging clang with DWARF in .o files by
making sure we perfectly size our vector of symbols on the symbol table.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145069 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
be9875dc16a839be592110d9de6dc2c9285c5b61 21-Nov-2011 Greg Clayton <gclayton@apple.com> Many GDB users always want to display disassembly when they stop by using
something like "display/4i $pc" (or something like this). With LLDB we already
were showing 3 lines of source before and 3 lines of source after the current
source line when showing a stop context. We now improve this by allowing the
user to control the number of lines with the new "stop-line-count-before" and
"stop-line-count-after" settings. Also, there is a new setting for how many
disassembly lines to show: "stop-disassembly-count". This will control how many
source lines are shown when there is no source or when we have no source line
info.

settings set stop-line-count-before 3
settings set stop-line-count-after 3
settings set stop-disassembly-count 4
settings set stop-disassembly-display no-source

The default values are set as shown above and allow 3 lines of source before
and after (what we used to do) the current stop location, and will display 4
lines of disassembly if the source is not available or if we have no debug
info. If both "stop-source-context-before" and "stop-source-context-after" are
set to zero, this will disable showing any source when stopped. The
"stop-disassembly-display" setting is an enumeration that allows you to control
when to display disassembly. It has 3 possible values:

"never" - never show disassembly no matter what
"no-source" - only show disassembly when there is no source line info or the source files are missing
"always" - always show disassembly.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145050 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
fecc09c3709262515add87254cb973ce5175f17b 19-Nov-2011 Sean Callanan <scallanan@apple.com> Pulled in a new revision of LLVM/Clang and added
several patches. These patches fix a problem
where templated types were not being completed the
first time they were used, and fix a variety of
minor issues I discovered while fixing that problem.

One of the previous local patches was resolved in
the most recent Clang, so I removed it. The others
will be removed in due course.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144984 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTResultSynthesizer.h
xpression/ASTStructExtractor.h
323ce42219c4b036e21212ce7d1398253a91e9db 19-Nov-2011 Jim Ingham <jingham@apple.com> Handle stepping through a trampoline where the jump target is calculated a runtime - and so doesn't match
the name of the PLT entry. This solution assumes a naming convention agreed upon by us and the system folks,
and isn't general. The general solution requires actually finding & calling the resolver function if it
hasn't been called yet. That's more tricky.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144981 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
arget/DynamicLoader.h
a9385537809ef342c843c5ab972e513742652047 18-Nov-2011 Greg Clayton <gclayton@apple.com> Added optional calls to lldb_private::Process for getting memory region info
from a process and hooked it up to the new packet that was recently added
to our GDB remote executable named debugserver. Now Process has the following
new calls:

virtual Error
Process::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info);

virtual uint32_t
GetLoadAddressPermissions (lldb::addr_t load_addr);

Only the first one needs to be implemented by subclasses that can add this
support.

Cleaned up the way the new packet was implemented in debugserver to be more
useful as an API inside debugserver. Also found an error where finding a region
for an address actually will pick up the next region that follows the address
in the query so we also need ot make sure that the address we requested the
region for falls into the region that gets returned.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144976 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
5a55c7a90100e2ed832c35955645bf146e8a66b7 18-Nov-2011 Sean Callanan <scallanan@apple.com> This commit completes the rearchitecting of ClangASTSource
to allow variables in the persistent variable store to know
how to complete themselves from debug information. That
fixes a variety of bugs during dematerialization of
expression results and also makes persistent variable and
result variables ($foo, $4, ...) more useful.

I have also added logging improvements that make it much
easier to figure out how types are moving from place to
place, and made some checking a little more aggressive.

The commit includes patches to Clang which are currently being
integrated into Clang proper; once these fixes are in Clang
top-of-tree, these patches will be removed. The patches don't
fix API; rather, they fix some internal bugs in Clang's
ASTImporter that were exposed when LLDB was moving types from
place to place multiple times.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144969 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTImporter.h
464c6161464694412b7472129e789248f1cf21b9 17-Nov-2011 Greg Clayton <gclayton@apple.com> Use a pseudoterminal for local processes if no STDIO redirection or other
file actions have been specified.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144922 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
ffa43a6bc42bfcccae46eec9cf7bf73f17c328e9 17-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed the issue that was causing our monitor process threads to crash, it
turned out to be unitialized data in the ProcessLaunchInfo default constructor.
Turning on MallocScribble in the environment helped track this down.

When we launch and attach using the host layer, we now inform the process that
it shouldn't detach when by calling an accessor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144882 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
202060806d75f812b56a3cfa70d85fff536e5c2f 17-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed an issue with the pthread_setspecific() where we weren't NULL-ing out
the thread specific data and were destroying the thread specfic data more
than once.

Also added the ability to ask a lldb::StateType if it is stopped with an
additional paramter of "must_exist" which means that the state must be a
stopped state for a process that still exists. This means that eStateExited
and eStateUnloaded will no longer return true if "must_exist" is set to true.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144875 91177308-0d34-0410-b5e6-96231b3b80d8
ore/State.h
595553a651fe59867e6d70113cbfff68d4427790 16-Nov-2011 Sean Callanan <scallanan@apple.com> Added support to the ASTImporter for passing
completion information between different AST
contexts. It works like this:

- If a Decl is imported from a context that
has completion metadata, then that Decl
is associated with the same completion
information (possibly none) as the Decl
it was imported from.

- If a Decl is imported from a context that
does not have completion metadata, then it
is marked as completable by consulting the
Decl and context it was imported from.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144838 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTImporter.h
d01bf8848e2407fca0621ede07a2b39be741e45f 16-Nov-2011 Sean Callanan <scallanan@apple.com> Changed the ClangASTImporter to store metadata
for each AST context it knows about in a single
object. This makes it faster to look up the
appropriate ASTImpoter for a given ASTContext
pair and also makes it much easier to delete all
metadata for a given AST context.

In the future, this fix will allow the
ClangASTImporter to propagate completion
information between the metadata for different
AST contexts as its minions move AST objects
around.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144835 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTImporter.h
cf3c7bd6eb28a5a14063689607473d9d8b794c05 16-Nov-2011 Sean Callanan <scallanan@apple.com> Added a CopyType method to the ASTImporter that
handles opaque QualTypes.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144813 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTImporter.h
4938bd6ebe7ce788c1fd74cf657a5e4c882d929a 16-Nov-2011 Sean Callanan <scallanan@apple.com> I made the ClangASTImporter owned by the target
rather than individually on behalf of each
ASTContext. This allows the ASTImporter to know
about all containers of types, which will let it
be smarter about forwarding information about
type origins. That means that the following
sequence of steps will be possible (after a few
more changes):

- Import a type from a Module's ASTContext into
an expression parser ASTContext, tracking its
origin information -- this works now.

- Because the result of the expression uses that
type, import it from the expression parser
ASTContext into the Target's scratch AST
context, forwarding the origin information --
this needs to be added.

- For a later expression that uses the result,
import the type from the Target's scratch AST
context, still forwarding origin information
-- this also needs to be added.

- Use the intact origin information to complete
the type as needed -- this works now if the
origin information is present.

To this end, I made the following changes:

- ASTImporter top-level copy functions now
require both a source and a destination AST
context parameter.

- The ASTImporter now knows how to purge
records related to an ASTContext that is
going away.

- The Target now owns and creates the ASTImporter
whenever the main executable changes or (in the
absence of a main executable) on demand.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144802 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
ymbol/ClangASTImporter.h
arget/Target.h
ldb-forward.h
1c4642c6ab741d85c98d4288cf922c9a2ef77007 16-Nov-2011 Greg Clayton <gclayton@apple.com> Made the darwin host layer properly reap any child processes that it spawns.
After recent changes we weren't reaping child processes resulting in many
zombie processes.

This was fixed by adding more settings to the ProcessLaunchOptions class
that allow clients to specify a callback function and baton to be notified
when their process dies. If one is not supplied a default callback will be
used that "does the right thing".

Cleaned up a race condition in the ProcessGDBRemote class that would attempt
to monitor when debugserver died.

Added an extra boolean to the process monitor callbacks that indicate if a
process exited or not. If your process exited with a zero exit status and no
signal, both items could be zero.

Modified the process monitor functions to not require a callback function
in order to reap the child process.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144780 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ost/Host.h
arget/Process.h
e0b7f94a82aee489f221a3b3f995bce1cbb34e23 16-Nov-2011 Sean Callanan <scallanan@apple.com> Fixed a problem where the target didn't use a
NULL-terminated C string to store the contents
of the expression prefix file. This meant that
expressions, when printing the contents of the
prefix into the expression's text, would
invariably put in bad data after the end of the
expression.

Now, instead, we store the prefix contents in a
std::string, which handles null-termination
correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144760 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
dcf03f82c67033cd72925a050768498fa367249b 15-Nov-2011 Sean Callanan <scallanan@apple.com> Made Target own a ClangASTSource that will be used
to complete types in the scratch AST context.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144712 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTImporter.h
arget/Target.h
ldb-forward.h
e9cd03af38f048f191425bdaf9f7cc2a7f936b9d 15-Nov-2011 Sean Callanan <scallanan@apple.com> Removed the ClangASTImporter pointer from
ClangExpressionDeclMap, which actually uses the
one it inherits from ClangASTSource.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144702 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
527154d8e532f27f25af226c9e1dac607c48b5d1 15-Nov-2011 Greg Clayton <gclayton@apple.com> Added a new class to Process.h: ProcessAttachInfo. This class contains enough
info for us to attach by pid, or by name and will also allow us to eventually
do a lot more powerful attaches. If you look at the options for the "platform
process list" command, there are many options which we should be able to
specify. This will allow us to do things like "attach to a process named 'tcsh'
that has a parent process ID of 123", or "attach to a process named 'x' which
has an effective user ID of 345".

I finished up the --shell implementation so that it can be used without the
--tty option in "process launch". The "--shell" option now can take an
optional argument which is the path to the shell to use (or a partial name
like "sh" which we will find using the current PATH environment variable).

Modified the Process::Attach to use the new ProcessAttachInfo as the sole
argument and centralized a lot of code that was in the "process attach"
Execute function so that everyone can take advantage of the powerful new
attach functionality.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144615 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Args.h
nterpreter/CommandReturnObject.h
arget/Platform.h
arget/Process.h
ldb-forward.h
e6ea5fe8e76b028a0565bc01543bc15f8c120e8a 15-Nov-2011 Sean Callanan <scallanan@apple.com> Pulled in a new version of LLVM/Clang to solve a variety
of problems with Objective-C object completion. To go
along with the LLVM/Clang-side fixes, we have a variety
of Objective-C improvements.

Fixes include:

- It is now possible to run expressions when stopped in
an Objective-C class method and have "self" act just
like "self" would act in the class method itself (i.e.,
[self classMethod] works without casting the return
type if debug info is present). To accomplish this,
the expression masquerades as a class method added by
a category.

- Objective-C objects can now provide methods and
properties and methods to Clang on demand (i.e., the
ASTImporter sets hasExternalVisibleDecls on Objective-C
interface objects).

- Objective-C built-in types, which had long been a bone
of contention (should we be using "id"? "id*"?), are
now fetched correctly using accessor functions on
ClangASTContext. We inhibit searches for them in the
debug information.

There are also a variety of logging fixes, and I made two
changes to the test suite:

- Enabled a test case for Objective-C properties in the
current translation unit.

- Added a test case for calling Objective-C class methods
when stopped in a class method.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144607 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTDumper.h
xpression/ClangASTSource.h
xpression/ClangUserExpression.h
xpression/ExpressionSourceCode.h
96154be69fa240a662419183ed08e1cfc5418164 13-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10126482>

Fixed an issues with the SBType and SBTypeMember classes:
- Fixed SBType to be able to dump itself from python
- Fixed SBType::GetNumberOfFields() to return the correct value for objective C interfaces
- Fixed SBTypeMember to be able to dump itself from python
- Fixed the SBTypeMember ability to get a field offset in bytes (the value
being returned was wrong)
- Added the SBTypeMember ability to get a field offset in bits


Cleaned up a lot of the Stream usage in the SB API files.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144493 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBStream.h
PI/SBTarget.h
PI/SBType.h
ymbol/ClangASTContext.h
ymbol/Type.h
bd06ff435614ff4e884c40f3ea13e24f0cef96f7 13-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10103980>

A long time ago we started to centralized the STDOUT in lldb_private::Process
but we missed a few things still in ProcessGDBRemote.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144491 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
a1b9a90b7aef446302de9b845dc4f3b0e1473aa7 13-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10338439>

This is the actual fix for the above radar where global variables that weren't
initialized were not being shown correctly when leaving the DWARF in the .o
files. Global variables that aren't intialized have symbols in the .o files
that specify they are undefined and external to the .o file, yet document the
size of the variable. This allows the compiler to emit a single copy, but makes
it harder for our DWARF in .o files with the executable having a debug map
because the symbol for the global in the .o file doesn't exist in a section
that we can assign a fixed up linked address to, and also the DWARF contains
an invalid address in the "DW_OP_addr" location (always zero). This means that
the DWARF is incorrect and actually maps all such global varaibles to the
first file address in the .o file which is usually the first function. So we
can fix this in either of two ways: make a new fake section in the .o file
so that we have a file address in the .o file that we can relink, or fix the
the variable as it is created in the .o file DWARF parser and actually give it
the file address from the executable. Each variable contains a
SymbolContextScope, or a single pointer that helps us to recreate where the
variables came from (which module, file, function, etc). This context helps
us to resolve any file addresses that might be in the location description of
the variable by pointing us to which file the file address comes from, so we
can just replace the SymbolContextScope and also fix up the location, which we
would have had to do for the other case as well, and update the file address.
Now globals display correctly.

The above changes made it possible to determine if a variable is a global
or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag
for each variable (local, global, or static), yet DWARF provides no way for
us to classify these variables into these categories. We can now detect when
a variable has a simple address expressions as its location and this will help
us classify these correctly.

While making the above changes I also noticed that we had two symbol types:
eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same
thing: the symbol is not defined in the current object file. Symbol objects
also have a bit that specifies if a symbol is externally visible, so I got
rid of the eSymbolTypeExtern symbol type and moved all code locations that
used it to use the eSymbolTypeUndefined type.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144489 91177308-0d34-0410-b5e6-96231b3b80d8
ore/dwarf.h
xpression/DWARFExpression.h
ldb-enumerations.h
2d9adb73af7520bec430e0585ca40467828e6ed1 12-Nov-2011 Greg Clayton <gclayton@apple.com> Added the ability to run a process in a shell on MacOSX currently when using
the --tty option. So you can now get shell expansion and file redirection:

(lldb) process launch --tty --shell -- *.jpg < in.txt > out.txt

Again, the "--tty" is mandatory for now until we hook this up to other
functions. The shell is also currently hard coded to "/bin/bash" and not the
"SHELL" variable. "/bin/tcsh" was causing problems which I need to dig into.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144443 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
2546fd2a7adb2081e77ce6779e25646c0e3498a9 12-Nov-2011 Jim Ingham <jingham@apple.com> Add code that reads the APPLE_property debug info, and makes up properties from them.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144440 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
ymbol/ClangASTContext.h
70d7092795f616e6c72eda0fce4588238d116aa0 11-Nov-2011 Sean Callanan <scallanan@apple.com> Fixed a bug that inhibited symbol lookup. The
problem is that we had a bitfield that kept
track of what had been found so far, and inhibited
searches when the local variable bit was set.
This bitfield was not being initialized correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144400 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
22a3afd927a97026bd22b6023162439c59e6166d 11-Nov-2011 Greg Clayton <gclayton@apple.com> Allow the Apple hash tables to be emtpy.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144353 91177308-0d34-0410-b5e6-96231b3b80d8
ore/MappedHash.h
6e56157a52b093759f13321b7f2d601e3eaea8a0 10-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/9334299>

Added the ability to get a type without qualifiers (const, volatile, restrict, etc).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144302 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
6db3594f1ce91d8268ef60bf5d07635d778ea786 10-Nov-2011 Jim Ingham <jingham@apple.com> Using the wrong type for the break id's (user_id_t is an unsigned int, but internal breakpoints can be negative, and anyway it is a good idea to use break_id_t for breakpoints, no?)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144254 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanRunToAddress.h
9b7148450908952cdf93de06fa69220d9fb7fba6 09-Nov-2011 Sean Callanan <scallanan@apple.com> Added a function to ClangASTSource to service
lookups for Objective-C methods by selector.
Right now all it does is print log information.

Also improved the logging for imported TagDecls
to indicate whether or not the definition for
the imported TagDecl is complete.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144203 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
0296fe73a7cb1482226b1303a795ede00e12d677 08-Nov-2011 Jim Ingham <jingham@apple.com> Do a better job of detecting when a breakpoint command has set the target running again (except you have to ignore
cases where the breakpoint runs expressions, those don't count as really "running again").


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144064 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
arget/StopInfo.h
abb3302051246273eb92cca203c9a1b9d9736e05 08-Nov-2011 Greg Clayton <gclayton@apple.com> Moved many of the "settings" that used to be in "target.process.*" to just
be in the target. All of the environment, args, stdin/out/err files, etc have
all been moved. Also re-enabled the ability to launch a process in a separate
terminal on MacOSX.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144061 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
arget/Target.h
d7a6281f7e0464f0341782631bf4de5b17b3e328 08-Nov-2011 Greg Clayton <gclayton@apple.com> Moved the fixed ScriptSummaryFormat forward declaration into the #ifndef LLDB_DISABLE_PYTHON so it doesn't show up in builds where it is supposed to be disabled.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144045 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-forward.h
5b658cc411e8810073f7f633f3c5d6f177cb3dcd 08-Nov-2011 Sean Callanan <scallanan@apple.com> Added a language parameter to the expression parser,
which will in the future allow expressions to be
compiled as C, C++, and Objective-C instead of the
current default Objective-C++. This feature requires
some additional support from Clang -- specifically, it
requires reference types in the parser regardless of
language -- so it is not yet exposed to the user.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144042 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/ClangUserExpression.h
9d60ca89ed02fb4c8a9cccd017c33b7d35fcfe61 08-Nov-2011 Eric Christopher <echristo@apple.com> Remove duplicate and contradictory forward declaration.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144040 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-forward.h
6010acef0cee54e044d4e7e472ef3d99e13c5045 07-Nov-2011 Enrico Granata <granata.enrico@gmail.com> this patch addresses several issues with "command script" subcommands:
a) adds a new --synchronicity (-s) setting for "command script add" that allows the user to decide if scripted commands should run synchronously or asynchronously (which can make a difference in how events are handled)
b) clears up several error messages
c) adds a new --allow-reload (-r) setting for "command script import" that allows the user to reload a module even if it has already been imported before
d) allows filename completion for "command script import" (much like what happens for "target create")
e) prevents "command script add" from replacing built-in commands with scripted commands
f) changes AddUserCommand() to take an std::string instead of a const char* (for performance reasons)
plus, it fixes an issue in "type summary add" command handling which caused several test suite errors


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144035 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ldb-enumerations.h
ldb-private-enumerations.h
b607f428c8fc96f210c446503adb80dbc952d944 05-Nov-2011 Greg Clayton <gclayton@apple.com> Missed part of a previous patch.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143773 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatNavigator.h
07c51d09d4b61891cdc37f44bb332dc286b4de2f 04-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Include limits.h for PATH_MAX.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143694 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
3e4238d47a6d1a3106f357d2e7b495870721c7ae 04-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed the Xcode project building of LLVM to be a bit more user friendly:

- If you download and build the sources in the Xcode project, x86_64 builds
by default using the "llvm.zip" checkpointed LLVM.
- If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
Xcode project will download the right LLVM sources and build them from
scratch
- If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
directory, we will use the sources you have placed in the LLDB directory.

Python can now be disabled for platforms that don't support it.

Changed the way the libllvmclang.a files get used. They now all get built into
arch specific directories and never get merged into universal binaries as this
was causing issues where you would have to go and delete the file if you wanted
to build an extra architecture slice.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143678 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpointLocation.h
PI/SBFrame.h
ore/FormatClasses.h
ore/FormatManager.h
xpression/ClangUserExpression.h
nterpreter/ScriptInterpreterPython.h
ldb-forward-rtti.h
ldb-forward.h
36bc5ea5a48c19421d44f559e2165c105657b809 03-Nov-2011 Greg Clayton <gclayton@apple.com> Modified all Process::Launch() calls to use a ProcessLaunchInfo structure
on internal only (public API hasn't changed) to simplify the paramter list
to the launch calls down into just one argument. Also all of the argument,
envronment and stdio things are now handled in a much more centralized fashion.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143656 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Args.h
arget/Process.h
ldb-enumerations.h
0fcc7d2710dcff471bf281771292e94c77f29892 02-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Try to unbreak Makefile builds.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143566 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRDynamicChecks.h
2581dbf7292c6272bb771fe396ab30921385d669 02-Nov-2011 Sean Callanan <scallanan@apple.com> Sometimes the debug information includes artifically-
generated special member functions (constructors,
destructors, etc.) for classes that don't really have
them. We needed to mark these as artificial to reflect
the debug information; this bug does that for
constructors and destructors.

The "etc." case (certain assignment operators, mostly)
remains to be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143526 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
9911d2fa3380028c9b798110bd1dcdeb44920421 02-Nov-2011 Sean Callanan <scallanan@apple.com> Added functionality to call Objective-C class methods
correctly, and added a testcase to check that it works.

The main problem here is that Objective-C class method
selectors are external references stored in a special
data structure in the LLVM IR module for an expression.
I just had to extract them and ensure that the real
class object locations were properly resolved.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143520 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
716e3f07f6c41436b2845b172975fd45b456c8f0 01-Nov-2011 Sean Callanan <scallanan@apple.com> Added the capability (turned off for now) to mark a
method as __attribute__ ((used)) when adding it to a
class. This functionality is useful when stopped in
anonymous namespaces: expressions attached to classes
in anonymous namespaces are typically elided by Clang's
CodeGen because they have no namespaces are intended
not to be externally visible. __attribute__ ((used))
forces CodeGen to emit the function.

Right now, __attribute__ ((used)) causes the JIT not to
emit the function, so we're not enabling it until we
fix that.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143469 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
ba560cc7d03c9f7d9df81e60201c5ec75cff5232 01-Nov-2011 Jim Ingham <jingham@apple.com> Enhanced the ObjC DynamicCheckerFunction to test for "object responds to selector" as well as
"object borked"... Also made the error when the checker fails reflect this fact rather than
report a crash at 0x0.

Also a little cleanup:
- StopInfoMachException had a redundant copy of the description string.
- ThreadPlanCallFunction had a redundant copy of the thread, and had a
copy of the process that it didn't really need.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143419 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRDynamicChecks.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanCallUserExpression.h
97c8957257a3e0b3ce6f46f8e5a28c965e30f357 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fix a bunch of -Wreorder problems.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143381 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
f09a857961404d937463e9419dc3a8d019cae5f6 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fix several uses of trailing comma on enumeration extensions.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143380 91177308-0d34-0410-b5e6-96231b3b80d8
ore/MappedHash.h
705a098b207440d81ea4e4ce66ebf1398ec458a3 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fix up several const qualified return types.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143379 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
arget/Target.h
3ac9f04a2ce96a38b0817f0dbfaeb71223e6aaa5 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fixup a number of mismatched tags problems.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143378 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-forward.h
715f6b0843d0099761464f05e4f899cb69e63320 31-Oct-2011 Sean Callanan <scallanan@apple.com> The IRDynamicChecks subsystem was not properly
detecting Objective-C method calls because the
"lldb.call.realName" metadata was no longer
being correctly installed. I fixed this problem.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143371 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
41a857a34dd83831c4e9db23179608cb8bd28328 29-Oct-2011 Jason Molenda <jmolenda@apple.com> finish removal of alpha arch -- previous half-removal caused lldb to assert on startup

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143294 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
9394b5aaa5aafcf95d21d27371fa0a6548790a57 29-Oct-2011 Sean Callanan <scallanan@apple.com> Cloned FindExternalVisibleDecls from
ClangExpressionDeclMap to ClangASTSource, and
moved all general type and namespace lookups
into ClangASTSource. Now ClangASTSource is ready
to complete types given nothing more than a target
and an AST context.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143292 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
bb715f9c0a70d9e8763772d673ce0620cfbc2d34 29-Oct-2011 Sean Callanan <scallanan@apple.com> Moved FindExternalLexicalDecls and a few smaller
functions from ClangExpressionDeclMap to ClangASTSource.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143276 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
73b520f4f60dca58e58e446c9504d45384ee677b 29-Oct-2011 Sean Callanan <scallanan@apple.com> I moved the responsibility for interacting with the
AST importer on completing namespace mappings from
ClangExpressionDeclMap to ClangASTSource.

ClangASTSource now contains a TargetSP which it
uses to lookup namespaces in all of a target's
modules. I will use the TargetSP in the future to
look up globals.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143275 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
d8a218d998d0dd805a8e4ec7bbaa9aeb229590cc 29-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed the "expression" command when it comes to using it with the new GDB format
command suffix:

(lldb) expression/x 3+3

Since "expression" is a raw command that has options, we need to make sure the
command gets its options properly terminated with a "--".

Also fixed an issue where if you try to use the GDB command suffix on a
command that doesn't support the "--gdb-format" command, it will report an
appropriate error.

For the fix above, you can query an lldb_private::Options object to see if it
supports a long option by name.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143266 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Options.h
f76afff22617c3f632af58ffebe1f037ba935717 29-Oct-2011 Sean Callanan <scallanan@apple.com> As part of a general refactoring of ClangASTSource to
allow it to complete types on behalf of any AST context
(including the "scratch" AST context associated with
the target), I scrapped its role as intermediary between
the Clang parser and ClangExpressionDeclMap, and instead
made ClangExpressionDeclMap inherit from ClangASTSource.

After this, I will migrate the functions that complete
types and perform namespace lookups from
ClangExpressionDeclMap to ClangASTSource. Ultimately
ClangExpressionDeclMap's only responsiblity will be to
look up variables and ensure that they are materialized
and dematerialized correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143253 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
3ec8bb74de508012e3188544d104e3cb0487dc03 29-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed the GDB format to allow the size and format characters to come in any
order. Also hooked up the new formats for instruction, hex float and address
to the new formats.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143251 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupFormat.h
7089d8a3ef19ea251210b3e9bf198da8fb55f279 29-Oct-2011 Jim Ingham <jingham@apple.com> Added the ability for the target to specify Modules that will not be searched
when setting breakpoints, but only if no module is specified. The Darwin
platform uses this to not set breakpoints in dyld.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143249 91177308-0d34-0410-b5e6-96231b3b80d8
ore/SearchFilter.h
arget/Platform.h
arget/Target.h
7268b4c8a444a59d42f4d765bd7292e62f41a651 28-Oct-2011 Greg Clayton <gclayton@apple.com> Added the ability to have GDB formats appended to any command so you can do
things like:

(lldb) x/32xb 0x1000

"x" is an alias to "memory read", so this will actually turn into:

(lldb) memory read --gdb-format=32xb 0x1000

This applies to all commands, so the GDB formats will work with "register read",
"frame variable", "target variable" and others. All commands that can accept
formats, counts and sizes have been modified to support the "--gdb-format"
option.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143230 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
f35a96c63732a1b3adf875ea44c7d3d7de6f8eec 27-Oct-2011 Sean Callanan <scallanan@apple.com> Added a function to the Host that gets a dummy target
for it, so that people who want to use LLDB as a
calculator can run simple expressions without needing
a target or process.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143147 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
6f3bde75715fc2e1da483570c0c9241227c14c84 27-Oct-2011 Sean Callanan <scallanan@apple.com> Changed the way the expression parser handles variables
of reference types. Previously, such variables were
materialized as references to those references, which
caused undesried behavior in Clang and was useless anyway
(the benefit of using references to variables is that it
allows expressions to modify variables in place, but for
references that's not required).

Now we just materialize the references directly, which
fixes a variety of expressions that use references.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143137 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
ymbol/ClangASTContext.h
24a6bd9835ed1655984397b0cdf35127e47681e9 27-Oct-2011 Greg Clayton <gclayton@apple.com> Added support for the new ".apple_objc" accelerator tables. These tables are
in the same hashed format as the ".apple_names", but they map objective C
class names to all of the methods and class functions. We need to do this
because in the DWARF the methods for Objective C are never contained in the
class definition, they are scattered about at the translation unit level and
they don't even have attributes that say the are contained within the class
itself.

Added 3 new formats which can be used to display data:

eFormatAddressInfo
eFormatHexFloat
eFormatInstruction

eFormatAddressInfo describes an address such as function+offset and file+line,
or symbol + offset, or constant data (c string, 2, 4, 8, or 16 byte constants).
The format character for this is "A", the long format is "address".

eFormatHexFloat will print out the hex float format that compilers tend to use.
The format character for this is "X", the long format is "hex float".

eFormatInstruction will print out disassembly with bytes and it will use the
current target's architecture. The format character for this is "i" (which
used to be being used for the integer format, but the integer format also has
"d", so we gave the "i" format to disassembly), the long format is
"instruction".

Mate the lldb::FormatterChoiceCriterion enumeration private as it should have
been from the start. It is very specialized and doesn't belong in the public
API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143114 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataExtractor.h
ore/Disassembler.h
ore/FormatNavigator.h
nterpreter/OptionGroupFormat.h
ymbol/ClangASTType.h
ldb-enumerations.h
ldb-private-enumerations.h
4b3cef072258eb17bd387ca7c7be18b6451fe09a 26-Oct-2011 Sean Callanan <scallanan@apple.com> Extended the IR interpreter to handle the variables
"_cmd", "this", and "self". These variables are handled
differently from all other external variables used by
the expression. Other variables are used indirectly
through the $__lldb_arg operand; only _cmd, this, and
self are passed directly through the ABI.

There are two modifications:

- I added a function to ClangExpressionDeclMap that
retrives the value of one of these variables by name;
and

- I made IRInterpreter fetch these values when needed,
and ensured that the proper level of indirection is
used.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143065 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
cfbfb1a84ddf81436e086c6f45cb6608b7c1b656 26-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Use full path to ClangForward.h

Fixes Linux build.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143038 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/VerifyDecl.h
a31b4ddfd213da1c2595fe2c5ae599d05de65400 26-Oct-2011 Sean Callanan <scallanan@apple.com> Added a new #define, LLVM_NDEBUG_OFF, that should
be set if linking against an LLVM compiled with
NDEBUG off. If it is set, we do not enable NDEBUG
in any place where we include LLVM headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143036 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangExternalASTSourceCallbacks.h
65193b3f858b2848792e8e02067b10e57b12a514 26-Oct-2011 Sean Callanan <scallanan@apple.com> Fixed VerifyDecl to use shared forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143029 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/VerifyDecl.h
902b5beee960a8861867f06588c12ac6eb55eb9d 26-Oct-2011 Greg Clayton <gclayton@apple.com> A simple fix for the GDB format strings so the byte size parameter gets
properly marked as valid.

Also modified the "memory read" command to be able to intelligently repeat
subsequent memory requests, so now you can do:

(lldb) memory read --format hex --count 32 0x1000

Then hit enter to keep viewing the memory that follows the last valid request.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143015 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupFormat.h
nterpreter/OptionGroupOutputFile.h
nterpreter/OptionGroupValueObjectDisplay.h
5e8eb5c428e91b99f3884b53fc5deea0ecb001cd 26-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed an issue where a class that resides inside another class wasn't getting
an access specifier set on it, causing an assertion to fire when building
with a Debug+Asserts build of clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143010 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
c6d161e3ed961e40242b5a0482a3354848c7cd57 26-Oct-2011 Sean Callanan <scallanan@apple.com> Added VerifyDecl, a function that, when LLDB is
linked against a debug LLVM, runs a variety of
functions -- currently just one -- that verify
that the Decls we create are valid.

ClangASTContext now calls this verifier whenever
it adds a Decl to a DeclContext, and the verifier
checks that the AccessSpecifier is sane.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143000 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/VerifyDecl.h
9c236733d43e6250c8a5671a438f4a2afeb9c0b2 26-Oct-2011 Greg Clayton <gclayton@apple.com> Cleaned up many error codes. For any who is filling in error strings into
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible

Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142999 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupFormat.h
ldb-enumerations.h
c7ca466fa99aea0e4e81530157bc8927682cae00 25-Oct-2011 Sean Callanan <scallanan@apple.com> Improved handling of static data in the expression
parser. Now expression like the following work as
expected:

-
(lldb) expr struct { int a; int b; } $blah = { 10, 20 }
<no result>
(lldb) expr $blah
(<anonymous struct at Parse:6:5>) $blah = {
(int) a = 10
(int) b = 20
}
-

Now the IRForTarget subsystem knows how to handle
static initializers of various composite types.

Also removed an unnecessary parameter from
ClangExpressionDeclMap::GetFunctionInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142936 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/IRForTarget.h
a42880a8e464a3e4f93951ae797313e5e38cdcd3 25-Oct-2011 Greg Clayton <gclayton@apple.com> Updated all commands that use a "--format" / "-f" options to use the new
OptionGroupFormat. Updated OptionGroupFormat to be able to also use the
"--size" and "--count" options. Commands that use a OptionGroupFormat instance
can choose which of the options they want by initializing OptionGroupFormat
accordingly. Clients can either get only the "--format", "--format" + "--size",
or "--format" + "--size" + "--count". This is in preparation for upcoming
chnages where there are alternate ways (GDB format specification) to set a
format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142911 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/NamedOptionValue.h
nterpreter/OptionGroupFormat.h
nterpreter/OptionGroupVariable.h
9d855c667f8006ffcfd20dc8858fea6a0308b411 25-Oct-2011 Greg Clayton <gclayton@apple.com> Simplified the CommandInterpreter::StripFirstWord logic by making it a static
function and having it not require both a bool and a quote char to fill in.
We intend to get rid of this functionality when we rewrite the command
interpreter for streams eventually, but not for now.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142888 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
fa1f617779902cabfcce11abf07a857b85880f41 24-Oct-2011 Enrico Granata <granata.enrico@gmail.com> Decoupling of lock-related code from the core of ScriptInterpreterPython. All that concerns locking the Python interpreter is now delegated to the internal ScriptInterpreterPython::Locker class. Several changes in ScriptInterpreterPython to accommodate this new pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142802 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreterPython.h
c28bbdb17a0826eb2f84cf2debb059f560c7d39b 23-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Move Python.h includes out of the headers into the .cpp file where it's actually used.

Python.h includes a ton of macros that can cause weird behavior down the road.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142754 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
nterpreter/ScriptInterpreterPython.h
3ce51281f53e4554ac27abcb504a104d07f53131 23-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove unused include of deprecated header.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142753 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatNavigator.h
f6a5bd78aaef0e4d477208289ace03cfa7f60649 22-Oct-2011 Greg Clayton <gclayton@apple.com> Added template support when parsing DWARF into types. We can now use STL
classes in the expression parser.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142717 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
ymbol/ClangASTContext.h
a7cb1fa9d7d9c71fc2a5d9946cbec8e928baa5b9 22-Oct-2011 Sean Callanan <scallanan@apple.com> Implemented an extension to the namespace map that
permits a namespace map to be created and populated
when the namespace is imported, not just when it is
requested via FindExternalVisibleDecls().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142690 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
ymbol/ClangASTImporter.h
557ccd6b47c5d4b3736e704e7f1e887a7fff6549 21-Oct-2011 Sean Callanan <scallanan@apple.com> Made the IR interpreter more robust in the presence
of arbitrary pointers, allowing direct dereferences
of literal addresses. Also disabled special-cased
generation of certain expression results (especially
casts), substituting the IR interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142638 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
591cf15899706efe8878a0718daec056e1ffd442 21-Oct-2011 Jim Ingham <jingham@apple.com> Lock the Unwinder before accessing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142632 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Unwind.h
bbe39167c881ac025cdc4f383ee8895cfd5b1148 21-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed some issues where we might not have one of the new apple accelerator
tables (like the .apple_namespaces) and it would cause us to index DWARF that
didn't need to be indexed.

Updated the MappedHash.h (generic Apple accelerator table) and the DWARF
specific one (HashedNameToDIE.h) to be up to date with the latest and
greatest hash table format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142627 91177308-0d34-0410-b5e6-96231b3b80d8
ore/MappedHash.h
a23ca4249f28a56ef1d1959ea3ac1cd8aabbfae2 20-Oct-2011 Greg Clayton <gclayton@apple.com> Modified the ASTDumper to return a "const char *" instead of a copy of the
std::string and modified all places that used the std::string it returned
to use the "const char *".

Also modified the expression parser to not crash when a function type fails
to copy into the expression AST context.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142561 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTDumper.h
444e35b5fdf15a25a427285650f06f1390e62c75 19-Oct-2011 Greg Clayton <gclayton@apple.com> Moved lldb::user_id_t values to be 64 bit. This was going to be needed for
process IDs, and thread IDs, but was mainly needed for for the UserID's for
Types so that DWARF with debug map can work flawlessly. With DWARF in .o files
the type ID was the DIE offset in the DWARF for the .o file which is not
unique across all .o files, so now the SymbolFileDWARFDebugMap class will
make the .o file index part (the high 32 bits) of the unique type identifier
so it can uniquely identify the types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142534 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symbol.h
arget/Process.h
ldb-defines.h
ldb-types.h
4c8353bd5be6e5abcab8fe27965d477aace75cf2 19-Oct-2011 Greg Clayton <gclayton@apple.com> Changed lldb_private::Type over to use the intrusive ref counted pointers
so we don't have to lookup types in a type list by ID.

Changed the DWARF parser to remove the "can externally complete myself" bits
from the type when we are in the process of completing the type itself to
avoid an onslaught of external visible decl requests from the
clang::ExternalASTSource.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142461 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Type.h
ymbol/TypeList.h
ldb-forward-rtti.h
e3737fdca55be5c078534cc49fb38db409d12e32 18-Oct-2011 Sean Callanan <scallanan@apple.com> Improved logging, replacing the old ASTDumper (which
we never used) with a much simpler class that wraps
the relevant dump functions in Clang. This class also
knows to disable external lookups on DeclContexts
being dumped so it should be safe to print incomplete
Decls.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142359 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTDumper.h
xpression/ClangExpressionDeclMap.h
1a7b956db08140e5b0579b9a6585099732604725 18-Oct-2011 Johnny Chen <johnny.chen@apple.com> This patch alloows lldb to build under GCC.

from dawn@burble.org


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142305 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTImporter.h
59df36f99b76e33852e6848a162f5c2851074ea2 17-Oct-2011 Enrico Granata <granata.enrico@gmail.com> this patch introduces a new command script import command which takes as input a filename for a Python script and imports the module contained in that file. the containing directory is added to the Python path such that dependencies are honored. also, the module may contain an __lldb_init_module(debugger,dict) function, which gets called after importing, and which can somehow initialize the module's interaction with lldb

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142283 91177308-0d34-0410-b5e6-96231b3b80d8
ost/FileSpec.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
712a628dde2f4f786389feecf7e06e59f0853c75 17-Oct-2011 Johnny Chen <johnny.chen@apple.com> Add a commnad to set a condition for a watchpoint. Example:

watchpoint modify -c 'global==5'

modifies the last created watchpoint so that the condition expression
is evaluated at the stop point to decide whether we should proceed with
the stopping.

Also add SBWatchpont::SetCondition(const char *condition) to set condition
programmatically.

Test cases to come later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142227 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBWatchpoint.h
reakpoint/Watchpoint.h
43d390617a5a03ff42894fa0ad121b9335fa4dbc 15-Oct-2011 Jim Ingham <jingham@apple.com> Make "next" and "step-out" work when in stepping over or out of inlined functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142031 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanStepOut.h
76e55f722acc41f6eaf35a7f988090f97b2c82e0 15-Oct-2011 Jim Ingham <jingham@apple.com> Make the step range plans capable of supporting multiple ranges. Also make their constructors public, there isn't any good reason why you shouldn't be able to make these plans.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142026 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepRange.h
5f24c5053d9fa99bd20e6b1e5b8c659c68d57be7 15-Oct-2011 Greg Clayton <gclayton@apple.com> Add function decls to their parent decl context.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142011 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
6364304894596829a96c8cd3b07b4ea5e00029da 14-Oct-2011 Greg Clayton <gclayton@apple.com> Make sure we create only unique one namespace per AST when parsing the DWARF.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142005 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
67bbb1103c5a49b7c994750e90ae7ed130daa3ae 14-Oct-2011 Sean Callanan <scallanan@apple.com> Improved expression logging. Now all calls to
FindExternalVisibleDecls and FindExternalLexicalDecls
are marked and given unique IDs, so that all logging
done as part of their execution can be traced back to
the proper call.

Also there was some logging that really wasn't helpful
in most cases so I disabled it unless verbose logging
(log enable -v lldb expr) is enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141987 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
41a55efdfd779b910fb3515c47357c97e695ec22 14-Oct-2011 Johnny Chen <johnny.chen@apple.com> Add SBWatchpoint::GetError() API, which is not currently populated as yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141979 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBWatchpoint.h
reakpoint/Watchpoint.h
f5c0c72346eb8137107dbee95b12efb700117c13 14-Oct-2011 Greg Clayton <gclayton@apple.com> Added the ability to run expressions in any command. Expressions can be
inserted in commands by using backticks:

(lldb) memory read `$rsp-16` `$rsp+16`
(lldb) memory read -c `(int)strlen(argv[0])` `argv[0]`

The result of the expression will be inserted into the command as a sort of
preprocess stage where this gets done first. We might need to tweak where this
preprocess stage goes, but it is very functional already.

Added ansi color support to the Debugger::FormatPrompt() so you can use things
like "${ansi.fg.blue}" and "${ansi.bold}" many more. This helps in adding
colors to your prompts without needing to know the ANSI color code strings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141948 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
tility/AnsiTerminal.h
tility/SharedCluster.h
ecd4feb5111432d2878e95461220c720cb2d24c8 14-Oct-2011 Johnny Chen <johnny.chen@apple.com> SBValue::Watch() and SBValue::WatchPointee() are now the official API for creating
a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee
encapsulated by SBValue (WatchPointee).

Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that.

Modified the watchpoint related test suite to reflect the change.

Plus replacing WatchpointLocation with Watchpoint throughout the code base.

There are still cleanups to be dome. This patch passes the whole test suite.
Check it in so that we aggressively catch regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141925 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
PI/SBValue.h
PI/SBWatchpoint.h
reakpoint/Watchpoint.h
reakpoint/WatchpointList.h
reakpoint/WatchpointLocation.h
reakpoint/WatchpointLocationList.h
arget/Process.h
arget/Target.h
ldb-forward-rtti.h
ldb-forward.h
9f54ab7b1fb850e31c82c53d7e6967be8547e7ab 14-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed a case where we might end up trying to parse a type in the DWARF parser for a method whose class isn't currently in the process of completing itself. Currently, methods of a class, must be parsed when the class type that contains the method is asked to complete itself through the clang::ExternalASTSource virtual functions. Now we "do the right thing" by checking if the class is being defined, and if so we parse it, else we tell the class to complete itself so everything happens correctly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141908 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
b01f7a4f4793b14f88689fa48c04a11822d3a1c4 14-Oct-2011 Sean Callanan <scallanan@apple.com> Cleaned up a few functions that never get used.

Specifically, the expression parser used to use
functions attached to SymbolContext to do lookups,
but nowadays it searches a ModuleList or Module
directly instead. These functions had no
remaining clients so I removed them to prevent
bit rot.

I also removed a stray callback function from
ClangExpressionDeclMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141899 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/SymbolContext.h
a75970673121eb7cb4c947625235b8c201940fe2 13-Oct-2011 Sean Callanan <scallanan@apple.com> Moved the list of found namespaces into the search
context object. Having it populated and registered
within a single FindExternalVisibleDecls call worked
fine when there was only one call (i.e., when we were
just looking in the global namespace).

However, now FindExternalVisibleDecls is called for
nested namespaces as well, which means that it is
called not once but many times (once per module in
which the parent namespace appears). This means that
the namespace mapping is built up across many calls
to the inferior FindExternalVisibleDecls, so I moved
it into a data structure (the search context) that is
shared by all calls.

I also added some logging to make it easier to see
what is happening during a namespace search, and
cleaned up some existing logging.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141888 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
ymbol/ClangASTImporter.h
1fa6b3d6c83955fe06c63d3a4025f2c0ec431d68 13-Oct-2011 Greg Clayton <gclayton@apple.com> Cleaned up the SBWatchpoint public API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141876 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDefines.h
PI/SBError.h
PI/SBStream.h
PI/SBTarget.h
PI/SBValue.h
PI/SBWatchpoint.h
PI/SBWatchpointLocation.h
aa4a553d4b8cd37f13bd4946f504265000a7bcc4 13-Oct-2011 Sean Callanan <scallanan@apple.com> Removed namespace qualification from symbol queries.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141866 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
xpression/ClangExpressionDeclMap.h
0fcec13c6639ab49216fa9447b25888b7bc9ff59 13-Oct-2011 Sean Callanan <scallanan@apple.com> Completed the glue that passes a ClangNamespaceDecl *
down through Module and SymbolVendor into SymbolFile.
Added checks to SymbolFileDWARF that restrict symbol
searches when a namespace is passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141847 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
4a07832dc5028af55cacf247bedad9933bf8afdc 13-Oct-2011 Sean Callanan <scallanan@apple.com> Now that we know the values are going to stick around,
we don't need to look them up again when materializing.

Switched over the materialization mechanism (for JIT
expressions) and the lookup mechanism (for interpreted
expressions) to use the VariableSP/Symbol that were
found during parsing.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141839 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
16c4ec3c4cb8c68b9813dd7d199471a794da4523 12-Oct-2011 Sean Callanan <scallanan@apple.com> Refactoring in preparation for having multiple
calls to the FindExternalVisibleDecls function.

FindExternalVisibleDecls was recording whether
it had found generic function symbols in variables
that were local to the function. Now, however,
multiple calls occur in response to one request
from Clang, since we may be searching across
namespaces. To support that, I moved the local
variables into a bitfield in NameSearchContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141808 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
0eca1a7136ec5a48d8cf97decf157dc04c93512a 12-Oct-2011 Sean Callanan <scallanan@apple.com> Added support to ClagnExpressionDeclMap for finding
data symbols in namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141792 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
94cd0cac9117f12cf05bab3e836029f15a62024b 12-Oct-2011 Sean Callanan <scallanan@apple.com> Made FindGlobalVariable() optionally search a specific
module and namespace. Also made it use FindGlobalVariables()
instead of the more heavyweight
GetVariablesForVariableExpressionPath().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141783 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
3e80cd9c9e6ae50ff54537551e2fe3ed5319b9b4 12-Oct-2011 Sean Callanan <scallanan@apple.com> Added ClangNamespaceDecl * parameters to several
core Module functions that the expression parser
will soon be using.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141766 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
03f64ca626d4dc0488e6acfe7023e4e376b4df30 12-Oct-2011 Sean Callanan <scallanan@apple.com> Cleanups in preparation for making FindExternalVisibleDecls
look in individual modules rather than globally.

Also some whitespace fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141765 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
141f8d98cb74262914d66a7af4732e8cb2d8699f 12-Oct-2011 Greg Clayton <gclayton@apple.com> Fix preprocessor warnings for no newline at the end of the source files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141755 91177308-0d34-0410-b5e6-96231b3b80d8
ore/MappedHash.h
16b53ab189392cb30056ce1bbc24202cb935bf15 12-Oct-2011 Sean Callanan <scallanan@apple.com> Implemented a namespace map that allows searching
of namespaces (only in the modules where they've
been found) for entities inside those namespaces.

For each NamespaceDecl that has been imported into
the parser, we maintain a map containing
[ModuleSP, ClangNamespaceDecl] pairs in the ASTImporter.
This map has one entry for each module in which the
namespace has been found. When we later scan for an
entity inside a namespace, we search only the modules
in which that namespace was found.

Also made a small whitespace fix in
ClangExpressionParser.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141748 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
ymbol/ClangASTImporter.h
1fb8a2dd636ef408728989d8bbc6d1a7a73177cc 11-Oct-2011 Jim Ingham <jingham@apple.com> Add a SBTarget::BreakpointCreateByName API that allows you to specify the name
type mask.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141625 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
81a20a017b4e3fae0579854aa47aedadd198c118 10-Oct-2011 Greg Clayton <gclayton@apple.com> Patch from Dragos Tatulea regarding typedefs with the new RangeArray template class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141546 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
be42123fa214b039b86ad152bd21d910db7a7af2 08-Oct-2011 Greg Clayton <gclayton@apple.com> Changed RangeMap over to use llvm::SmallVector and updated the RangeArray and the RangeDataArray to have an extra "unsigned N" template parameter. Updated the lldb_private::Block to use a RangeArray with a uint32_t for both the function base offset and block range size, and then a 1 for the small vector size since most lexical blocks in DWARF only have 1 range. Updates the DWARFDebugRanges RangeArray to use an unsigned of 2 since most blocks that have more than one range usually have 2. Also updated a DWARFDebugAranges to default their RangeArray to use a SmallVector with unsigned size of 1 since this will take care of the .o files when doing DWARF in .o files and since there really isn't any good size we can guess with.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141480 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RangeMap.h
ymbol/Block.h
c03a99ae9cced3e3086f10db444ddc90d115a3f3 08-Oct-2011 Greg Clayton <gclayton@apple.com> Added some debug code that can verify that all RangeMap.h maps are sorted when needed since RangeArray and RangeDataArray instantiations depend on it. I ran the test suite with ASSERT_RANGEMAP_ARE_SORTED defined and I got no assertions, so I disabled it prior to checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141478 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RangeMap.h
49e08e3b6ffa42a0148bad845c34da2c4fe603de 08-Oct-2011 Greg Clayton <gclayton@apple.com> Started on the export table for the MappedHash.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141469 91177308-0d34-0410-b5e6-96231b3b80d8
ore/MappedHash.h
8a2a4f8dd31f3228ce323cd2e3c788cbf9f2e7c1 08-Oct-2011 Jim Ingham <jingham@apple.com> Fix the last testsuite regression from the apple-names stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141468 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/SymbolContext.h
bc36a861b8e0b2f2dde34f27c9fa9629a357d598 08-Oct-2011 Greg Clayton <gclayton@apple.com> Added more functionality to Range template classes in RangeMap.h and converted remaining DWARF areas that were using ranges over to this class. Also converted lldb_private::Block to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141460 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RangeMap.h
ymbol/Block.h
060d53f1559d08a6923e45bdeffe8f22ca663049 08-Oct-2011 Sean Callanan <scallanan@apple.com> Fixed a memory leak of ASTResultSynthesizers,
by attaching them to the ClangExpressionParser.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141452 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangUserExpression.h
ldb-forward.h
c1535187de67e4ce48053a7677c76825adcdda44 08-Oct-2011 Sean Callanan <scallanan@apple.com> Updated LLVM/Clang to pull in the latest ARM disassembler.
This involved minor changes to the way we report Objective-C
methods, as well as cosmetic changes and added parameters
for a variety of Clang APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141437 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
ymbol/ClangASTContext.h
659758ac74ae47e3237cc38dd56e5efae2261b25 08-Oct-2011 Jim Ingham <jingham@apple.com> Remove some commented out code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141431 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanStepRange.h
1dca63469790d5dc677e4aa99403c3c72b97634d 08-Oct-2011 Jim Ingham <jingham@apple.com> Clean up some documentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141430 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ore/ModuleList.h
8b7b2276132c7353cabd22000287b42badc26613 08-Oct-2011 Jim Ingham <jingham@apple.com> Move the responsibility for translating the various eFunctionNameType lookups to the
SymbolFIle (it was done mostly in the BreakpointResolverName resolver before.) Then
tailor our searches to the way the indexed maps are laid out. This removes a bunch
of test case failures using indexed dSYM's.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141428 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointResolverName.h
arget/CPPLanguageRuntime.h
arget/ObjCLanguageRuntime.h
ca804bfc09bdc53065e11081c8cb42a5e67fc613 08-Oct-2011 Jim Ingham <jingham@apple.com> Don't look up main to find the default source file till somebody actually asks for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141422 91177308-0d34-0410-b5e6-96231b3b80d8
ore/SourceManager.h
61aca5dd78f07de66e997d41af521ab9d8c16b89 07-Oct-2011 Greg Clayton <gclayton@apple.com> Re-organized the contents of RangeMap.h to be more concise and also allow for a Range, RangeArray, RangeData (range + data), or a RangeDataArray. We have many range implementations in LLDB and I will be converting over to using the classes in RangeMap.h so we can have one set of code that does ranges and searching of ranges.

Fixed up DWARFDebugAranges to use the new range classes.

Fixed the enumeration parsing to take a lldb_private::Error to avoid a lot of duplicated code. Now when an invalid enumeration is supplied, an error will be returned and that error will contain a list of the valid enumeration values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141382 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RangeMap.h
nterpreter/Args.h
257663e753af15633e48c7b00eb7b5880168090b 07-Oct-2011 Greg Clayton <gclayton@apple.com> Since we use address ranges a lot I added a templatized class that allows us to easily control the base address type, the size type, and the data that is stored with each range. It is designed to be populated by appending all needed items, then sorting the resulting list, and optionally minimizing the list when done. I adopted this new list in the DWARFDebugAranges for even further memory savings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141352 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RangeMap.h
e14cf4e7dc9d561224f744807b70a8ab91a8b36d 05-Oct-2011 Johnny Chen <johnny.chen@apple.com> Add capability to set ignore count for watchpoint on the command line:

watchpoint ignore -i <count> [<watchpt-id | watchpt-id-list>]

Add tests of watchpoint ignore_count for command line as well as API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141217 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
8bdf57cfc246358ab65b2d36ec2b8462e8d36e54 05-Oct-2011 Johnny Chen <johnny.chen@apple.com> Fix a problem where the stop-hook command 'frame variable g_val' produces nothing
when newly created threads were subsequently stopped due to breakpoint hit.
The stop-hook mechanism delegates to CommandInterpreter::HandleCommands() to
execuet the commands. Make sure the execution context is switched only once
at the beginning of HandleCommands() only and don't update the context while looping
on each individual command to be executed.

rdar://problem/10228156


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141144 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
ff9a7e065cb72e24dc3629725ae7d1100b29acd4 05-Oct-2011 Greg Clayton <gclayton@apple.com> Added missing file.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141130 91177308-0d34-0410-b5e6-96231b3b80d8
ore/MappedHash.h
00db215522a0cf31082d26d7ab30d2aa30965acf 05-Oct-2011 Greg Clayton <gclayton@apple.com> Enable all the new accelerator tables if they are present and don't manually
index the DWARF. Also fixed an issue with memory accelerator tables with a
size of 1 where we would loop infinitely.

Added support for parsing the new .apple_namespaces section which gives us a
memory hash table for looking up namespaces.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141128 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
15afa9f26a38ea55876ac4ee0b17f0ac8137e9c1 01-Oct-2011 Greg Clayton <gclayton@apple.com> Removed lldb::SBSourceManager_impl. We export everything in the lldb namespace
and this implemenation that backs our lldb::SBSourceManager should not be
exported.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140930 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBFileSpec.h
PI/SBSourceManager.h
PI/SBStream.h
PI/SBTarget.h
ldb-forward.h
5cac6a54b36dd4f9b0db570720b8d47a487343f9 01-Oct-2011 Johnny Chen <johnny.chen@apple.com> Add SBFrame.WatchLocation() to find and watch the location pointed to by
a variable usng the frame as the scope.

Add TestSetWatchpoint.py to exercise this API. Also fix some SWIG Python
docstrings.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140914 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
2f57db09a49f2a05a620b8163bbe1e748a46ec73 01-Oct-2011 Greg Clayton <gclayton@apple.com> Cleaned up the the code that figures out the inlined stack frames given a
symbol context that represents an inlined function. This function has been
renamed internally to:

bool
SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc,
SymbolContext &next_frame_sc,
Address &next_frame_pc) const;

And externally to:

SBSymbolContext
SBSymbolContext::GetParentOfInlinedScope (const SBAddress &curr_frame_pc,
SBAddress &parent_frame_addr) const;

The correct blocks are now correctly calculated.

Switched the stack backtracing engine (in StackFrameList) and the address
context printing over to using the internal SymbolContext::GetParentOfInlinedScope(...)
so all inlined callstacks will match exactly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140910 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSymbolContext.h
ore/Broadcaster.h
ymbol/Block.h
ymbol/SymbolContext.h
f92d0dd8184d6e8f59bce1607c5cd448fcf318c6 30-Sep-2011 Greg Clayton <gclayton@apple.com> Removed some commented out code from the DWARF parser.

Also reduce the size of the lldb_private::Symbol objects by removing the
lldb_private::Function pointer that was in each symbol. Running Instruments
has shown that when debugging large applications with DWARF in .o files that
lldb_private::Symbol objects are one of the highest users of memory. No one
was using the Symbol::GetFunction() call anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140881 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symbol.h
6c19c8a7da08b89ee153d7091aa8641348e0482c 30-Sep-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10212450>

Don't parse function types all the time, only parse them lazily.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140842 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
1b4525213621b2179f0841edd54842eebecd28cd 30-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add an accompanying option to the 'frame variable -w' command to, instead of watching the variable,
watch the location pointed to by the variable. An example,

(lldb) frame variable -w write -x 1 -g g_char_ptr
(char *) g_char_ptr = 0x0000000100100860 ""...
Watchpoint created: WatchpointLocation 1: addr = 0x100100860 size = 1 state = enabled type = w
declare @ '/Volumes/data/lldb/svn/trunk/test/functionalities/watchpoint/hello_watchlocation/main.cpp:21'

...

(lldb) c
Process 3936 resuming

...

rocess 3936 stopped
* thread #2: tid = 0x3403, 0x00000001000009b7 a.out`do_bad_thing_with_location(char*, char) + 23 at main.cpp:27, stop reason = watchpoint 1
frame #0: 0x00000001000009b7 a.out`do_bad_thing_with_location(char*, char) + 23 at main.cpp:27
24 do_bad_thing_with_location(char *char_ptr, char new_val)
25 {
26 *char_ptr = new_val;
-> 27 }
28
29 uint32_t access_pool (uint32_t flag = 0);
30
(lldb)

Also add TestWatchLocation.py test to exercise this functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140836 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupWatchpoint.h
ed11c1ebc344458c2bc83aa5b0bf6b3d0e2ef987 30-Sep-2011 Greg Clayton <gclayton@apple.com> Fixed an issue where a lexical block or inlined function might have bad debug
information generated for it. Say we have a concrete function "foo" which
has inlined function "a" which calls another inlined function "b":

foo
1 {
2 {
a ()
3 {
b ()
4 {

}
}
}
}

Sometimes we see the compiler generate an address range in the DWARF for "foo"
(block 1 above) as say [0x1000-0x1100). Then the range for "a" is something
like [0x1050-0x1060) (note that it is correctly scoped within the "foo"
address range). And then we get "b" which is a child of "a", yet the debug
info says it has a range of [0x1060-0x1080) (not contained within "a"). We now
detect this issue when making our blocks and add an extra range to "a".

Also added a new "lldb" logging category named "symbol" where we can find out
about symbol file errors and warnings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140822 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
ldb-private-log.h
2cd9fbd2e10e80a2aaf6b48034928988151cadcd 29-Sep-2011 Greg Clayton <gclayton@apple.com> Free up some space in lldb_private::Block by not requiring a sibling pointer.
The old way of storing blocks used to use the sibling pointer, but now all
blocks contain a collection of shared pointers to blocks so this isn't required
anymore and a parent can be asked to find the sibling block for a child block.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140808 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
9a93fcd1c343560eb33770c2e73eb3bd431535d6 29-Sep-2011 Greg Clayton <gclayton@apple.com> If the new .apple_names and .apple_types DWARF accelerator tables
are available, we currently will still index the DWARF ourselves
and assert if the name lookups differ. This will help us transition
to the new accelerator tables and make sure they are workng before
we switch over entirely.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140788 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/SymbolContext.h
f6e3de2d877dc94120c72624a79e488c9bea5c35 28-Sep-2011 Greg Clayton <gclayton@apple.com> Convert over to the latest and greatest on disc accelerator
hash tables. Renamed the DWARF sections to ".apple_names" and
".apple_types" until we get more buy in from other vendors.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140702 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
5eb54bb63835eb01b200223503b5fd89a7557dd5 27-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add SBTarget::GetLastCreatedWatchpointLocation() API and export to the Python interface.
Also add rich comparison methods (__eq__ and __ne__) for SBWatchpointLocation.
Modify TestWatchpointLocationIter.py to exercise the new APIs.

Add fuzz testings for the recently added SBTarget APIs related to watchpoint manipulations.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140633 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
reakpoint/WatchpointLocationList.h
arget/Target.h
a7d8951c573b0206ab7f6cff7f9c301e2bc0e28c 27-Sep-2011 Jim Ingham <jingham@apple.com> Added an API to SymbolContext to hide the complexity of getting the
function name from a symbol context. Use that in CommandCompletions
to get the right name.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140628 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/SymbolContext.h
092bd1575675778c6ebe901a7760af7427db617e 27-Sep-2011 Johnny Chen <johnny.chen@apple.com> Export the watchpoint related API (SBWatchpointLocation class and added SBTarget methods)
to the Python interface.

Implement yet another (threre're 3 now) iterator protocol for SBTarget: watchpoint_location_iter(),
to iterate on the available watchpoint locations. And add a print representation for
SBWatchpointLocation.

Exercise some of these Python API with TestWatchpointLocationIter.py.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140595 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBWatchpointLocation.h
d9b4425303fd48210ab104ca6573c869083a8480 27-Sep-2011 Greg Clayton <gclayton@apple.com> Fixed the public and internal disassembler API to be named correctly:

const char *
SBInstruction::GetMnemonic()

const char *
SBInstruction::GetOperands()

const char *
SBInstruction::GetComment()

Fixed the symbolicate example script and the internals.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140591 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBInstruction.h
ore/Disassembler.h
e97e4e3a1b7ead4a8ca3847fec07be1710776dac 27-Sep-2011 Sean Callanan <scallanan@apple.com> Fixed an include path that was breaking Linux builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140577 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ExpressionSourceCode.h
096c293f8d4171448908801d5a1a74b152af1430 27-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add SB API class SBWatchpointLocation and some extra methods to the SBTarget class to
iterate on the available watchpoint locations and to perform watchpoint manipulations.

I still need to export the SBWatchpointLocation class as well as the added watchpoint
manipulation methods to the Python interface. And write test cases for them.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140575 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDefines.h
PI/SBStream.h
PI/SBTarget.h
PI/SBWatchpointLocation.h
reakpoint/WatchpointLocation.h
reakpoint/WatchpointLocationList.h
ldb-forward.h
de3d27ef1d426713d7af044cfd5c34a9aeae926a 26-Sep-2011 Sean Callanan <scallanan@apple.com> Factored out handling of the source code for an
expression into a separate class. This class
encapsulates wrapping the function as needed. I
am also moving from using booleans to indicate
what the expression's language should be to using
lldb::LanguageType instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140545 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ExpressionSourceCode.h
23b8abbe214c252028f6e09f79169529c846409d 26-Sep-2011 Greg Clayton <gclayton@apple.com> Added more functionality to the public API to allow for better
symbolication. Also improved the SBInstruction API to allow
access to the instruction opcode name, mnemonics, comment and
instruction data.

Added the ability to edit SBLineEntry objects (change the file,
line and column), and also allow SBSymbolContext objects to be
modified (set module, comp unit, function, block, line entry
or symbol).

The SymbolContext and SBSymbolContext can now generate inlined
call stack infomration for symbolication much easier using the
SymbolContext::GetParentInlinedFrameInfo(...) and
SBSymbolContext::GetParentInlinedFrameInfo(...) methods.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140518 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBCompileUnit.h
PI/SBData.h
PI/SBInstruction.h
PI/SBLineEntry.h
PI/SBSymbolContext.h
PI/SBTarget.h
ore/Disassembler.h
ore/Opcode.h
ymbol/Block.h
ymbol/SymbolContext.h
15ef51e3bd8229d3779f96e08b25b26182c91c6c 24-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability to get all section contents, or the section
contents starting at an offset (2 separate methods). This helps
the scripting interface stay more natural by allowing both from
Python.

Added the ability to dump data with address annotations when
call SBData::GetDescription().

Hooked up the SBSection to the __repr__ so you can print section
objects from within python.

Improved the dumping of symbols from python.

Fixed the .i interface references which were set to "Relative to this Group"
which somehow included Jim's "lldb-clean" root directory in the path. The
interfaces are now in a folder called "interfaces" withing the Xcode API
subfolder.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140451 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBData.h
PI/SBSection.h
PI/SBStream.h
980c7500ca60ce7ee0917ea77bc9bb4563950c57 24-Sep-2011 Greg Clayton <gclayton@apple.com> Fixed build issues after recent checkin.

Added the ability to get the name of the SBSection.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140444 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSection.h
9a29f00d3dae2e368bd01226388633fe8653808e 24-Sep-2011 Jim Ingham <jingham@apple.com> Add GetAddress to SBBreakpointLocation, and put the .i files in the API section of the Xcode project.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140440 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBreakpointLocation.h
3e8c25f62f92145b6fb699b379cbfe72b1245d4a 24-Sep-2011 Greg Clayton <gclayton@apple.com> Added to the public API to allow symbolication:
- New SBSection objects that are object file sections which can be accessed
through the SBModule classes. You can get the number of sections, get a
section at index, and find a section by name.
- SBSections can contain subsections (first find "__TEXT" on darwin, then
us the resulting SBSection to find "__text" sub section).
- Set load addresses for a SBSection in the SBTarget interface
- Set the load addresses of all SBSection in a SBModule in the SBTarget interface
- Add a new module the an existing target in the SBTarget interface
- Get a SBSection from a SBAddress object

This should get us a lot closer to being able to symbolicate using LLDB through
the public API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140437 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBData.h
PI/SBDebugger.h
PI/SBModule.h
PI/SBSection.h
PI/SBTarget.h
ore/ModuleList.h
nterpreter/OptionGroupPlatform.h
arget/Target.h
arget/TargetList.h
ldb-forward.h
4c24b0a9f72c09d2e442ab9dbbf270b6e930f1e8 24-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add an SB API SBFrame::WatchValue() and exported to the Python interface to
set a watchpoint Pythonically. If the find-and-watch-a-variable operation
fails, an invalid SBValue is returned, instead.

Example Python usage:

value = frame0.WatchValue('global',
lldb.eValueTypeVariableGlobal,
lldb.LLDB_WATCH_TYPE_READ|lldb.LLDB_WATCH_TYPE_WRITE)

Add TestSetWatchpoint.py to exercise this API.
We have 400 test cases now.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140436 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
c86582f4095d146c4177b0ed7f79c923269deca5 23-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add a (bool)end_to_end parameter, default true, to the Target::Remove/Disable/EnableALLWatchpointLocations()
methods. If passed as false, it signifies that only the debugger side is affected.

Modify Target::DeleteCurrentProcess() to use DisableAllWatchpointLocations(false) to
disable the watchpoint locations, instead of removing them between process instances.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140418 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
d6d47976b71187907c1cdeea86fabf7d5534314f 23-Sep-2011 Jim Ingham <jingham@apple.com> Added the ability to restrict breakpoints by function name, function regexp, selector
etc to specific source files.
Added SB API's to specify these source files & also more than one module.
Added an "exact" option to CompileUnit's FindLineEntry API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140362 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCompileUnit.h
PI/SBFileSpecList.h
PI/SBTarget.h
reakpoint/BreakpointResolverFileRegex.h
ore/FileSpecList.h
ore/SearchFilter.h
ymbol/CompileUnit.h
arget/Target.h
cacedfb1c5db4da1cbbcf6326486ced8174f9b64 23-Sep-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint IDs and ID Ranges are not quite the same as Breakpoint IDs and ID Ranges.
Add eArgTypeWatchpointID and eArgTypeWatchpointIDRange to the CommandArgumentType enums and
modify the signature of CommandObject::AddIDsArgumentData() from:

AddIDsArgumentData(CommandArgumentEntry &arg)

to:

AddIDsArgumentData(CommandArgumentEntry &arg, CommandArgumentType ID, CommandArgumentType IDRange)

to accommodate.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140346 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
ldb-enumerations.h
73d8eaf0341d3375b8240b3cb089b97b25fa6088 22-Sep-2011 Greg Clayton <gclayton@apple.com> Added missing forward declarations for SBFileSpecList and SBInstructionList.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140338 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDefines.h
01acfa76010b8db2e77016c144963c4dd70f1392 22-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add initial implementation of watchpoint commands for list, enable, disable, and delete.
Test cases to be added later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140322 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/StoppointLocation.h
reakpoint/WatchpointLocation.h
reakpoint/WatchpointLocationList.h
567e7f3ba16eb48cb9fd6a2f26f2f7269eb6983c 22-Sep-2011 Greg Clayton <gclayton@apple.com> Converted the lldb_private::Process over to use the intrusive
shared pointers.

Changed the ExecutionContext over to use shared pointers for
the target, process, thread and frame since these objects can
easily go away at any time and any object that was holding onto
an ExecutionContext was running the risk of using a bad object.

Now that the shared pointers for target, process, thread and
frame are just a single pointer (they all use the instrusive
shared pointers) the execution context is much safer and still
the same size.

Made the shared pointers in the the ExecutionContext class protected
and made accessors for all of the various ways to get at the pointers,
references, and shared pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140298 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
arget/ExecutionContext.h
arget/Process.h
ldb-forward-rtti.h
a8428a458e779a64c8642fef5d29c7f6cc1b95f9 22-Sep-2011 Sean Callanan <scallanan@apple.com> Fixed a problem with the IR interpreter that caused
it to generate result variables that were not bound
to their underlying data. This allowed the SBValue
class to use the interpreter (if possible).

Also made sure that any result variables that point
to stack allocations in the stack frame of the
interpreted expressions do not get live data.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140285 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
043f8c230739ceab194257a617731ecd28e1a912 22-Sep-2011 Johnny Chen <johnny.chen@apple.com> StopInfoWatchpoint should override the StopInfo::ShouldStop() virtual method and delegate to
the WatchpointLocation object to check whether it should stop and allow it to update the hit
count, among other bookkeepings.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140279 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocation.h
arget/StopInfo.h
03c8ee5aeafcd6c43f10002a4f8096af01780f86 21-Sep-2011 Jim Ingham <jingham@apple.com> Add a new breakpoint type "break by source regular expression".
Fix the RegularExpression class so it has a real copy constructor.
Fix the breakpoint setting with multiple shared libraries so it makes
one breakpoint not one per shared library.
Add SBFileSpecList, to be used to expose the above to the SB interface (not done yet.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140225 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandInterpreter.h
PI/SBFileSpec.h
PI/SBFileSpecList.h
PI/SBTarget.h
reakpoint/BreakpointResolver.h
reakpoint/BreakpointResolverFileRegex.h
ore/RegularExpression.h
ore/SearchFilter.h
ore/SourceManager.h
nterpreter/CommandInterpreter.h
arget/Target.h
ldb-defines.h
0576c24a13668fc77109122c5331bd784222f70d 21-Sep-2011 Johnny Chen <johnny.chen@apple.com> A little refactoring of the way to add break IDs or ID ranges as command argument data
to the command argument entry. Add a static helper function:

CommandObject::AddIDsArgumentData(CommandArgumentEntry &arg)

to be used from CommandObjectBreakpoint.cpp. The helper function could also be useful
for commands in the future to manipulate watchpoints.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140221 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
da5a80217ec4b4f23cecfc81264faeb1bda4e547 21-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add some watchpoint maintenance methods to the Target class.
Plus some minor changes to the WatchpointLocationList and WatchpointLocation classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140211 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocationList.h
arget/Target.h
6cf6c474742a23e7cb6b4f618bf1de711db90a85 21-Sep-2011 Sean Callanan <scallanan@apple.com> Fixed a problem where expressions would attempt to
allocate memory in a process that did not support
expression execution. Also improved detection of
whether or not a process can execute expressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140202 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 20-Sep-2011 Jason Molenda <jmolenda@apple.com> Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandReturnObject.h
PI/SBError.h
PI/SBStream.h
ore/Error.h
ore/Log.h
ore/Stream.h
ore/Timer.h
ost/File.h
ost/Host.h
nterpreter/CommandReturnObject.h
95b7b4362ca7135be088e4fbf04c2bd15767a104 20-Sep-2011 Jason Molenda <jmolenda@apple.com> Change Error::SetErrorStringWithFormat() prototype to use an
__attribute__ format so the compiler knows that this method takes
printf style formatter arguments and checks that it's being used
correctly. Fix a couple dozen incorrect SetErrorStringWithFormat()
calls throughout the sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140115 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Error.h
7d0e3642ad1927a84bd76647ac9502f92159a622 19-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add GetByIndex() methods to the WatchpointLocationList class to facilitate iteration
through the watchpoint locations by index.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140071 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocationList.h
e40b6424d9e49306392bec4b44060da36414c382 18-Sep-2011 Greg Clayton <gclayton@apple.com> Don't put modules for .o files into the global shared module list. We
used to do this because we needed to find the shared pointer for a .o
file when the .o file's module was needed in a SymbolContext since the
module in a symbol context was a shared pointer. Now that we are using
intrusive pointers we don't have this limitation anymore since any
instrusive shared pointer can be made from a pointer to an object
all on its own.

Also switched over to having the Module and SymbolVendor use shared
pointers to their object files as had a leak on MacOSX when the
SymbolVendor's object file wasn't the same as the Module's (debug info
in a stand along file (dSYM file)). Now everything will correctly clean
itself up when the module goes away after an executable gets rebuilt.

Now we correctly get rid of .o files that are used with the DWARF with
debug map executables on subsequent runs since the only shared pointer
to the object files in from the DWARF symbol file debug map parser, and
when the module gets replaced, it destroys to old one along with all .o
files.

Also added a small optimization when using BSD archives where we will
remove old BSD containers from the shared list when they are outdated.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140002 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ymbol/ObjectContainer.h
ymbol/ObjectFile.h
ymbol/SymbolVendor.h
ldb-forward-rtti.h
987c7ebe1daa425ba7abfa9643800e3237146fc0 17-Sep-2011 Greg Clayton <gclayton@apple.com> Adopt the intrusive pointers in:

lldb_private::Breakpoint
lldb_private::BreakpointLocations
lldb_private::BreakpointSite
lldb_private::Debugger
lldb_private::StackFrame
lldb_private::Thread
lldb_private::Target



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139985 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
reakpoint/BreakpointSite.h
ore/Debugger.h
ore/ValueObject.h
arget/StackFrame.h
arget/Target.h
arget/Thread.h
arget/ThreadPlanTestCondition.h
tility/SharingPtr.h
ldb-forward-rtti.h
02e210cad27e36108bef493b798c2c1eb3b04cb8 17-Sep-2011 Greg Clayton <gclayton@apple.com> Removed the function:

ModuleSP
Module::GetSP();

Since we are now using intrusive ref counts, we can easily turn any
pointer to a module into a shared pointer just by assigning it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139984 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
6e0101c86555a06b3bd4cb6104b35abfae0b0057 17-Sep-2011 Greg Clayton <gclayton@apple.com> Convert lldb::ModuleSP to use an instrusive ref counted pointer.
We had some cases where getting the shared pointer for a module from
the global module list was causing a performance issue when debugging
with DWARF in .o files. Now that the module uses intrusive ref counts,
we can easily convert any pointer to a shared pointer.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139983 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ymbol/SymbolContext.h
tility/SharingPtr.h
ldb-forward-rtti.h
ldb-forward.h
ldb-types.h
10b12b3aa8542721fa9485c1d520433de0e0e720 16-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add a declaraion info member field to the WatchpointLocation class.
Modify CommandObjectFrame.cpp to populate this field when creating a watchpoint location.
Update the test case to verify that the declaration info matches the file and line number.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139946 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocation.h
reakpoint/WatchpointLocationList.h
cc7de484073d40dc115e4f1a8271f016718a3714 16-Sep-2011 Johnny Chen <johnny.chen@apple.com> Untabify and fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139867 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
dbcf98c194742f911c963854084c66aa49a5e513 15-Sep-2011 Jim Ingham <jingham@apple.com> Track whether a process was Launched or Attached to. If Attached, the detach when the debugger is destroyed, rather than killing the process. Also added a Debugger::Clear, which gets called in Debugger::Destroy to deal with all the targets in the Debugger. Also made the Driver's main loop call Destroy on the debugger, rather than just Destroying the currently selected Target's process.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139852 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
arget/Process.h
6c43c12022eaccbaad8c25078e47211c98e4d200 15-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add cleanup of watchpoint locations during Target::DeleteCurrentProcess().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139840 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocationList.h
47dc457387b690c5e4df1c0c7dd8c4337b92e630 15-Sep-2011 Sean Callanan <scallanan@apple.com> This patch modifies the expression parser to allow it
to execute expressions even in the absence of a process.
This allows expressions to run in situations where the
target cannot run -- e.g., to perform calculations based
on type information, or to inspect a binary's static
data.

This modification touches the following files:

lldb-private-enumerations.h
Introduce a new enum specifying the policy for
processing an expression. Some expressions should
always be JITted, for example if they are functions
that will be used over and over again. Some
expressions should always be interpreted, for
example if the target is unsafe to run. For most,
it is acceptable to JIT them, but interpretation
is preferable when possible.

Target.[h,cpp]
Have EvaluateExpression now accept the new enum.

ClangExpressionDeclMap.[cpp,h]
Add support for the IR interpreter and also make
the ClangExpressionDeclMap more robust in the
absence of a process.

ClangFunction.[cpp,h]
Add support for the new enum.

IRInterpreter.[cpp,h]
New implementation.

ClangUserExpression.[cpp,h]
Add support for the new enum, and for running
expressions in the absence of a process.

ClangExpression.h
Remove references to the old DWARF-based method
of evaluating expressions, because it has been
superseded for now.

ClangUtilityFunction.[cpp,h]
Add support for the new enum.

ClangExpressionParser.[cpp,h]
Add support for the new enum, remove references
to DWARF, and add support for checking whether
the expression could be evaluated statically.

IRForTarget.[h,cpp]
Add support for the new enum, and add utility
functions to support the interpreter.

IRToDWARF.cpp
Removed

CommandObjectExpression.cpp
Remove references to the obsolete -i option.

Process.cpp
Modify calls to ClangUserExpression::Evaluate
to pass the correct enum (for dlopen/dlclose)

SBValue.cpp
Add support for the new enum.

SBFrame.cpp
Add support for he new enum.

BreakpointOptions.cpp
Add support for the new enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139772 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRForTarget.h
xpression/IRInterpreter.h
arget/Target.h
ldb-private-enumerations.h
25dcbeb046c056f1c8a8244c548dc410c425fa46 15-Sep-2011 Jim Ingham <jingham@apple.com> Fix ArchSpec::operator== to take the Triple into account as well as the Core. Also make the constructors explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139761 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
819dd5e0990e8550d0185f65cc5cf4bc3d9d1058 15-Sep-2011 Jason Molenda <jmolenda@apple.com> Have the FuncUnwinder object request & provide an architecture-defined
UnwindPlan for unwinding from the first instruction of an otherwise
unknown function call (GetUnwindPlanArchitectureDefaultAtFunctionEntry()).

Update RegisterContextLLDB::GetFullUnwindPlanForFrame() to detect the
case of a frame 0 at address 0x0 which indicates that we jumped through
a NULL function pointer. Use the ABI's FunctionEntryUnwindPlan to
find the caller frame.

These changes make it so lldb can identify the calling frame correctly
in code like

int main ()
{
void (*f)(void) = 0;
f();
}




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139760 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/FuncUnwinders.h
69b6ec840171ef30af4ed7646155bffc225002ca 14-Sep-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint WIP:

o WatchpointLocationList:
Add a GetListMutex() method.
o WatchpointLocation:
Fix Dump() method where there was an extra % in the format string.
o Target.cpp:
Add implementation to CreateWatchpointLocation() to create and enable a watchpoint.

o DNBArchImplX86_64.cpp:
Fix bugs in SetWatchpoint()/ClearWatchpoint() where '==' was used, instead of '=',
to assign/reset the data break address to a debug register.

Also fix bugs where a by reference debug_state should have been used, not by value.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139666 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocation.h
reakpoint/WatchpointLocationList.h
nterpreter/OptionGroupWatchpoint.h
83dd2039d86b79e9cd5cf320bdb50c838fcb7b9c 14-Sep-2011 Jim Ingham <jingham@apple.com> Adding "-n", "-p" and "-w" flags to the lldb command-line tool to
allow attaching from the command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139665 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
cc637461f6c59851302836c64e0cb002de4f4571 13-Sep-2011 Jim Ingham <jingham@apple.com> SBSourceManager now gets the real source manager either from the Debugger or Target. Also, move the SourceManager file cache into the debugger
so it can be shared amongst the targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139564 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBFileSpec.h
PI/SBSourceManager.h
PI/SBStream.h
PI/SBTarget.h
ore/Debugger.h
ore/SourceManager.h
34bbf85e60949752de9c8272a70d59383e523cc5 13-Sep-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint WIP:

o Rename from OptionGroupWatchpoint::WatchMode to OptionGroupWatchpoint::WatchType,
and CommandArgumentType::eArgTypeWatchMode to CommandArgumentType::eArgTypeWatchType.
Update the sources to reflect the change.

o Add a CreateWatchpointLocation() method to Target class, which is currently not implmeneted
(returns an empty WatchpointLocationSP object). Add logic to CommandObjectFrame::Execute()
to exercise the added API for creating a watchpoint location.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139560 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocation.h
nterpreter/OptionGroupWatchpoint.h
arget/Target.h
ldb-enumerations.h
31cf0e7c5ff8233eccef28ca22d025d7b490cb7a 12-Sep-2011 Greg Clayton <gclayton@apple.com> Changed to using an "operator bool" instead of an "operator void*"
and avoid returning a pointer to the current object. In the new
"operator bool" implementation, check the filename object first
since many times we have FileSpec objects with a filename, yet no
directory.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139488 91177308-0d34-0410-b5e6-96231b3b80d8
ost/FileSpec.h
86c2e7463b34b5e281d49565bd0bbd7dc03e41ba 12-Sep-2011 Greg Clayton <gclayton@apple.com> Fixed up the comments in the headerdoc to match the current implementation
of how ConstString objects work, and removed the duplicate and out of date
comments that were in the cpp file.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139487 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
448bd2fe5693c3ef591743d460b8b830607cfa09 11-Sep-2011 Greg Clayton <gclayton@apple.com> Fixes for Symtab.cpp to take advantage of the new unique C string map
changes that were just submitted.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139478 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
95decca6c9ef181c4460ecbeb027731d7c181c33 11-Sep-2011 Greg Clayton <gclayton@apple.com> Added extra calls to the UniqueCStringMap to allow it to be used
more efficiently when it contains a large number of items. Since
the map is actually a vector of "const char *" and type T values,
it will double in size every time you append to it. The extra
added functions allow the collection to be sized to fit the data
after all entries have been appended, and lookups by name or by
regex have been built in to the class to allow efficient lookup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139477 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UniqueCStringMap.h
439d0337a6515cb1dfca8843ff7164bbd5f47df1 10-Sep-2011 Johnny Chen <johnny.chen@apple.com> A little bit of cleanup; set watch_mode to eWatchInvalid at the OptionParsingStarting() lifecycle point.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139467 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupWatchpoint.h
d1f87057301c06815d519383ea2289df4bcffa5b 10-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139447 91177308-0d34-0410-b5e6-96231b3b80d8
tility/Utils.h
4003f57f86a92411f0563f355a32e8f86ae29d5a 10-Sep-2011 Johnny Chen <johnny.chen@apple.com> Refactoring: replace a bunch of static array size computation or hardcoded constant
with a template function 'arraysize(static_array)', defined in Utils.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139444 91177308-0d34-0410-b5e6-96231b3b80d8
tility/Utils.h
3b23d2097b526c6326b7b7c56d5fc84884d4e08b 10-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Renaming a bulk of method calls from Get() to something more descriptive

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139435 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataVisualization.h
58dba3ce82715249c068abb7bf99f0d43dfbe8f9 10-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add OptionGroupWatchpoint.cpp/.h (preparatory work) for hooking up watchpoint to the 'frame variable' comand.
To watch a variable for read/write, issue:

frame variable -w read_write

Note that '-w' option is not working yet. :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139434 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupWatchpoint.h
ldb-enumerations.h
d68e089f8353eaf845c3559dac6d47b32830974f 10-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability to introspect types thourgh the public SBType interface.

Fixed up many API calls to not be "const" as const doesn't mean anything to
most of our lldb::SB objects since they contain a shared pointer, auto_ptr, or
pointer to the types which circumvent the constness anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139428 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
PI/SBType.h
PI/SBValue.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/Type.h
ldb-enumerations.h
ldb-forward.h
1ac6d1f9200a875cc4f761e278d29658599431c0 09-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Adding two new options to the 'help' command:
--show-aliases (-a) shows aliases for commands, as well as built-in commands
--hide-user-defined (-u) hides user defined commands
by default 'help' without arguments does not show aliases anymore. to see them, add --show-aliases
to have only built-in commands appear, use 'help --hide-user-defined' ; there is currently no way to hide
built-in commands from the help output
'help command' is not changed by this commit, and help is shown even if command is an alias and -a is not specified

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139377 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
fdf24efe672bf3fa041cdbebd2d7f406b11882bd 09-Sep-2011 Jim Ingham <jingham@apple.com> Move the SourceManager from the Debugger to the Target. That way it can store the per-Target default Source File & Line.
Set the default Source File & line to main (if it can be found.) at startup. Selecting the current thread & or frame resets
the current source file & line, and "source list" as well as the breakpoint command "break set -l <NUM>" will use the
current source file.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139323 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/SourceManager.h
arget/ObjCLanguageRuntime.h
arget/StackFrameList.h
arget/Target.h
arget/Thread.h
30e8d97af7d9d398da889337a11e9bcb552ebc3e 08-Sep-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint WIP: on the debugger side, create an instance of either
StopInfoTrace or StopInfoWatchpoint based on the exc_sub_code, as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139315 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocationList.h
arget/Target.h
716a6286f8fd6d5d0e5da218c34317a16f5baa50 07-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Refactoring of Get() methods in FormatManager/FormatCategory to have explicative names and return shared-pointers instead of bools
Reduced the amount of memory required to avoid loops in DumpPrintableRepresentation() from 32 bits down to 1 bit
- Additionally, disallowed creating summary strings of the form ${var%S} which did nothing but cause endless loops by definition


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139201 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataVisualization.h
ore/FormatManager.h
ore/ValueObject.h
21900fb7a68d94b7e205599231f4bbf6f5fc65af 07-Sep-2011 Johnny Chen <johnny.chen@apple.com> Fill out implementation of Enable/DisableWatchpoint() for ProcessGDBRemote class (Not Tested Yet).
Also update the signature of WatchpointLocation::SetEnable() to take a bool as input arg.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139198 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocation.h
9a3c2a58db644dc93915f938cb4c99558e41966c 06-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add a data type WatchpointLocationList to the repository. A Target contains an instance of watchpoint location list.
Also add a typefed for WatchpointLocationSP to lldb-forward-rtti.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139166 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocationList.h
arget/Target.h
ldb-forward-rtti.h
ldb-types.h
915448044bac6fdac22a33cc46697dcb771a8df2 06-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Redesign of the interaction between Python and frozen objects:
- introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
in frozen objects ; now such reads transparently move from host to target as required
- as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
removed code that enabled to recognize an expression result VO as such
- introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
representing a T* or T[], and doing dereferences transparently
in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
- as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
en lieu of doing the raw read itself
- introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
in public layer this returns an SBData, just like GetPointeeData()
- introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
- added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
Solved a bug where global pointers to global variables were not dereferenced correctly for display
New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
addresses that generate file address children UNLESS we have a live process)
Updated help text for summary-string
Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
Edited the syntax and help for some commands to have proper argument types


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139160 91177308-0d34-0410-b5e6-96231b3b80d8
PI/LLDB.h
PI/SBAddress.h
PI/SBData.h
PI/SBDefines.h
PI/SBError.h
PI/SBStream.h
PI/SBValue.h
ore/DataExtractor.h
ore/FormatClasses.h
ore/FormatManager.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectConstResultChild.h
ore/ValueObjectConstResultImpl.h
ore/ValueObjectVariable.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ymbol/ClangASTType.h
arget/Target.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
edda23fad2e785272ba5362583f174f96bc64320 06-Sep-2011 Johnny Chen <johnny.chen@apple.com> Change the signature of WatchpointLocation ctor so that the second param becomes
'size_t size', instead of 'lldb::tid_t tid'. Pass size to the StoppointLocation
ctor as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139131 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/WatchpointLocation.h
5c3861df62fde02d610a5ed92927a2d89333358b 02-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability for DWARF locations to use the ABI plug-ins to resolve
register names when dumping variable locations and location lists. Also did
some cleanup where "int" types were being used for "lldb::RegisterKind"
values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138988 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/DWARFExpression.h
ymbol/DWARFCallFrameInfo.h
ymbol/UnwindPlan.h
c8cf5e234be554d4acb6ae644a8269c303c4f56e 02-Sep-2011 Greg Clayton <gclayton@apple.com> Added support for accessing and loading our new .debug_names and .debug_types
DWARF accelerator table sections to the DWARF parser. These sections are similar
to the .debug_pubnames and .debug_pubtypes, but they are designed to be hash tables
that are saved to disc in a way that the sections can just be loaded into memory
and used without any work on the debugger side. The .debug_pubnames and .debug_pubtypes
sections are not ordered, contain a copy of the name in the section itself which
makes these sections quite large, they only include publicly exported names (so no
static functions, no types defined inside functions), many compilers put different
information in them making them very unreliable so most debugger ignore these sections
and parse the DWARF on their own. The tables must also be parsed and sorted in order
to be used effectively. The new sections can be quickly loaded and very efficiently be used
to do name to DIE lookups with very little up front work. The format of these new
sections will be changing while we work out the bugs, but we hope to have really
fast name to DIE lookups soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138979 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
97b8f66b4f4d1b47c94155b1a9917d9652a8acea 01-Sep-2011 Greg Clayton <gclayton@apple.com> Forgot to write out the NULL terminator when putting C string value into
a data using DataEncoder.

Added DataEncoder to the lldb-forward.h file.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138950 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-forward.h
d84cc042a09c9aa7f89f8b032ba3a346a25d9447 01-Sep-2011 Greg Clayton <gclayton@apple.com> Added a DataEncoder class for the new IR evaluation expression parser so it
can reserve a block of memory and store stuff into it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138949 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataEncoder.h
23967773eda67ca32904b15cc80e556dd38266a8 25-Aug-2011 Johnny Chen <johnny.chen@apple.com> Make ThreadList::GetSelectedThread() select and return the 0th thread if there's no
currently selected thread. And update the call sites accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138577 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadList.h
caf798c28b23aeee54279366f46e5dee8799c558 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixing commas in enums (build breaker on GCC) as reported by Filipe Cabecinhas

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138385 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
ldb-private-enumerations.h
2431244f929e269c6ecd51aa3eb606b6a2474f19 23-Aug-2011 Sean Callanan <scallanan@apple.com> Added support for persistent types to the
expression parser. You can use a persistent
type like this:

(lldb) expr struct $foo { int a; int b; };
(lldb) struct $foo i; i.a = 2; i.b = 3; i
($foo) $0 = {
(int) a = 2
(int) b = 3
}

typedefs work similarly.

This patch affects the following files:

test/expression_command/persistent_types/*
A test case for persistent types,
in particular structs and typedefs.

ClangForward.h
Added TypeDecl, needed to declare some
functions in ASTResultSynthesizer.h

ClangPersistentVariables.[h,cpp]
Added a list of persistent types to the
persistent variable store.

ASTResultSynthesizer.[h,cpp]
Made the AST result synthesizer iterate
across TypeDecls in the expression, and
record any persistent types found. Also
made a minor documentation fix.

ClangUserExpression.[h,cpp]
Extended the user expression class to
keep the state needed to report the
persistent variable store for the target
to the AST result synthesizers.

Also introduced a new error code for
expressions that executed normally but
did not return a result.

CommandObjectExpression.cpp
Improved output for expressions (like
declarations of new persistent types) that
don't return a result. This is no longer
treated as an error.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138383 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ASTResultSynthesizer.h
xpression/ClangPersistentVariables.h
xpression/ClangUserExpression.h
2c6a3d80dab3cf50c26fefe037357a4e6e621258 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Additional code cleanups ; Short option name for --python-script in type summary add moved from -s to -o (this is a preliminary step in moving the short option for --summary-string from -f to -s) ; Accordingly updated the test suite

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138315 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
ore/FormatManager.h
ldb-private-enumerations.h
d587a5847c90ecb588f725532825fffe4211e019 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Separated FormatNavigator and FormatManager in two different files ; moved FormatCategoryItem enum out of FormatManager.h as a debugger-wide lldb_private enum ; minor style cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138307 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ore/FormatNavigator.h
ldb-private-enumerations.h
0be2e9be82cb20dbf03dac41dd48e376e8fee4cb 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> More cleanups ; Separated implementation of FormatManager from class DataVisualization as a front-end by using separate .h/.cpp files - Final aim is to break up FormatManager.h/cpp into several separate files

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138279 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataVisualization.h
ore/FormatManager.h
b0968f5c6b8c15d5cb223676686e014eb12c44c1 22-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Code cleanup and refactoring (round 4):
- FormatCategories now are directly mapped by ConstString objects instead of going through
const char* -> ConstString -> const char*
- FormatCategory callback does not pass category name anymore. This is not necessary because
FormatCategory objects themselves hold their name as a member variable


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138254 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
37f962e785be99dc4f0c5e9d02416992ff03bbd0 22-Aug-2011 Greg Clayton <gclayton@apple.com> Added a new plug-in type: lldb_private::OperatingSystem. The operating system
plug-ins are add on plug-ins for the lldb_private::Process class that can add
thread contexts that are read from memory. It is common in kernels to have
a lot of threads that are not currently executing on any cores (JTAG debugging
also follows this sort of thing) and are context switched out whose state is
stored in memory data structures. Clients can now subclass the OperatingSystem
plug-ins and then make sure their Create functions correcltly only enable
themselves when the right binary/target triple are being debugged. The
operating system plug-ins get a chance to attach themselves to processes just
after launching or attaching and are given a lldb_private::Process object
pointer which can be inspected to see if the main executable, target triple,
or any shared libraries match a case where the OS plug-in should be used.
Currently the OS plug-ins can create new threads, define the register contexts
for these threads (which can all be different if desired), and populate and
manage the thread info (stop reason, registers in the register context) as
the debug session goes on.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138228 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataExtractor.h
ore/PluginManager.h
ore/ValueObject.h
arget/ABI.h
arget/OperatingSystem.h
arget/Process.h
arget/Thread.h
arget/ThreadList.h
ldb-forward.h
ldb-private-interfaces.h
3370f0ce9e2ae2fe1f2adf3628f443053602efa4 20-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed some SWIG interoperability issues

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138154 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
nterpreter/ScriptInterpreter.h
d8b9b06fcf29565079ba8f3a87fb267d80bcc968 20-Aug-2011 Greg Clayton <gclayton@apple.com> Added the ability to create a SBCommandReturnObject object from a pointer
and also to later release the ownership of the pointer object. This was needed
for SWIG interaction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138133 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandReturnObject.h
13a54a141acd6255e4e11db466951ec1f26aa2f5 19-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Taking care of an issue with using lldb_private types in SBCommandInterpreter.cpp ; Making NSString test case work on Snow Leopard ; Removing an unused variable warning

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138105 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
6f30287bdc836c715fcac75b06ec58d13b79e715 19-Aug-2011 Enrico Granata <granata.enrico@gmail.com> - Now using ${var} as the summary for an aggregate type will produce "name-of-type @ object-location" instead of giving an error
e.g. you may get "foo_class @ 0x123456" when typing "type summary add -f ${var} foo_class"
- Added a new special formatting token %T for summaries. This shows the type of the object.
Using it, the new "type @ location" summary could be manually generated by writing ${var%T} @ ${var%L}
- Bits and pieces required to support "frame variable array[n-m]"
The feature is not enabled yet because some additional design and support code is required, but the basics
are getting there
- Fixed a potential issue where a ValueObjectSyntheticFilter was not holding on to its SyntheticChildrenSP
Because of the way VOSF are being built now, this has never been an actual issue, but it is still sensible for
a VOSF to hold on to the SyntheticChildrenSP as well as to its FrontEnd


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138080 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
ore/ValueObject.h
ore/ValueObjectSyntheticFilter.h
arget/StackFrame.h
2f2c6fb9e61dadd9296948cb358680172b30232e 19-Aug-2011 Enrico Granata <granata.enrico@gmail.com> More thorough fix for the spaces-in-typename issue

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138026 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
d3a86a2bad17204570577dbafc51f3b107310de8 19-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Third round of code cleanups:
- reorganizing the PTS (Partial Template Specializations) in FormatManager.h
- applied a patch by Filipe Cabecinhas to make LLDB compile with GCC
Functional changes:
- fixed an issue where command type summary add for type "struct Foo" would not match any types.
currently, "struct" will be stripped off and type "Foo" will be matched.
similar behavior occurs for class, enum and union specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138020 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ore/ValueObject.h
nterpreter/ScriptInterpreter.h
1c61743af946076e988d88baf725382e99d905de 18-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Second round of code cleanups:
- reorganizing classes layout to have public part first
Typedefs that we want to keep private, but must be defined for some public code to work correctly are an exception
- avoiding methods in the form T foo() { code; } all on one-line
- moving method implementations from .h to .cpp whenever feasible
Templatized code is an exception and so are very small methods
- generally, adhering to coding conventions followed project-wide
Functional changes:
- fixed an issue where using ${var} in a summary for an aggregate, and then displaying a pointer-to-aggregate would lead to no summary being displayed
The issue was not a major one because all ${var} was meant to do in that context was display an error for invalid use of pointer
Accordingly fixed test cases and added a new test case


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137944 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
ore/FormatManager.h
ore/ValueObject.h
f501c5913d5daaf45a906477bdf466bb74ed10fb 18-Aug-2011 Enrico Granata <granata.enrico@gmail.com> First round of code cleanups:
- all instances of "vobj" have been renamed to "valobj"
- class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp)
The interface to this class has not changed
- FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting
from ConstString to const char* and back all the time
Next step is making the same happen for categories themselves
- category gnu-libstdc++ is defined in the constructor for a FormatManager
The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time
All references to previous 'osxcpp' name have been removed from both code and file names
Functional changes:
- the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string
to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script
will become -o


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137886 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
074e3b6c2eac1438a85e464796cbc19b4354d5ad 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> New category "gnu-libstdc++" provides summary for std::string and synthetic children for types std::map, std::list and std::vector
The category is enabled by default. If you run into issues with it, disable it and the previous behavior of LLDB is restored
** This is a temporary solution. The general solution to having formatters pulled in at startup should involve going through the Platform.
Fixed an issue in type synthetic list where a category with synthetic providers in it was not shown if all the providers were regex-based


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137850 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
e5e34cb15f031237004b05abfa623c71f879f6c0 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> When defining a scripted command, it is possible to provide a docstring and that will be used as the help text for the command
If no docstring is provided, a default help text is created
LLDB will refuse to create scripted commands if the scripting language is anything but Python
Some additional comments in AppleObjCRuntimeV2.cpp to describe the memory layout expected by the dynamic type lookup code


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137801 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
6b1596d81c34c6efb10ed51a3572d6b145b73f5b 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Changes to Python commands:
- They now have an SBCommandReturnObject instead of an SBStream as third argument
- The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp
- The command to manage them is now:
command script with subcommands add, list, delete, clear
command alias is returned to its previous functionality
- Python commands are now part of an user dictionary, instead of being seen as aliases



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137785 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandReturnObject.h
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
c2a2825d787be5459fc55264e55b6020ff62f68a 16-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Python commands:
It is now possible to use 'command alias --python' to define a command name that actually triggers execution of a Python function
(e.g. command alias --python foo foo_impl makes a command named 'foo' that runs Python function 'foo_impl')
The Python function foo_impl should have as signature: def foo_impl(debugger, args, stream, dict): where
debugger is an object wrapping an LLDB SBDebugger
args is the command line arguments, as an unparsed Python string
stream is an SBStream that represents the standard output
dict is an internal utility parameter and should be left untouched
The function should return None on no error, or an error string to describe any problems


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137722 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
d6bcc0db2ffc5cf724460f8e260c5709e07ea642 16-Aug-2011 Greg Clayton <gclayton@apple.com> Fixed register value objects to be able to return their values as unsigned
and signed integers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137710 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ore/ValueObjectRegister.h
19030d8e5545e0edbd59d8e44a16a11728089afa 15-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Refactoring of ValueObject::DumpValueObject and 'frame variable', 'target variable' commands to use an Options object instead of passing an ever-increasing number of arguments to the DumpValueObject() method, with the ultimate aim of making that call private implementation

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137622 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
arget/ObjCLanguageRuntime.h
ldb-enumerations.h
3ad4da0f2c2afdea3352deaaf9c044855dc5c95b 15-Aug-2011 Jim Ingham <jingham@apple.com> Factor out the code that parses ObjC Method names into a static method
in ObjCLanguageRuntime.
Add the category-free name of symbols to the Symtab name-to-index list.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137600 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ObjCLanguageRuntime.h
558dd5bc8b25722fa5b5106586b97ecf99e0026e 13-Aug-2011 Jim Ingham <jingham@apple.com> Add a version of SBDebugger::Create which allows us to specify whether to source
in the init files or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137541 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
574c3d63822cc7fd52bf6f6a94b6882fec4c8ce9 13-Aug-2011 Jim Ingham <jingham@apple.com> Make ValueObject::SetValueFromCString work correctly.
Also change the SourceInitFile to look for .lldb-<APPNAME> and source that
preferentially if it exists.
Also made the breakpoint site report its address as well as its breakpoint number
when it gets hit and can't find any the associated locations (usually because the
breakpoint got disabled or deleted programmatically between the time it was hit
and reported.)
Changed ThreadPlanCallFunction to initialize the ivar m_func in the initializers of the
constructor, rather than waiting to initialize till later on in the function.
Fixed a bug where if you make an SBError and the ask it Success, it returns false.
Fixed ValueObject::ResolveValue so that it resolves a temporary value, rather than
overwriting the one in the value object.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137536 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/ValueObject.h
ore/ValueObjectRegister.h
nterpreter/CommandInterpreter.h
7aa04f6ea07da8fa9d943e62692ec543b0c7532a 13-Aug-2011 Greg Clayton <gclayton@apple.com> Removed an initialization that wasn't needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137533 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ProcessDataAllocator.h
c51ffbf896e398ada5f7e89b2fa5aec6f2224f09 12-Aug-2011 Greg Clayton <gclayton@apple.com> We were leaking a stack frame in StackFrameList in Thread.cpp which could
cause extra shared pointer references to one or more modules to be leaked.
This would cause many object files to stay around the life of LLDB, so after
a recompile and rexecution, we would keep adding more and more memory. After
fixing the leak, we found many cases where leaked stack frames were still
being used and causing crashes in the test suite. These are now all resolved.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137516 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBCompileUnit.h
PI/SBFunction.h
PI/SBLineEntry.h
PI/SBSymbol.h
PI/SBSymbolContext.h
ore/Address.h
ore/FormatManager.h
ore/Module.h
ymbol/Block.h
ymbol/CompileUnit.h
ymbol/Function.h
ymbol/Symbol.h
ymbol/SymbolContextScope.h
arget/Thread.h
arget/ThreadPlanTracer.h
tility/SharingPtr.h
ldb-types.h
06f0db61da5e218e298ef6db0c4775e3daffc2c8 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Added an error message when the user tries to add a filter when a synthetic provider for the same type is already defined in the same category
The converse is also true: an error is shown when the user tries to add a synthetic provider to a category that already has a filter for the same type


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137493 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
db64d95b32062acbf961019aa6c1025237d3145c 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Giving a warning to the user the first time children are truncated by the new cap setting

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137462 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
018921dd162d818e71cf1ac86d03422e88f0a674 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> *Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level
This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option
to frame variable or increase the limit in your lldbinit file
*Command "type synthetic" has been split in two:
- "type synthetic" now only handles Python synthetic children providers
- the new command "type filter" handles filters
Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137416 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
ore/FormatManager.h
ore/ValueObject.h
nterpreter/OptionGroupValueObjectDisplay.h
arget/Target.h
9c57fc067307ebb1abe50de6ff704d4b2ae9b9d4 11-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed an issue where a pointer's address was being logged instead of its value
Access to synthetic children by name:
if your object has a synthetic child named foo you can now type
frame variable object.foo (or ->foo if you have a pointer)
and that will print the value of the synthetic child
(if your object has an actual child named foo, the actual child prevails!)
this behavior should also work in summaries, and you should be able to use
${var.foo} and ${svar.foo} interchangeably
(but using svar.foo will mask an actual child named foo)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137314 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ore/ValueObjectSyntheticFilter.h
f2bf870da5819415d52bc7da98c151cedf1e6dff 11-Aug-2011 Greg Clayton <gclayton@apple.com> Patch for "process load" by Filipe Cabecinhas.

Filipe was attempting to do a:

(lldb) process load ~/path/foo.dylib

But the process load command wasn't resolving the path. We have to be careful
about resolving the path here because we want to do it in terms of the platform
we are using. the "~/" can mean a completely different path if you are remotely
debugging on another machine as another user. So to support this, platforms now
can resolve remote paths:

bool
Platform::ResolveRemotePath (const FileSpec &platform_path,
FileSpec &resolved_platform_path);

The host/local platform will just resolve the path.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137307 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Platform.h
5beb99d65c72cd4a4f7529c4ff8cc04a1a40769d 11-Aug-2011 Greg Clayton <gclayton@apple.com> Added the ability to remove orphaned module shared pointers from a ModuleList.
This is helping us track down some extra references to ModuleSP objects that
are causing things to get kept around for too long.

Added a module pointer accessor to target and change a lot of code to use
it where it would be more efficient.

"taret delete" can now specify "--clean=1" which will cleanup the global module
list for any orphaned module in the shared module cache which can save memory
and also help track down module reference leaks like we have now.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137294 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
arget/Target.h
153ccd72f52a6cc3595d7614558e2954f67833eb 10-Aug-2011 Greg Clayton <gclayton@apple.com> While tracking down memory consumption issue a few things were needed: the
ability to dump more information about modules in "target modules list". We
can now dump the shared pointer reference count for modules, the pointer to
the module itself (in case performance tools can help track down who has
references to said pointer), and the modification time.

Added "target delete [target-idx ...]" to be able to delete targets when they
are no longer needed. This will help track down memory usage issues and help
to resolve when module ref counts keep getting incremented. If the command gets
no arguments, the currently selected target will be deleted. If any arguments
are given, they must all be valid target indexes (use the "target list"
command to get the current target indexes).

Took care of a bunch of "no newline at end of file" warnings.

TimeValue objects can now dump their time to a lldb_private::Stream object.

Modified the "target modules list --global" command to not error out if there
are no targets since it doesn't require a target.

Fixed an issue in the MacOSX DYLD dynamic loader plug-in where if a shared
library was updated on disk, we would keep using the older one, even if it was
updated.

Don't allow the ModuleList::GetSharedModule(...) to return an empty module.
Previously we could specify a valid path on disc to a module, and specify an
architecture that wasn't contained in that module and get a shared pointer to
a module that wouldn't be able to return an object file or a symbol file. We
now make sure an object file can be extracted prior to adding the shared pointer
to the module to get added to the shared list.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137196 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
ost/TimeValue.h
arget/Target.h
840eb267769b943926bb9fcb527ab91221cf7a07 10-Aug-2011 Enrico Granata <granata.enrico@gmail.com> CFString.py now shows contents in a more NSString-like way (e.g. you get @"Hello" instead of "Hello")
new --raw-output (-R) option to frame variable prevents using summaries and synthetic children
other future formatting enhancements will be excluded by using the -R option
test case enhanced to check that -R works correctly


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137185 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupValueObjectDisplay.h
21f37ad875d4f50d1b4b3d307e120f6d27103730 09-Aug-2011 Jim Ingham <jingham@apple.com> Move the handling of breakpoint conditions from the Private event loop to the StopInfoBreakpoint::DoActions, which happens as the
event is removed. Also use the return value of asynchronous breakpoint callbacks, they get checked before, and override the
breakpoint conditions.

Added ProcessModInfo class, to unify "stop_id generation" and "memory modification generation", and use where needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137102 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
ore/UserID.h
ore/ValueObject.h
arget/Process.h
arget/StopInfo.h
ldb-forward.h
f669850b51f3898020cbae8fdfd17faf4f18ba02 09-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Basic support for reading synthetic children by index:
if your datatype provides synthetic children, "frame variable object[index]" should now do the right thing
in cases where the above syntax would have been rejected before, i.e.
object is not a pointer nor an array (frame variable ignores potential overload of [])
object is a pointer to an Objective-C class (which cannot be dereferenced)
expression will still run operator[] if available and complain if it cannot do so
synthetic children by name do not work yet


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137097 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
arget/StackFrame.h
899025fb72c0430e3b02746ca11c9070e9ede951 09-Aug-2011 Greg Clayton <gclayton@apple.com> Added a "--global" option to the "target modules list"
command that allows us to see all modules that exist and
their corresponding global shared pointer count. This will
help us track down memory issues when modules aren't being
removed and cleaned up from the module list.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137078 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ec07c0dde27ae022b87423ee106f10437864c219 09-Aug-2011 Jim Ingham <jingham@apple.com> Add EvaluateWithError static method. Fix a bug in handling constant expressions - we weren't setting the result even though the expression evaluation succeeded...

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137077 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangUserExpression.h
c617a4cb4a451be9d7e97d7af6e165d282b5390f 06-Aug-2011 Sean Callanan <scallanan@apple.com> This is an overhaul of the expression parser code
that detects what context the current expression is
meant to execute in. LLDB now properly consults
the method declaration in the debug information
rather than trying to hunt down the "this" or "self"
pointer by name, which can be misleading.

Other fixes include:

- LLDB now properly detects that it is inside
an inlined C++ member function.

- LLDB now allows access to non-const members when
in const code.

- The functions in SymbolFile that locate the
DeclContext containing a DIE have been renamed
to reflect what they actually do. I have added
new functions that find the DeclContext for the
DIE itself.

I have also introduced testcases for C++ and
Objective-C.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136999 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
ymbol/Function.h
ymbol/SymbolFile.h
0c64baff28c9340f84fa566df1bf9426ddd2dc31 06-Aug-2011 Johnny Chen <johnny.chen@apple.com> On second thought, add the IsValid() method to SBTypeList, making it similar to SBSymbolContextList and SBValueList.
Modify the test suite accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136990 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
8c1d7203f726e3a62b832dbeeaf0ae76f9f65222 05-Aug-2011 Greg Clayton <gclayton@apple.com> Fixed issues for iOS debugging where if a device has
a native architecture that doesn't match the universal
slice that is being used for all executables, we weren't
correctly descending through the platform architectures
and resolving the binaries.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136980 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
a54ad9917626ca26d29edd13f74e1856548301d9 05-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Option --regex (-x) now also works for synthetic children:
- Added a test case in python-synth
Minor code improvements in categories, making them ready for adding new element types

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136957 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
80b01e59bda7984c1f4315f544a1e635de3bbd05 05-Aug-2011 Enrico Granata <granata.enrico@gmail.com> fixed a potential memory leak ; small improvement in the formatters lookup algorithm

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136945 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ldb-enumerations.h
5c9a3c7cce9da84d9eff1eb48ebadab32b1abe54 04-Aug-2011 Sean Callanan <scallanan@apple.com> Fixed a problem that caused LLDB to fail to execute
expressions that used function pointers. The problem
was that IRForTarget previously only scanned the IR
for the expression for call instructions; if a function
was used in another context, it was ignored.

Now LLDB scans the Module for functions that are only
declared (not also defined -- so these are externals);
it then constructs function pointers for these
functions and substitutes them wherever the function
is used.

Also made some changes so that "expr main" works just
as well as "expr &main"; they end up being the same
code, but LLDB was generating the result variable in
different ways.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136928 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
a83f8779ac614263d92959d2338e6e9f08d8f9fb 04-Aug-2011 Greg Clayton <gclayton@apple.com> Make sure we track CXX and objc method decls.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136920 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
4e5397c1127d698c61df295f30909e573a1c9876 04-Aug-2011 Enrico Granata <granata.enrico@gmail.com> New formatting symbol %# can be used in summary strings to get the "count of children" of a variable
- accordingly, the test cases for the synthetic providers for the std:: containers have been edited to use
${svar%#} instead of ${svar.len} to print out the count of elements ; the .len synthetic child has been
removed from the synthetic providers
The synthetic children providers for the std:: containers now return None when asked for children indexes >= num_children()
Basic code to support filter names based on regular expressions (WIP)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136862 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ore/ValueObject.h
ldb-enumerations.h
c92eb4004a354b0ea085b610b2ba991e575b1c32 04-Aug-2011 Enrico Granata <granata.enrico@gmail.com> APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError parameter to give more info about any problem
The synthetic children providers now use the new (safer) APIs to get the values of objects
As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136861 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
0fb0bcc9d4e951145e1b8c783652224c09b23af4 04-Aug-2011 Greg Clayton <gclayton@apple.com> Cleaned up the SBType.h file to not include internal headers and reorganized
the SBType implementation classes.

Fixed LLDB core and the test suite to not use deprecated SBValue APIs.

Added a few new APIs to SBValue:

int64_t
SBValue::GetValueAsSigned(int64_t fail_value=0);

uint64_t
SBValue::GetValueAsUnsigned(uint64_t fail_value=0)




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136829 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBType.h
PI/SBValue.h
ymbol/ClangASTType.h
ymbol/Type.h
ldb-forward-rtti.h
ldb-forward.h
441f08ca9d17fad237b93a71aeab9dad74ea1258 03-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed an issue where the KVO swizzled type would be returned as the dynamic type instead of the actual user-level type
- see the test case in lang/objc/objc-dynamic-value for an example
Objective-C dynamic type lookup now works for every Objective-C type
- previously, true dynamic lookup was only performed for type id


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136763 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
51b11e06de746667396f56b303d1867f007baf8b 03-Aug-2011 Jim Ingham <jingham@apple.com> Add method Module::IsLoadedInTarget, and then in the MacOS X dynamic loader, after we
have initialized our shared library state, discard all the modules that didn't make
it into the running process.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136755 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
6e2d2823b1bfa4e6a57996391696ba25a2dd069b 03-Aug-2011 Greg Clayton <gclayton@apple.com> Fixed an issue where StackFrame::GetValueForVariableExpressionPath(...)
was previously using the entire frame variable list instead of using the
in scope variable list. I added a new function to a stack frame:

lldb::VariableListSP
StackFrame::GetInScopeVariableList (bool get_file_globals);

This gets only variables that are in scope and they will be ordered such
that the variables from the current scope are first.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136745 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
4b66329ac82b5f3d939bd31b4d1498da9257d85a 02-Aug-2011 Johnny Chen <johnny.chen@apple.com> Patch by David Forsythe to build lldb on FreeBSD!

I did not take the patch for ClangExpressionParser.cpp since there was a
recent change by Peter for the same line. Feel free to disagree. :-)

Reference:
----------------------------------------------------------------------
r136580 | pcc | 2011-07-30 15:42:24 -0700 (Sat, 30 Jul 2011) | 3 lines

Add reloc arg to standard JIT createJIT()

Fixes non-__APPLE__ build. Patch by Matt Johnson!
----------------------------------------------------------------------

Also, I ignore the part of the patch to remove the RegisterContextDarwin*.h/.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136720 91177308-0d34-0410-b5e6-96231b3b80d8
ost/SocketAddress.h
ost/freebsd/Config.h
afb7c85df796f74262917e44dd68f668dade3911 02-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
- expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
- Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136695 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ore/ValueObject.h
ymbol/ClangASTType.h
arget/ObjCLanguageRuntime.h
ldb-enumerations.h
166ba106f9d8c377f2fda72112c821550d2e82d1 01-Aug-2011 Sean Callanan <scallanan@apple.com> Added checking to make sure that the target has a
scratch AST context before attempting to parse.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136631 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
9b6898f3ec1dedbe1dfc8bd7cd1d82a5b10e1bb0 30-Jul-2011 Sean Callanan <scallanan@apple.com> This change brings in the latest LLVM/Clang, and
completes the support in the LLDB expression parser
for incomplete types. Clang now imports types
lazily, and we complete those types as necessary.

Changes include:

- ClangASTSource now supports three APIs which it
passes to ClangExpressionDeclMap. CompleteType
completes a TagDecl or an ObjCInterfaceDecl when
needed; FindExternalVisibleDecls finds named
entities that are visible in the expression's
scope; and FindExternalLexicalDecls performs a
(potentially restricted) search for entities
inside a lexical scope like a namespace. These
changes mean that entities in namespaces should
work normally.

- The SymbolFileDWARF code for searching a context
for a specific name is now more general, and can
search arbitrary contexts.

- We are continuing to adapt our calls into LLVM
from interfaces that take start and end iterators
when accepting multiple items to interfaces that
use ArrayRef.

- I have cleaned up some code, especially our use
of namespaces.

This change is neutral for our testsuite and greatly
improves correctness for large programs (like Clang)
with complicated type systems. It should also lay
the groundwork for improving the expression parser's
performance as we are lazier and lazier about
providing type information.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136555 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
xpression/IRForTarget.h
ymbol/ClangASTImporter.h
ymbol/ClangExternalASTSourceCallbacks.h
62fcf03cee420445b28fa79623075bb5ba379a9a 30-Jul-2011 Greg Clayton <gclayton@apple.com> Moved some functionality from ValueObject to ClangASTType.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136536 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTType.h
979e20d127335143ffc89c2e37ec3a8b717ff22d 29-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Public API changes:
- Completely new implementation of SBType
- Various enhancements in several other classes
Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>:
- these return the actual elements into the container as the children of the container
- basic template name parsing that works (hopefully) on both Clang and GCC
- find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth
New summary string token ${svar :
- the syntax is just the same as in ${var but this new token lets you read the values
coming from the synthetic children provider instead of the actual children
- Python providers above provide a synthetic child len that returns the number of elements
into the container
Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB
Several other fixes, including:
- inverted the order of arguments in the ClangASTType constructor
- EvaluationPoint now only returns SharedPointer's to Target and Process
- the help text for several type subcommands now correctly indicates argument-less options as such


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136504 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDefines.h
PI/SBModule.h
PI/SBTarget.h
PI/SBType.h
PI/SBValue.h
ore/FormatClasses.h
ore/FormatManager.h
ore/Module.h
ore/ModuleList.h
ore/ValueObject.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
ymbol/ClangASTType.h
ymbol/TaggedASTType.h
ymbol/Type.h
ldb-enumerations.h
e89ab7b58d2542f4f42e923fa65ef8984840a90c 25-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new flag -P to type synth add lets you type a Python class interactively
added a final newline to fooSynthProvider.py
new option to automatically save user input in InputReaderEZ
checking for NULL pointers in several new places


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135916 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatClasses.h
ore/InputReader.h
ore/InputReaderEZ.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
9ae7cef26612773c6b3422834cec83f0fbb2cf8c 24-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python synthetic children:
- you can now define a Python class as a synthetic children producer for a type
the class must adhere to this "interface":
def __init__(self, valobj, dict):
def get_child_at_index(self, index):
def get_child_index(self, name):
then using type synth add -l className typeName
(e.g. type synth add -l fooSynthProvider foo)
(This is still WIP with lots to be added)
A small test case is available also as reference

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135865 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ore/ValueObject.h
ore/ValueObjectSyntheticFilter.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
tility/PythonPointer.h
ldb-forward-rtti.h
ldb-forward.h
ea6d783624f0b7dcbf3773cb31d6e4fcd4f93b6c 22-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for platforms without sa_len to SocketAddress, and modify
some code to use it

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135790 91177308-0d34-0410-b5e6-96231b3b80d8
ost/SocketAddress.h
de4059f2f6a864f5af102a59b56602183b9239bd 22-Jul-2011 Enrico Granata <granata.enrico@gmail.com> some editing of data visualization error messages to make them more meaningful
debugging printfs() for data visualization turned into a meaningful log:
- introduced a new log category `types' in channel `lldb'


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135773 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ldb-private-log.h
a395506fb374f1f589d0d860f5e6c9fa7b1e0b9a 22-Jul-2011 Greg Clayton <gclayton@apple.com> Make the SBAddress class easier to use when using the public
API.

SBTarget changes include changing:

bool
SBTarget::ResolveLoadAddress (lldb::addr_t vm_addr,
lldb::SBAddress& addr);

to be:

lldb::SBAddress
SBTarget::ResolveLoadAddress (lldb::addr_t vm_addr);

SBAddress can how contruct itself using a load address and a target
which can be used to resolve the address:

SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target);

This will actually just call the new SetLoadAddress accessor:

void
SetLoadAddress (lldb::addr_t load_addr,
lldb::SBTarget &target);

This function will always succeed in making a SBAddress object
that can be used in API calls (even if "target" isn't valid).
If "target" is valid and there are sections currently loaded,
then it will resolve the address to a section offset address if
it can. Else an address with a NULL section and an offset that is
the "load_addr" that was passed in. We do this because a load address
might be from the heap or stack.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135770 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBTarget.h
e4e3e2c0448bb0c77f8f8a3bbb47b951a481d3d8 22-Jul-2011 Enrico Granata <granata.enrico@gmail.com> when typing a summary string you can use the %S symbol to explicitly indicate that you want the summary to be used to print the target object
(e.g. ${var%S}). this might already be the default if your variable is of an aggregate type
new feature: synthetic filters. you can restrict the number of children for your variables to only a meaningful subset
- the restricted list of children obeys the typical rules (e.g. summaries prevail over children)
- one-line summaries show only the filtered (synthetic) children, if you type an expanded summary string, or you use Python scripts, all the real children are accessible
- to provide a synthetic children list use the "type synth add" command, as in:
type synth add foo_type --child varA --child varB[0] --child varC->packet->flags[1-4]
(you can use ., ->, single-item array operator [N] and bitfield operator [N-M]; array slice access is not supported, giving simplified names to expression paths is not supported)
- a new -S option to frame variable and target variable lets you override synthetic children and instead show real ones

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135731 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ore/ValueObject.h
ore/ValueObjectSyntheticFilter.h
nterpreter/OptionGroupValueObjectDisplay.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
1e620f0c6b953f86436a97fdd1d728648b4cdab1 20-Jul-2011 Enrico Granata <granata.enrico@gmail.com> type category list now supports a regular expression argument that filters categories to only include the ones matching the regex
type summary list now supports a -w flag with a regular expression argument that filters categories to only include the ones matching the regex
in category and summary listings, categories are printed in a meaningful order:
- enabled ones first, in the order in which they are searched for summaries
- disabled ones, in an unspecified order
type summary list by default only expands non-empty enabled categories. to obtain a full listing, you must use the -w flag giving a "match-all" regex

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135529 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
23ba377314a2836f491c650c86e50766e741dcf2 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Applied Matt Johnson patch to ValueObject and FormatManager

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135523 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
d5b3e3c662c967feb455a01f307c3f4bc318eec9 19-Jul-2011 Greg Clayton <gclayton@apple.com> Added some more functionality to SocketAddress and modified
ConnectionFileDescriptor to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135511 91177308-0d34-0410-b5e6-96231b3b80d8
ost/SocketAddress.h
2bc9eb3ba78efc64a273729b480bafc3bbaa433a 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Patch by Matt Johnson to silence G++ warnings!
Used hand merge to apply the diffs. I did not apply the diffs for FormatManager.h and
the diffs for memberwise initialization for ValueObject.cpp because they changed since.
I will ask my colleague to apply them later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135508 91177308-0d34-0410-b5e6-96231b3b80d8
ore/InputReaderEZ.h
ore/Value.h
ore/ValueObject.h
xpression/ClangExpressionDeclMap.h
xpression/ProcessDataAllocator.h
ymbol/ClangASTContext.h
ymbol/ClangASTImporter.h
ymbol/ObjectFile.h
arget/Process.h
4c3fb4b50a87e6e08987096d7edacc26545f58dc 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> The implementation of categories is now synchronization safe
Code cleanup:
- The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the
actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and
FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...)
are contained. The wrapper code always remains in Debugger.{h|cpp}
- Several leftover fields, methods and comments from previous design choices have been removed
type category subcommands (enable, disable, delete) now can take a list of category names as input
- for type category enable, saying "enable A B C" is the same as saying
enable C
enable B
enable A
(the ordering is relevant in enabling categories, and it is expected that a user typing
enable A B C wants to look into category A, then into B, then into C and not the other
way round)
- for the other two commands, the order is not really relevant (however, the same inverted ordering
is used for consistency)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135494 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatClasses.h
ore/FormatManager.h
ldb-enumerations.h
ac304e4cbd1005210661720d5f2232f85b08c195 19-Jul-2011 Greg Clayton <gclayton@apple.com> Abstract "struct sockaddr", "struct sockaddr_in", "struct sockaddr_in6" and
"struct sockaddr_storage" into a new host class called SocketAddress. This
will allow us to control the host specific implementations (such as how to
get the length) into a single Host specific class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135488 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionFileDescriptor.h
ost/SocketAddress.h
8a717e596312951672ecd8c54df2d255e6da20ba 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a bug where deleting a regex summary would not immediately reflect in the variables display
The "systemwide summaries" feature has been removed and replaced with a more general and
powerful mechanism.
Categories:
- summaries can now be grouped into buckets, called "categories" (it is expected that categories
correspond to libraries and/or runtime environments)
- to add a summary to a category, you can use the -w option to type summary add and give
a category name (e.g. type summary add -f "foo" foo_t -w foo_category)
- categories are by default disabled, which means LLDB will not look into them for summaries,
to enable a category use "type category enable". once a category is enabled, LLDB will
look into that category for summaries. the rules are quite trivial: every enabled category
is searched for an exact match. if an exact match is nowhere to be found, any match is
searched for in every enabled category (whether it involves cascading, going to base classes,
...). categories are searched into the order in which they were enabled (the most recently
enabled category first, then the second most and so on..)
- by default, most commands that deal with summaries, use a category named "default" if no
explicit -w parameter is given (the observable behavior of LLDB should not change when
categories are not explicitly used)
- the systemwide summaries are now part of a "system" category

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135463 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
6d91e0a095183e02a84b2833c5cbe46e7963e8ba 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG interface files for SBSymbol, SBSymbolContext, and SBSymbolContextList.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135459 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBSymbolContextList.h
fb35e2ad9893ca53f33eb3ce190147c02d97ec87 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBLineEntry, SBListener, and SBModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135441 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBLineEntry.h
PI/SBListener.h
PI/SBModule.h
ba6f252fa157521791eef0ba446e281290fe7c85 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Missed the interface file for SBFunction in the previous checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135436 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFunction.h
6cf1bc333301e95ad5c96481d63b270eac7a7266 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBDebugger, SBCompileUnit, and SBEvent.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135432 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBEvent.h
3cfd5e89ce6b66f271727032b36afb635287a24b 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBAddress, SBBlock, SBBreakpoint, and SBBreakpointLocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135430 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
c3fba812b636dcdede81be622d557efbdc834240 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBProcess, SBThread, and SBFrame.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135419 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
PI/SBProcess.h
PI/SBThread.h
854a1ba617fded6eb054b3f93b3299d0a7173ca1 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add two new interface files SBValue.i and SBValueList.i, instead of directly swigging the header files.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135416 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
PI/SBValueList.h
8d2ea2888a4acb7f140f9af64ddd2b16b2dee870 17-Jul-2011 Greg Clayton <gclayton@apple.com> Added a boolean to the pure virtual lldb_private::Process::CanDebug(...)
method so process plug-ins that are requested by name can answer yes when
asked if they can debug a target that might not have any file in the target.

Modified the ConnectionFileDescriptor to have both a read and a write file
descriptor. This allows us to support UDP, and eventually will allow us to
support pipes. The ConnectionFileDescriptor class also has a file descriptor
type for each of the read and write file decriptors so we can use the correct
read/recv/recvfrom call when reading, or write/send/sendto for writing.

Finished up an initial implementation of UDP where you can use the "udp://"
URL to specify a host and port to connect to:

(lldb) process connect --plugin kdp-remote udp://host:41139

This will cause a ConnectionFileDescriptor to be created that can send UDP
packets to "host:41139", and it will also bind to a localhost port that can
be given out to receive the connectionless UDP reply.

Added the ability to get to the IPv4/IPv6 socket port number from a
ConnectionFileDescriptor instance if either file descriptor is a socket.

The ProcessKDP can now successfully connect to a remote kernel and detach
using the above "processs connect" command!!! So far we have the following
packets working:
KDP_CONNECT
KDP_DISCONNECT
KDP_HOSTINFO
KDP_VERSION
KDP_REATTACH

Now that the packets are working, adding new packets will go very quickly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135363 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Communication.h
ore/ConnectionFileDescriptor.h
ore/DataExtractor.h
arget/Process.h
ebd63b28c6b7574ed9fbd71e57677c25e57c6a5b 16-Jul-2011 Johnny Chen <johnny.chen@apple.com> Create an interface file for SBTarget named SBTarget.i which relieves SBTarget.h
of the duty of having SWIG docstring features and multiline string literals
embedded within.

lldb.swig now %include .../SBTarget.i, instead of .../SBTarget.h. Will create
other interface files and transition them over.

Also update modify-python-lldb.py to better handle the trailing blank line right
before the ending '"""' Python docstring delimiter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135355 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
412babddfbe62a2f79a04d052a4e84b2efd3c253 16-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Add missing #include, fixes Linux build

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135346 91177308-0d34-0410-b5e6-96231b3b80d8
ore/InputReader.h
d52d00f4edb746ba458a3e659699160952dc925e 16-Jul-2011 Greg Clayton <gclayton@apple.com> Completed more work on the KDP darwin kernel debugging Process plug-in.
Implemented connect, disconnect, reattach, version, and hostinfo.

Modified the ConnectionFileDescriptor class to be able to handle UDP.

Added a new Stream subclass called StreamBuffer that is backed by a
llvm::SmallVector for better efficiency.

Modified the DataExtractor class to have a static function that can
dump hex bytes into a stream. This is currently being used to dump incoming
binary packet data in the KDP plug-in.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135338 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionFileDescriptor.h
ore/DataExtractor.h
ore/StreamBuffer.h
ore/StreamString.h
ldb-forward.h
7f163b363aeccffeec8eda23bd31e4965abc7226 16-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Some descriptive text for the Python script feature:
- help type summary add now gives some hints on how to use it
frame variable and target variable now have a --no-summary-depth (-Y) option:
- simply using -Y without an argument will skip one level of summaries, i.e.
your aggregate types will expand their children and display no summary, even
if they have one. children will behave normally
- using -Y<int>, as in -Y4, -Y7, ..., will skip as many levels of summaries as
given by the <int> parameter (obviously, -Y and -Y1 are the same thing). children
beneath the given depth level will behave normally
-Y0 is the same as omitting the --no-summary-depth parameter entirely
This option replaces the defined-but-unimplemented --no-summary

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135336 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
nterpreter/OptionGroupValueObjectDisplay.h
db15e0cbbd18d6cd10a0197bae31aafb9e078365 16-Jul-2011 Sean Callanan <scallanan@apple.com> Added support for dynamic detection of AVX, and
fixed a few bugs that revealed. Now the "register
read" command should show AVX registers
(ymm0-ymm15) on Mac OS X platforms that support
them.

When testing this on Mac OS X, run debugserver
manually, like this:

debugserver --native-regs localhost:1111 /path/to/executable

Then

lldb /path/to/executable
...
(lldb) process connect connect://localhost:1111


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135331 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegisterValue.h
90d207ede88604e278f68ee1b02600a35e56dd14 16-Jul-2011 Enrico Granata <granata.enrico@gmail.com> System-wide summaries:
- Summaries for char*, const char* and char[] are loaded at startup as
system-wide summaries. This means you cannot delete them unless you use
the -a option to type summary delete/clear
- You can add your own system-wide summaries by using the -w option to type
summary add
Several code improvements for the Python summaries feature

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135326 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ore/InputReader.h
ore/InputReaderEZ.h
9bb5b41fa3dc2421c306c21340926aaa05e6cf53 16-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Fix gcc build error

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135325 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
533ed2fd6d3763654cd35cdc2379e1bf1049e0dd 15-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add some more docstrings for SBCompileUnit and SBBreakpoint, plus incorporate the doxgen doc block of

SBValue::GetChildAtIndex(uint32_t idx,
lldb::DynamicValueType use_dynamic,
bool can_create_synthetic);

into the SBValue docstrings.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135295 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBCompileUnit.h
PI/SBValue.h
8f64c47120c81728aac0ab0d66097c9a92284f6f 15-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to get synthetic child values from SBValue objects that
represent pointers and arrays by adding an extra parameter to the

SBValue
SBValue::GetChildAtIndex (uint32_t idx,
DynamicValueType use_dynamic,
bool can_create_synthetic);

The new "can_create_synthetic" will allow you to create child values that
aren't actually a part of the original type. So if you code like:

int *foo_ptr = ...

And you have a SBValue that contains the value for "foo_ptr":

SBValue foo_value = ...

You can now get the "foo_ptr[12]" item by doing this:

v = foo_value.GetChiltAtIndex (12, lldb.eNoDynamicValues, True);

Normall the "foo_value" would only have one child value (an integer), but
we can create "synthetic" child values by treating the pointer as an array.

Likewise if you have code like:

int array[2];

array_value = ....

v = array_value.GetChiltAtIndex (0); // Success, v will be valid
v = array_value.GetChiltAtIndex (1); // Success, v will be valid
v = array_value.GetChiltAtIndex (2); // Fail, v won't be valid, "2" is not a valid zero based index in "array"

But if you use the ability to create synthetic children:

v = array_value.GetChiltAtIndex (0, lldb.eNoDynamicValues, True); // Success, v will be valid
v = array_value.GetChiltAtIndex (1, lldb.eNoDynamicValues, True); // Success, v will be valid
v = array_value.GetChiltAtIndex (2, lldb.eNoDynamicValues, True); // Success, v will be valid






git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135292 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
1e5b02176d6952d0679479926fa557534313472b 15-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to connect using "tcp://<host>:<port>" which is the
same as the old "connect://<host>:<port>". Also added the ability to
connect using "udp://<host>:<port>" which will open a connected
datagram socket. I need to find a way to specify a non connected
datagram socket as well.

We might need to start setting some settings in the URL itself,
maybe something like:

udp://<host>:<port>?connected=yes
udp://<host>:<port>?connected=no

I am open to suggestions for URL settings.

Also did more work on the KDP darwin kernel plug-in.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135277 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionFileDescriptor.h
f7a9b14c2c02d2fa9fad586c19f29d77533fcc09 15-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python summary strings:
- you can use a Python script to write a summary string for data-types, in one of
three ways:
-P option and typing the script a line at a time
-s option and passing a one-line Python script
-F option and passing the name of a Python function
these options all work for the "type summary add" command
your Python code (if provided through -P or -s) is wrapped in a function
that accepts two parameters: valobj (a ValueObject) and dict (an LLDB
internal dictionary object). if you use -F and give a function name,
you're expected to define the function on your own and with the right
prototype. your function, however defined, must return a Python string
- test case for the Python summary feature
- a few quirks:
Python summaries cannot have names, and cannot use regex as type names
both issues will be fixed ASAP
major redesign of type summary code:
- type summary working with strings and type summary working with Python code
are two classes, with a common base class SummaryFormat
- SummaryFormat classes now are able to actively format objects rather than
just aggregating data
- cleaner code to print descriptions for summaries
the public API now exports a method to easily navigate a ValueObject hierarchy
New InputReaderEZ and PriorityPointerPair classes
Several minor fixes and improvements

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135238 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/Debugger.h
ore/Error.h
ore/FormatManager.h
ore/InputReader.h
ore/InputReaderEZ.h
ore/StringList.h
ore/ValueObject.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
tility/PriorityPointerPair.h
tility/RefCounter.h
ldb-forward-rtti.h
ldb-forward.h
e3a83d21d6f4fd813446fc7471c739507bbe11b5 15-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add usage docstring to SBValue.h, and minor update of docstrings for SBValueList.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135230 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
PI/SBValueList.h
d0d9ccee5532e7c79054580ba2a5f690a17ec926 15-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add usage docstrings to SBTarget, SBProcess, and SBThread.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135221 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBProcess.h
PI/SBTarget.h
PI/SBThread.h
7b1b875d7f76905b9b1f1f347b073e87437e760c 14-Jul-2011 Johnny Chen <johnny.chen@apple.com> Fix typo in ConnectRemote() docstring.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135188 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
2de7ce665acfd7040e9372209d2f750c4b58e0fd 14-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add some more docstrings (includng example usages) to SBTarget.h.

Add logic to modify-python-lldb to correct swig's transformation of 'char **argv' and 'char **envp'
to 'char argv' and 'char envp' by morphing them into the 'list argv' and 'list envp' (as a list of
Python strings).


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135114 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
67dde8e176c0ab62056911a3165b62fdcc6259ed 14-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add some more docstrings for SBTarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135108 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
423d8d0d1207c88d8cff25ee0c2ccdf96ddb66b9 14-Jul-2011 Johnny Chen <johnny.chen@apple.com> Use %feature("docstring") for methods of SBModule class so that the methods signature also gets generated in the Python docstring.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135105 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBModule.h
bbc6342babdd58daa34bb35e35d7d53f59beada1 13-Jul-2011 Johnny Chen <johnny.chen@apple.com> Update docstrings for SBModeule/SBTarget::FindGlobalVariables().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135019 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBModule.h
PI/SBTarget.h
ede7bdf4cf4f9ad1a0b8d74c715dfa45e866b8d5 13-Jul-2011 Enrico Granata <granata.enrico@gmail.com> fixing missing RefCounter class

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135012 91177308-0d34-0410-b5e6-96231b3b80d8
tility/RefCounter.h
86e7c3ecb82655e77581ec042aa6b31753a42afc 13-Jul-2011 Enrico Granata <granata.enrico@gmail.com> smarter summary strings:
- formats %s %char[] %c and %a now work to print 0-terminated c-strings if they are applied to a char* or char[] even without the [] operator (e.g. ${var%s})
- array formats (char[], intN[], ..) now work when applied to an array of a scalar type even without the [] operator (e.g. ${var%int32_t[]})
LLDB will not crash because of endless loop when trying to obtain a summary for an object that has no value and references itself in its summary string
In many cases, a wrong summary string will now display an "<error>" message instead of giving out an empty string

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135007 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ore/ValueObject.h
7dd98df0d69447d3f42b8044b7cda2c089aea653 12-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to _not_ skip the prologue when settings breakpoints
by name by adding an extra parameter to the lldb_private::Target breakpoint
setting functions.

Added a function in the DWARF symbol file plug-in that can dump errors
and prints out which DWARF file the error is happening in so we can track
down what used to be assertions easily.

Fixed the MacOSX kernel plug-in to properly read the kext images and set
the kext breakpoint to watch for kexts as they are loaded.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134990 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointResolverName.h
arget/Target.h
6247dbee41ec51e9a082df7e86269c0f47f28160 12-Jul-2011 Jim Ingham <jingham@apple.com> Added "command history" command to dump the command history.
Also made:
(lldb) !<NUM>
(lldb) !-<NUM>
(lldb) !!

work with the history. For added benefit:

(lldb) !<NUM><TAB>

will insert the command at position <NUM> in the history into the command line to be edited.

This is only partial, I still need to sync up editline's history list with the one kept by the interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134955 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
ldb-enumerations.h
1a102087f54079c25c8827afac6153a44ca535da 12-Jul-2011 Enrico Granata <granata.enrico@gmail.com> named summaries:
- a new --name option for "type summary add" lets you give a name to a summary
- a new --summary option for "frame variable" lets you bind a named summary to one or more variables
${var%s} now works for printing the value of 0-terminated CStrings
type format test case now tests for cascading
- this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
new design for the FormatNavigator class
new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134943 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ore/ValueObject.h
nterpreter/OptionGroupVariable.h
ymbol/ClangASTContext.h
tility/CleanUp.h
c22fb5ea4657d8c7c20a87de75cd57acaf32ec8a 11-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add missing docstring for 'bool stop_at_endtry'.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134924 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
9b82f8637b65c90e91c2827245550a1bb5e8df91 11-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to see block variables when looking up addresses
with the "target modules lookup --address <addr>" command. The variable
ID's, names, types, location for the address, and declaration is
displayed.

This can really help with crash logs since we get, on MacOSX at least,
the registers for the thread that crashed so it is often possible to
figure out some of the variable contents.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134886 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/DWARFExpression.h
ymbol/Variable.h
fb81642e03567a3413d94cdb632b6005a0ad4273 10-Jul-2011 Greg Clayton <gclayton@apple.com> Allow the built in ValueObject summary providers for C strings
use lldb_private::Target::ReadMemory(...) to allow constant strings
to be displayed in global variables prior on in between process
execution.

Centralized the variable declaration dumping into:

bool
Variable::DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module);

Fixed an issue if you used "target variable --regex <regex>" where the
variable name would not be displayed, but the regular expression would.

Fixed an issue when viewing global variables through "target variable"
might not display correctly when doing DWARF in object files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134878 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Declaration.h
ymbol/SymbolContext.h
ymbol/Variable.h
24b03108fe8d672bf96b2cfd491e99e601f03218 09-Jul-2011 Greg Clayton <gclayton@apple.com> Fixed the global and static variables to always be in scope.

Made it so that you can create synthetic children of array
value objects. This is for creating array members when the
array index is out of range. This comes in handy when you have
a structure definition like:

struct Collection
{
uint32_t count;
Item array[0];
};
"array" has 1 item, but many times in practice there are more
items in "item_array".

This allows you to do:

(lldb) target variable g_collection.array[3]

To implement this, the get child at index has been modified
to have a "ignore_array_bounds" boolean that can be set to true.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134846 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ymbol/ClangASTContext.h
f9ce9b8460a3604ba05cf2a8c50d878fe0baf9eb 09-Jul-2011 Greg Clayton <gclayton@apple.com> Fixed some const issues with args to some lldb_private::Target functions.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134826 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
ca31997f0ff24dbba39623054d5a94a0181c52d6 09-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to get an abstract file type (executable, object file,
shared library, etc) and strata (user/kernel) from an object file. This will
help with plug-in and platform selection when given a new binary with the
"target create <file>" command.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134779 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ObjectFile.h
33b4be1d7ca14b25d0d57b5a2032971294980996 09-Jul-2011 Johnny Chen <johnny.chen@apple.com> o TestEvents.py:

Add a usage example of SBEvent APIs.

o SBEvent.h and SBListener.h:

Add method docstrings for SBEvent.h and SBListener.h, and example usage of SBEvent into
the class docstring of SBEvent.

o lldb.swig:

Add typemap for SBEvent::SBEvent (uint32_t event, const char *cstr, uint32_t cstr_len)
so that we can use, in Python, obj2 = lldb.SBEvent(0, "abc") to create an SBEvent.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134766 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBEvent.h
PI/SBListener.h
5d81f49f0b45f8810cfaf1fa3437aa72bed0c3af 08-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to see global variables with a variable expression path so
you can do things like:

(lldb) target variable g_global.a
(lldb) target variable *g_global.ptr
(lldb) target variable g_global.ptr[1]



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134745 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ore/ValueObjectList.h
ymbol/Variable.h
ymbol/VariableList.h
ff78238a2ebc66a683dded02c2f99fba85077d05 08-Jul-2011 Enrico Granata <granata.enrico@gmail.com> final fix for the global constructors issue
new GetValueForExpressionPath() method in ValueObject to navigate expression paths in a more bitfield vs slices aware way
changes to the varformats.html document (WIP)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134679 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
nterpreter/CommandObject.h
bbea13375ec4ae876576fcb8608626d45880dd96 08-Jul-2011 Greg Clayton <gclayton@apple.com> Added the start of the darwin dynamic loader plug-in. It isn't hooked up to
be detected yet, but most of the initial code is there and needs to be
debugged more.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134672 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
9a0688f7aee3f75cf1a66641cb2984af6577f3a9 08-Jul-2011 Johnny Chen <johnny.chen@apple.com> The Python API does not need SBEvent::BroadcasterMatchesPtr() when SBEvent::BroadcasterMatchesRef() suffices.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134659 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBEvent.h
7a289bbe83d4d815637110b6e2f5470b4dc8ab01 08-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add docstrings for SBSymbolContextList with example usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134652 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSymbol.h
PI/SBSymbolContextList.h
968958c31c42224cfd5eb4ba0cf6fe0157ab375c 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SBValue::GetID() member method call API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134636 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
edeaef152b894b3bb50490882bc1ff6967be4a75 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add docstrings for SBValueList with example usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134632 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValueList.h
b7237a61a08f4f565f76aebf9bdfcc9d5178be62 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> Fix wording in docstring.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134623 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
9ae9fd3992be47dd17d3b78526cf42ddfd5b51af 07-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a warning where initializing CommandObject::g_arguments_data[] required global constructors

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134613 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
3f2e1b9a4a30cbb01721041da84ede822d2734aa 07-Jul-2011 Greg Clayton <gclayton@apple.com> Stop the lldb_private::RegularExpression class from implicitly
constructing itself and causing unexpected things to happen
in LLDB.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134598 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegularExpression.h
368f8226b1f75fbb4758748fafcee70f18fc248e 07-Jul-2011 Greg Clayton <gclayton@apple.com> Centralize the variable display prefs into a new option
group class: OptionGroupVariable. It gets initialized with
a boolean that indicates if the frame specific options are
included so that this can be used in both the "frame variable"
and "target variable" commands.

Removed the global functionality from the "frame variable"
command. Users should switch to using the "target variable"
command.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134594 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupVariable.h
336dc6006ec498007db726614eefc7cacfe43e1d 07-Jul-2011 Jim Ingham <jingham@apple.com> Typo in header doc.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134584 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ore/ModuleList.h
801417e453f8531ac176cd952200587bf15d9ccf 07-Jul-2011 Greg Clayton <gclayton@apple.com> Added "target variable" command that allows introspection of global
variables prior to running your binary. Zero filled sections now get
section data correctly filled with zeroes when Target::ReadMemory
reads from the object file section data.

Added new option groups and option values for file lists. I still need
to hook up all of the options to "target variable" to allow more complete
introspection by file and shlib.

Added the ability for ValueObjectVariable objects to be created with
only the target as the execution context. This allows them to be read
from the object files through Target::ReadMemory(...).

Added a "virtual Module * GetModule()" function to the ValueObject
class. By default it will look to the parent variable object and
return its module. The module is needed when we have global variables
that have file addresses (virtual addresses that are specific to
module object files) and in turn allows global variables to be displayed
prior to running.

Removed all of the unused proxy object support that bit rotted in
lldb_private::Value.

Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
with the more efficient "FileSpec::Equal (lhs, rhs)".

Improved logging in GDB remote plug-in.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134579 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpecList.h
ore/Module.h
ore/ModuleList.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectMemory.h
ore/ValueObjectVariable.h
nterpreter/NamedOptionValue.h
nterpreter/OptionGroupFile.h
ymbol/Variable.h
arget/ExecutionContext.h
1bba6e50d400090eb81efd7ab51957dfcbef06c0 07-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new detailed descriptions for type summary add and type format add
some changes to the help system code for better display of long help text
-p and -r flags now also work for type format add


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134574 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
ldb-enumerations.h
f0086c8bbbdcab57c0d3c592d00bd38dadcf929f 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add class docstrings with example usage for SBBreakpoint and SBBreakpointLocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134571 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBFunction.h
PI/SBThread.h
1626335c2b18cb0c41619b616f9889f49b9f7b0e 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add class docstrings with example usage for SBFunction and SBAddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134560 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBFunction.h
87ffc77824a7ee9f06dba86cfa60e7b75735a6e5 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> SWIG doesn't need two methods of the same name 'GetDescription' but differ in
the presence of 'const'. Ifndef the non-const one out.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134553 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBEvent.h
54b4bcd0993226eedd6678d9bd17bfb819366eac 06-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add docstrings for the primordial object -- SBDebugger.
The swig "autodoc" feature to remove '*' from 'char *' will be handled by doing
post-processing on the lldb.py module.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134524 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
bafc86e11a23ad23112f67a99e42aac7b0f207d7 06-Jul-2011 Greg Clayton <gclayton@apple.com> Made the string representation for a SBValue return what "frame variable"
would return instead of a less than helpful "name: '%s'" description.

Make sure that when we ask for the error from a ValueObject object we
first update the value if needed.

Cleaned up some SB functions to use internal functions and not re-call
through the public API when possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134497 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBError.h
ore/ValueObject.h
107e53da8bdca540db8b734ed237688eaeee85c5 06-Jul-2011 Greg Clayton <gclayton@apple.com> Fixed some issues with ARM backtraces by not processing any push/pop
instructions if they are conditional. Also fixed issues where the PC wasn't
getting bit zero stripped for ARM targets when a stack frame was thumb. We
now properly call through the GetOpcodeLoadAddress() functions to make sure
the addresses are properly stripped for any targets that may decorate up
their addresses.

We now don't pass the SIGSTOP signals along. We can revisit this soon, but
currently this was interfering with debugging some older ARM targets that
don't have vCont support in the GDB server.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134461 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegisterValue.h
arget/StackFrame.h
9762e10787a7efc2f0d822590cab42ca23d5e4f9 06-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new syntax for summary strings:
- ${*expr} now simply means to dereference expr before actually using it
- bitfields, array ranges and pointer ranges now work in a (hopefully) more natural and language-compliant way
a new class TypeHierarchyNavigator replicates the behavior of the FormatManager in going through type hierarchies
when one-lining summary strings, children's summaries can be used as well as values

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134458 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ore/ValueObject.h
ymbol/ClangASTContext.h
ymbol/TypeHierarchyNavigator.h
2ded5ed80f3f4c794a2323b68a5da11fad61b6f2 06-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add a more verbose docstring for SBThread.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134452 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBThread.h
da91397c600ae1a2d078cca786ebed37571d0d18 06-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add swig docstrings for SBBlock.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134451 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBlock.h
cbb52a64ea9775af1fcca2e929d0d0b4aa698de4 06-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add swig docstrings for SBModule.h, plus ifndef the SBModule::GetUUIDBytes() API out if swig.
Fix typos in the comment for Module.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134446 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBModule.h
ore/Module.h
faf7f05749ea6e4011295cfd6947ea194e81d797 05-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add a more verbose docstring to the SBSymbolContext API class.
Add doxygen/docstring to SBProcess.RemoteAttachToProcessWithID() API method.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134437 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBProcess.h
PI/SBSymbolContext.h
f451e30ad3a1867065fb19e1601048a417f88f9f 03-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add swig docstrings for SBFrame.h.
Add post-processing step to remove the trailing blank lines from the docstrings of lldb.py.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134360 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
d0691fe6327b0edaadf907008b26c55e78c1ca2f 03-Jul-2011 Greg Clayton <gclayton@apple.com> When we use the "fd://%u" for file descriptors, we need to detect if this is
a file or socket. We now make a getsockopt call to check if the fd is a socket.

Also, the previous logic in the GDB communication needs to watch for success
with an error so we can deal with EAGAIN and other normal "retry" error codes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134359 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionFileDescriptor.h
3e1c95a5eccc5fca012fcd91226ea67710b7ff26 02-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Fix Linux build errors

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134347 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTType.h
3440a5fb4a5583f2de5aa8005e69f50fdec70d6a 02-Jul-2011 Johnny Chen <johnny.chen@apple.com> Furnish some docstrings to be swigified into the generated lldb.py module.
Especially SBProcess.ReadMemory() and SBProcess.WriteMemory() because the generated autodoc strings
make no sense for Python programmers due to typemap (see lldb.swig).


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134301 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBProcess.h
886bc3e5cb48e9660692609a7be69ec15b898bd7 02-Jul-2011 Enrico Granata <granata.enrico@gmail.com> several improvements to "type summary":
- type names can now be regular expressions (exact matching is done first, and is faster)
- integral (and floating) types can be printed as bitfields, i.e. ${var[low-high]} will extract bits low thru high of the value and print them
- array subscripts are supported, both for arrays and for pointers. the syntax is ${*var[low-high]}, or ${*var[]} to print the whole array (the latter only works for statically sized arrays)
- summary is now printed by default when a summary string references a variable. if that variable's type has no summary, value is printed instead. to force value, you can use %V as a format specifier
- basic support for ObjectiveC:
- ObjectiveC inheritance chains are now walked through
- %@ can be specified as a summary format, to print the ObjectiveC runtime description for an object
- some bug fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134293 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ore/RegularExpression.h
ore/ValueObject.h
ldb-enumerations.h
ldb-forward-rtti.h
e43cdedc77133ff4d0a0c6a39f515d0f7584891c 02-Jul-2011 Johnny Chen <johnny.chen@apple.com> SWIG doesn't need two methods of the same name 'GetDescription' but differ in
the presence of 'const'. Ifndef the non-const one out.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134284 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
09e0a42211591a7ee4de26cdb80350568eab40ec 02-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add some documentation blocks to SBTarget.h and use swig docstring feature to
take advantage of them. Update modify-python-lldb.py to remove some 'residues'
resulting from swigification.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134269 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
a0d0a7cbd773ded4ced8d5065f993b6e0feb8dfe 01-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add docstrings for some API classes and auto-generates docstrings for the methods of them.
A few of the auto-generated method docstrings don't look right, and may need to be fixed
by either overwriting the auto-gened docstrings or some post-processing steps.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134246 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBlock.h
PI/SBCompileUnit.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBLineEntry.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBTarget.h
PI/SBThread.h
PI/SBValue.h
10b4ab1a248389b479ad7a2234503629368b15af 30-Jun-2011 Johnny Chen <johnny.chen@apple.com> Ifdef out the 'lldb::Encoding GetEncoding(uint32_t &count)' API from
Python SWIG, since it cannot hanlde the (uint32_t &count) parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134176 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
b302b2f50e079b11a12ebafc29104c198f4f15e4 30-Jun-2011 Greg Clayton <gclayton@apple.com> Centralize all of the type name code so that we always strip the leading
"struct ", "class ", and "union " from the start of any type names that are
extracted from clang QualType objects. I had to fix test suite cases that
were expecting the struct/union/class prefix to be there.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134132 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangFunction.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
1391a391072a4b25c21b7198733ef7aa47a616c7 30-Jun-2011 Enrico Granata <granata.enrico@gmail.com> This commit adds a new top subcommand "summary" to command type named "type". Currently this command
implements three commands:

type summary add <format> <typename1> [<typename2> ...]
type summary delete <typename1> [<typename2> ...]
type summary list [<typename1> [<typename2>] ...]
type summary clear

This allows you to specify the default format that will be used to display
summaries for variables, shown when you use "frame variable" or "expression", or the SBValue classes.

Examples:
type summary add "x = ${var.x}" Point

type summary list

type summary add --one-liner SimpleType

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134108 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ore/ValueObject.h
ymbol/ClangASTType.h
ldb-forward-rtti.h
ldb-forward.h
917c000e77fcf657099f59085d6436d179a39ea4 30-Jun-2011 Greg Clayton <gclayton@apple.com> Added support for finding and global variables in the SBTarget and SBModule
level in the public API.

Also modified the ValueObject values to be able to display global variables
without having a valid running process. The globals will read themselves from
the object file section data if there is no process, and from the process if
there is one.

Also fixed an issue where modifications for dynamic types could cause child
values of ValueObjects to not show up if the value was unable to evaluate
itself (children of NULL pointer objects).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134102 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDefines.h
PI/SBModule.h
PI/SBTarget.h
PI/SBValueList.h
ore/ValueObject.h
ore/ValueObjectList.h
ymbol/ClangASTContext.h
446ccaa81e42b089b6245a950cb4fca05cce12dd 29-Jun-2011 Johnny Chen <johnny.chen@apple.com> Add fuzz calls to SBType, SBValue, and SBValueList.
Fixed crashes for SBValue fuzz calls.
And change 'bool SBType::IsPointerType(void)' to
'bool SBType::IsAPointerType(void)' to avoid name collision with the static 'bool SBType::IsPointerType(void *)'
function, which SWIG cannot handle.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134096 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
82820f9f021e289431ff3b79e56bd7d88097f327 29-Jun-2011 Jim Ingham <jingham@apple.com> Remove a few more places where we were iterating linearly over the Breakpoint Site's rather than
looking up what we needed by address, which is much faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134090 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointSiteList.h
6377f5c7a1c7ac62488abc597e12a38861fcd716 28-Jun-2011 Greg Clayton <gclayton@apple.com> Remove the disassembly option: "eOptionShowCurrentLine" and replaced it with
two:

eOptionMarkPCSourceLine = (1u << 2), // Mark the source line that contains the current PC (mixed mode only)
eOptionMarkPCAddress = (1u << 3) // Mark the disassembly line the contains the PC

This allows mixed mode to show the line that contains the current PC, and it
allows us to mark the PC address in the disassembly if desired. Having these
be separate gives more control on the disassembly output. SBFrame::Disassemble()
doesn't enable any of these options.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134019 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
e6d72ca9a6b22cd062136bbff039c3d8217f798a 25-Jun-2011 Greg Clayton <gclayton@apple.com> This commit adds broad architectural support for hierarchical
inspection of namespaces in the expression parser.

ClangExpressionDeclMap hitherto reported that namespaces had
been completely imported, even though the namespaces are
returned empty. To deal with this situation, ClangASTSource
was recently extended with an API to complete incomplete type
definitions, and, for greater efficiency, to complete these
definitions partially, returning only those objects that have
a given name.

This commit supports these APIs on LLDB's side, and uses it
to provide information on types resident in namespaces.
Namespaces are now imported as they were -- that is to say,
empty -- but with minimal import mode on. This means that
Clang will come back and request their contents by name as
needed. We now respond with information on the contained
types; this will be followed soon by information on functions
and variables.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133852 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
ymbol/ClangASTContext.h
ymbol/ClangASTImporter.h
ymbol/ClangExternalASTSourceCallbacks.h
58513667f6765aa8db13cdc4abd500340c1cac80 25-Jun-2011 Jim Ingham <jingham@apple.com> Add support for looking up ivar offset from the ObjC runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133831 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
arget/ObjCLanguageRuntime.h
ldb-defines.h
3182effd150f2e0381d7c6867236737ac69ad846 23-Jun-2011 Greg Clayton <gclayton@apple.com> Centralized all of the format to c-string and to format character code inside
the FormatManager class. Modified the format arguments in any commands to be
able to use a single character format, or a full format name, or a partial
format name if no full format names match.

Modified any code that was displaying formats to use the new FormatManager
calls so that our help text and errors never get out of date.

Modified the display of the "type format list" command to be a bit more
human readable by showing the format as a format string rather than the single
character format char.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133765 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ore/State.h
ldb-enumerations.h
921fac021ef9f7e5d32de359e67d5ad28fcccc65 23-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Fix header paths

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133755 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FormatManager.h
ff0c5dfc88c4ece84f8c2a13f0db45f79e12ba65 23-Jun-2011 Greg Clayton <gclayton@apple.com> Another patch from Enrico Granata.

Added a fix for where you might have already displayed something with a given
type, then did a "type format add ...", then you display the type again. This
patch will figure out that the format changed and allow us to display the
type with the correct new format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133743 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
5c28dd1daf8de701ce1eeb8f9b8d3e3b5e39ad50 23-Jun-2011 Greg Clayton <gclayton@apple.com> Committing type format code for Enrico Granata.

This commit adds a new top level command named "type". Currently this command
implements three commands:

type format add <format> <typename1> [<typename2> ...]
type format delete <typename1> [<typename2> ...]
type format list [<typename1> [<typename2>] ...]

This allows you to specify the default format that will be used to display
types when you use "frame variable" or "expression", or the SBValue classes.

Examples:

// Format uint*_t as hex
type format add x uint16_t uint32_t uint64_t

// Format intptr_t as a pointer
type format add p intptr_t

The format characters are the same as "printf" for the most part with many
additions. These format character specifiers are also used in many other
commands ("frame variable" for one). The current list of format characters
include:

a - char buffer
b - binary
B - boolean
c - char
C - printable char
d - signed decimal
e - float
f - float
g - float
i - signed decimal
I - complex integer
o - octal
O - OSType
p - pointer
s - c-string
u - unsigned decimal
x - hex
X - complex float
y - bytes
Y - bytes with ASCII




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133728 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/FormatManager.h
ymbol/ClangASTType.h
cbc07cfd435fb703d8feb69b97ca8590e6ee2fd8 23-Jun-2011 Greg Clayton <gclayton@apple.com> Fixed an issue for ARM where data symbols would alway return invalid addresses.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133684 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
4bb0f19c87ee5d3d3ee3cfa6402564587f72dd37 22-Jun-2011 Greg Clayton <gclayton@apple.com> Fixed an issue where SBFrame::GetDisassembly() was returning disassembly that
contained the current line marker. This is now an option which is not enabled
for the API disassembly call.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133597 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
4ed315fdc503cfdc18e89b1eb43bf87e07fd1673 21-Jun-2011 Greg Clayton <gclayton@apple.com> Added the ability to find functions from either a SBModule (find functions
only in a specific module), or in a SBTarget (all modules for a target).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133498 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDefines.h
PI/SBModule.h
PI/SBSymbolContextList.h
PI/SBTarget.h
ldb-enumerations.h
ldb-private-enumerations.h
d2554b5b7d4531b44bfbbea00cccc5fd274ef76b 21-Jun-2011 Johnny Chen <johnny.chen@apple.com> Test lldb Python API object's default constructor and make sure it is invalid
after initial construction.

There are two exceptions to the above general rules, though; the API objects are
SBCommadnReturnObject and SBStream.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133475 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommunication.h
PI/SBInstructionList.h
e6bd142d9fa7ed149bd37efd8a75637375f165b7 20-Jun-2011 Jim Ingham <jingham@apple.com> Use the dyld_mode, image_infos & image_infos_count passed into the shared library notification function
to update libraries rather than reading the whole all_imaage_infos structure every time we get notified.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133448 91177308-0d34-0410-b5e6-96231b3b80d8
arget/DynamicLoader.h
8c6907c4daa74a8ebc418ec6eed151b68bda6321 19-Jun-2011 Greg Clayton <gclayton@apple.com> Fixed a case where LLDB would crash if we get C++ operators with invalid
operator counts due to bad debug DWARF debug info. We now verify the operator
has a valid number of params using the clang operator tables.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133375 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
20fe30ca112121e963dc5ed0547b46bca72f9620 19-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Switch from USEC_PER_SEC/NSEC_PER_SEC/NSEC_PER_USEC to TimeValue constants

Fixes the Linux build.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133370 91177308-0d34-0410-b5e6-96231b3b80d8
ost/TimeValue.h
582ed0ed40a4f4135368dc4d2aff44f22f04b701 18-Jun-2011 Greg Clayton <gclayton@apple.com> Added two new API functions to SBFrame:

const char *
SBFrame::GetFunctionName();

bool
SBFrame::IsInlined();


The first one will return the correct name for a frame. The name of a frame is:
- the name of the inlined function (if there is one)
- the name of the concrete function (if there is one)
- the name of the symbol (if there is one)
- NULL

We also can now easily check if a frame is an inline function or not.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133357 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
307fa07606d519d427c812802aff5f9727e7047c 18-Jun-2011 Greg Clayton <gclayton@apple.com> Added a new format for displaying an array of characters: eFormatCharArray
This us useful because sometomes you have to show a single character as: 'a'
(using eFormatChar) and other times you might have an array of single
charcters for display as: 'a' 'b' 'c', and other times you might want to
show the contents of buffer of characters that can contain non printable
chars: "\0\x22\n123".

This also fixes an issue that currently happens when you have a single character
C string (const char *a = "a"; or char b[1] = { 'b' };) that was being output
as "'a'" incorrectly due to the way the eFormatChar format output worked.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133316 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
1bd2b2feb7694e06b9a971063c283f9c490479d2 18-Jun-2011 Greg Clayton <gclayton@apple.com> Fixed variable parsing to not parse block variables over and over due to an
issue in the way block variables are marked as parsed. In the DWARF parser we
always parse all blocks for a function at once, so we can mark all blocks as
having all variables parsed and avoid recursive function calls to try and
reparse things that have already been handled.

Fixed an issue with how variables get scoped into blocks. The DWARF parser can
now handle abtract class definitions that contain concrete static variables.
When the concrete instance of the class functions get instantiated, they will
track down the concrete block for the abtract block and add the variable to
each block.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133302 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
604f0d336f0d9390a0405022ef660ae922ef29bf 17-Jun-2011 Greg Clayton <gclayton@apple.com> Added the notion of an system root for SDKs. This is a directory where all
libraries and headers exist. This can be specified using the platform select
function:

platform select --sysroot /Volumes/remote-root remote-macosx

Each platform subclass is free to interpret the sysroot as needed.

Expose the new SDK root directory through the SBDebugger class.

Fixed an issue with the GDB remote protocol where unimplemented packets were
not being handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133231 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
nterpreter/OptionGroupPlatform.h
arget/Platform.h
63afdb07641f04aa7b60d895120b056124d3469b 17-Jun-2011 Greg Clayton <gclayton@apple.com> Improved the packet throughput when debugging with GDB remote by over 3x on
darwin (not sure about other platforms).

Modified the communication and connection classes to not require the
BytesAvailable function. Now the "Read(...)" function has a timeout in
microseconds.

Fixed a lot of assertions that were firing off in certain cases and replaced
them with error output and code that can deal with the assertion case.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133224 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommunication.h
ore/Communication.h
ore/Connection.h
ore/ConnectionFileDescriptor.h
ore/ConnectionMachPort.h
ore/ConnectionSharedMemory.h
892fadd1f1001d1082cd2edcf282fee0cba8ac87 16-Jun-2011 Caroline Tice <ctice@apple.com> Add 'batch_mode' to CommandInterpreter. Modify InputReaders to
not write output (prompts, instructions,etc.) if the CommandInterpreter
is in batch_mode.

Also, finish updating InputReaders to write to the asynchronous stream,
rather than using the Debugger's output file directly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133162 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
409646d247dc8a1efe4f199a1b251516ffc62f60 15-Jun-2011 Johnny Chen <johnny.chen@apple.com> Add an API to SBDebugger class:

bool SBDebugger::DeleteTarget(lldb::SBTarget &target);

which is used in the test tearDown() phase to cleanup the debugger's target list
so that it won't grow larger and larger as test cases are executed. This is also
a good opportunity to get rid of the arcane requirement that test cases exercising
the Python API must assign the process object to self.process so that it gets
shutdown gracefully. Instead, the shutdown of the process associated with each
target is now being now automatically.

Also get rid of an API from SBTarget class:

SBTarget::DeleteTargetFromList(lldb_private::TargetList *list);


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133091 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBTarget.h
ac35442b2b1a35ea3100c870214977e3bddb76f6 15-Jun-2011 Jim Ingham <jingham@apple.com> Made GetConditionText const everywhere. Made it return NULL when there's no condition
like the doc's say it should. Make sure we have a condition before we set up a test whether
we have one, so we only present a "could not parse condition" error if we actually have a condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133088 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
cd73f3e9f95d3d182a87e2d9d5e00a8442448158 14-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Declare CompareHistoryEvents and IsCurrentHistoryEvent as pure virtual functions

Fixes the Linux build.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132967 91177308-0d34-0410-b5e6-96231b3b80d8
ore/History.h
8e432fa9ca1f8f191ac11d68fffb50805ae44417 10-Jun-2011 Greg Clayton <gclayton@apple.com> Make the size accessor const.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132829 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UniqueCStringMap.h
9282e86cbcd26f34eab5b34b98dc27bcf246ecd9 10-Jun-2011 Greg Clayton <gclayton@apple.com> Added an llvm::StringRef accessor.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132827 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
9d479442c0a521983328faa799883e967a6d5252 10-Jun-2011 Greg Clayton <gclayton@apple.com> I modified the StringMap that was being used to unique our debugger C strings
to have the value for the map be a "const char *" instead of an unused uint32_t.
This allows us to store the uniqued mangled/demangled counterpart in this map
for mangled names. This also speeds up the mangled/demangled counterpart lookup
that used to be maintained in a STL map by having direct access to the data.
If we eventually need to associate other strings to strings to more data, we
can make the value of the StringMap have a more complex value.

Added the start of a history source and history event class. It isn't being
used by anything yet, but might be shortly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132813 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
ore/History.h
6561155acc9dee660de73e4aa8215839a06f01a7 04-Jun-2011 Greg Clayton <gclayton@apple.com> Created a std::string in the base StopInfo class for the description and
cleaned up all base classes that had their own copy. Added a SetDescription
accessor to the StopInfo class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132615 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StopInfo.h
abb53e5708c9d880441017a6d7d89172fc233e3e 03-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Fix some order-of-initialisation warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132588 91177308-0d34-0410-b5e6-96231b3b80d8
tility/SharedCluster.h
e426d855032b9b1962b98028b42e3a4e88975b03 03-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Move SaveFrameZeroState and RestoreSaveFrameZero implementations to Thread base class

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132586 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
e5ed8e90471d8f56d054909f06e91b06ce38ff05 03-Jun-2011 Jim Ingham <jingham@apple.com> Added Debugger::GetAsync{Output/Error}Stream, and use it to print parse errors when we go to run a breakpoint condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132517 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
d8662f50b3cdcdec80c652ad3bb1d0130b397681 02-Jun-2011 Caroline Tice <ctice@apple.com> Create new class, InputReaderStack, to better handle
mutexes around input readers and prevent deadlocking; modify
Debugger to use the new class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132475 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/InputReaderStack.h
82f0746880b4a6b18bcf8666670140f5b4a56791 30-May-2011 Greg Clayton <gclayton@apple.com> lldb-59.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132304 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataExtractor.h
ore/ValueObject.h
xpression/DWARFExpression.h
ymbol/ClangASTContext.h
ymbol/Variable.h
860f7464b809d665f3ab279156cba60f63200d68 30-May-2011 Greg Clayton <gclayton@apple.com> Protect the input reader stack with a recursive mutex.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132301 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
421ca5014ea0e163998b9a8e0d777d3adb5c872e 29-May-2011 Greg Clayton <gclayton@apple.com> Don't have the debugger default to ignoring EOF. This is only what the driver
(or anything running in a terminal) wants. Not what a UI (Xcode) would want
where it creates a debugger per debug window. The current code had an infinite
loop after a debug session ended.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132280 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
54b38413f62af3bcaeb8802a978cc621c8e88eb1 25-May-2011 Greg Clayton <gclayton@apple.com> ABI plug-ins must implement the following pure virtual functions:

virtual bool
ABI::StackUsesFrames () = 0;

Should return true if your ABI uses frames when doing stack backtraces. This
means a frame pointer is used that points to the previous stack frame in some
way or another.

virtual bool
ABI::CallFrameAddressIsValid (lldb::addr_t cfa) = 0;

Should take a look at a call frame address (CFA) which is just the stack
pointer value upon entry to a function. ABIs usually impose alignment
restrictions (4, 8 or 16 byte aligned), and zero is usually not allowed.
This function should return true if "cfa" is valid call frame address for
the ABI, and false otherwise. This is used by the generic stack frame unwinding
code to help determine when a stack ends.

virtual bool
ABI::CodeAddressIsValid (lldb::addr_t pc) = 0;

Validates a possible PC value and returns true if an opcode can be at "pc".
Some ABIs or architectures have fixed width instructions and must be aligned
to a 2 or 4 byte boundary. "pc" can be an opcode or a callable address which
means the load address might be decorated with extra bits (such as bit zero
to indicate a thumb function call for ARM targets), so take this into account
when returning true or false. The address should also be validated to ensure
it is a valid address for the address size of the inferior process. 32 bit
targets should make sure the address is less than UINT32_MAX.

Modified UnwindLLDB to use the new ABI functions to help it properly terminate
stacks.


Modified the mach-o function that extracts dependent files to not resolve the
path as the paths inside a binary might not match those on the current
host system.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132021 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ABI.h
c0492741dc594cd02736521048fe0d8f4c9a0a61 23-May-2011 Sean Callanan <scallanan@apple.com> This commit integrates support for the LLVM MCJIT
into the mainline LLDB codebase. MCJIT introduces
API improvements and better architectural support.

This commit adds a new subsystem, the
ProcessDataAllocator, which is responsible for
performing static data allocations on behalf of the
IR transformer. MCJIT currently does not support
the relocations required to store the constant pool
in the same allocation as the function body, so we
allocate a heap region separately and redirect
static data references from the expression to that
heap region in a new IR modification pass.

This patch also fixes bugs in the IR
transformations that were exposed by the transition
to the MCJIT. Finally, the patch also pulls in a
more recent revision of LLVM so that the MCJIT is
available for use.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131923 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionParser.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRForTarget.h
xpression/ProcessDataAllocator.h
c0fa53324d62a48257c092a3347d6e7236aa3152 23-May-2011 Greg Clayton <gclayton@apple.com> Added new lldb_private::Process memory read/write functions to stop a bunch
of duplicated code from appearing all over LLDB:

lldb::addr_t
Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error);

bool
Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error);

size_t
Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error);

size_t
Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error);

in lldb_private::Process the following functions were renamed:

From:
uint64_t
Process::ReadUnsignedInteger (lldb::addr_t load_addr,
size_t byte_size,
Error &error);

To:
uint64_t
Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr,
size_t byte_size,
uint64_t fail_value,
Error &error);

Cleaned up a lot of code that was manually doing what the above functions do
to use the functions listed above.

Added the ability to get a scalar value as a buffer that can be written down
to a process (byte swapping the Scalar value if needed):

uint32_t
Scalar::GetAsMemoryData (void *dst,
uint32_t dst_len,
lldb::ByteOrder dst_byte_order,
Error &error) const;

The "dst_len" can be smaller that the size of the scalar and the least
significant bytes will be written. "dst_len" can also be larger and the
most significant bytes will be padded with zeroes.

Centralized the code that adds or removes address bits for callable and opcode
addresses into lldb_private::Target:

lldb::addr_t
Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const;

lldb::addr_t
Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const;

All necessary lldb_private::Address functions now use the target versions so
changes should only need to happen in one place if anything needs updating.

Fixed up a lot of places that were calling :

addr_t
Address::GetLoadAddress(Target*);

to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress()
as needed. There were many places in the breakpoint code where things could
go wrong for ARM if these weren't used.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131878 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Scalar.h
arget/Process.h
arget/Target.h
arget/ThreadPlanRunToAddress.h
6cf4d2b31bf208cd6e48d4e37af671ab9b451446 22-May-2011 Jim Ingham <jingham@apple.com> Change the m_update_state to an int, and only trigger the "on removal"
action the second time the event is removed (the first is the internal ->
external transition, the second when it is pulled off the public event
queue, and further times when it is put back because we are faking a
stop reason to hide the expression evaluation stops.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131869 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
5a26910ed231503d2a7a71365a44e379a994f4e6 22-May-2011 Greg Clayton <gclayton@apple.com> Added functions to lldb_private::Address to set an address from a load address
and set the address as an opcode address or as a callable address. This is
needed in various places in the thread plans to make sure that addresses that
might be found in symbols or runtime might already have extra bits set (ARM/Thumb).
The new functions are:

bool
Address::SetCallableLoadAddress (lldb::addr_t load_addr, Target *target);

bool
Address::SetOpcodeLoadAddress (lldb::addr_t load_addr, Target *target);

SetCallableLoadAddress will initialize a section offset address if it can,
and if so it might possibly set some bits in the address to make the address
callable (bit zero might get set for ARM for Thumb functions).

SetOpcodeLoadAddress will initialize a section offset address using the
specified target and it will strip any special address bits if needed
depending on the target.

Fixed the ABIMacOSX_arm::GetArgumentValues() function to require arguments
1-4 to be in the needed registers (previously this would incorrectly fallback
to the stack) and return false if unable to get the register values. The
function was also modified to first look for the generic argument registers
and then fall back to finding the registers by name.

Fixed the objective trampoline handler to use the new Address::SetOpcodeLoadAddress
function when needed to avoid address mismatches when trying to complete
steps into objective C methods. Make similar fixes inside the
AppleThreadPlanStepThroughObjCTrampoline::ShouldStop() function.

Modified ProcessGDBRemote::BuildDynamicRegisterInfo(...) to be able to deal with
the new generic argument registers.

Modified RNBRemote::HandlePacket_qRegisterInfo() to handle the new generic
argument registers on the debugserver side.

Modified DNBArchMachARM::NumSupportedHardwareBreakpoints() to be able to
detect how many hardware breakpoint registers there are using a darwin sysctl.
Did the same for hardware watchpoints in
DNBArchMachARM::NumSupportedHardwareWatchpoints().




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131834 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
a29381ffcadf831f2eaecbe916c1ca3b14ceb856 20-May-2011 Charles Davis <cdavis@mines.edu> Fix a tag type mismatch (i.e. class vs. struct) warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131699 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
265ab33ae56209d2bfdc47510a557aa075b2a829 19-May-2011 Greg Clayton <gclayton@apple.com> Moved a lot of simple functions from StoppointLocation.cpp to be inlined in
StoppointLocation.h.

Added a new lldb_private::Address function:

addr_t
Address::GetOpcodeLoadAddress (Target *target) const;

This will strip any special bits from an address to make sure it is suitable
for use in addressing an opcode. Often ARM addresses have an extra bit zero
that can be set to indicate ARM vs Thumb addresses (gotten from return address
registers, or symbol addresses that may be marked up specially). We need to
strip these bits off prior to setting breakpoints, so we can centralized the
place to do this inside the Address class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131658 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/StoppointLocation.h
ore/Address.h
5fba9eec8d79109bf44d5b0a59dda377c65544c5 19-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to sign extend a Scalar at any bit position for integer
types.

Added the abilty to set a RegisterValue type via accessor and enum.

Added the ability to read arguments for a function for ARM if you are on the
first instruction in ABIMacOSX_arm.

Fixed an issue where a file descriptor becoming invalid could cause an
inifnite loop spin in the libedit thread.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131610 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegisterValue.h
ore/Scalar.h
da7af84c427c5c3a7b18e550c665c2f538670a34 19-May-2011 Greg Clayton <gclayton@apple.com> Added a function to lldb_private::Address:

addr_t
Address::GetCallableLoadAddress (Target *target) const;

This will resolve the load address in the Address object and optionally
decorate the address up to be able to be called. For all non ARM targets, this
just essentially returns the result of "Address::GetLoadAddress (target)". But
for ARM targets, it checks if the address is Thumb, and if so, it returns
an address with bit zero set to indicate a mode switch to Thumb. This is how
we need function pointers to be for return addresses and when resolving
function addresses for the JIT. It is also nice to centralize this in one spot
to avoid having multiple copies of this code.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131588 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
b9e8f6e7a374d9313f89193e90ae41ef91712e5b 18-May-2011 Greg Clayton <gclayton@apple.com> Added a way to resolve an load address from a target:

bool
Address::SetLoadAddress (lldb::addr_t load_addr, Target *target);

Added an == and != operator to RegisterValue.

Modified the ThreadPlanTracer to use RegisterValue objects to store the
register values when single stepping. Also modified the output to be a bit
less wide.

Fixed the ABIMacOSX_arm to not overwrite stuff on the stack. Also made the
trivial function call be able to set the ARM/Thumbness of the target
correctly, and also sets the return value ARM/Thumbness.

Fixed the encoding on the arm s0-s31 and d16 - d31 registers when the default
register set from a standard GDB server register sets.







git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131517 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ore/RegisterValue.h
arget/Process.h
arget/ThreadPlanTracer.h
613b8739a4d489b7f1c571288d5786768c024205 17-May-2011 Greg Clayton <gclayton@apple.com> Added an allocated memory cache to avoid having to allocate memory over and
over when running JITed expressions. The allocated memory cache will cache
allocate memory a page at a time for each permission combination and divvy up
the memory and hand it out in 16 byte increments.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131453 91177308-0d34-0410-b5e6-96231b3b80d8
ore/State.h
arget/Memory.h
arget/Process.h
2370a97fe5bea6fa9d82f40bb34d37d3d3bda317 17-May-2011 Jim Ingham <jingham@apple.com> Fix the error message when an expression evaluation is interrupted by a crash/breakpoint hit to
give the reason for the interrupt. Also make sure it we don't want to unwind from the evaluation
we print something if it is interrupted.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131448 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlan.h
arget/ThreadPlanCallFunction.h
997b1e82f098a8b748b490d1ae6d0bbe597a59d5 15-May-2011 Greg Clayton <gclayton@apple.com> Added generic register numbers for simple ABI argument registers and defined
the appropriate registers for arm and x86_64. The register names for the
arguments that are the size of a pointer or less are all named "arg1", "arg2",
etc. This allows you to read these registers by name:

(lldb) register read arg1 arg2 arg3
...

You can also now specify you want to see alternate register names when executing
the read register command:

(lldb) register read --alternate
(lldb) register read -A




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131376 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegisterValue.h
nterpreter/NamedOptionValue.h
ldb-defines.h
2f085c6ca2895663687dca704589478ff040b849 15-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to get the return value from a ThreadPlanCallFunction
thread plan. In order to get the return value, you can call:

void
ThreadPlanCallFunction::RequestReturnValue (lldb::ValueSP &return_value_sp);

This registers a shared pointer to a return value that will get filled in if
everything goes well. After the thread plan is run the return value will be
extracted for you.

Added an ifdef to be able to switch between the LLVM MCJIT and the standand JIT.
We currently have the standard JIT selected because we have some work to do to
get the MCJIT fuctioning properly.

Added the ability to call functions with 6 argument in the x86_64 ABI.

Added the ability for GDBRemoteCommunicationClient to detect if the allocate
and deallocate memory packets are supported and to not call allocate memory
("_M") or deallocate ("_m") if we find they aren't supported.

Modified the ProcessGDBRemote::DoAllocateMemory(...) and ProcessGDBRemote::DoDeallocateMemory(...)
to be able to deal with the allocate and deallocate memory packets not being
supported. If they are not supported, ProcessGDBRemote will switch to calling
"mmap" and "munmap" to allocate and deallocate memory instead using our
trivial function call support.

Modified the "void ProcessGDBRemote::DidLaunchOrAttach()" to correctly ignore
the qHostInfo triple information if any was specified in the target. Currently
if the target only specifies an architecture when creating the target:

(lldb) target create --arch i386 a.out

Then the vendor, os and environemnt will be adopted by the target.

If the target was created with any triple that specifies more than the arch:

(lldb) target create --arch i386-unknown-unknown a.out

Then the target will maintain its triple and not adopt any new values. This
can be used to help force bare board debugging where the dynamic loader for
static files will get used and users can then use "target modules load ..."
to set addressses for any files that are desired.

Added back some convenience functions to the lldb_private::RegisterContext class
for writing registers with unsigned values. Also made all RegisterContext
constructors explicit to make sure we know when an integer is being converted
to a RegisterValue.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131370 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegisterValue.h
arget/RegisterContext.h
arget/ThreadPlanCallFunction.h
ldb-forward-rtti.h
989816b9505219cd67ce044d655c54ac86ecf64b 14-May-2011 Greg Clayton <gclayton@apple.com> Expand the ABI prepare trivial function call to allow 6 simple args.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131334 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ABI.h
arget/ThreadPlanCallFunction.h
fb3058efeaacc2ced967e46842dfc4875b3daf14 13-May-2011 Sean Callanan <scallanan@apple.com> Introduced support for UnknownAnyTy, the Clang type
representing variables whose type must be inferred
from the way they are used. Functions without debug
information now return UnknownAnyTy and must be cast.

Variables with no debug information are not yet using
UnknownAnyTy; instead they are assumed to be void*.
Support for variables of unknown type is coming (and,
in fact, some relevant support functions are included
in this commit) but will take a bit of extra effort.

The testsuite has also been updated to reflect the new
requirement that the result of printf be cast, i.e.

expr (int) printf("Hello world!")


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131263 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
ymbol/ClangASTContext.h
61d4f7adb6936a6d406dd5b20452d0843e538d76 12-May-2011 Greg Clayton <gclayton@apple.com> Cleaned up the ABI::PrepareTrivialCall() function to take three argument
pointers:

virtual bool
PrepareTrivialCall (Thread &thread,
lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
lldb::addr_t *arg1_ptr,
lldb::addr_t *arg2_ptr,
lldb::addr_t *arg3_ptr) const = 0;

Prior to this it was:

virtual bool
PrepareTrivialCall (Thread &thread,
lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
lldb::addr_t arg,
lldb::addr_t *this_arg,
lldb::addr_t *cmd_arg) const = 0;

This was because the function that called this slowly added more features to
be able to call a C++ member function that might have a "this" pointer, and
then later added "self + cmd" support for objective C. Cleaning this code up
and the code that calls it makes it easier to implement the functions for
new targets.

The MacOSX_arm::PrepareTrivialCall() is now filled in and ready for testing.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131221 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ABI.h
3613ae1d8bc555d336d3aed9606418d7f714643d 12-May-2011 Jim Ingham <jingham@apple.com> Target::EvaluateExpression should suppress stop hooks.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131219 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
75906e4ec98af3717e415727a8d663a4e246bb4f 11-May-2011 Greg Clayton <gclayton@apple.com> Moved all code from ArchDefaultUnwindPlan and ArchVolatileRegs into their
respective ABI plugins as they were plug-ins that supplied ABI specfic info.

Also hookep up the UnwindAssemblyInstEmulation so that it can generate the
unwind plans for ARM.

Changed the way ABI plug-ins are handed out when you get an instance from
the plug-in manager. They used to return pointers that would be mananged
individually by each client that requested them, but now they are handed out
as shared pointers since there is no state in the ABI objects, they can be
shared.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131193 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
ore/PluginManager.h
ymbol/UnwindPlan.h
arget/ABI.h
arget/ArchDefaultUnwindPlan.h
arget/ArchVolatileRegs.h
arget/Process.h
ldb-forward-rtti.h
ldb-forward.h
ldb-private-interfaces.h
649116c40a40319fd627f3543cbe7eaf47869f8d 11-May-2011 Caroline Tice <ctice@apple.com> Add ability to recognize/handle quotes around commands
(e.g. '"target" create' works as well as 'target create').



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131185 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
b38df1e945846a5d956974ec157902a6ad748868 10-May-2011 Caroline Tice <ctice@apple.com> Make sure writing asynchronous output only backs up
& overwrites prompt if the IOChannel input reader is the top
input reader.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131110 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
0ddf806dd9e71637846bf0ad46e1b2df7d02cbce 10-May-2011 Sean Callanan <scallanan@apple.com> Fixed a bug in which expression-local variables were
treated as being permanently resident in target
memory. In fact, since the expression's stack frame
is deleted and potentially re-used after the
expression completes, the variables need to be treated
as being freeze-dried.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131104 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangUserExpression.h
arget/ThreadPlanCallFunction.h
061b79dbf1fefaf157d414747e98a463a0f32eda 09-May-2011 Greg Clayton <gclayton@apple.com> While implementing unwind information using UnwindAssemblyInstEmulation I ran
into some cleanup I have been wanting to do when reading/writing registers.
Previously all RegisterContext subclasses would need to implement:

virtual bool
ReadRegisterBytes (uint32_t reg, DataExtractor &data);

virtual bool
WriteRegisterBytes (uint32_t reg, DataExtractor &data, uint32_t data_offset = 0);

There is now a new class specifically designed to hold register values:
lldb_private::RegisterValue

The new register context calls that subclasses must implement are:

virtual bool
ReadRegister (const RegisterInfo *reg_info, RegisterValue &reg_value) = 0;

virtual bool
WriteRegister (const RegisterInfo *reg_info, const RegisterValue &reg_value) = 0;

The RegisterValue class must be big enough to handle any register value. The
class contains an enumeration for the value type, and then a union for the
data value. Any integer/float values are stored directly in an appropriate
host integer/float. Anything bigger is stored in a byte buffer that has a length
and byte order. The RegisterValue class also knows how to copy register value
bytes into in a buffer with a specified byte order which can be used to write
the register value down into memory, and this does the right thing when not
all bytes from the register values are needed (getting a uint8 from a uint32
register value..).

All RegiterContext and other sources have been switched over to using the new
regiter value class.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131096 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataExtractor.h
ore/Disassembler.h
ore/EmulateInstruction.h
ore/RegisterValue.h
ore/ValueObjectRegister.h
nterpreter/Args.h
arget/RegisterContext.h
ldb-forward.h
819749647b1605f75753f625050cb240292c08b0 08-May-2011 Sean Callanan <scallanan@apple.com> Added support for reading untyped symbols. Right now
they are treated as pointers of type (void*). This
allows reading of environ, for instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131063 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
696cf5f6f2a77b87a4b06cdf0f697749b494665f 07-May-2011 Sean Callanan <scallanan@apple.com> Made expressions that are just casts of pointer
variables be evaluated statically.

Also fixed a bug that caused the results of
statically-evaluated expressions to be materialized
improperly.

This bug also removes some duplicate code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131042 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/ClangExpressionVariable.h
xpression/ClangUserExpression.h
xpression/IRForTarget.h
5ddbe214153f60f8ab62ba98dea089a21f1779f3 06-May-2011 Caroline Tice <ctice@apple.com> Replace calls to HandleCommand in lldb core with more appropriate
direct function calls. As part of this, collect code that processes
arguments & options for aliases into a single function.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131020 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
0039e68f8b6f7f15011f58a36621bec046ef5244 06-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to cast pointer types to another type, no matter what the
ValueObject is, as long as the ValueObject that is being asked to be casted
is a pointer itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130966 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
10de7d1db3ec782ea2ccda1f39c0a40b9c301594 04-May-2011 Jim Ingham <jingham@apple.com> Change "frame var" over to using OptionGroups (and thus the OptionGroupVariableObjectDisplay).
Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target,
and dynamic with running target.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130832 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
PI/SBValue.h
ore/ValueObject.h
ore/ValueObjectConstResult.h
ore/ValueObjectDynamicValue.h
nterpreter/OptionGroupValueObjectDisplay.h
arget/LanguageRuntime.h
arget/StackFrame.h
arget/Target.h
ldb-enumerations.h
e1f50b9df1299f6b9181b5ac2699ed4a3ad38a59 04-May-2011 Greg Clayton <gclayton@apple.com> Added new OptionGroup classes for UInt64, UUID, File and Boolean values.

Removed the "image" command and moved it to "target modules". Added an alias
for "image" to "target modules".

Added some new target commands to be able to add and load modules to a target:
(lldb) target modules add <path>
(lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...]

So you can load individual sections without running a target:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000

Or you can rigidly slide an entire shared library:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000

This should improve bare board debugging when symbol files need to be slid around manually.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130796 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/NamedOptionValue.h
nterpreter/OptionGroupBoolean.h
nterpreter/OptionGroupFile.h
nterpreter/OptionGroupUInt64.h
nterpreter/OptionGroupUUID.h
4a348081030cdd2af758fddc869518357d9befd3 02-May-2011 Caroline Tice <ctice@apple.com> This patch captures and serializes all output being written by the
command line driver, including the lldb prompt being output by
editline, the asynchronous process output & error messages, and
asynchronous messages written by target stop-hooks.

As part of this it introduces a new Stream class,
StreamAsynchronousIO. A StreamAsynchronousIO object is created with a
broadcaster, who will eventually broadcast the stream's data for a
listener to handle, and an event type indicating what type of event
the broadcaster will broadcast. When the Write method is called on a
StreamAsynchronousIO object, the data is appended to an internal
string. When the Flush method is called on a StreamAsynchronousIO
object, it broadcasts it's data string and clears the string.

Anything in lldb-core that needs to generate asynchronous output for
the end-user should use the StreamAsynchronousIO objects.

I have also added a new notification type for InputReaders, to let
them know that a asynchronous output has been written. This is to
allow the input readers to, for example, refresh their prompts and
lines, if desired. I added the case statements to all the input
readers to catch this notification, but I haven't added any code for
handling them yet (except to the IOChannel input reader).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130721 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandInterpreter.h
PI/SBDebugger.h
ore/Debugger.h
ore/Event.h
ore/StreamAsynchronousIO.h
nterpreter/CommandInterpreter.h
ldb-enumerations.h
ef80aabe53b7fdf61309ba6d3d6865c94c681345 02-May-2011 Jim Ingham <jingham@apple.com> Adding support for fetching the Dynamic Value for ObjC Objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130701 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ymbol/Type.h
arget/LanguageRuntime.h
arget/ObjCLanguageRuntime.h
ldb-forward.h
180546b3feb8c7bcca70a56776a7c4fad99ba09c 30-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability to set the Platform path for a module through the SBModule
interface.

Added a quick way to set the platform though the SBDebugger interface. I will
actually an a SBPlatform support soon, but for now this will do.

ConnectionFileDescriptor can be passed a url formatted as: "fd://<fd>" where
<fd> is a file descriptor in the current process. This is handy if you have
services, deamons, or other tools that can spawn processes and give you a
file handle.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130565 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBModule.h
3063c95c54ac0303287c34f9f5af7ba7b6b8f0bc 30-Apr-2011 Greg Clayton <gclayton@apple.com> Added the start of the CFI row production using the
emulate instruction classes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130556 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
56bbdaf817cb19a2f133e8501473f499be447c2d 28-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability to specify dumping options (show types, show location,
depth control, pointer depth, and more) when dumping memory and viewing as
a type.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130436 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
nterpreter/Args.h
nterpreter/NamedOptionValue.h
nterpreter/OptionGroupFormat.h
nterpreter/OptionGroupValueObjectDisplay.h
57b3c6b12812b0a7a79f896855c787bd4d893ecb 28-Apr-2011 Greg Clayton <gclayton@apple.com> Added a new OptionValue subclass for lldb::Format: OptionValueFormat. Added
new OptionGroup subclasses for:
- output file for use with options:
long opts: --outfile <path> --append--output
short opts: -o <path> -A

- format for use with options:
long opts: --format <format>

- variable object display controls for depth, pointer depth, wether to show
types, show summary, show location, flat output, use objc "po" style summary.

Modified ValueObjectMemory to be able to be created either with a TypeSP or
a ClangASTType.

Switched "memory read" over to use OptionGroup subclasses: one for the outfile
options, one for the command specific options, and one for the format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130334 91177308-0d34-0410-b5e6-96231b3b80d8
ore/State.h
ore/ValueObjectMemory.h
nterpreter/NamedOptionValue.h
nterpreter/OptionGroupFormat.h
nterpreter/OptionGroupOutputFile.h
nterpreter/OptionGroupValueObjectDisplay.h
nterpreter/Options.h
ymbol/ClangASTType.h
c07d451bb046e47215bd73fda0235362cc6b1a47 27-Apr-2011 Greg Clayton <gclayton@apple.com> Got the EmulateInstruction CFI code a lot closer to producing CFI data.

Switch the EmulateInstruction to use the standard RegisterInfo structure
that is defined in the lldb private types intead of passing the reg kind and
reg num everywhere. EmulateInstruction subclasses also need to provide
RegisterInfo structs given a reg kind and reg num. This eliminates the need
for the GetRegisterName() virtual function and allows more complete information
to be passed around in the read/write register callbacks. Subclasses should
always provide RegiterInfo structs with the generic register info filled in as
well as at least one kind of register number in the RegisterInfo.kinds[] array.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130256 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
ymbol/UnwindPlan.h
888a7334344778d1a4edbd58b5852ae4d53ffed9 26-Apr-2011 Greg Clayton <gclayton@apple.com> Changed the emulate instruction function to take emulate options which
are defined as enumerations. Current bits include:

eEmulateInstructionOptionAutoAdvancePC
eEmulateInstructionOptionIgnoreConditions

Modified the EmulateInstruction class to have a few more pure virtuals that
can help clients understand how many instructions the emulator can handle:

virtual bool
SupportsEmulatingIntructionsOfType (InstructionType inst_type) = 0;


Where instruction types are defined as:

//------------------------------------------------------------------
/// Instruction types
//------------------------------------------------------------------
typedef enum InstructionType
{
eInstructionTypeAny, // Support for any instructions at all (at least one)
eInstructionTypePrologueEpilogue, // All prologue and epilogue instructons that push and pop register values and modify sp/fp
eInstructionTypePCModifying, // Any instruction that modifies the program counter/instruction pointer
eInstructionTypeAll // All instructions of any kind

} InstructionType;


This allows use to tell what an emulator can do and also allows us to request
these abilities when we are finding the plug-in interface.

Added the ability for an EmulateInstruction class to get the register names
for any registers that are part of the emulation. This helps with being able
to dump and log effectively.

The UnwindAssembly class now stores the architecture it was created with in
case it is needed later in the unwinding process.

Added a function that can tell us DWARF register names for ARM that goes
along with the source/Utility/ARM_DWARF_Registers.h file:

source/Utility/ARM_DWARF_Registers.c

Took some of plug-ins out of the lldb_private namespace.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130189 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBInstruction.h
ore/Disassembler.h
ore/EmulateInstruction.h
arget/ArchDefaultUnwindPlan.h
arget/UnwindAssembly.h
ldb-enumerations.h
ldb-private-enumerations.h
ldb-private-interfaces.h
8badcb2503ed2e2884a48f66099c1d48494817f4 25-Apr-2011 Greg Clayton <gclayton@apple.com> Renamed UnwindAssemblyProfiler to UnwindAssembly along with its source files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130156 91177308-0d34-0410-b5e6-96231b3b80d8
ore/PluginManager.h
ymbol/FuncUnwinders.h
ymbol/UnwindTable.h
arget/UnwindAssembly.h
arget/UnwindAssemblyProfiler.h
ldb-forward.h
ldb-private-interfaces.h
bdc36bd05d156143d9f2e568a1aa1b5253bbe1f1 25-Apr-2011 Johnny Chen <johnny.chen@apple.com> Make SBBreakpointLocation::GetDescription() API to be consistent with SBTarget,
i.e., with 'SBStream &description' first, followed by 'DescriptionLevel level'.

Modify lldbutil.py so that get_description() for a target or breakpoint location
can just take the lldb object itself without specifying an option to mean option
lldb.eDescriptionLevelBrief. Modify TestTargetAPI.py to exercise this logic path.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130147 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpointLocation.h
97eecb1834431b39d4d58257f8ccfdea1db7f1de 25-Apr-2011 Greg Clayton <gclayton@apple.com> Put plug-ins into the correct directories as they were incorrectly located
in a Utility directory.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130135 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ArchDefaultUnwindPlan.h
arget/ArchVolatileRegs.h
arget/UnwindAssemblyProfiler.h
tility/ArchDefaultUnwindPlan.h
tility/ArchVolatileRegs.h
tility/UnwindAssemblyProfiler.h
ff44ab42e9f5d8e4d550e11d1b69413e0bc75b71 23-Apr-2011 Greg Clayton <gclayton@apple.com> Fixed the SymbolContext::DumpStopContext() to correctly indent and dump
inline contexts when the deepest most block is not inlined.

Added source path remappings to the lldb_private::Target class that allow it
to remap paths found in debug info so we can find source files that are elsewhere
on the current system.

Fixed disassembly by function name to disassemble inline functions that are
inside other functions much better and to show enough context before the
disassembly output so you can tell where things came from.

Added the ability to get more than one address range from a SymbolContext
class for the case where a block or function has discontiguous address ranges.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130044 91177308-0d34-0410-b5e6-96231b3b80d8
ore/SourceManager.h
ore/UserSettingsController.h
nterpreter/NamedOptionValue.h
ymbol/Block.h
ymbol/SymbolContext.h
arget/PathMappingList.h
arget/Target.h
47da810225d8674eb9158bcf5f1f5b847cbaeedf 23-Apr-2011 Jim Ingham <jingham@apple.com> Fix up how the ValueObjects manage their life cycle so that you can hand out a shared
pointer to a ValueObject or any of its dependent ValueObjects, and the whole cluster will
stay around as long as that shared pointer stays around.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130035 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectMemory.h
ore/ValueObjectRegister.h
ore/ValueObjectVariable.h
tility/SharedCluster.h
tility/SharingPtr.h
dfb2e20724a90a4a10558ddaee18b72a1c51e499 22-Apr-2011 Caroline Tice <ctice@apple.com> Change code for reading emulation data files to read the new file
format. (The newly formatted files will go in as a separate commit in a
few minutes).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129981 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
ore/EmulateInstruction.h
nterpreter/NamedOptionValue.h
17cd995147b3324680d845b3fc897febcc23c9e0 22-Apr-2011 Greg Clayton <gclayton@apple.com> Did some work on the "register read" command to only show the first register
set by default when dumping registers. If you want to see all of the register
sets you can use the "--all" option:

(lldb) register read --all

If you want to just see some register sets, you can currently specify them
by index:

(lldb) register read --set 0 --set 2

We need to get shorter register set names soon so we can specify the register
sets by name without having to type too much. I will make this change soon.

You can also have any integer encoded registers resolve the address values
back to any code or data from the object files using the "--lookup" option.
Below is sample output when stopped in the libc function "puts" with some
const strings in registers:

Process 8973 stopped
* thread #1: tid = 0x2c03, 0x00007fff828fa30f libSystem.B.dylib`puts + 1, stop reason = instruction step into
frame #0: 0x00007fff828fa30f libSystem.B.dylib`puts + 1
(lldb) register read --lookup
General Purpose Registers:
rax = 0x0000000100000e98 "----------------------------------------------------------------------"
rbx = 0x0000000000000000
rcx = 0x0000000000000001
rdx = 0x0000000000000000
rdi = 0x0000000100000e98 "----------------------------------------------------------------------"
rsi = 0x0000000100800000
rbp = 0x00007fff5fbff710
rsp = 0x00007fff5fbff280
r8 = 0x0000000000000040
r9 = 0x0000000000000000
r10 = 0x0000000000000000
r11 = 0x0000000000000246
r12 = 0x0000000000000000
r13 = 0x0000000000000000
r14 = 0x0000000000000000
r15 = 0x0000000000000000
rip = 0x00007fff828fa30f libSystem.B.dylib`puts + 1
rflags = 0x0000000000000246
cs = 0x0000000000000027
fs = 0x0000000000000000
gs = 0x0000000000000000

As we can see, we see two constant strings and the PC (register "rip") is
showing the code it resolves to.

I fixed the register "--format" option to work as expected.

Added a setting to disable skipping the function prologue when setting
breakpoints as a target settings variable:

(lldb) settings set target.skip-prologue false

Updated the user settings controller boolean value handler funciton to be able
to take the default value so it can correctly respond to the eVarSetOperationClear
operation.

Did some usability work on the OptionValue classes.

Fixed the "image lookup" command to correctly respond to the "--verbose"
option and display the detailed symbol context information when looking up
line table entries and functions by name. This previously was only working
for address lookups.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129977 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
nterpreter/NamedOptionValue.h
arget/Target.h
c08770b52dceb7d6c11dca89012d08dade902e56 21-Apr-2011 Greg Clayton <gclayton@apple.com> More iteration on the new option value stuff. We now define an
OptionValueCollection class that can be subclassed to provide access to
internal settings that are stored as ObjectValue subclasses.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129926 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/NamedOptionValue.h
e972845ac67027cc80d63c83cf6fcadfe16242e0 21-Apr-2011 Greg Clayton <gclayton@apple.com> Made the constructors public for all OptionValue classes
so we can instantiate them, and also moved the code that
can get the specific subclass for a OptionValue into the
OptionValue class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129920 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/NamedOptionValue.h
1cee1e6478d77ef19e24086a54c88358c66a90cb 20-Apr-2011 Greg Clayton <gclayton@apple.com> Fixed an issue where breakpoint were being displayed when using the "source list"
command when the file was implicit or found from a symbol.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129867 91177308-0d34-0410-b5e6-96231b3b80d8
ore/SourceManager.h
27a8727a99c8b3f09791321d797df942d21faf08 20-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability for arrays and dictionaries to contain only specific
types of values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129863 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/NamedOptionValue.h
f91b735a8e7aaf42fd4eed4f848a613b8dad0850 20-Apr-2011 Caroline Tice <ctice@apple.com> Fix typo (accidental second 'const' qualifier).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129859 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
d12aeab33bab559e138307f599077da3918a3238 20-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability for users to create new regex commands.
To do this currently, it must be done in multi-line mode:

(lldb) commands regex --help "Help text for command" --syntax "syntax for command" <cmd-name>

Any example that would use "f" for "finish" when there are no arguments,
and "f <num>" to do a "frame select <num>" would be:
(lldb) commands regex f
Enter multiple regular expressions in the form s/find/replace/ then terminate with an empty line:
s/^$/finish/
s/([0-9]+)/frame select %1/

(lldb) f 11
frame select 12
...
(lldb) f
finish
...

Also added the string version of the OptionValue as OptionValueString.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129855 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
nterpreter/CommandObjectRegexCommand.h
nterpreter/NamedOptionValue.h
7406c39458db2c7eeb235d2d99bfc4fe6c296b8e 20-Apr-2011 Greg Clayton <gclayton@apple.com> Added the start of a new option value system that we can use for many things
around the debugger. The class isn't hooked into anything yet, but it will be
soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129843 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/NamedOptionValue.h
ldb-forward-rtti.h
ldb-forward.h
6b8d3b5e7f0507aca2ee1c0937d7ec80fa2a9c5b 20-Apr-2011 Caroline Tice <ctice@apple.com> Add the infrastructure to test instruction emulations automatically.
The idea is that the instruction to be emulated is actually executed
on the hardware to be emulated, with the before and after state of the
hardware being captured and 'freeze-dried' into .dat files. The
emulation testing code then loads the before & after state from the
.dat file, emulates the instruction using the before state, and
compares the resulting state to the 'after' state. If they match, the
emulation is accurate, otherwise there is a problem.

The final format of the .dat files needs a bit more work; the plan is
to generalize them a bit and to convert the plain values to key-value pairs.
But I wanted to get this first pass committed.

This commit adds arm instruction emulation testing to the testsuite, along with
many initial .dat files.

It also fixes a bug in the llvm disassembler, where 32-bit thumb opcodes
were getting their upper & lower 16-bits reversed.

There is a new Instruction sub-class, that is intended to be loaded
from a .dat file rather than read from an executable. There is also a
new EmulationStateARM class, for handling the before & after states.
EmulationStates for other architetures can be added later when we
emulate their instructions.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129832 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBInstruction.h
ore/Disassembler.h
ore/EmulateInstruction.h
41c56fab98d16adf31dabdb623111ae4371a2d41 20-Apr-2011 Greg Clayton <gclayton@apple.com> General cleanup on the UserSettingsController stuff. There were 5 different
places that were dumping values for the settings. Centralized all of the
value dumping into a single place. When dumping values that aren't strings
we no longer surround the value with single quotes. When dumping values that
are strings, surround the string value with double quotes. When dumping array
values, assume they are always string values, and don't put quotes around
dictionary values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129826 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
52c8b6e3205e11e90adc83521c01915fc13626de 19-Apr-2011 Greg Clayton <gclayton@apple.com> Added a new option to the "source list" command that allows us to see where
line tables specify breakpoints can be set in the source. When dumping the
source, the number of breakpoints that can be set on a source line are shown
as a prefix:

(lldb) source list -f test.c -l1 -c222 -b
1 #include <stdio.h>
2 #include <sys/fcntl.h>
3 #include <unistd.h>
4 int
5 sleep_loop (const int num_secs)
[2] 6 {
7 int i;
[1] 8 for (i=0; i<num_secs; ++i)
9 {
[1] 10 printf("%d of %i - sleep(1);\n", i, num_secs);
[1] 11 sleep(1);
12 }
13 return 0;
[1] 14 }
15
16 int
17 main (int argc, char const* argv[])
[1] 18 {
[1] 19 printf("Process: %i\n\n", getpid());
[1] 20 puts("Press any key to continue..."); getchar();
[1] 21 sleep_loop (20);
22 return 12;
[1] 23 }

Above we can see there are two breakpoints for line 6 and one breakpoint for
lines 8, 10, 11, 14, 18, 19, 20, 21 and 23. All other lines have no line table
entries for them. This helps visualize the data provided in the debug
information without having to manually dump all line tables. It also includes
all inline breakpoint that may result for a given file which can also be very
handy to see.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129747 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointResolverFileLine.h
ore/FileLineResolver.h
ore/SearchFilter.h
ore/SourceManager.h
ymbol/LineTable.h
ymbol/SymbolContext.h
abe0fed36d83e1c37af9dae90c2d25db742b4515 18-Apr-2011 Greg Clayton <gclayton@apple.com> Centralized a lot of the status information for processes,
threads, and stack frame down in the lldb_private::Process,
lldb_private::Thread, lldb_private::StackFrameList and the
lldb_private::StackFrame classes. We had some command line
commands that had duplicate versions of the process status
output ("thread list" and "process status" for example).

Removed the "file" command and placed it where it should
have been: "target create". Made an alias for "file" to
"target create" so we stay compatible with GDB commands.

We can now have multple usable targets in lldb at the
same time. This is nice for comparing two runs of a program
or debugging more than one binary at the same time. The
new command is "target select <target-idx>" and also to see
a list of the current targets you can use the new "target list"
command. The flow in a debug session can be:

(lldb) target create /path/to/exe/a.out
(lldb) breakpoint set --name main
(lldb) run
... hit breakpoint
(lldb) target create /bin/ls
(lldb) run /tmp
Process 36001 exited with status = 0 (0x00000000)
(lldb) target list
Current targets:
target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped )
* target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited )
(lldb) target select 0
Current targets:
* target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped )
target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited )
(lldb) bt
* thread #1: tid = 0x2d03, 0x0000000100000b9a a.out`main + 42 at main.c:16, stop reason = breakpoint 1.1
frame #0: 0x0000000100000b9a a.out`main + 42 at main.c:16
frame #1: 0x0000000100000b64 a.out`start + 52

Above we created a target for "a.out" and ran and hit a
breakpoint at "main". Then we created a new target for /bin/ls
and ran it. Then we listed the targest and selected our original
"a.out" program, so we showed two concurent debug sessions
going on at the same time.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129695 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/OptionGroupArchitecture.h
nterpreter/OptionGroupPlatform.h
arget/Process.h
arget/StackFrame.h
arget/StackFrameList.h
arget/TargetList.h
arget/Thread.h
e41494a9092e15192012a5e0a8a1ffd66c70b8bb 16-Apr-2011 Jim Ingham <jingham@apple.com> Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.

The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.

There's also a general setting:

target.prefer-dynamic-value (boolean) = 'true'

which is consulted if you call "frame var" without supplying a value for the -d option.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129623 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
PI/SBValue.h
ore/ValueObject.h
ore/ValueObjectConstResult.h
ore/ValueObjectDynamicValue.h
ore/ValueObjectMemory.h
arget/LanguageRuntime.h
arget/StackFrame.h
arget/Target.h
5e342f50b42b265d8568e1c926328858e74b2c0a 14-Apr-2011 Greg Clayton <gclayton@apple.com> Added auto completion for architecture names and for platforms.

Modified the OptionGroupOptions to be able to specify only some of the options
that should be appended by using the usage_mask in the group defintions and
also provided a way to remap them to a new usage mask after the copy. This
allows options to be re-used and also targetted for specific option groups.

Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration.
Taught the option parser to be able to automatically use the appropriate
auto completion for a given options if nothing is explicitly specified
in the option definition. So you don't have to specify it in the option
definition tables.

Renamed the default host platform name to "host", and the default platform
hostname to be "localhost".

Modified the "file" and "platform select" commands to make sure all options
and args are good prior to creating a new platform. Also defer the computation
of the architecture in the file command until all options are parsed and the
platform has either not been specified or reset to a new value to avoid
computing the arch more than once.

Switch the PluginManager code over to using llvm::StringRef for string
comparisons and got rid of all the AccessorXXX functions in lieu of the newer
mutex + collection singleton accessors.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129483 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
ore/Log.h
ore/PluginManager.h
nterpreter/CommandCompletions.h
nterpreter/Options.h
arget/Platform.h
ldb-enumerations.h
ldb-private-types.h
143fcc3a15425659b381502ed4e1e50a3e726f36 13-Apr-2011 Greg Clayton <gclayton@apple.com> Added two new classes for command options:

lldb_private::OptionGroup
lldb_private::OptionGroupOptions

OptionGroup lets you define a class that encapsulates settings that you want
to reuse in multiple commands. It contains only the option definitions and the
ability to set the option values, but it doesn't directly interface with the
lldb_private::Options class that is the front end to all of the CommandObject
option parsing. For that the OptionGroupOptions class can be used. It aggregates
one or more OptionGroup objects and directs the option setting to the
appropriate OptionGroup class. For an example of this, take a look at the
CommandObjectFile and how it uses its "m_option_group" object shown below
to be able to set values in both the FileOptionGroup and PlatformOptionGroup
classes. The members used in CommandObjectFile are:

OptionGroupOptions m_option_group;
FileOptionGroup m_file_options;
PlatformOptionGroup m_platform_options;

Then in the constructor for CommandObjectFile you can combine the option
settings. The code below shows a simplified version of the constructor:

CommandObjectFile::CommandObjectFile(CommandInterpreter &interpreter) :
CommandObject (...),
m_option_group (interpreter),
m_file_options (),
m_platform_options(true)
{
m_option_group.Append (&m_file_options);
m_option_group.Append (&m_platform_options);
m_option_group.Finalize();
}

We append the m_file_options and then the m_platform_options and then tell
the option group the finalize the results. This allows the m_option_group to
become the organizer of our prefs and after option parsing we end up with
valid preference settings in both the m_file_options and m_platform_options
objects. This also allows any other commands to use the FileOptionGroup and
PlatformOptionGroup classes to implement options for their commands.

Renamed:
virtual void Options::ResetOptionValues();
to:
virtual void Options::OptionParsingStarting();

And implemented a new callback named:

virtual Error Options::OptionParsingFinished();

This allows Options subclasses to verify that the options all go together
after all of the options have been specified and gives the chance for the
command object to return an error. It also gives a chance to take all of the
option values and produce or initialize objects after all options have
completed parsing.

Modfied:

virtual Error
SetOptionValue (int option_idx, const char *option_arg) = 0;

to be:

virtual Error
SetOptionValue (uint32_t option_idx, const char *option_arg) = 0;

(option_idx is now unsigned).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129415 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Options.h
arget/Process.h
b72d0f098e45936fa72e26b1a026c603e17e2d6c 12-Apr-2011 Greg Clayton <gclayton@apple.com> Moved the execution context that was in the Debugger into
the CommandInterpreter where it was always being used.

Make sure that Modules can track their object file offsets correctly to
allow opening of sub object files (like the "__commpage" on darwin).

Modified the Platforms to be able to launch processes. The first part of this
move is the platform soon will become the entity that launches your program
and when it does, it uses a new ProcessLaunchInfo class which encapsulates
all process launching settings. This simplifies the internal APIs needed for
launching. I want to slowly phase out process launching from the process
classes, so for now we can still launch just as we used to, but eventually
the platform is the object that should do the launching.

Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able
to launch processes with all of the new eLaunchFlag settings. Modified any
code that was manually launching processes to use the Host::LaunchProcess
functions.

Fixed an issue where lldb_private::Args had implicitly defined copy
constructors that could do the wrong thing. This has now been fixed by adding
an appropriate copy constructor and assignment operator.

Make sure we don't add empty ModuleSP entries to a module list.

Fixed the commpage module creation on MacOSX, but we still need to train
the MacOSX dynamic loader to not get rid of it when it doesn't have an entry
in the all image infos.

Abstracted many more calls from in ProcessGDBRemote down into the
GDBRemoteCommunicationClient subclass to make the classes cleaner and more
efficient.

Fixed the default iOS ARM register context to be correct and also added support
for targets that don't support the qThreadStopInfo packet by selecting the
current thread (only if needed) and then sending a stop reply packet.

Debugserver can now start up with a --unix-socket (-u for short) and can
then bind to port zero and send the port it bound to to a listening process
on the other end. This allows the GDB remote platform to spawn new GDB server
instances (debugserver) to allow platform debugging.







git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129351 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionFileDescriptor.h
ore/ConnectionMachPort.h
ore/Debugger.h
ore/Module.h
ost/Host.h
nterpreter/Args.h
nterpreter/CommandInterpreter.h
arget/Platform.h
arget/Process.h
ldb-enumerations.h
ldb-forward.h
dbeb3e1e038a75f00fd565203839020e1d00a7c6 11-Apr-2011 Stephen Wilson <wilsons@start.ca> Order of initialization lists.

This patch fixes all of the warnings due to unordered initialization lists.

Patch by Marco Minutoli.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129290 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/DWARFCallFrameInfo.h
tility/CleanUp.h
d7d3af7201c7aed2ddd0ade31ae5d3543994c55b 11-Apr-2011 Stephen Wilson <wilsons@start.ca> Fix struct vs. class warning.

ParserVars is declared using the class keyword. This solves the warning.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129289 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
1f954f59df9ce7bf58d0353ab0949656561210d4 11-Apr-2011 Caroline Tice <ctice@apple.com> Implement ARM emulation function to handle "SUBS PC, LR and related instructions".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129279 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
0fe5a535b87841a5c422f4a79d55c21bf07b50ca 09-Apr-2011 Caroline Tice <ctice@apple.com> Fix various things in the instruction emulation code:

- Add ability to control whether or not the emulator advances the
PC register (in the emulation state), if the instruction itself
does not change the pc value..

- Fix a few typos in asm description strings.

- Fix bug in the carry flag calculation.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129168 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBInstruction.h
ore/Disassembler.h
ore/EmulateInstruction.h
ec2d9787bed36e9eda6eac1996c7bed76c8d3da4 08-Apr-2011 Stephen Wilson <wilsons@start.ca> Add missing headers.

Something changed in commit r129112 where a few standard headers vanished from
the include chain when building on Linux. Fix up by including limits.h for
INT_MAX and PATH_MAX where needed, and stdio.h for printf().



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129130 91177308-0d34-0410-b5e6-96231b3b80d8
ore/StreamTee.h
ore/StringList.h
f15996eea072cdaa8a092f22d3a1212b3d95f0ec 08-Apr-2011 Greg Clayton <gclayton@apple.com> Modified the ArchSpec to take an optional "Platform *" when setting the triple.
This allows you to have a platform selected, then specify a triple using
"i386" and have the remaining triple items (vendor, os, and environment) set
automatically.

Many interpreter commands take the "--arch" option to specify an architecture
triple, so now the command options needed to be able to get to the current
platform, so the Options class now take a reference to the interpreter on
construction.

Modified the build LLVM building in the Xcode project to use the new
Xcode project level user definitions:

LLVM_BUILD_DIR - a path to the llvm build directory
LLVM_SOURCE_DIR - a path to the llvm sources for the llvm that will be used to build lldb
LLVM_CONFIGURATION - the configuration that lldb is built for (Release,
Release+Asserts, Debug, Debug+Asserts).

I also changed the LLVM build to not check if "lldb/llvm" is a symlink and
then assume it is a real llvm build directory versus the unzipped llvm.zip
package, so now you can actually have a "lldb/llvm" directory in your lldb
sources.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129112 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointOptions.h
ore/ArchSpec.h
ore/STLUtils.h
xpression/ClangExpressionDeclMap.h
nterpreter/Options.h
arget/Target.h
ldb-forward.h
baf01e0ba101b98764a1eb62f45e739f0d1a1e89 07-Apr-2011 Stephen Wilson <wilsons@start.ca> Removed use of NSEC_PER_SEC.

NSEC_PER_SEC is not defined in sys/time.h on Linux. Replaced that macro with a
static constant inside TimeValue.

Patch by Marco Minutoli.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129071 91177308-0d34-0410-b5e6-96231b3b80d8
ost/TimeValue.h
af59180d46b42665dba3ea581fc501bb9fcb1fb7 06-Apr-2011 Caroline Tice <ctice@apple.com> Add Emulate and DumpEmulation to Instruction class.

Move InstructionLLVM out of DisassemblerLLVM class.

Add instruction emulation function calls to SBInstruction and SBInstructionList APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128956 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
PI/SBInstruction.h
PI/SBInstructionList.h
ore/Disassembler.h
ea69d6ddc37e25d57973699463110b6c3233f0a0 05-Apr-2011 Caroline Tice <ctice@apple.com> Convert "process" read/write callback functions to "frame" read/write callback functions.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128917 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
080bf61255afcffd7ccfe0402d3715f77f6627b9 05-Apr-2011 Caroline Tice <ctice@apple.com> Add the rest of the mechanisms to make ARM instruction emulation usable/possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128907 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
06d7cc86937caca0acf2b990a02a641dc9c7579a 04-Apr-2011 Greg Clayton <gclayton@apple.com> Added a speed test to the GDBRemoteCommunicationClient and
GDBRemoteCommunicationServer classes. This involved adding a new packet
named "qSpeedTest" which can test the speed of a packet send/response pairs
using a wide variety of send/recv packet sizes.

Added a few new connection classes: one for shared memory, and one for using
mach messages (Apple only). The mach message stuff is experimental and not
working yet, but added so I don't lose the code. The shared memory stuff
uses pretty standard calls to setup shared memory.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128837 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionMachPort.h
ore/ConnectionSharedMemory.h
ore/DataBufferMemoryMap.h
257082556976558deb1cb246d45c2ae1bdd7b34c 01-Apr-2011 Greg Clayton <gclayton@apple.com> Some OpenBSD patches from Amit Kulkarni.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128721 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Config.h
919ee60577297be31eb69f14a5901e7c6170a9ca 01-Apr-2011 Johnny Chen <johnny.chen@apple.com> Add TestSymbolAPI.py to test the newly added SBSymbol and SBAddress APIs:

lldb::SymbolType SBSymbol::GetType();

lldb::SectionType SBAddress::GetSectionType ();
lldb::SBModule SBAddress::GetModule ();

Also add an lldb::SBModule::GetUUIDString() API which is easier for Python
to work with in the test script.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128695 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBModule.h
ff39f746ebaa3710c44ba49bd9b0a6cf05f60a3f 01-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability to get a broadcaster event name for a given broadcaster
event.

Modified the ProcessInfo structure to contain all process arguments. Using the
new function calls on MacOSX allows us to see the full process name, not just
the first 16 characters.

Added a new platform command: "platform process info <pid> [<pid> <pid> ...]"
that can be used to get detailed information for a process including all
arguments, user and group info and more.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128694 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Broadcaster.h
arget/Process.h
0de37195f17fefb536157b3296a18999116b8125 01-Apr-2011 Jim Ingham <jingham@apple.com> Remove unneeded ExecutionContextScope variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128685 91177308-0d34-0410-b5e6-96231b3b80d8
arget/CPPLanguageRuntime.h
arget/LanguageRuntime.h
b0e68d996b28cf81a28aeceefd69f7ed8d4aba99 31-Mar-2011 Greg Clayton <gclayton@apple.com> Added some functions to our API related to classifying symbols as code, data,
const data, etc, and also for SBAddress objects to classify their type of
section they are in and also getting the module for a section offset address.

lldb::SymbolType SBSymbol::GetType();

lldb::SectionType SBAddress::GetSectionType ();
lldb::SBModule SBAddress::GetModule ();




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128602 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBModule.h
PI/SBSymbol.h
ore/Module.h
ore/ModuleList.h
ore/Section.h
ymbol/Symbol.h
ymbol/Symtab.h
ldb-enumerations.h
ldb-private-enumerations.h
ldb-private.h
fa3a16a2ea380ef38388ebe323817bd1b32c20cd 31-Mar-2011 Jim Ingham <jingham@apple.com> Convert ValueObject to explicitly maintain the Execution Context in which they were created, and then use that when they update themselves. That means all the ValueObject evaluate me type functions that used to require a Frame object now do not. I didn't remove the SBValue API's that take this now useless frame, but I added ones that don't require the frame, and marked the SBFrame taking ones as deprecated.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128593 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectRegister.h
ore/ValueObjectVariable.h
xpression/ClangExpressionVariable.h
xpression/ClangPersistentVariables.h
arget/ExecutionContext.h
arget/StackID.h
5c4b1607e8783a3d3f1f28fa66fcaa89ac246bd1 31-Mar-2011 Jim Ingham <jingham@apple.com> Add GetFrameWithStackID to the StackFrameList and the Thread (which routes to its StackFrameList.)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128592 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrameList.h
arget/Thread.h
b5871fe4d11a06d5f468a607059a361cbdc25e1d 31-Mar-2011 Jim Ingham <jingham@apple.com> Add a LaunchSimple API that is nicer to use for quick scripts.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128588 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
24bc5d9bfad2a1c562c27e7cf37e1c56d85c45e7 30-Mar-2011 Greg Clayton <gclayton@apple.com> Many improvements to the Platform base class and subclasses. The base Platform
class now implements the Host functionality for a lot of things that make
sense by default so that subclasses can check:

int
PlatformSubclass::Foo ()
{
if (IsHost())
return Platform::Foo (); // Let the platform base class do the host specific stuff

// Platform subclass specific code...
int result = ...
return result;
}

Added new functions to the platform:

virtual const char *Platform::GetUserName (uint32_t uid);
virtual const char *Platform::GetGroupName (uint32_t gid);

The user and group names are cached locally so that remote platforms can avoid
sending packets multiple times to resolve this information.

Added the parent process ID to the ProcessInfo class.

Added a new ProcessInfoMatch class which helps us to match processes up
and changed the Host layer over to using this new class. The new class allows
us to search for processs:
1 - by name (equal to, starts with, ends with, contains, and regex)
2 - by pid
3 - And further check for parent pid == value, uid == value, gid == value,
euid == value, egid == value, arch == value, parent == value.

This is all hookup up to the "platform process list" command which required
adding dumping routines to dump process information. If the Host class
implements the process lookup routines, you can now lists processes on
your local machine:

machine1.foo.com % lldb
(lldb) platform process list
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME
====== ====== ========== ========== ========== ========== ======================== ============================
99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge
94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker
94852 244 username usergroup username usergroup x86_64-apple-darwin Safari
94727 244 username usergroup username usergroup x86_64-apple-darwin Xcode
92742 92710 username usergroup username usergroup i386-apple-darwin debugserver


This of course also works remotely with the lldb-platform:

machine1.foo.com % lldb-platform --listen 1234

machine2.foo.com % lldb
(lldb) platform create remote-macosx
Platform: remote-macosx
Connected: no
(lldb) platform connect connect://localhost:1444
Platform: remote-macosx
Triple: x86_64-apple-darwin
OS Version: 10.6.7 (10J869)
Kernel: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386
Hostname: machine1.foo.com
Connected: yes
(lldb) platform process list
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME
====== ====== ========== ========== ========== ========== ======================== ============================
99556 244 username usergroup username usergroup x86_64-apple-darwin trustevaluation
99548 65539 username usergroup username usergroup x86_64-apple-darwin lldb
99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge
94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker
94852 244 username usergroup username usergroup x86_64-apple-darwin Safari

The lldb-platform implements everything with the Host:: layer, so this should
"just work" for linux. I will probably be adding more stuff to the Host layer
for launching processes and attaching to processes so that this support should
eventually just work as well.

Modified the target to be able to be created with an architecture that differs
from the main executable. This is needed for iOS debugging since we can have
an "armv6" binary which can run on an "armv7" machine, so we want to be able
to do:

% lldb
(lldb) platform create remote-ios
(lldb) file --arch armv7 a.out

Where "a.out" is an armv6 executable. The platform then can correctly decide
to open all "armv7" images for all dependent shared libraries.

Modified the disassembly to show the current PC value. Example output:

(lldb) disassemble --frame
a.out`main:
0x1eb7: pushl %ebp
0x1eb8: movl %esp, %ebp
0x1eba: pushl %ebx
0x1ebb: subl $20, %esp
0x1ebe: calll 0x1ec3 ; main + 12 at test.c:18
0x1ec3: popl %ebx
-> 0x1ec4: calll 0x1f12 ; getpid
0x1ec9: movl %eax, 4(%esp)
0x1ecd: leal 199(%ebx), %eax
0x1ed3: movl %eax, (%esp)
0x1ed6: calll 0x1f18 ; printf
0x1edb: leal 213(%ebx), %eax
0x1ee1: movl %eax, (%esp)
0x1ee4: calll 0x1f1e ; puts
0x1ee9: calll 0x1f0c ; getchar
0x1eee: movl $20, (%esp)
0x1ef5: calll 0x1e6a ; sleep_loop at test.c:6
0x1efa: movl $12, %eax
0x1eff: addl $20, %esp
0x1f02: popl %ebx
0x1f03: leave
0x1f04: ret

This can be handy when dealing with the new --line options that was recently
added:

(lldb) disassemble --line
a.out`main + 13 at test.c:19
18 {
-> 19 printf("Process: %i\n\n", getpid());
20 puts("Press any key to continue..."); getchar();
-> 0x1ec4: calll 0x1f12 ; getpid
0x1ec9: movl %eax, 4(%esp)
0x1ecd: leal 199(%ebx), %eax
0x1ed3: movl %eax, (%esp)
0x1ed6: calll 0x1f18 ; printf

Modified the ModuleList to have a lookup based solely on a UUID. Since the
UUID is typically the MD5 checksum of a binary image, there is no need
to give the path and architecture when searching for a pre-existing
image in an image list.

Now that we support remote debugging a bit better, our lldb_private::Module
needs to be able to track what the original path for file was as the platform
knows it, as well as where the file is locally. The module has the two
following functions to retrieve both paths:

const FileSpec &Module::GetFileSpec () const;
const FileSpec &Module::GetPlatformFileSpec () const;





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128563 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
ore/Module.h
ore/ModuleList.h
ost/Host.h
nterpreter/Options.h
arget/Platform.h
arget/Process.h
arget/Target.h
ldb-forward.h
029bc71e61adbec91b920e488459aad3fad63ffb 30-Mar-2011 Stephen Wilson <wilsons@start.ca> give subclasses access to UnixSignals::m_signals

Allow subclasses of UnixSignals to access m_signals by marking the member
protected instead of private. This enables a subclass to provide a default
signal set as appropriate on construction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128544 91177308-0d34-0410-b5e6-96231b3b80d8
arget/UnixSignals.h
d05b4903bb95b07e709986961fe387921dd0e029 29-Mar-2011 Caroline Tice <ctice@apple.com> Add subtraction context.

Add code to emulate SUB (SP minus register) ARM instruction.

Add stubs for other ARM emulation functions that need to be written.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128491 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
17842eccfd2f2fb95d314c0b69e6f2bb13a509fa 28-Mar-2011 Stephen Wilson <wilsons@start.ca> Add a missing include required on Linux



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128400 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Opcode.h
889fbd0581c24523642e0a04d659cc8f3dcdb4ed 26-Mar-2011 Greg Clayton <gclayton@apple.com> Added the ability to get the min and max instruction byte size for
an architecture into ArchSpec:

uint32_t
ArchSpec::GetMinimumOpcodeByteSize() const;

uint32_t
ArchSpec::GetMaximumOpcodeByteSize() const;

Added an AddressClass to the Instruction class in Disassembler.h.
This allows decoded instructions to know know if they are code,
code with alternate ISA (thumb), or even data which can be mixed
into code. The instruction does have an address, but it is a good
idea to cache this value so we don't have to look it up more than
once.

Fixed an issue in Opcode::SetOpcodeBytes() where the length wasn't
getting set.

Changed:

bool
SymbolContextList::AppendIfUnique (const SymbolContext& sc);

To:
bool
SymbolContextList::AppendIfUnique (const SymbolContext& sc,
bool merge_symbol_into_function);

This function was typically being used when looking up functions
and symbols. Now if you lookup a function, then find the symbol,
they can be merged into the same symbol context and not cause
multiple symbol contexts to appear in a symbol context list that
describes the same function.

Fixed the SymbolContext not equal operator which was causing mixed
mode disassembly to not work ("disassembler --mixed --name main").

Modified the disassembler classes to know about the fact we know,
for a given architecture, what the min and max opcode byte sizes
are. The InstructionList class was modified to return the max
opcode byte size for all of the instructions in its list.
These two fixes means when disassemble a list of instructions and dump
them and show the opcode bytes, we can format the output more
intelligently when showing opcode bytes. This affects any architectures
that have varying opcode byte sizes (x86_64 and i386). Knowing the max
opcode byte size also helps us to be able to disassemble N instructions
without having to re-read data if we didn't read enough bytes.

Added the ability to set the architecture for the disassemble command.
This means you can easily cross disassemble data for any supported
architecture. I also added the ability to specify "thumb" as an
architecture so that we can force disassembly into thumb mode when
needed. In GDB this was done using a hack of specifying an odd
address when disassembling. I don't want to repeat this hack in LLDB,
so the auto detection between ARM and thumb is failing, just specify
thumb when disassembling:

(lldb) disassemble --arch thumb --name main

You can also have data in say an x86_64 file executable and disassemble
data as any other supported architecture:
% lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) b main
(lldb) run
(lldb) disassemble --arch thumb --count 2 --start-address 0x0000000100001080 --bytes
0x100001080: 0xb580 push {r7, lr}
0x100001082: 0xaf00 add r7, sp, #0

Fixed Target::ReadMemory(...) to be able to deal with Address argument object
that isn't section offset. When an address object was supplied that was
out on the heap or stack, target read memory would fail. Disassembly uses
Target::ReadMemory(...), and the example above where we disassembler thumb
opcodes in an x86 binary was failing do to this bug.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128347 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
ore/Disassembler.h
ore/Opcode.h
ymbol/SymbolContext.h
ba083b2404ce8753548c5d8c606e25e821f1d6ef 26-Mar-2011 Stephen Wilson <wilsons@start.ca> Add a missing include required on Linux


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128311 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Opcode.h
149731c0b267e5b6cd7192cbfac0c7f457ae5cfc 25-Mar-2011 Greg Clayton <gclayton@apple.com> Cleaned up the Disassembler code a bit more. You can now request a disassembler
plugin by name on the command line for when there is more than one disassembler
plugin.

Taught the Opcode class to dump itself so that "disassembler -b" will dump
the bytes correctly for each opcode type. Modified all places that were passing
the opcode bytes buffer in so that the bytes could be displayed to just pass
in a bool that indicates if we should dump the opcode bytes since the opcode
now lives inside llvm_private::Instruction.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128290 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
ore/Opcode.h
7bc390873f7c1c798c36c8003c4b82597f67c703 25-Mar-2011 Greg Clayton <gclayton@apple.com> Made the lldb_private::Opcode struct into a real boy... I mean class.

Modified the Disassembler::Instruction base class to contain an Opcode
instance so that we can know the bytes for an instruction without needing
to keep the data around.

Modified the DisassemblerLLVM's instruction class to correctly extract the
opcode bytes if all goes well.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128248 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
ore/EmulateInstruction.h
ore/Opcode.h
ldb-private-types.h
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't needed, and allows us to
abstract our API better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ore/ArchSpec.h
ore/Baton.h
ore/Debugger.h
ore/EmulateInstruction.h
ore/InputReader.h
ore/Module.h
ore/ModuleList.h
ore/Section.h
ore/UserSettingsController.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectConstResult.h
ore/ValueObjectRegister.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/ClangExpressionVariable.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/IRForTarget.h
xpression/IRToDWARF.h
ost/Host.h
nterpreter/Args.h
nterpreter/CommandObject.h
nterpreter/Options.h
ymbol/ClangASTType.h
ymbol/ClangNamespaceDecl.h
ymbol/ObjectFile.h
ymbol/Symbol.h
ymbol/Symtab.h
ymbol/Type.h
arget/LanguageRuntime.h
arget/ObjCLanguageRuntime.h
arget/Platform.h
arget/Process.h
arget/RegisterContext.h
arget/SectionLoadList.h
arget/StopInfo.h
arget/Target.h
arget/Thread.h
arget/ThreadList.h
arget/ThreadPlan.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepInstruction.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepRange.h
arget/ThreadPlanTestCondition.h
tility/CleanUp.h
ldb-defines.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
ldb-include.h
ldb-private-enumerations.h
ldb-private-interfaces.h
ldb-private-log.h
ldb-private-types.h
ldb-private.h
ldb-public.h
ldb-types.h
58e26e0935138225477fd61283215ceff2068899 24-Mar-2011 Greg Clayton <gclayton@apple.com> Did a lot more work on abtracting and organizing the platforms.

On Mac OS X we now have 3 platforms:
PlatformDarwin - must be subclassed to fill in the missing pure virtual funcs
but this implements all the common functionality between
remote-macosx and remote-ios. It also allows for another
platform to be used (remote-gdb-server for now) when doing
remote connections. Keeping this pluggable will allow for
flexibility.
PlatformMacOSX - Now implements both local and remote macosx desktop platforms.
PlatformRemoteiOS - Remote only iOS that knows how to locate SDK files in the
cached SDK locations on the host.

A new agnostic platform has been created:
PlatformRemoteGDBServer - this implements the platform using the GDB remote
protocol and uses the built in lldb_private::Host
static functions to implement many queries.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128193 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
arget/Platform.h
47f07856222a1d2032ecfb346f04836b3660d449 23-Mar-2011 Stephen Wilson <wilsons@start.ca> Eliminate a pile of "type qualifiers ignored on function return type" warnings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128136 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
cb8977d726be451df9978a74088435667fa37da2 23-Mar-2011 Greg Clayton <gclayton@apple.com> Added new platform commands:

platform connect <args>
platform disconnect

Each platform can decide the args they want to use for "platform connect". I
will need to add a function that gets the connect options for the current
platform as each one can have different options and argument counts.

Hooked up more functionality in the PlatformMacOSX and PlatformRemoteiOS.
Also started an platform agnostic PlatformRemoteGDBServer.cpp which can end
up being used by one or more actual platforms. It can also be specialized and
allow for platform specific commands.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128123 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Platform.h
aa3e3e1f0f3be95c79f902c5331e11878f66b365 22-Mar-2011 Jim Ingham <jingham@apple.com> Add the ability to disassemble "n" instructions from the current PC, or the first "n" instructions in a function.
Also added a "-p" flag that disassembles from the current pc.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128063 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
e86cbb9ef128db87cf904e330b2edfc15566bacd 22-Mar-2011 Greg Clayton <gclayton@apple.com> Abtracted the innards of lldb-core away from the SB interface. There was some
overlap in the SWIG integration which has now been fixed by introducing
callbacks for initializing SWIG for each language (python only right now).
There was also a breakpoint command callback that called into SWIG which has
been abtracted into a callback to avoid cross over as well.

Added a new binary: lldb-platform

This will be the start of the remote platform that will use as much of the
Host functionality to do its job so it should just work on all platforms.
It is pretty hollowed out for now, but soon it will implement a platform
using the GDB remote packets as the transport.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128053 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpointLocation.h
PI/SBCommandInterpreter.h
PI/SBFrame.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
a733c04608cc94592a15d27583529588e19db552 21-Mar-2011 Greg Clayton <gclayton@apple.com> Added real user/group id, effective user/group id, and parent
process ID to the ProcessInfo.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128023 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
b1888f24fa181489840b9acf193e224d125d0776 19-Mar-2011 Greg Clayton <gclayton@apple.com> Added more platform support. There are now some new commands:

platform status -- gets status information for the selected platform
platform create <platform-name> -- creates a new instance of a remote platform
platform list -- list all available platforms
platform select -- select a platform instance as the current platform (not working yet)

When using "platform create" it will create a remote platform and make it the
selected platform. For instances for iPhone OS debugging on Mac OS X one can
do:

(lldb) platform create remote-ios --sdk-version=4.0
Remote platform: iOS platform
SDK version: 4.0
SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0"
Not connected to a remote device.
(lldb) file ~/Documents/a.out
Current executable set to '~/Documents/a.out' (armv6).
(lldb) image list
[ 0] /Volumes/work/gclayton/Documents/devb/attach/a.out
[ 1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld
[ 2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib


Note that this is all happening prior to running _or_ connecting to a remote
platform. Once connected to a remote platform the OS version might change which
means we will need to update our dependecies. Also once we run, we will need
to match up the actualy binaries with the actualy UUID's to files in the
SDK, or download and cache them locally.

This is just the start of the remote platforms, but this modification is the
first iteration in getting the platforms really doing something.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127934 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ore/ArchSpec.h
ore/Debugger.h
ost/Host.h
nterpreter/Args.h
ymbol/ObjectFile.h
arget/Platform.h
arget/Process.h
arget/Target.h
ldb-enumerations.h
ldb-forward.h
70c55622e15857e232cf4777a502fa5fe40e785b 18-Mar-2011 Jim Ingham <jingham@apple.com> Relax the constraint on the types of ValueObjects that we'll by default try the
ObjC runtime for print object to Pointer AND Integer (from just pointer.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127841 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
53bfd064c90a795485809a9be7dfbeaccb7ce369 17-Mar-2011 Jim Ingham <jingham@apple.com> Get ObjC stepping working again when the process is not the default host architecture.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127825 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangFunction.h
8ce836dbf416c4dfdbede109be5cc09b95918fd0 16-Mar-2011 Caroline Tice <ctice@apple.com> Add code to emulate STRH (Register) Arm instruction.

Remove inaccurate comments from EmulateInstruction::Context definition.

Fix contexts in a few arm instruction emulation routines.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127770 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
dd506e1674073ea3eaec680d5a87d5589ea08362 15-Mar-2011 Greg Clayton <gclayton@apple.com> Added a fix to not re-use object files when doing DWARF with debug map.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127659 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
279584cdea3dfda933480ed0fe948df2697ab512 15-Mar-2011 Sean Callanan <scallanan@apple.com> Updated to LLVM/Clang revision 127600.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127634 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ClangExpressionParser.h
f6aaf7de798144df2a04d6630dfa1cd0acf33350 13-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Turn labels into actual switch cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127558 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
d60d94a5126b93fda98678a68322abc2164073db 11-Mar-2011 Jim Ingham <jingham@apple.com> Add a first pass at a "stop hook" mechanism. This allows you to add commands that get run every time the debugger stops, whether due to a breakpoint, the end of a step, interrupt, etc. You can also specify in which context you want the stop hook to run, for instance only on a particular thread, or only in a particular shared library, function, file, line range within a file.

Still need to add "in methods of a class" to the specifiers, and the ability to write the stop hooks in the Scripting language as well as in the Command Language.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127457 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/SymbolContext.h
arget/Target.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
a4fede31869663e889d67ace3d07dc5d3e4ea2b8 11-Mar-2011 Jim Ingham <jingham@apple.com> CommandInterpreter::HandleCommands should take its commands as a "const StringList &" since it doesn't modify it...

Also, don't turn on the immediate output in the temporary result, or you'll get doubled output.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127452 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
8053904ed2fbe199caea70bc523577843c6395eb 11-Mar-2011 Jim Ingham <jingham@apple.com> Declare some const functions as const.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127450 91177308-0d34-0410-b5e6-96231b3b80d8
ore/StringList.h
a5268237caa48d08579c7690577468e36e6ccbd1 11-Mar-2011 Jim Ingham <jingham@apple.com> Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127449 91177308-0d34-0410-b5e6-96231b3b80d8
ost/FileSpec.h
a846cc3c9e57124838fed9793e7fd4610b8da9d7 11-Mar-2011 Sean Callanan <scallanan@apple.com> Fixed the -r parameter to the disassemble command
so that it actually triggers raw output.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127433 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Disassembler.h
2a456816c5d7c575f2e141acd48bb5f8085d9910 10-Mar-2011 Caroline Tice <ctice@apple.com> The UserSettings controllers must be initialized & terminated in the
correct order. Previously this was tacitly implemented but not
enforced, so it was possible to accidentally do things in the wrong
order and cause problems. This fixes that problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127430 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
arget/Process.h
arget/Target.h
arget/Thread.h
e4b9c1fb338ee1ada72e6a3c198afb342d68c5c1 08-Mar-2011 Greg Clayton <gclayton@apple.com> LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provide
an interface to a local or remote debugging platform. By default each host OS
that supports LLDB should be registering a "default" platform that will be
used unless a new platform is selected. Platforms are responsible for things
such as:
- getting process information by name or by processs ID
- finding platform files. This is useful for remote debugging where there is
an SDK with files that might already or need to be cached for debug access.
- getting a list of platform supported architectures in the exact order they
should be selected. This helps the native x86 platform on MacOSX select the
correct x86_64/i386 slice from universal binaries.
- Connect to remote platforms for remote debugging
- Resolving an executable including finding an executable inside platform
specific bundles (macosx uses .app bundles that contain files) and also
selecting the appropriate slice of universal files for a given platform.

So by default there is always a local platform, but remote platforms can be
connected to. I will soon be adding a new "platform" command that will support
the following commands:
(lldb) platform connect --name machine1 macosx connect://host:port
Connected to "machine1" platform.
(lldb) platform disconnect macosx

This allows LLDB to be well setup to do remote debugging and also once
connected process listing and finding for things like:
(lldb) process attach --name x<TAB>

The currently selected platform plug-in can now auto complete any available
processes that start with "x". The responsibilities for the platform plug-in
will soon grow and expand.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127286 91177308-0d34-0410-b5e6-96231b3b80d8
ore/AddressResolver.h
ore/AddressResolverName.h
ore/Error.h
ore/PluginInterface.h
ore/PluginManager.h
ost/Host.h
ymbol/SymbolVendor.h
arget/Platform.h
arget/Process.h
arget/TargetList.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
ldb-private-interfaces.h
ldb-private.h
e45140f9916841ea356ef707541945efa20ba042 08-Mar-2011 Jim Ingham <jingham@apple.com> I didn't notice there was already an ObjectFile::GetEntryPoint. Move that over to GetEntryPointAddress 'cause that's more consistent with other functions in ObjectFile, do the mutatis mutandi and also in the ELF case I return a section offset address rather than a bare load address.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127205 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ObjectFile.h
2877594f4442cfc4d0ed2abd30af6b8027a84fc1 08-Mar-2011 Jim Ingham <jingham@apple.com> Add a method "GetEntryPoint" to the ObjectFile class, and implement it on MachO & ELF - though the ELF implementation is probably a little weak. Then use this method in place of directly looking for "start" in the ThreadPlanCallFunction constructor to find the stopping point for our function evaluation.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127194 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ObjectFile.h
3809340ce8954dbeaf24907ece29cd6b179143ea 04-Mar-2011 James McIlree <jmcilree@apple.com> Expose ConnectRemote API through SBTarget and SBProcess.
Patch verified by Greg Clayton prior to checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126974 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBProcess.h
PI/SBTarget.h
b27771da2fe3256f4a64729ecec05946c27c1a0a 03-Mar-2011 Caroline Tice <ctice@apple.com> Add code to emulate RFE Arm instruction.

Add new instruction context for RFE instruction.

Add several new helper functions to help emulate RFE instruction
(including CurrentModeIsPrivileged, BadMode, and CPSRWriteByInstr).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126965 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
dcc11b3b8882b3522244a25d2915c9086b44e596 03-Mar-2011 Caroline Tice <ctice@apple.com> Add code to emulate ADD (immediate, Thumb) Arm instruction.

Add addition context to EmulateInstruction contexts.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126903 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
89f1aa732c8b1df90cbbfe116b6f06cf80a25ae3 03-Mar-2011 Greg Clayton <gclayton@apple.com> Export the ability to get the start and end addresses for functions
and symbols, and also allow clients to get the prologue size in bytes:

SBAddress
SBFunction::GetStartAddress ();

SBAddress
SBFunction::GetEndAddress ();

uint32_t
SBFunction::GetPrologueByteSize ();

SBAddress
SBSymbol::GetStartAddress ();

SBAddress
SBSymbol::GetEndAddress ();

uint32_t
SBSymbol::GetPrologueByteSize ();



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126892 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBFunction.h
PI/SBSymbol.h
5c1e2edcc5230fbf0995efcc32e9c0548a97a2d2 02-Mar-2011 Caroline Tice <ctice@apple.com> Add code to emulate MUL Arm instruction.

Add new context type & info structure for mul instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126891 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
afb8186acfef6132174ca02d357fafd36b599ca3 02-Mar-2011 Greg Clayton <gclayton@apple.com> Added a missing API call in SBTarget that enables one to get
anything in a SBSymbolContext filled in given an SBAddress:

SBSymbolContext
SBTarget::ResolveSymbolContextForAddress (const SBAddress& addr, uint32_t resolve_scope);

Also did a little cleanup on the ProcessGDBRemote stdio file handle
code.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126885 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSymbolContext.h
PI/SBTarget.h
c7129c3ca353eb7f0bc8c2aa0d99b54de21b9de6 02-Mar-2011 Jim Ingham <jingham@apple.com> Add some function docs.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126868 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
60a544f23362d4f2fbe1e68b9c5340aa5e11302c 01-Mar-2011 Johnny Chen <johnny.chen@apple.com> Add an API SBProcess::GetByteOrder() and add test cases which utilizes GetByteOrder(),
among other SBProcess APIs, to write (int)256 into a memory location of a global variable
(int)my_int and reads/checks the variable afterwards.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126792 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBProcess.h
a2f7423310044cf76d8d52aa9153b7fd8b226b49 24-Feb-2011 Greg Clayton <gclayton@apple.com> Fixed CommandReturnObject::SetImmediateErrorFile() to set the correct stream.

Modifed lldb_private::Process to be able to handle connecting to a remote
target that isn't running a process. This leaves lldb_private::Process in the
eStateConnected state from which we can then do an attach or launch.

Modified ProcessGDBRemote to be able to set stdin, stdout, stderr, working
dir, disable ASLR and a few other settings down by using new GDB remote
packets. This allows us to keep all of our current launch flags and settings
intact and still be able to communicate them over to the remote GDB server.
Previously these were being sent as arguments to the debugserver binary that
we were spawning. Also modified ProcessGDBRemote to handle losing connection
to the remote GDB server and always exit immediately. We do this by watching
the lldb_private::Communication event bit for the read thread exiting in the
ProcessGDBRemote async thread.

Added support for many of the new 'Q' packets for setting stdin, stdout,
stderr, working dir and disable ASLR to the GDBRemoteCommunication class for
easy accesss.

Modified debugserver for all of the new 'Q' packets and also made it so that
debugserver always exists if it loses connection with the remote debugger.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126444 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Stream.h
nterpreter/CommandReturnObject.h
arget/Process.h
b7af465a97de8d110074f0c814d65ce4416ca9ab 24-Feb-2011 Stephen Wilson <wilsons@start.ca> ArchSpec: Do not depend on Host::GetArchitecture.

The major issue this patch solves is that ArchSpec::SetTriple no longer depends
on the implementation of Host::GetArchitecture. On linux, Host::GetArchitecture
calls ArchSpec::SetTriple, thus blowing the stack.

A second smaller point is that SetTriple now defaults to Host defined components
iff all OS, vendor and environment fields are not set.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126403 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
940b103224f3062578c7a7e6e76d8bf4a7956f2a 23-Feb-2011 Greg Clayton <gclayton@apple.com> Abtracted all mach-o and ELF out of ArchSpec. This patch is a modified form
of Stephen Wilson's idea (thanks for the input Stephen!). What I ended up
doing was:
- Got rid of ArchSpec::CPU (which was a generic CPU enumeration that mimics
the contents of llvm::Triple::ArchType). We now rely upon the llvm::Triple
to give us the machine type from llvm::Triple::ArchType.
- There is a new ArchSpec::Core definition which further qualifies the CPU
core we are dealing with into a single enumeration. If you need support for
a new Core and want to debug it in LLDB, it must be added to this list. In
the future we can allow for dynamic core registration, but for now it is
hard coded.
- The ArchSpec can now be initialized with a llvm::Triple or with a C string
that represents the triple (it can just be an arch still like "i386").
- The ArchSpec can still initialize itself with a architecture type -- mach-o
with cpu type and subtype, or ELF with e_machine + e_flags -- and this will
then get translated into the internal llvm::Triple::ArchSpec + ArchSpec::Core.
The mach-o cpu type and subtype can be accessed using the getter functions:

uint32_t
ArchSpec::GetMachOCPUType () const;

uint32_t
ArchSpec::GetMachOCPUSubType () const;

But these functions are just converting out internal llvm::Triple::ArchSpec
+ ArchSpec::Core back into mach-o. Same goes for ELF.

All code has been updated to deal with the changes.

This should abstract us until later when the llvm::TargetSpec stuff gets
finalized and we can then adopt it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126278 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
arget/Target.h
aa378b1f53f8b557ceab403e31e6c9ef9a20b77d 20-Feb-2011 Greg Clayton <gclayton@apple.com> Don't limit StreamTee to just two streams. It now can contain
N streams by making the stream a vector of stream shared pointers
that is protected by a mutex. Streams can be get/set by index which
allows indexes to be defined as stream indentifiers. If a stream is
set at index 3 and there are now streams in the collection, then
empty stream objects are inserted to ensure that stream at index 3
has a valid stream. There is also an append method that allows a stream
to be pushed onto the stack. This will allow our streams to be very
flexible in where the output goes.

Modified the CommandReturnObject to use the new StreamTee functionality.
This class now defines two StreamTee indexes: 0 for the stream string
stream, and 1 for the immediate stream. This is used both on the output
and error streams.

Added the ability to get argument types as strings or as descriptions.
This is exported through the SBCommandInterpreter API to allow external
access.

Modified the Driver class to use the newly exported argument names from
SBCommandInterpreter::GetArgumentTypeAsCString().



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126067 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandInterpreter.h
ore/StreamTee.h
nterpreter/CommandObject.h
nterpreter/CommandReturnObject.h
2e8cb8a7342a2ea672792067d712a794e215a3a7 19-Feb-2011 Jim Ingham <jingham@apple.com> - Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126015 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandReturnObject.h
PI/SBStream.h
ore/StreamTee.h
ore/UserSettingsController.h
nterpreter/CommandReturnObject.h
ymbol/SymbolContext.h
d284b663aa7d08b4f767de5ffa6289f33fcbcce7 18-Feb-2011 Greg Clayton <gclayton@apple.com> Added new target instance settings for execution settings:

Targets can now specify some additional parameters for when we debug
executables that can help with plug-in selection:

target.execution-level = auto | user | kernel
target.execution-mode = auto | dynamic | static
target.execution-os-type = auto | none | halted | live

On some systems, the binaries that are created are the same wether you use
them to debug a kernel, or a user space program. Many times inspecting an
object file can reveal what an executable should be. For these cases we can
now be a little more complete by specifying wether to detect all of these
things automatically (inspect the main executable file and select a plug-in
accordingly), or manually to force the selection of certain plug-ins.

To do this we now allow the specficifation of wether one is debugging a user
space program (target.execution-level = user) or a kernel program
(target.execution-level = kernel).

We can also specify if we want to debug a program where shared libraries
are dynamically loaded using a DynamicLoader plug-in
(target.execution-mode = dynamic), or wether we will treat all symbol files
as already linked at the correct address (target.execution-mode = static).

We can also specify if the inferior we are debugging is being debugged on
a bare board (target.execution-os-type = none), or debugging an OS where
we have a JTAG or other direct connection to the inferior stops the entire
OS (target.execution-os-type = halted), or if we are debugging a program on
something that has live debug services (target.execution-os-type = live).

For the "target.execution-os-type = halted" mode, we will need to create
ProcessHelper plug-ins that allow us to extract the process/thread and other
OS information by reading/writing memory.

This should allow LLDB to be used for a wide variety of debugging tasks and
handle them all correctly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125815 91177308-0d34-0410-b5e6-96231b3b80d8
ore/PluginManager.h
arget/Process.h
arget/Target.h
ldb-enumerations.h
949d5acde6684b5824a26034457410cdf3823dfe 18-Feb-2011 Jim Ingham <jingham@apple.com> Factor all the code that does "Execute a list of lldb command interpreter commands" into a single function in the Interpreter, and then use that in all the places that used to do this by hand.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125807 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointOptions.h
ore/StringList.h
nterpreter/CommandInterpreter.h
60299ec172c9bbeab4e1bbffad513d75cd1741de 17-Feb-2011 Johnny Chen <johnny.chen@apple.com> Add EmulateTB() method to emulate "Table Branch Byte" and "Table Branch Halfword"
operations for Thumb2.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125767 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
7095fa37a059bf4924c87cbd89999d0656e09dd4 17-Feb-2011 Stephen Wilson <wilsons@start.ca> Do not use constants from stdint.h that we cannot portably provide on all platforms.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125695 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
04c9c7b03fbec6d0dcc6c848391147de2f129c66 17-Feb-2011 Greg Clayton <gclayton@apple.com> Clean up a bit of the type getting code where lldb_private:Type now has

clang_type_t
GetClangFullType(); // Get a completely defined clang type

clang_type_t
GetClangLayoutType(); // Get a clang type that can be used for type layout

clang_type_t
GetClangForwardType(); // A type that can be completed if needed, but is more efficient.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125691 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Value.h
ymbol/Function.h
ymbol/Type.h
b1a22bed0c669cbce8e25e8ca2517df3bdc8a98d 16-Feb-2011 Stephen Wilson <wilsons@start.ca> Use SIZE_MAX instead of SIZE_T_MAX for portability.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125653 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
75c703dd8b492bad25a987b96853626641ae7246 16-Feb-2011 Greg Clayton <gclayton@apple.com> The DynamicLoader plug-in instance now lives up in lldb_private::Process where
it should live and the lldb_private::Process takes care of managing the
auto pointer to the dynamic loader instance.

Also, now that the ArchSpec contains the target triple, we are able to
correctly set the Target architecture in DidLaunch/DidAttach in the subclasses,
and then the lldb_private::Process will find the dynamic loader plug-in
by letting the dynamic loader plug-ins inspect the arch/triple in the target.

So now the ProcessGDBRemote plug-in is another step closer to be purely
process/platform agnostic.

I updated the ProcessMacOSX and the ProcessLinux plug-ins accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125650 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
ldb-private-interfaces.h
7fac857ec72051dc0a91b027719c275ea672a470 15-Feb-2011 Caroline Tice <ctice@apple.com> Add eContextRegisterLoad instruction emulation context.

Add code to emulate STR (Immediate, Thumb) instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125610 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
395fc33dc4b06c048ed35047ec461bc092ef2df3 15-Feb-2011 Greg Clayton <gclayton@apple.com> Made lldb_private::ArchSpec contain much more than just an architecture. It
now, in addition to cpu type/subtype and architecture flavor, contains:
- byte order (big endian, little endian)
- address size in bytes
- llvm::Triple for true target triple support and for more powerful plug-in
selection.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125602 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
ore/EmulateInstruction.h
xpression/ClangExpressionParser.h
xpression/ClangFunction.h
ost/Host.h
ymbol/ClangASTContext.h
ymbol/ObjectFile.h
arget/ABI.h
arget/Process.h
arget/Target.h
ldb-private-interfaces.h
668b45124a14cbd03e7b4965b3d86fdbf208d282 15-Feb-2011 Johnny Chen <johnny.chen@apple.com> Remove the "Register &reg" parameter from the BXWritePC(), LoadWritePC(), and ALUWritePC()
methods of EmulateInstructionARM class. The context data structure should provide sufficient
information already.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125596 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
c3c4661c6a7527580e605dbb69bef7634971fe13 15-Feb-2011 Greg Clayton <gclayton@apple.com> All UnwindPlan objects are now passed around as shared pointers.

ArchDefaultUnwindPlan plug-in interfaces are now cached per architecture
instead of being leaked for every frame.

Split the ArchDefaultUnwindPlan_x86 into ArchDefaultUnwindPlan_x86_64 and
ArchDefaultUnwindPlan_i386 interfaces.

There were sporadic crashes that were due to something leaking or being
destroyed when doing stack crawls. This patch should clear up these issues.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125541 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/FuncUnwinders.h
tility/ArchDefaultUnwindPlan.h
ldb-forward-rtti.h
9bfe7f219fb47d93c2b866ad5a6342a827d0dbd6 15-Feb-2011 Caroline Tice <ctice@apple.com> - Rearrange instruction emulation contexts to use a union for the
various types and numbers of arguments rather than trying to keep a
constant number of arguments for all the types.

- Also create a Register type within the instructions, to hold
register type and number.

- Modify EmulateInstructionArm.cpp to use the new register and context
types in all the instruction emulation functions.

- Add code to emulate the STM Arm instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125528 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
c1f4587c3cc1b6de2f59d472762e9eb16819feff 12-Feb-2011 Greg Clayton <gclayton@apple.com> Added the ability to detect which vCont packets (using the "vCont?") packet
are supported by the remote GDB target. We can also now deal with the lack of
vCont support and send packets that the remote GDB stub can use. We also error
out of the continue if LLDB tries to do something too complex when vCont isn't
supported.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125433 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
fa17220ce8b3db56b05317fd5e69c450127f8538 11-Feb-2011 Caroline Tice <ctice@apple.com> - Add three more instruction contexts to EmulateInstruction:
eContextAdjustBaseRegister, eContextRegisterStore and
eContextWriteMemoryRandomBits.

- Implement a version of WriteBits32UnknownToMemory for writing to memory.

- Modify EmulateLDM, EmulateLDMDA, EmulateLDMDB and EmulateLDMIB to use the
eContextAdjustBaseRegister context when appropriate.

- Add code to emulate the STM/STMIA/STMEA Arm instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125414 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
713c2665a27096b68f3f8956222375354f1292f8 11-Feb-2011 Caroline Tice <ctice@apple.com> Add new instruction context, eContextWriteRegisterRandomBits.

Add new utility function, WriteBits32Unknown

Modify the LDM* instruction emulation functions to call WriteBits32Unknown.
Add missing overview comments to the LDM* instruction emulation functions.

Add code to emulate LDMDA Arm instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125377 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
7f99fc8c51b4eb67d4c1e6ab89c7ba12a6cfd1fc 10-Feb-2011 Caroline Tice <ctice@apple.com> Add a new function to Debugger for finding the top/current
input reader.

Always make sure the input reader stack is not empty before
trying to get the top element from the stack.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125255 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
a8d4241dcd129f289710c909491e0e80e7e3d732 09-Feb-2011 Greg Clayton <gclayton@apple.com> Added the DWARF unique type map such that we only create a type once in the
module's AST context. Prior to this fix, with gcc binaries, we end up with
a full class definition for any used classes in each compile unit due to the
one definition rule. This would result in us making N copies of class T, where
N is the number of compile units that use class T, in the module AST. When
an expression would then try and use any types that were duplicated, it would
quickly confuse clang and make expression evaluation fail due to all of the
duplicate types that got copied over. This is now fixed by making a map of
types in the DWARF that maps type names to a collection of types + declaration
(file + line number) + DIE. Then later when we find a type we look in this
module map and find any already cached types that we can just use.

8935777



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125207 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/UnwindPlan.h
419144b064166f0d18b06cad4d52fe66e7ca058f 09-Feb-2011 Greg Clayton <gclayton@apple.com> File::GetFileSpec() support for linux patch from Stephen Wilson.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125181 91177308-0d34-0410-b5e6-96231b3b80d8
ost/File.h
ldb-enumerations.h
c08c4d3fa57387517b9ef43230f4b92c19e70572 09-Feb-2011 Greg Clayton <gclayton@apple.com> Pull support for the shared and exclusive lock since this wasn't available
on linux. And conditionalize the availablility of the fcntl() command
F_GETPATH.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125152 91177308-0d34-0410-b5e6-96231b3b80d8
ost/File.h
ost/freebsd/Config.h
ost/linux/Config.h
ost/macosx/Config.h
ost/mingw/Config.h
5892856b0cd6591194c669afab5bf9ac19c5b3a0 09-Feb-2011 Greg Clayton <gclayton@apple.com> Use Host::File in lldb_private::StreamFile and other places to cleanup host
layer a bit more.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125149 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/StreamFile.h
ost/File.h
158842ca982c53aca6c5ad7345d7b261e309292d 09-Feb-2011 Jim Ingham <jingham@apple.com> Add FileSpec::ResolvePartialUsername, and use it in CommandCompletions to isolate pwd.h in the Host layer.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125135 91177308-0d34-0410-b5e6-96231b3b80d8
ost/FileSpec.h
d35305ab31c10130fd60cec3f6ff62c49f1fb9dd 08-Feb-2011 Greg Clayton <gclayton@apple.com> Updated a few more Host::File functions and added documentation.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125110 91177308-0d34-0410-b5e6-96231b3b80d8
ost/File.h
882ef0508d9fc517b8ce51a6115b0a3a4e195725 08-Feb-2011 Greg Clayton <gclayton@apple.com> Added a few more calls to the File abtract class for seeking, syncing and
getting the file spec from the file descriptor.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125106 91177308-0d34-0410-b5e6-96231b3b80d8
ost/File.h
60a63aea48af3c5fb34a808e97cb5227eebbaf00 08-Feb-2011 Greg Clayton <gclayton@apple.com> Added a file abtraction layer into the Host section of LLDB.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125093 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Error.h
ost/File.h
f9f40c20b210eea72ab042c63178ca000f005ed9 08-Feb-2011 Jim Ingham <jingham@apple.com> Rework the RunThreadPlan event handling to use Event Hijacking not stopping the event thread. Also clarify the logic of the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125083 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
arget/Thread.h
82cfaed47126a17b4fa21e42e05546e7a041b9e3 08-Feb-2011 Greg Clayton <gclayton@apple.com> A bit more cleanup with respect to using LLDB_CONFIG_XXX defines outside of
the lldb/source/Host/*.cpp and lldb/source/Host/*/*.cpp directories. The only
offenders are the command completion and the StreamFile.cpp.

I will soon modify StreamFile.cpp to use a lldb/source/Host/File.cpp so that
all file open, close, read, write, seek, are abstracted into the host layer
as well, then this will be gone.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125082 91177308-0d34-0410-b5e6-96231b3b80d8
ost/FileSpec.h
b0cb717846f1b732245c402864987a106dfd28ac 08-Feb-2011 Jim Ingham <jingham@apple.com> Change the Hijacking interposer to a stack of interposers.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125080 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Broadcaster.h
e9170d2ccd75c88691e9b85291a0042e58f982be 08-Feb-2011 Jim Ingham <jingham@apple.com> Add a GetName interface to the Listener for logging purposes.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125079 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Listener.h
5f54ac373b119a4c6693e4875c48aa761fba0c86 08-Feb-2011 Greg Clayton <gclayton@apple.com> Moved FileSpec into the Host layer since it will vary from host to host.
We have a common unix implementation in lldb/source/Host/common/FileSpec.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125078 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointResolver.h
ore/AddressResolver.h
ore/FileSpec.h
ore/FileSpecList.h
ore/PluginManager.h
ore/SearchFilter.h
ore/SourceManager.h
ost/FileSpec.h
ost/Symbols.h
ymbol/Declaration.h
ymbol/LineEntry.h
ymbol/ObjectContainer.h
ymbol/ObjectFile.h
9dd30d0b56d859a0ca600760e46b74a6b674672d 08-Feb-2011 Johnny Chen <johnny.chen@apple.com> Forgot to check in this file with r125059.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125075 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
3c12604d5773abb8973e06a006ac460be9e426ea 08-Feb-2011 Greg Clayton <gclayton@apple.com> Fixed a crasher that could happen when trying to look at N_GSYM entries
in the DWARF + debug map symbol file parser.

Also cleaned up the "image lookup --address ADDR" output when we it results
in something that is in an inlined function. Now we correctly dump out the
full inlined call stack.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125072 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
09c81efd010d1c9ac8821bad00cdfc9747fcae79 08-Feb-2011 Greg Clayton <gclayton@apple.com> Patch that allows for thread_t to be something more complex than an
integer. Modified patch from Kirk Beitz.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125067 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-types.h
14ef59fe5728d862c040cf5a6b99c384229a34ee 08-Feb-2011 Greg Clayton <gclayton@apple.com> Cleaned up the dynamic library open/getsymbol/close code to use abstracted
flags such that symbols can be searched for within a shared library if desired.
Platforms that support the RTLD_FIRST flag can still take advantage of their
quicker lookups, and other platforms can still get the same fucntionality
with a little extra work.

Also changed LLDB_CONFIG flags over to either being defined, or not being
defined to stay in line with current open source practices and to prepare for
using autoconf or cmake to configure LLDB builds.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125064 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
ost/Host.h
ost/freebsd/Config.h
ost/linux/Config.h
ost/macosx/Config.h
ost/mingw/Config.h
0fdd4a0ed890af386d86ee404ffe58e0e2d6020b 08-Feb-2011 Greg Clayton <gclayton@apple.com> Abtract terminal stuff into a new lldb_private::Terminal class
where the implementation is hidden in the host layer. This avoids
a slew of "#if LLDB_CONFIG_TERMIOS_SUPPORTED" statements in the
code and keeps things cleaner.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125057 91177308-0d34-0410-b5e6-96231b3b80d8
ore/TTYState.h
ost/Terminal.h
nterpreter/ScriptInterpreterPython.h
a39fa4b8c67886e0d7df0752fe176ad7723e305f 07-Feb-2011 Jim Ingham <jingham@apple.com> Include Config.h so we can get "~" resolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125031 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
9a7a94733fc502384aeedacd7717c6573a99b019 07-Feb-2011 Greg Clayton <gclayton@apple.com> More termios fixes. We need to currently make sure to include:

#include "lldb/Host/Config.h"

Or the LLDB_CONFIG_TERMIOS_SUPPORTED defined won't be set. I will fix all
of this Termios stuff later today by moving lldb/Core/TTYState.* into the
host layer and then we conditionalize all of this inside TTYState.cpp and
then we get rid of LLDB_CONFIG_TERMIOS_SUPPORTED all together.

Typically, when we start to see too many "#if LLDB_CONFIG_XXXX" preprocessor
directives, this is a good indicator that something needs to be moved over to
the host layer. TTYState can be modified to do all of the things that many
areas of the code are currently doing, and it will avoid all of the
preprocessor noise.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125027 91177308-0d34-0410-b5e6-96231b3b80d8
ore/TTYState.h
ost/Config.h
nterpreter/ScriptInterpreterPython.h
99208582d715cc667fe46aa7a997a0deb5a333c1 07-Feb-2011 Greg Clayton <gclayton@apple.com> More termios fixes from Kirk Beitz.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125024 91177308-0d34-0410-b5e6-96231b3b80d8
ore/TTYState.h
0f577c2ab79604f7300ac66afebcaa4a4b2dceef 07-Feb-2011 Greg Clayton <gclayton@apple.com> Added a "ArchSpec::SetElfArch()" that was removed by a previous patch and
avoid using RTLD_FIRST with dlopen to keep things compatible with other *NIX
variants. Patch from Jai Menon.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125015 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
8dd8c54c88325993e5cdd60192e33f5adb2279c2 05-Feb-2011 Greg Clayton <gclayton@apple.com> Fixup on setlinebuf() patch to make it work.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124944 91177308-0d34-0410-b5e6-96231b3b80d8
ore/StreamFile.h
b8fa5686ad2f92ee4b027c6a6fef79c7fde4ea90 05-Feb-2011 Greg Clayton <gclayton@apple.com> Configuration support for setlinebuf support from Kirk Beitz.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124943 91177308-0d34-0410-b5e6-96231b3b80d8
ore/StreamFile.h
ost/linux/Config.h
ost/macosx/Config.h
ost/mingw/Config.h
17f5afe9ed10bda3efbce0f26cf0c030331f8b15 05-Feb-2011 Greg Clayton <gclayton@apple.com> Header patch, virtual dtor patch and missed UUID patch from Kirk Beitz.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124931 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBInputReader.h
ore/EmulateInstruction.h
ore/InputReader.h
xpression/ASTStructExtractor.h
xpression/IRDynamicChecks.h
xpression/IRForTarget.h
xpression/IRToDWARF.h
ost/Endian.h
ost/Symbols.h
nterpreter/ScriptInterpreterPython.h
arget/ThreadPlanTracer.h
tility/PseudoTerminal.h
ldb-forward-rtti.h
ldb-include.h
8da92a74478ff2465e092aea92ce29ad7ad6dddd 05-Feb-2011 Greg Clayton <gclayton@apple.com> Added support for targets that don't support expanding "~/" or "~USERNAME".
Patch from Kirk Beitz.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124927 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
ost/linux/Config.h
ost/macosx/Config.h
ost/mingw/Config.h
0bfda0b1371b2381326b441adc93a6db3dc5f74f 05-Feb-2011 Greg Clayton <gclayton@apple.com> Added a quicker lookup in the SectionLoadList when looking things up by
section by using a DenseMap.

Fixed some logging calls to get the log shared pointer.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124926 91177308-0d34-0410-b5e6-96231b3b80d8
arget/SectionLoadList.h
19a1ab8a1e0c9c66adaa648b5cf5909dac2d667e 05-Feb-2011 Greg Clayton <gclayton@apple.com> Fixed the BreakpointLocationList to be able to do O(1) lookups on breakpoint
locations by ID. It used to be, worst case, O(N).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124914 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointLocationList.h
5e41dd3d1392e841b89a57b965a6db39a9ed5b48 04-Feb-2011 Greg Clayton <gclayton@apple.com> Added the start of platform configuration designed for internal LLDB use.
Internal use means for compiling the LLDB debug engine and plug-ins, but it
should never make it into the public API.

Since we don't currently have a configuration script that detects avaiable
functionality in the LLDB build system, we are hard coding #define values
in the host specific "Config.h" files.

#define values in these Config.h header files should set the value to zero or
one:

#define LLDB_CONFIG_TERMIOS_SUPPORTED 1

#define LLDB_CONFIG_OTHER 0

Then any code in the LLDB engine should check the availability using:

#if LLDB_CONFIG_TERMIOS_SUPPORTED
....
#endif

Eventually the contents of the host specific Config.h files will be auto
generated, but for now they will be hard coded. Any LLDB_CONFIG_XXXX items
that are added should be added to all Config.h files and set to either zero
or one.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124892 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Config.h
ost/freebsd/Config.h
ost/linux/Config.h
ost/macosx/Config.h
ost/mingw/Config.h
0467c78e9a75eff9ec33d3c1f39fa83e1c5d9241 04-Feb-2011 Greg Clayton <gclayton@apple.com> Applied a fix to qualify "UUID" with the lldb_private namespace to fix
build issues on MinGW.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124888 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ore/ModuleList.h
ymbol/ObjectFile.h
arget/Target.h
arget/TargetList.h
151185a8c2a30820744d6c4e2b622b5c18afd0a8 04-Feb-2011 Greg Clayton <gclayton@apple.com> MinGW patch from Kirk Beitz.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124879 91177308-0d34-0410-b5e6-96231b3b80d8
ost/TimeValue.h
a14755aaab93eaa3e60ae10e75cb5c4bd3244fbb 04-Feb-2011 Johnny Chen <johnny.chen@apple.com> Patches from Jean-Daniel:

One (stepout.patch) to fix a problem in ThreadPlanStepOut.cpp. There is an erroneous semi colon at end of an if statement that make the condition useless (if body is empty).

And the second patch is to remove to useless typedef on enum, and so avoid a lot of warnings with clang++.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124874 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
arget/StackFrame.h
e71e258286a1713dbb2d366d8b81ff2f28e0216f 04-Feb-2011 Greg Clayton <gclayton@apple.com> Added support for attaching to a remote debug server with the new command:
(lldb) process connect <remote-url>

Currently when you specify a file with the file command it helps us to find
a process plug-in that is suitable for debugging. If you specify a file you
can rely upon this to find the correct debugger plug-in:

% lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) process connect connect://localhost:2345
...

If you don't specify a file, you will need to specify the plug-in name that
you wish to use:

% lldb
(lldb) process connect --plugin process.gdb-remote connect://localhost:2345

Other connection URL examples:

(lldb) process connect connect://localhost:2345
(lldb) process connect tcp://127.0.0.1
(lldb) process connect file:///dev/ttyS1

We are currently treating the "connect://host:port" as a way to do raw socket
connections. If there is a URL for this already, please let me know and we
will adopt it.

So now you can connect to a remote debug server with the ProcessGDBRemote
plug-in. After connection, it will ask for the pid info using the "qC" packet
and if it responds with a valid process ID, it will be equivalent to attaching.
If it response with an error or invalid process ID, the LLDB process will be
in a new state: eStateConnected. This allows us to then download a program or
specify the program to run (using the 'A' packet), or specify a process to
attach to (using the "vAttach" packets), or query info about the processes
that might be available.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124846 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
arget/Process.h
ldb-enumerations.h
b77be414a1a4b74827f30e5944a58d4af0445ff4 04-Feb-2011 Johnny Chen <johnny.chen@apple.com> Add EmulateInstructionARM::EmulateSVC() to the g_arm_opcodes and g_thumb_opcodes tables,
to represent the supervisor call instruction (previosuly software interrupt).


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124840 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
a04acd854c172427917054904dd0675d3cce4619 04-Feb-2011 Caroline Tice <ctice@apple.com> Modify 'apropos' command to search settings variable descriptions as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124836 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
271a5db096ae183e9235ebd273c4a6aab6130b3e 03-Feb-2011 Greg Clayton <gclayton@apple.com> Added a SBListener parameter to Launch and attach calls to avoid a race
condition that could occur when launching or attaching. What could happen is
you would launch/attach to a process, then you would need to tell a listener
to watch for process state changed events. In this case, if you waited too
long to listen for events, you could miss the initial stop event, requiring
clients to listen, then check the process state.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124818 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBListener.h
PI/SBTarget.h
52fd984f7e67c3a0ab18d5565f40356bcfa84822 02-Feb-2011 Greg Clayton <gclayton@apple.com> Modified the PluginManager to be ready for loading plug-ins from a system
LLDB plugin directory and a user LLDB plugin directory. We currently still
need to work out at what layer the plug-ins will be, but at least we are
prepared for plug-ins. Plug-ins will attempt to be loaded from the
"/Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Plugins"
folder, and from the "~/Library/Application Support/LLDB/Plugins" folder on
MacOSX. Each plugin will be scanned for:

extern "C" bool LLDBPluginInitialize(void);
extern "C" void LLDBPluginTerminate(void);

If at least LLDBPluginInitialize is found, the plug-in will be loaded. The
LLDBPluginInitialize function returns a bool that indicates if the plug-in
should stay loaded or not (plug-ins might check the current OS, current
hardware, or anything else and determine they don't want to run on the current
host). The plug-in is uniqued by path and added to a static loaded plug-in
map. The plug-in scanning happens during "lldb_private::Initialize()" which
calls to the PluginManager::Initialize() function. Likewise with termination
lldb_private::Terminate() calls PluginManager::Terminate(). The paths for the
plug-in directories is fetched through new Host calls:

bool Host::GetLLDBPath (ePathTypeLLDBSystemPlugins, dir_spec);
bool Host::GetLLDBPath (ePathTypeLLDBUserPlugins, dir_spec);

This way linux and other systems can define their own appropriate locations
for plug-ins to be loaded.

To allow dynamic shared library loading, the Host layer has also been modified
to include shared library open, close and get symbol:

static void *
Host::DynamicLibraryOpen (const FileSpec &file_spec,
Error &error);

static Error
Host::DynamicLibraryClose (void *dynamic_library_handle);

static void *
Host::DynamicLibraryGetSymbol (void *dynamic_library_handle,
const char *symbol_name,
Error &error);

lldb_private::FileSpec also has been modified to support directory enumeration
in an attempt to abstract the directory enumeration into one spot in the code.
The directory enumertion function is static and takes a callback:


typedef enum EnumerateDirectoryResult
{
eEnumerateDirectoryResultNext, // Enumerate next entry in the current directory
eEnumerateDirectoryResultEnter, // Recurse into the current entry if it is a directory or symlink, or next if not
eEnumerateDirectoryResultExit, // Exit from the current directory at the current level.
eEnumerateDirectoryResultQuit // Stop directory enumerations at any level
};

typedef FileSpec::EnumerateDirectoryResult (*EnumerateDirectoryCallbackType) (void *baton,
FileSpec::FileType file_type,
const FileSpec &spec);

static FileSpec::EnumerateDirectoryResult
FileSpec::EnumerateDirectory (const char *dir_path,
bool find_directories,
bool find_files,
bool find_other,
EnumerateDirectoryCallbackType callback,
void *callback_baton);

This allow clients to specify the directory to search, and specifies if only
files, directories or other (pipe, symlink, fifo, etc) files will cause the
callback to be called. The callback also gets to return with the action that
should be performed after this directory entry. eEnumerateDirectoryResultNext
specifies to continue enumerating through a directory with the next entry.
eEnumerateDirectoryResultEnter specifies to recurse down into a directory
entry, or if the file is not a directory or symlink/alias to a directory, then
just iterate to the next entry. eEnumerateDirectoryResultExit specifies to
exit the current directory and skip any entries that might be remaining, yet
continue enumerating to the next entry in the parent directory. And finally
eEnumerateDirectoryResultQuit means to abort all directory enumerations at
all levels.

Modified the Declaration class to not include column information currently
since we don't have any compilers that currently support column based
declaration information. Columns support can be re-enabled with the
additions of a #define.

Added the ability to find an EmulateInstruction plug-in given a target triple
and optional plug-in name in the plug-in manager.

Fixed a few cases where opendir/readdir was being used, but yet not closedir
was being used. Soon these will be deprecated in favor of the new directory
enumeration call that was added to the FileSpec class.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124716 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
ore/FileSpec.h
ore/PluginManager.h
ost/Host.h
ymbol/Declaration.h
ldb-enumerations.h
9b8d783409b5b80af2cf129c45cbc39c9544ccca 02-Feb-2011 Johnny Chen <johnny.chen@apple.com> Add EmulateBLXImmediate() and EmulateBLXRm() to the g_arm_opcodes and g_thumb_opcodes tables,
which represent "bl <label>", "blx <label>", and "blx <Rm>" instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124710 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
6e74dbb2e10a1119f6f7c3b59efbe43c6426658a 02-Feb-2011 Sean Callanan <scallanan@apple.com> Added a new class, ASTDumper, that provides verbose
diagnostics of Clang AST classes for the purpose of
debugging the types LLDB produces for DWARF objects.

The ASTDumper is currently only used in log output
if you enable verbose mode in the expression log:

log enable -v lldb expr

Its output then appears in the log for external
variables used by the expr command.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124703 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTDumper.h
b077058fd5c0c0de3261d3da177db360d39edc24 01-Feb-2011 Greg Clayton <gclayton@apple.com> Added EmulateIntruction plug-in manager support.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124644 91177308-0d34-0410-b5e6-96231b3b80d8
ore/PluginManager.h
ldb-forward.h
ldb-private-interfaces.h
cd548034fa23113e995b8463d14f910ba2f7298c 01-Feb-2011 Greg Clayton <gclayton@apple.com> Endian patch from Kirk Beitz that allows better cross platform building.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124643 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Communication.h
ost/Endian.h
ymbol/ObjectContainer.h
ymbol/ObjectFile.h
ldb-enumerations.h
8482dedc1d0fb4669d1ec63ec259d1cb8eaeb20f 01-Feb-2011 Greg Clayton <gclayton@apple.com> Made the EmulateInstruction class into a plug-in interface and moved the
source files around into the places they need to go.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124631 91177308-0d34-0410-b5e6-96231b3b80d8
ore/EmulateInstruction.h
7e2f91cb958c8670774cb2190db7b858618b5b9b 29-Jan-2011 Greg Clayton <gclayton@apple.com> Finished up the async attach support. This allows us to request to attach
by name or by pid (with or without waiting for a process to launch) and
catch the response asynchronously.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124530 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
68bffc51b218dc3a124820cb4d983204bf20be4a 29-Jan-2011 Jim Ingham <jingham@apple.com> The m_next_action is simpler if it is an auto_pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124525 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
c2dc7c88cebe05cce059970cc907768256b28a42 29-Jan-2011 Jim Ingham <jingham@apple.com> Added a completion action class to the Process events so that we can make things like Attach and later Launch start their job, and then return to the event loop while waiting for the work to be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124520 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
db2bab463047edba4b01da1fcaf70f15e778095e 27-Jan-2011 Greg Clayton <gclayton@apple.com> Finally tracked down the racy condition that would hose up our debug
sessions: When continue packet has been sent and an interrupt packet was
quickly sent, it would get read at the same time:

$c#00\x03

There was an error where the packet end index was always being computed
incorrectly by debugserver, but it wouldn't matter if there weren't extra
bytes on the end (the hex \x03 interrupt byte in this case). The first
'$' last 3 bytes of the data in the packet buffer were being trimmed
(trying to trim the '#' + checksum (#XX)) which made:

c#

And this would then be passed to the handle routine for the 'c' packet which
would see an extra character at the end and assume it was going to be in the
form c[addr] where "[addr]" was a hex address to resume at and this would
result in a malformed packet response. This is now fixed and everything works
great.

Another issue was issuing async packets correctly by doing correct handshakes
between the thread that wants to send the async packet, and the thread that
is tracking the current run.

Added a write lock to the communication class as well to make sure you never
get two threads trying to write data at the same time. This wasn't happening,
but it is a good idea to make sure it doesn't.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124369 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Communication.h
28d5fcc3158aebf543e0f3d0a3608c1746f5ef15 27-Jan-2011 Greg Clayton <gclayton@apple.com> Changed the SymbolFile::FindFunction() function calls to only return
lldb_private::Function objects. Previously the SymbolFileSymtab subclass
would return lldb_private::Symbol objects when it was asked to find functions.

The Module::FindFunctions (...) now take a boolean "bool include_symbols" so
that the module can track down functions and symbols, yet functions are found
by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are
gotten through the ObjectFile plug-ins.

Fixed and issue where the DWARF parser might run into incomplete class member
function defintions which would make clang mad when we tried to make certain
member functions with invalid number of parameters (such as an operator=
operator that had no parameters). Now we just avoid and don't complete these
incomplete functions.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124359 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ore/ModuleList.h
ymbol/SymbolContext.h
ymbol/Symtab.h
97c924e1ff142ea29a2f7b41cbcdcb0082b76959 27-Jan-2011 Sean Callanan <scallanan@apple.com> Added error reporting to IRForTarget so that the
user doesn't have to enable logging to see where
something went wrong.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124342 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
bdcb6abaa287df2c5f312c51d993c1d0b0cb120c 26-Jan-2011 Greg Clayton <gclayton@apple.com> Enabled extra warnings and fixed a bunch of small issues.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124250 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointList.h
reakpoint/BreakpointLocationList.h
ore/DataExtractor.h
ore/Module.h
ore/PluginInterface.h
ore/StreamFile.h
ore/Value.h
xpression/ASTResultSynthesizer.h
xpression/ASTStructExtractor.h
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/DWARFExpression.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/Symbol.h
ymbol/SymbolContextScope.h
ymbol/TaggedASTType.h
ymbol/Type.h
ymbol/UnwindTable.h
arget/ExecutionContextScope.h
tility/SharingPtr.h
68ca823ad1ab94805bcee03f3ad0b649d94e5a09 25-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed ProcessGDBRemote to kill the process correctly when it is either running
or stopped.

Added support for sections to be able to state if they are encrypted or not.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124171 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Broadcaster.h
ore/Section.h
ac95966f900e8af29c25b3bd85b3d41cd4568857 24-Jan-2011 Jim Ingham <jingham@apple.com> More useful STEP logging.

Be sure to clear out the base plan's m_report_run and m_report_stop each time we resume so we don't use stale values.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124113 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanBase.h
d1eb73fc5aeab5bb9ab79a84780be83eba12a6ce 24-Jan-2011 Jim Ingham <jingham@apple.com> Add a method to StreamFile to line buffer the file. Use that in "log enable -f file" to line buffer the log output.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124107 91177308-0d34-0410-b5e6-96231b3b80d8
ore/StreamFile.h
5ec14f83253f65f51cc0aff15ac34c0f32750e5e 23-Jan-2011 Greg Clayton <gclayton@apple.com> Deprecated old forms of SBTarget::Launch. There is not just one and no
SWIG renaming done to work around deprecated APIs.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124075 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
1fcdb8234a1b19c84c1b409d073c5c7864710f9a 23-Jan-2011 Johnny Chen <johnny.chen@apple.com> Let's teach SWIG to rename the overloaded SBTarget::Launch() function which has
provision for specifying a working directory with the name LaunchWithCWD in our
target language (Python) for now. This fixes the test suite failures due to the
overloading.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124069 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
879bfee0ce2ddaaa50d41042002d5e38c938aed4 23-Jan-2011 Greg Clayton <gclayton@apple.com> Restored some missing APIs for the test suite. Now testsuite still has some failures
due to overloaded SBTarget::Launch() calls.

Bumping Xcode project versions: lldb-42 and debugserver-127.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124063 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
de915beb5febe597505ba33fdc2c39eea2abdbd4 23-Jan-2011 Greg Clayton <gclayton@apple.com> Added a new variant of SBTarget::Launch() that deprectates the old one that
takes separate file handles for stdin, stdout, and stder and also allows for
the working directory to be specified.

Added support to "process launch" to a new option: --working-dir=PATH. We
can now set the working directory. If this is not set, it defaults to that
of the process that has LLDB loaded. Added the working directory to the
host LaunchInNewTerminal function to allows the current working directory
to be set in processes that are spawned in their own terminal. Also hooked this
up to the lldb_private::Process and all mac plug-ins. The linux plug-in had its
API changed, but nothing is making use of it yet. Modfied "debugserver" and
"darwin-debug" to also handle the current working directory options and modified
the code in LLDB that spawns these tools to pass the info along.

Fixed ProcessGDBRemote to properly pass along all file handles for stdin, stdout
and stderr.

After clearing the default values for the stdin/out/err file handles for
process to be NULL, we had a crasher in UserSettingsController::UpdateStringVariable
which is now fixed. Also fixed the setting of boolean values to be able to
be set as "true", "yes", "on", "1" for true (case insensitive) and "false", "no",
"off", or "0" for false.

Fixed debugserver to properly handle files for STDIN, STDOUT and STDERR that are not
already opened. Previous to this fix debugserver would only correctly open and dupe
file handles for the slave side of a pseudo terminal. It now correctly handles
getting STDIN for the inferior from a file, and spitting STDOUT and STDERR out to
files. Also made sure the file handles were correctly opened with the NOCTTY flag
for terminals.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124060 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
ost/Host.h
arget/Process.h
72e1c782ba1e4226da37af4722af608de9f39408 23-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed an issue in "SBError SBProcess::Destroy ()" where it wasn't properly
checking the validity of the shared pointer prior to using it.

Fixed the GDB remote plug-in to once again watch for a reply from the "k"
packet, and fixed the logic to make sure the thread requesting the kill
and the async thread play nice (and very quickly) by synchronizing the
packet sending and reply. I also tweaked some of the shut down packet
("k" kill, "D" detach, and the halt packet) to make sure they do the right
thing.

Fixed "StateType Process::WaitForProcessStopPrivate (...)" to correctly pass
the timeout along to WaitForStateChangedEventsPrivate() and made the function
behave correctly with respect to timing out.

Added separate STDIN, STDOUT, and STDERR support to debugserver. Also added
the start of being able to set the working directory for the inferior process.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124049 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
55e01d8635032ee10cc06e0114213a76a8677be0 22-Jan-2011 Jim Ingham <jingham@apple.com> Added an interface for noticing new thread creation. At this point, I only turn it on when
we are requesting a single thread to run. May seem like a silly thing to do, but the kernel
on MacOS X will inject new threads into a program willy-nilly, and I would like to keep them
from running if I can.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124018 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
cce607b039a7636f50f53b3ed52f6e8db99fffd5 22-Jan-2011 Jim Ingham <jingham@apple.com> Centralize the register reporting (might want to move this function to Thread).


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124016 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanCallFunction.h
c4ed12f9db1a526401f29a4cef17d78fa5e3da26 22-Jan-2011 Caroline Tice <ctice@apple.com> Add API and implementation for SBDebugger::Destroy and Debugger::Destroy.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124011 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
1ebdcc7789aac1ef30ad6dcd485dff86c63136ad 21-Jan-2011 Greg Clayton <gclayton@apple.com> Added support for stepping out of a frame. If you have 10 stack frames, and you
select frame #3, you can then do a step out and be able to go directly to the
frame above frame #3!

Added StepOverUntil and StepOutOfFrame to the SBThread API to allow more powerful
stepping.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123970 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBError.h
PI/SBFrame.h
PI/SBThread.h
arget/Thread.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepUntil.h
00c3ae7dac4cf9654d1569735c41e58fb2fd8969 21-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed up the SBValue::GetExpressionPath() to be more correct under more
circumstances.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123957 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
ore/ValueObject.h
ore/ValueObjectChild.h
ymbol/ClangASTContext.h
ymbol/Type.h
c67efa41a83b0f8b2bab467436a23b50a44e7f30 20-Jan-2011 Greg Clayton <gclayton@apple.com> Added the ability to StackFrame::GetValueForVariableExpressionPath(...) to avoid
fragile ivars if requested. This was done by changing the previous second parameter
to an options bitfield that can be populated by logical OR'ing the new
StackFrame::ExpressionPathOption enum values together:

typedef enum ExpressionPathOption
{
eExpressionPathOptionCheckPtrVsMember = (1u << 0),
eExpressionPathOptionsNoFragileObjcIvar = (1u << 1),
};

So the old function was:
lldb::ValueObjectSP
StackFrame::GetValueForVariableExpressionPath (const char *var_expr, bool check_ptr_vs_member, Error &error);

But it is now:

lldb::ValueObjectSP
StackFrame::GetValueForVariableExpressionPath (const char *var_expr, uint32_t options, Error &error);

This allows the expression parser in Target::EvaluateExpression(...) to avoid
using simple frame variable expression paths when evaluating something that might
be a fragile ivar.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123938 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
cd151697a4b4d32d8818488b793ea44712945448 20-Jan-2011 Greg Clayton <gclayton@apple.com> Made the DWARF + debug map symbol file parser be much more efficient when it isn't
going to actually be used as the symbol file plug-in by looking only for suitable
N_OSO symbols and avoiding sorting function (N_FUN) and global/static (N_GSYM/N_STSYM)
symbols when there are no suitable N_OSO objects.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123889 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
15dcb7ca49b8d8f46910cf085b4c249aac5317fa 20-Jan-2011 Jim Ingham <jingham@apple.com> Back up both the register AND the stop state when calling functions.
Set the thread state to "bland" before calling functions so they don't
inherit the pending signals and die.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123869 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StopInfo.h
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanCallFunction.h
d0882d062a09effb7a22ce81cb327e9b9fa108bd 20-Jan-2011 Greg Clayton <gclayton@apple.com> Make expressions clean up their JIT'ed code allocation.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123855 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ClangExpression.h
xpression/ClangExpressionParser.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/RecordingMemoryManager.h
arget/ThreadPlanCallUserExpression.h
ldb-forward.h
3e2ef48cd65658162791134b34c3c1fb9e8c8991 19-Jan-2011 Jim Ingham <jingham@apple.com> ThreadPlanCallUserExpression's WillPop needs to call it's parent's WillPop.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123816 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanCallFunction.h
arget/ThreadPlanCallUserExpression.h
443bd7585f160e06a66be9f704b7c292c63c8351 18-Jan-2011 Greg Clayton <gclayton@apple.com> Remove trailing commas from lldb enumerations (patch from Stephen Wilson).

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123782 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
6c9662e0e5840b557fcd4bd990620e106e4a18e2 18-Jan-2011 Jim Ingham <jingham@apple.com> In ThreadPlanCallFunction, do the Takedown right when the thread plan gets popped. When the function call is discarded (e.g. when it crashes and discard_on_error is true) the plan gets discarded. You need to make sure that the stack gets restored right then, and not wait till you start again and the thread plan stack is cleared.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123716 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanCallFunction.h
c7674af9458fbad6f07fa73609c354abf93af2dc 18-Jan-2011 Sean Callanan <scallanan@apple.com> Added support for the fragile ivars provided by
Apple's Objective-C 2.0 runtime. They are enabled
if the Objective-C runtime has the proper version.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123694 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/IRForTarget.h
3bb825931521bc4b288274cb0b3c7f5c16c83126 18-Jan-2011 Jim Ingham <jingham@apple.com> Add a method on the ObjC Language Runtime that returns the runtime version.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123693 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ObjCLanguageRuntime.h
ldb-enumerations.h
d8b65024a03833688b487535d6b8710bc2ffdd51 17-Jan-2011 Greg Clayton <gclayton@apple.com> Added missing source files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123614 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangExternalASTSourceCallbacks.h
b01000fd063629facd45044f137446fb748ee179 17-Jan-2011 Greg Clayton <gclayton@apple.com> A few of the issue I have been trying to track down and fix have been due to
the way LLDB lazily gets complete definitions for types within the debug info.
When we run across a class/struct/union definition in the DWARF, we will only
parse the full definition if we need to. This works fine for top level types
that are assigned directly to variables and arguments, but when we have a
variable with a class, lets say "A" for this example, that has a member:
"B *m_b". Initially we don't need to hunt down a definition for this class
unless we are ever asked to do something with it ("expr m_b->getDecl()" for
example). With my previous approach to lazy type completion, we would be able
to take a "A *a" and get a complete type for it, but we wouldn't be able to
then do an "a->m_b->getDecl()" unless we always expanded all types within a
class prior to handing out the type. Expanding everything is very costly and
it would be great if there were a better way.

A few months ago I worked with the llvm/clang folks to have the
ExternalASTSource class be able to complete classes if there weren't completed
yet:

class ExternalASTSource {
....

virtual void
CompleteType (clang::TagDecl *Tag);

virtual void
CompleteType (clang::ObjCInterfaceDecl *Class);
};

This was great, because we can now have the class that is producing the AST
(SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources
and the object that creates the forward declaration types can now also
complete them anywhere within the clang type system.

This patch makes a few major changes:
- lldb_private::Module classes now own the AST context. Previously the TypeList
objects did.
- The DWARF parsers now sign up as an external AST sources so they can complete
types.
- All of the pure clang type system wrapper code we have in LLDB (ClangASTContext,
ClangASTType, and more) can now be iterating through children of any type,
and if a class/union/struct type (clang::RecordType or ObjC interface)
is found that is incomplete, we can ask the AST to get the definition.
- The SymbolFileDWARFDebugMap class now will create and use a single AST that
all child SymbolFileDWARF classes will share (much like what happens when
we have a complete linked DWARF for an executable).

We will need to modify some of the ClangUserExpression code to take more
advantage of this completion ability in the near future. Meanwhile we should
be better off now that we can be accessing any children of variables through
pointers and always be able to resolve the clang type if needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123613 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/Module.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectConstResult.h
ore/ValueObjectRegister.h
ore/ValueObjectVariable.h
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
ymbol/ClangASTContext.h
ymbol/SymbolFile.h
ymbol/TaggedASTType.h
ymbol/Type.h
ymbol/TypeList.h
ldb-forward.h
e52f37baba95cc60d2fc78d9f8726dff5c3f3720 15-Jan-2011 Greg Clayton <gclayton@apple.com> Added complete complex support for displaying and parsing complex types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123509 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
91da7493de9a6d3ba2ae2bbaddbfff0f5d52a3cb 15-Jan-2011 Greg Clayton <gclayton@apple.com> Added the ability to wait for a predicate value, and set it to a new value all in a thread safe fashion.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123492 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Predicate.h
7ec8105eba4b76ac8ba5f61a11c2a9a2548369ca 14-Jan-2011 Stephen Wilson <wilsons@start.ca> Extend the ObjectFile interface to support dynamic loading on ELF platforms.

Debuggers on ELF platforms hook into the runtime linker by monitoring a special
"rendezvous" embedded in the address space of the inferior process. The exact
location of this structure is filled in by the runtime linker and can be
resolved by locating the DT_DEBUG entry in the processes .dynamic section. The
new GetImageInfoAddress() method (morally equivalent to
Process::GetImageInfoAddress) provides the mechanism to locate this information.

GetEntryPoint() simply returns the address of the start symbol in the executable
if present. It is useful to the dynamic loader plugin for ELF systems as this
is the earliest point where LLDB can break and probe the inferiors .dynamic
section and rendezvous structure. Also, this address can be used in the
computation of the virtual base address for position independent executables.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123466 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ObjectFile.h
0d62dfd4974eb23f550f992e594894b96c5696d1 14-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed an error in the type map for "char **" that was a bad memory smasher.
Anytime we had a valid python list that was trying to go from Python down into
our C++ API, it was allocating too little memory and it ended up smashing
whatever was next to the allocated memory.

Added typemap conversions for "void *, size_t" so we can get
SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t"
so we can get SBProcess::WriteMemory() to work.

Fixed an issue in the DWARF parser where we weren't correctly calculating the
DeclContext for all types and classes. We now should be a lot more accurate.
Fixes include: enums should now be setting their parent decl context correctly.
We saw a lot of examples where enums in classes were not being properly
namespace scoped. Also, classes within classes now get properly scoped.

Fixed the objective C runtime pointer checkers to let "nil" pointers through
since these are accepted by compiled code. We also now don't call "abort()"
when a pointer doesn't validate correctly since this was wreaking havoc on
the process due to the way abort() works. We now just dereference memory
which should give us an exception from which we can easily and reliably
recover.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123428 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Error.h
ymbol/ClangASTContext.h
0aa2e55f0e9422405ad33675adc1e35044537adb 14-Jan-2011 Caroline Tice <ctice@apple.com> Split up the Python script interpreter code to allow multiple script interpreter objects to
exist within the same process (one script interpreter object per debugger object). The
python script interpreter objects are all using the same global Python script interpreter;
they use separate dictionaries to keep their data separate, and mutex's to prevent any object
attempting to use the global Python interpreter when another object is already using it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123415 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
nterpreter/CommandInterpreter.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
6a92553d2cc2b7a3b853fcb6da101583435c2dc0 13-Jan-2011 Sean Callanan <scallanan@apple.com> Implemented a major overhaul of the way variables are handled
by LLDB. Instead of being materialized into the input structure
passed to the expression, variables are left in place and pointers
to them are materialzied into the structure. Variables not resident
in memory (notably, registers) get temporary memory regions allocated
for them.

Persistent variables are the most complex part of this, because they
are made in various ways and there are different expectations about
their lifetime. Persistent variables now have flags indicating their
status and what the expectations for longevity are. They can be
marked as residing in target memory permanently -- this is the
default for result variables from expressions entered on the command
line and for explicitly declared persistent variables (but more on
that below). Other result variables have their memory freed.

Some major improvements resulting from this include being able to
properly take the address of variables, better and cleaner support
for functions that return references, and cleaner C++ support in
general. One problem that remains is the problem of explicitly
declared persistent variables; I have not yet implemented the code
that makes references to them into indirect references, so currently
materialization and dematerialization of these variables is broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123371 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangUserExpression.h
xpression/IRForTarget.h
ymbol/ClangASTContext.h
arget/Target.h
123db408a6bc06614ec893040aaad84d8d0d16f9 12-Jan-2011 Greg Clayton <gclayton@apple.com> Added the following functions to SBThread to allow threads to be suspended when a process is resumed:

bool SBThread::Suspend();
bool SBThread::Resume();
bool SBThread::IsSuspended();



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123300 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBThread.h
arget/Thread.h
ldb-defines.h
a875b64ab8d258b28959d05eea37cb5dfdd72730 09-Jan-2011 Greg Clayton <gclayton@apple.com> Put more smarts into the RegisterContext base class. Now the base class has
a method:

void RegisterContext::InvalidateIfNeeded (bool force);

Each time this function is called, when "force" is false, it will only call
the pure virtual "virtual void RegisterContext::InvalideAllRegisters()" if
the register context's stop ID doesn't match that of the process. When the
stop ID doesn't match, or "force" is true, the base class will clear its
cached registers and the RegisterContext will update its stop ID to match
that of the process. This helps make it easier to correctly flush the register
context (possibly from multiple locations depending on when and where new
registers are availabe) without inadvertently clearing the register cache
when it doesn't need to be.

Modified the ProcessGDBRemote plug-in to be much more efficient when it comes
to:
- caching the expedited registers in the stop reply packets (we were ignoring
these before and it was causing us to read at least three registers every
time we stopped that were already supplied in the stop reply packet).
- When a thread has no stop reason, don't keep asking for the thread stopped
info. Prior to this fix we would continually send a qThreadStopInfo packet
over and over when any thread stop info was requested. We now note the stop
ID that the stop info was requested for and avoid multiple requests.

Cleaned up some of the expression code to not look for ClangExpressionVariable
objects up by name since they are now shared pointers and we can just look for
the exact pointer match and avoid possible errors.

Fixed an bug in the ValueObject code that would cause children to not be
displayed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123127 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
arget/RegisterContext.h
5382281cce4d2de419628a39b1284eca38b12d66 08-Jan-2011 Greg Clayton <gclayton@apple.com> Made FuncUnwinders threadsafe.

Other small cleanups as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123088 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/FuncUnwinders.h
ymbol/UnwindPlan.h
e2f90647b93b0f44c0222da8d995dfe267499f9c 08-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed issues with the unwinding code where the collection of FuncUnwinders
was being searched and sorted using a shared pointer as the value which means
the pointer value was what was being searched for. This means that anytime
you did a stack backtrace, the collection of FuncUnwinders doubled and then
the array or shared pointer got sorted (by pointer value), so you had an ever
increasing collection of shared pointer where a match was never found. This
means we had a ton of duplicates in this table and would cause issues after
one had been debugging for a long time.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123045 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ymbol/FuncUnwinders.h
ymbol/UnwindTable.h
fd119995f2693eb6e9e2ea3e685f9d872f5cd4f1 07-Jan-2011 Greg Clayton <gclayton@apple.com> Added memory caching to lldb_private::Process. All lldb_private::Process
subclasses will automatically be able to take advantage of caching. The
cache line size is set to 512 by default.

This greatly speeds up stack backtraces on MacOSX when using the
ProcessGDBRemote process plug-in since only about 6300 packets per second
can be sent.

Initial speedups show:

Prior to caching: 10,000 stack frames took 5.2 seconds
After caching: 10,000 stack frames in 240 ms!

About a 20x speedup!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122996 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
26100dcbc49648eac03fa8e8c3d7c793808fc8d6 07-Jan-2011 Greg Clayton <gclayton@apple.com> Added the ability for Target::ReadMemory to prefer to read from the file
cache even when a valid process exists. Previously, Target::ReadMemory would
read from the process if there was a valid one and then fallback to the
object file cache.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122989 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Target.h
08d7d3ae16110aa68ed40c161eac8571aeb94cd9 06-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed issues with RegisterContext classes and the subclasses. There was
an issue with the way the UnwindLLDB was handing out RegisterContexts: it
was making shared pointers to register contexts and then handing out just
the pointers (which would get put into shared pointers in the thread and
stack frame classes) and cause double free issues. MallocScribble helped to
find these issues after I did some other cleanup. To help avoid any
RegisterContext issue in the future, all code that deals with them now
returns shared pointers to the register contexts so we don't end up with
multiple deletions. Also now that the RegisterContext class doesn't require
a stack frame, we patched a memory leak where a StackFrame object was being
created and leaked.

Made the RegisterContext class not have a pointer to a StackFrame object as
one register context class can be used for N inlined stack frames so there is
not a 1 - 1 mapping. Updates the ExecutionContextScope part of the
RegisterContext class to never return a stack frame to indicate this when it
is asked to recreate the execution context. Now register contexts point to the
concrete frame using a concrete frame index. Concrete frames are all of the
frames that are actually formed on the stack of a thread. These concrete frames
can be turned into one or more user visible frames due to inlining. Each
inlined stack frame has the exact same register context (shared via shared
pointers) as any parent inlined stack frames all the way up to the concrete
frame itself.

So now the stack frames and the register contexts should behave much better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122976 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObjectRegister.h
arget/RegisterContext.h
arget/StackFrame.h
arget/StackFrameList.h
arget/Thread.h
arget/Unwind.h
e179a5840a49167964ca768a13c252c58c9cffcc 05-Jan-2011 Greg Clayton <gclayton@apple.com> Added the ability to get an set the desired format for SBValue objects.

Fixed the display of complex numbers in lldb_private::DataExtractor::Dump(...)
and also fixed other edge display cases in lldb_private::ClangASTType::DumpTypeValue(...).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122895 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/ValueObject.h
ldb-enumerations.h
ff7c3e965dea6b70e05faa985de1e6f6efe0ce40 20-Dec-2010 Johnny Chen <johnny.chen@apple.com> Patch from Stephen Wilson:

Provide full qualification for #include's.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122274 91177308-0d34-0410-b5e6-96231b3b80d8
tility/ArchDefaultUnwindPlan.h
tility/ArchVolatileRegs.h
tility/UnwindAssemblyProfiler.h
bdcda468276dc9ab6bf648fc8cc07f3faad91526 20-Dec-2010 Greg Clayton <gclayton@apple.com> The LLDB API (lldb::SB*) is now thread safe!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122262 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBProcess.h
PI/SBTarget.h
PI/SBValue.h
reakpoint/BreakpointList.h
ore/ValueObject.h
arget/Target.h
c0446861315ac0d5994f93510e24cbcac9f534ad 20-Dec-2010 Caroline Tice <ctice@apple.com> Add code to make sure InputReaders finish and are cleaned up when
a Debugger object is destroyed or re-set. (Thus making sure that, for
example, the Python interpreter finishes and exits cleanly rather than
being left in an undefined state.)



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122255 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
15bc1f521fd958b1df1d3d329fa071f5810105a9 19-Dec-2010 Greg Clayton <gclayton@apple.com> Line tables were trying to be too clever and only use 24 bits for a line
table offset where the offset is within a section. Increased the section
offset for line table entries to be 32 bits (from 24 bits), giving each
section a 4G offset, and increased the section index to 32 bits (from 8 bits).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122200 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/LineTable.h
928d130789bd8ee38ce434ccb2d564e6069cf018 19-Dec-2010 Greg Clayton <gclayton@apple.com> Improved our argument parsing abilities to be able to handle stuff more like
a shell would interpret it. A few examples that we now handle correctly

INPUT: "Hello "world
OUTPUT: "Hello World"

INPUT: "Hello "' World'
OUTPUT: "Hello World"

INPUT: Hello" World"
OUTPUT: "Hello World"

This broke the setting of dictionary values for the "settings set" command
for things like:

(lldb) settings set target.process.env-vars ["MY_ENV_VAR"]=YES

since we would drop the quotes. I fixed the user settings controller to use
a regular expression so it can accept any of the following inputs for
dictionary setting:

settings set target.process.env-vars ["MY_ENV_VAR"]=YES
settings set target.process.env-vars [MY_ENV_VAR]=YES
settings set target.process.env-vars MY_ENV_VAR=YES

We might want to eventually drop the first two syntaxes, but I won't make
that decision right now.

This allows more natural setting of the envirorment variables:

settings set target.process.env-vars MY_ENV_VAR=YES ABC=DEF CWD=/tmp






git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122166 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegularExpression.h
576b9655c887f7ec0d7389ac856d5d7e3f3ec8ff 18-Dec-2010 Greg Clayton <gclayton@apple.com> Linux patches from Stephen Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122128 91177308-0d34-0410-b5e6-96231b3b80d8
tility/SharingPtr.h
ca66a5f50969b4833cea57c441b23fa29c714a55 18-Dec-2010 Greg Clayton <gclayton@apple.com> Linux patches from Stephen Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122127 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandReturnObject.h
PI/SBStream.h
f6d8b67a2501eeffecbd016cb6192474204d133f 18-Dec-2010 Greg Clayton <gclayton@apple.com> Linux patches from Stephen Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122126 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
6e889b142d6acbe1c318bc1b690dd9c3722d7095 17-Dec-2010 Greg Clayton <gclayton@apple.com> Removed libunwind sources as we aren't using them anymore.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122059 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
c5157ecb9c6185b92923fab50de53f3fad86095d 17-Dec-2010 Greg Clayton <gclayton@apple.com> Added access to set the current stack frame within a thread so any command
line commands can use the current thread/frame.

Fixed an issue with expressions that get sandboxed in an objective C method
where unichar wasn't being passed down.

Added a "static size_t Scalar::GetMaxByteSize();" function in case we need
to know the max supported by size of something within a Scalar object.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122027 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBThread.h
ore/Scalar.h
6d29aebd9e7f8fa947dcc9c344aec2393922973d 16-Dec-2010 Greg Clayton <gclayton@apple.com> Added header doc for the recently added Process::ReadUnsignedInteger (addr_t addr, size_t int_byte_size, Error &error) function.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121999 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
f72fdeee129bbd7195f3db888b561ede689886aa 16-Dec-2010 Greg Clayton <gclayton@apple.com> Added the ability to read unsigned integers from the Process:

uint64_t Process::ReadUnsignedInteger (addr_t addr, size_t int_byte_size, Error &error);


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121996 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
05a5a1bcbed5c0f31fed29153bb2912d71836e91 16-Dec-2010 Sean Callanan <scallanan@apple.com> Implemented a feature where the expression parser
can avoid running the code in the target if the
expression's result is known and the expression
has no side effects.

Right now this feature is quite conservative in
its guess about side effects, and it only computes
integer results, but the machinery to make it more
sophisticated is there.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121952 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
xpression/ClangUserExpression.h
xpression/IRForTarget.h
xpression/RecordingMemoryManager.h
c3b61d239a53271d013b82ffaba6ab4e92b7fcc1 15-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed the "expression" command object to use the StackFrame::GetValueForExpressionPath()
function and also hooked up better error reporting for when things fail.

Fixed issues with trying to display children of pointers when none are
supposed to be shown (no children for function pointers, and more like this).
This was causing child value objects to be made that were correctly firing
an assertion.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121841 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ymbol/ClangASTContext.h
arget/StackFrame.h
4e9267d43979b391cb4c311b378fa9991c63285b 14-Dec-2010 Greg Clayton <gclayton@apple.com> Changed:
SBValue SBFrame::LookupVar(const char *name);
To
SBValue SBFrame::FindVariable (const char *name);

Changed:
SBValue LookupVarInScope (const char *name, const char *scope);
to
SBValue FindValue (const char *name, ValueType value_type);

The latter makes it possible to not only find variables (params, locals, globals, and statics), but we can also now get register sets, registers and persistent variables using the frame as the context.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121777 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
dd62d729cf960051615a74c1e67e2e41ec789fd7 14-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed SBFrame to properly check to make sure it has a valid m_opaque_sp object
before trying to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121748 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBlock.h
PI/SBCompileUnit.h
PI/SBFunction.h
PI/SBSymbol.h
427f290ff96f3ab9f2cf3a1af7001d2c560424c7 14-Dec-2010 Greg Clayton <gclayton@apple.com> Modified LLDB expressions to not have to JIT and run code just to see variable
values or persistent expression variables. Now if an expression consists of
a value that is a child of a variable, or of a persistent variable only, we
will create a value object for it and make a ValueObjectConstResult from it to
freeze the value (for program variables only, not persistent variables) and
avoid running JITed code. For everything else we still parse up and JIT code
and run it in the inferior.

There was also a lot of clean up in the expression code. I made the
ClangExpressionVariables be stored in collections of shared pointers instead
of in collections of objects. This will help stop a lot of copy constructors on
these large objects and also cleans up the code considerably. The persistent
clang expression variables were moved over to the Target to ensure they persist
across process executions.

Added the ability for lldb_private::Target objects to evaluate expressions.
We want to evaluate expressions at the target level in case we aren't running
yet, or we have just completed running. We still want to be able to access the
persistent expression variables between runs, and also evaluate constant
expressions.

Added extra logging to the dynamic loader plug-in for MacOSX. ModuleList objects
can now dump their contents with the UUID, arch and full paths being logged with
appropriate prefix values.

Thread hardened the Communication class a bit by making the connection auto_ptr
member into a shared pointer member and then making a local copy of the shared
pointer in each method that uses it to make sure another thread can't nuke the
connection object while it is being used by another thread.

Added a new file to the lldb/test/load_unload test that causes the test a.out file
to link to the libd.dylib file all the time. This will allow us to test using
the DYLD_LIBRARY_PATH environment variable after moving libd.dylib somewhere else.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121745 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Communication.h
ore/ModuleList.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectConstResult.h
xpression/ClangExpression.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangFunction.h
xpression/ClangPersistentVariables.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRToDWARF.h
ymbol/ClangASTContext.h
arget/Process.h
arget/StackFrame.h
arget/Target.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
047923c7bc90275f29c2e179d2385df26b8d81a1 14-Dec-2010 Sean Callanan <scallanan@apple.com> Bugfixes for the new "self" pointer handling. Specifically,
the code to pass the _cmd pointer has been improved, and _cmd
is now set to the value of _cmd for the current context, as
opposed to being simply NULL.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121739 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangUserExpression.h
3aa7da5cb3327792415de44405e0896c6bdc305b 13-Dec-2010 Sean Callanan <scallanan@apple.com> Added support for generating expressions that have
access to the members of the Objective-C self object.

The approach we take is to generate the method as a
@category on top of the self object, and to pass the
"self" pointer to it. (_cmd is currently NULL.)

Most changes are in ClangExpressionDeclMap, but the
change that adds support to the ABIs to pass _cmd
touches a fair amount of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121722 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ASTResultSynthesizer.h
xpression/ClangExpressionDeclMap.h
xpression/ClangFunction.h
ymbol/ClangASTType.h
arget/ABI.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanCallUserExpression.h
ab429022ca0f47e4bd2ae1dc70f315e4824d5ae1 12-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where the macosx dynamic loader, on the first shared library loaded notification, wasn't properly removing shared libraries from the target that didn't get loaded. This usually happens when a different shared library is loaded in place of another due to DYLD_LIBRARY_PATH or DYLD_FRAMEWORK_PATH environment variables. We now properly remove any images that didn't make it into the executable.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121641 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
ea49cc78c01f34f874b7e710acebea4ead404be1 12-Dec-2010 Greg Clayton <gclayton@apple.com> Added the ability for SBTarget to resolve load addresses (convert lldb::addr_t values into resolved SBAddress objects). These SBAddress objects can then be used to resolve a symbol context using "lldb::SBSymbolContext ResolveSymbolContextForAddress (const lldb::SBAddress& addr, uint32_t resolve_scope);".

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121638 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBreakpoint.h
PI/SBTarget.h
e5791dd89688683c9e1ec874b0be6906517e6827 11-Dec-2010 Johnny Chen <johnny.chen@apple.com> Add test_display_source_python() test case to TestSourceManager.py which uses
the lldb PyThon API SBSourceManager to display source files.

To accomodate this, the C++ SBSourceManager API has been changed to take an
lldb::SBStream as the destination for display of source lines. Modify SBStream::ctor()
so that its opaque pointer is initialized with an StreamString instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121605 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSourceManager.h
PI/SBStream.h
887d25180c9ebe10513654baa96bfb31f7f1f260 11-Dec-2010 Sean Callanan <scallanan@apple.com> Made all LLDB-generated ASTContexts have valid
DiagnosticClients, and removed code that was patching
over the original problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121601 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
ymbol/ClangASTContext.h
d9105c2f5e1a4b6bb1a9d424e3f1631e0e6296cd 10-Dec-2010 Caroline Tice <ctice@apple.com> Various fixes mostly relating to the User Settings stuff:

- Added new utility function to Arg, GetQuotedCommandString, which re-assembles
the args into a string, replacing quotes that were originally there.

- Modified user settings stuff to always show individual elements when printing out
arrays and dictionaries.

- Added more extensive help to 'settings set', explaining more about dictionaries
and arrays (including current dictionary syntax).

- Fixed bug in user settings where quotes were being stripped and lost, so that
sometimes array or dictionary elements that ought to have been a single element
were being split up.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121438 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Args.h
6507dd90b5d27662537caee49a3a3cc236f85a53 10-Dec-2010 Jim Ingham <jingham@apple.com> Changing the ObjC find method implementation to use a ClangUtilityFunction inserted into the target. Consolidate all the
logic for finding the target of a method dispatch into this function, insert & call it. Gets calls to super, and all the
fixup & fixedup variants working properly. Also gets the class from the object so that we step through KVO wrapper methods
into the actual user code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121437 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanStepOut.h
e0da7a5ba288669df3a4d51059aa0f78f729c6b1 09-Dec-2010 Caroline Tice <ctice@apple.com> Modify HandleCommand to not do any argument processing until it has determined whether or
not the command should take raw input, then handle & dispatch the arguments appropriately.

Also change the 'alias' command to be a command that takes raw input. This is necessary to
allow aliases to be created for other commands that take raw input and might want to include
raw input in the alias itself.

Fix a bug in the aliasing mechanism when creating aliases for commands with 3-or-more words.

Raw input should now be properly handled by all the command and alias mechanisms.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121423 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Args.h
nterpreter/CommandInterpreter.h
61e2c303e343598ed4aafecf6463a3b9631cb2b9 08-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed an issue in our source manager where we were permanently caching source
file data, so if a source file was modified, we would always show the first
cached copy of the source data. We now check file modification times when
displaying source info so we can show the update source info.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121278 91177308-0d34-0410-b5e6-96231b3b80d8
ore/SourceManager.h
58e844b3561848e73e69d6d98746d4851e78306e 08-Dec-2010 Greg Clayton <gclayton@apple.com> Added the ability to dump sections to a certain depth (for when sections
have children sections).

Modified SectionLoadList to do it's own multi-threaded protected on its map.
The ThreadSafeSTLMap class was difficult to deal with and wasn't providing
much utility, it was only getting in the way.

Make sure when the communication read thread is about to exit, it clears the
thread in the main class.

Fixed the ModuleList to correctly ignore architectures and UUIDs if they aren't
valid when searching for a matching module. If we specified a file with no arch,
and then modified the file and loaded it again, it would not match on subsequent
searches if the arch was invalid since it would compare an invalid architecture
to the one that was found or selected within the shared library or executable.
This was causing stale modules to stay around in the global module list when they
should have been removed.

Removed deprecated functions from the DynamicLoaderMacOSXDYLD class.

Modified "ProcessGDBRemote::IsAlive" to check if we are connected to a gdb
server and also make sure our process hasn't exited.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121236 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Section.h
arget/SectionLoadList.h
44c841d68a439da13e3f170427675bff8c7f2731 07-Dec-2010 Caroline Tice <ctice@apple.com> - Fix alias-building & resolving to properly handle optional arguments for command options.
- Add logging for command resolution ('log enable lldb commands')
- Fix alias resolution to properly handle commands that take raw input (resolve the alias, but
don't muck up the raw arguments).

Net result: Among other things, 'expr' command can now take strings with escaped characters and
not have the command handling & alias resolution code muck up the escaped characters. E.g.
'expr printf ("\n\n\tHello there!")' should now work properly.


Not working yet: Creating aliases with raw input for commands that take raw input. Working on that.
e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121171 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Args.h
nterpreter/CommandInterpreter.h
ldb-private-log.h
7b85755252a0e2e7bd99305fab9ea2f1f2ce38c6 07-Dec-2010 Greg Clayton <gclayton@apple.com> Cleanup before making the objective C ivar changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121158 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObjectChild.h
67283641ef749fadab1884e81520e7e5ab42e91a 07-Dec-2010 Greg Clayton <gclayton@apple.com> Forgot to qualify SBSymbol with the lldb namespace for SWIG.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121115 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBModule.h
43edca38dda703786e2dc7ad61169b5b445551e6 07-Dec-2010 Greg Clayton <gclayton@apple.com> Added symbol table access through the module for now. We might need to expose
a SBSymtab class, but for now, we expose the symbols through the module.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121112 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBModule.h
PI/SBSymbol.h
7b9fcc06843d624787a9115d14285a6d6a6cca53 07-Dec-2010 Greg Clayton <gclayton@apple.com> When shared libraries are unloaded, they are now removed from the target
ModuleList so they don't show up in the images. Breakpoint locations that are
in shared libraries that get unloaded will persist though so that if you
have plug-ins that load/unload and you have a breakpoint set on functions
in the plug-ins, the hit counts will persist between loads/unloads.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121069 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
ldb-enumerations.h
422b1ae11aaec0bea88d3d2d1f4cdb0147cef0ae 06-Dec-2010 Greg Clayton <gclayton@apple.com> Added a less than operator that will compare the internal opaque pointer values so SBBroadcaster objects can be contained in ordered containers or sorted.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120967 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBroadcaster.h
3ca95dac942597ca76101f6792f16e34e81dea1d 05-Dec-2010 Greg Clayton <gclayton@apple.com> Added "void SBBroadcaster::Clear ();" method to SBBroadcaster.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120949 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBroadcaster.h
eecb0f3b5021e37311f9588f14bcab38a35b8e9a 04-Dec-2010 Greg Clayton <gclayton@apple.com> More reverting of the EOF stuff as the API was changed which we don't want to
do. Closing on EOF is an option that can be set on the
lldb_private::Communication or the lldb::SBCommunication objects after they
are created. Of course the EOF support isn't hooked up, so they don't do
anything at the moment, but they are left in so when the code is fixed, it
will be easy to get working again.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120885 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommunication.h
ore/Communication.h
638351aee118e89c658ca295cb4e9d1db7849bef 04-Dec-2010 Greg Clayton <gclayton@apple.com> Added the ability for a process to inherit the current host environment. This
was done as an settings variable in the process for now. We will eventually
move all environment stuff over to the target, but we will leave it with the
process for now. The default setting is for a process to inherit the host
environment. This can be disabled by setting the "inherit-env" setting to
false in the process.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120862 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
arget/Process.h
bd666017403e102e0ca435d6da585ff979f83598 03-Dec-2010 Caroline Tice <ctice@apple.com> Add '-no-stdio' option to 'process launch' command, which causes the
inferior to be launched without setting up terminal stdin/stdout for it
(leaving the lldb command line accessible while the program is executing).
Also add a user settings variable, 'target.process.disable-stdio' to allow
the user to set this globally rather than having to use the command option
each time the process is launched.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120825 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
ldb-enumerations.h
31ab22bfc055d8bd088ae4d8002ad281f929e60d 03-Dec-2010 Greg Clayton <gclayton@apple.com> Make sure timed_out is initialized to false just to be on the safe side.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120813 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Predicate.h
b749a265a2b97f9cef71c362dfd6dae26c8f2973 03-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed a race condition that could cause ProcessGDBRemote::DoResume() to return
an error saying the resume timed out. Previously the thread that was trying
to resume the process would eventually call ProcessGDBRemote::DoResume() which
would broadcast an event over to the async GDB remote thread which would sent the
continue packet to the remote gdb server. Right after this was sent, it would
set a predicate boolean value (protected by a mutex and condition) and then the
thread that issued the ProcessGDBRemote::DoResume() would then wait for that
condition variable to be set. If the async gdb thread was too quick though, the
predicate boolean value could have been set to true and back to false by the
time the thread that issued the ProcessGDBRemote::DoResume() checks the boolean
value. So we can't use the predicate value as a handshake. I have changed the code
over to using a Event by having the GDB remote communication object post an
event:

GDBRemoteCommunication::eBroadcastBitRunPacketSent

This allows reliable handshaking between the two threads and avoids the erroneous
ProcessGDBRemote::DoResume() errors.

Added a host backtrace service to allow in process backtraces when trying to track
down tricky issues. I need to see if LLVM has any backtracing abilities abstracted
in it already, and if so, use that, but I needed something ASAP for the current issue
I was working on. The static function is:

void
Host::Backtrace (Stream &strm, uint32_t max_frames);

And it will backtrace at most "max_frames" frames for the current thread and can be
used with any of the Stream subclasses for logging.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120793 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
aa301c49e8b31f01c551cffbaa74c8ba82851a79 03-Dec-2010 Sean Callanan <scallanan@apple.com> Fixed object lifetimes in ClangExpressionDeclMap
so that it is not referring to potentially stale
state during IR execution.

This was done by introducing modular state (like
ClangExpressionVariable) where groups of state
variables have well-defined lifetimes:

- m_parser_vars are specific to parsing, and only
exist between calls to WillParse() and DidParse().

- m_struct_vars survive for the entire execution
of the ClangExpressionDeclMap because they
provide the template for a materialized set of
expression variables.

- m_material_vars are specific to a single
instance of materialization, and only exist
between calls to Materialize() and
Dematerialize().

I also removed unnecessary references to long-
lived state that really didn't need to be referred
to at all, and also introduced several assert()s
that helped me diagnose a few bugs (fixed too).


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120778 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
22defe8b06df5b1f09b53bda255ef07513abc04c 03-Dec-2010 Greg Clayton <gclayton@apple.com> Updated to latest LLVM/Clang for external AST source changes that allow
TagDecl subclasses and Objective C interfaces to complete themselves through
the ExternalASTSource class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120749 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionParser.h
ymbol/ClangASTContext.h
9ac497bc11512d221b3962e4f883eeac07db188a 02-Dec-2010 Caroline Tice <ctice@apple.com> Add proper EOF handling to Communication & Connection classes:

Add bool member to Communication class indicating whether the
Connection should be closed on receiving an EOF or not. Update the
Connection read to return an EOF status when appropriate. Modify the
Communication class to pass the EOF along or not, and to close the
Connection or not, as appropriate.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120723 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommunication.h
ore/Communication.h
e8e5557af333aba8183ce6e9fed9996221eb1547 01-Dec-2010 Sean Callanan <scallanan@apple.com> Fixed ClangUserExpression's wrapping of expressions
in C++ methods. There were two fixes involved:

- For an object whose contents are not known, the
expression should be treated as a non-member, and
"this" should have no meaning.

- For a const object, the method should be declared
const as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120606 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangUserExpression.h
ymbol/ClangASTType.h
360f53f3c216ee4fb433da0a367168785328a856 30-Nov-2010 Jim Ingham <jingham@apple.com> Moved the code in ClangUserExpression that set up & ran the thread plan with timeouts, and restarting with all threads into a utility function in Process. This required a bunch of renaming.

Added a ThreadPlanCallUserExpression that differs from ThreadPlanCallFunction in that it holds onto a shared pointer to its ClangUserExpression so that can't go away before the thread plan is done using it.

Fixed the stop message when you hit a breakpoint while running a user expression so it is more obvious what has happened.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120386 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangFunction.h
xpression/ClangUserExpression.h
arget/Process.h
arget/ThreadPlan.h
arget/ThreadPlanCallUserExpression.h
1ddd9fe72bd9e22f40ad28f25b3a139a9326ae98 30-Nov-2010 Sean Callanan <scallanan@apple.com> Added a feature where registers can be referred to
using special $-variables from expressions.

(lldb) expr $rip

These variables are available for reading and
writing.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120367 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
8e69de4b9c55ec2eaebc62e4d987c2f0618ac431 20-Nov-2010 Jason Molenda <jmolenda@apple.com> Change the DWARFExpression::Evaluate methods to take an optional
RegisterContext* - normally this is retrieved from the ExecutionContext's
StackFrame but when we need to evaluate an expression while creating
the stack frame list this can be a little tricky.

Add DW_OP_deref_size, needed for the _sigtramp FDE expression.

Add support for processing DWARF expressions in RegisterContextLLDB.

Update callers to DWARFExpression::Evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119885 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/DWARFExpression.h
ymbol/UnwindPlan.h
c4f55fee15b66ea53da092ca50400ac5d8b0692d 19-Nov-2010 Caroline Tice <ctice@apple.com> Add the ability to catch and do the right thing with Interrupts (often control-c)
and end-of-file (often control-d).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119837 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Communication.h
ore/Debugger.h
ldb-enumerations.h
ee8fc726f2eff9c3b3db7f00f9fddbaa9735e045 19-Nov-2010 Sean Callanan <scallanan@apple.com> Modifications to type handling logic. We no longer
perform recursive type lookups, because these are not
required for full type fidelity. We also make the
SelectorTable last for the full lifetime of the Clang
compiler; this was the source of many bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119835 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionParser.h
a91dd997b1e809c67901b7ac481942cacae19150 19-Nov-2010 Sean Callanan <scallanan@apple.com> Added support for indicating to the expression parser
that the result of an expression should be coerced to
a specific type. Also made breakpoint conditions pass
in the bool type for this type.

The expression parser ignores this indication for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119779 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTResultSynthesizer.h
xpression/ClangUserExpression.h
ymbol/ClangASTContext.h
3c7feb44971e0adf121c9b72a4eb5eb2896fe66d 19-Nov-2010 Greg Clayton <gclayton@apple.com> Added some logging back and cleaned up the code to match LLDB's coding
conventions.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119771 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
990de7bb41d3afec6b789155408ff322187d8682 19-Nov-2010 Greg Clayton <gclayton@apple.com> Cleaned up code that wasn't using the Initialize and Terminate paradigm by
changing it to use it. There was an extra parameter added to the static
accessor global user settings controllers that wasn't needed. A bool was being
used as a parameter to the accessor just so it could be used to clean up
the global user settings controller which is now fixed by splitting up the
initialization into the "static void Class::Initialize()", access into the
"static UserSettingsControllerSP & Class::GetSettingsController()", and
cleanup into "static void Class::Terminate()".

Also added initialize and terminate calls to the logging code to avoid issues
when LLDB is shutting down. There were cases after the logging was switched
over to use shared pointers where we could crash if the global destructor
chain was being run and it causes the log to be destroyed and any any logging
occurred.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119757 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/Log.h
arget/Process.h
arget/Target.h
arget/Thread.h
640dc6b983964615bcb149d7d37ee007a13fb02c 18-Nov-2010 Greg Clayton <gclayton@apple.com> Added the ability to get more information on the SBThread's stop reason
by being able to get the data count and data. Each thread stop reason
has one or more data words that can help describe the stop. To do this
I added:

size_t
SBThread::GetStopReasonDataCount();

uint64_t
SBThread::GetStopReasonDataAtIndex(uint32_t idx);




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119720 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBThread.h
reakpoint/BreakpointLocation.h
20d338fad87eba91de65aa9bec76e01c04472848 18-Nov-2010 Greg Clayton <gclayton@apple.com> Fixed Process::Halt() as it was broken for "process halt" after recent changes
to the DoHalt down in ProcessGDBRemote. I also moved the functionality that
was in ProcessGDBRemote::DoHalt up into Process::Halt so not every class has
to implement a tricky halt/resume on the internal state thread. The
functionality is the same as it was before with two changes:
- when we eat the event we now just reuse the event we consume when the private
state thread is paused and set the interrupted bool on the event if needed
- we also properly update the Process::m_public_state with the state of the
event we consume.

Prior to this, if you issued a "process halt" it would eat the event, not
update the process state, and then produce a new event with the interrupted
bit set and send it. Anyone listening to the event would get the stopped event
with a process that whose state was set to "running".

Fixed debugserver to not have to be spawned with the architecture of the
inferior process. This worked fine for launching processes, but when attaching
to processes by name or pid without a file in lldb, it would fail.

Now debugserver can support multiple architectures for a native debug session
on the current host. This currently means i386 and x86_64 are supported in
the same binary and a x86_64 debugserver can attach to a i386 executable.
This change involved a lot of changes to make sure we dynamically detect the
correct registers for the inferior process.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119680 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBThread.h
arget/Process.h
8a3b0a85dd512824f528cfa55d93f530ebe38be8 18-Nov-2010 Sean Callanan <scallanan@apple.com> Updated to the LLVM/Clang of 2010-11-17 at 3:30pm.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119677 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ClangASTSource.h
xpression/ClangExpressionParser.h
ymbol/ClangASTContext.h
cdea2365030d283cd9082fa0b80bead79a104e55 18-Nov-2010 Jim Ingham <jingham@apple.com> The thread plan destructors may call Thread virtual methods. That means they have to get cleaned up in the derived class's destructor. Make sure that happens.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119675 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
6ba533e0b2220b2aac92d10f94d3cecedb199763 18-Nov-2010 Sean Callanan <scallanan@apple.com> Added support for constant strings of the form @"this-is-a-string".
They are replaced with calls to the CoreFoundation function
CFStringCreateWithBytes() by a portion of the IRForTarget pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119582 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
ae7862a7fa70080e7450174b05544e7673fefb9d 17-Nov-2010 Jim Ingham <jingham@apple.com> Add a ThreadPlanAssemblyTracer that takes just a thread (since that's how we call it from ThreadPlanBase...)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119549 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanTracer.h
3ae449a5c3b4f51afc0da22cfeaef00c303c0acc 17-Nov-2010 Jim Ingham <jingham@apple.com> Added an "Interrupted" bit to the ProcessEventData. Halt now generates an event
with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events.
DoHalt is changed to ensure that the stop even is processed, and an event with
the Interrupted event is posted. Finally ClangFunction is rationalized to use this
facility so the that Halt is handled more deterministically.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119453 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
861efb3f6e225e45c45511d6da894633b36025a1 16-Nov-2010 Caroline Tice <ctice@apple.com> Make processes use InputReaders for their input. Move the process
ReadThread stuff into the main Process class (out of the Process Plugins).
This has the (intended) side effect of disabling the command line tool
from reading input/commands while the process is running (the input is
directed to the running process rather than to the command interpreter).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119329 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
2403b5e89760c1c970c3fe6936cb620d45dcf6c8 16-Nov-2010 Greg Clayton <gclayton@apple.com> First attempt and getting "const" C++ method function signatures correct.
It currently isn't working, but it should be close. I will work on this more
when I figure out what I am not doing correctly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119324 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Type.h
3bc52d0a96c18be384028a90914f534ac252fbe4 14-Nov-2010 Greg Clayton <gclayton@apple.com> Just like functions can have a basename and a mangled/demangled name, variable
can too. So now the lldb_private::Variable class has support for this.

Variables now have support for having a basename ("i"), and a mangled name
("_ZN12_GLOBAL__N_11iE"), and a demangled name ("(anonymous namespace)::i").

Nowwhen searching for a variable by name, users might enter the fully qualified
name, or just the basename. So new test functions were added to the Variable
and Mangled classes as:

bool NameMatches (const ConstString &name);
bool NameMatches (const RegularExpression &regex);

I also modified "ClangExpressionDeclMap::FindVariableInScope" to also search
for global variables that are not in the current file scope by first starting
with the current module, then moving on to all modules.

Fixed an issue in the DWARF parser that could cause a varaible to get parsed
more than once. Now, once we have parsed a VariableSP for a DIE, we cache
the result even if a variable wasn't made so we don't do any re-parsing. Some
DW_TAG_variable DIEs don't have locations, or are missing vital info that
stops a debugger from being able to display anything for it, we parse a NULL
variable shared pointer for these DIEs so we don't keep trying to reparse it.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119085 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Mangled.h
ymbol/Variable.h
feb6e56275a8a7a53336bdb957064e9093e8e170 14-Nov-2010 Greg Clayton <gclayton@apple.com> Fixed a crasher (an assert was firing in the DWARF parser) when setting
breakpoints on inlined functions by name. This involved fixing the DWARF parser
to correctly back up and parse the concrete function when we find inlined
functions by name, then grabbing any appropriate inlined blocks and returning
symbol contexts with the block filled in. After this was fixed, the breakpoint
by name resolver needed to correctly deal with symbol contexts that had the
inlined block filled in in the symbol contexts.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119017 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
9ceed1e2b872d12a1c01ba148855db07b193649e 13-Nov-2010 Greg Clayton <gclayton@apple.com> Got namespace lookup working and was able to print a complex "this" as an
expression. This currently takes waaaayyyyy too much time to evaluate. We will
need to look at the expression parser and find ways to optimize the info we
provide and get this to evaluate quicker. I believe the performance issue is
currently related to us always providing a complete C++ class type when asked
about a C++ class which can cause a lot of information to be pulled since all
classes will be fully created (methods, base classes, members, all their
types). We will need to give the classes back the parser and mark them as
having external sources and get parser (Sema) to query us when it needs more
info. This should bring things up to an acceptable level.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118979 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
6916e358c9725b75ed91f31236c147f26c9af10e 13-Nov-2010 Greg Clayton <gclayton@apple.com> Modified the lldb_private::Type clang type resolving code to handle three
cases when getting the clang type:
- need only a forward declaration
- need a clang type that can be used for layout (members and args/return types)
- need a full clang type

This allows us to partially parse the clang types and be as lazy as possible.
The first case is when we just need to declare a type and we will complete it
later. The forward declaration happens only for class/union/structs and enums.
The layout type allows us to resolve the full clang type _except_ if we have
any modifiers on a pointer or reference (both R and L value). In this case
when we are adding members or function args or return types, we only need to
know how the type will be laid out and we can defer completing the pointee
type until we later need it. The last type means we need a full definition for
the clang type.

Did some renaming of some enumerations to get rid of the old "DC" prefix (which
stands for DebugCore which is no longer around).

Modified the clang namespace support to be almost ready to be fed to the
expression parser. I made a new ClangNamespaceDecl class that can carry around
the AST and the namespace decl so we can copy it into the expression AST. I
modified the symbol vendor and symbol file plug-ins to use this new class.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118976 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
ore/Value.h
xpression/ClangExpressionDeclMap.h
ymbol/ClangASTContext.h
ymbol/ClangNamespaceDecl.h
ymbol/SymbolContext.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
ymbol/Type.h
ldb-forward.h
e4b078491287a6c4d4ab0828fcfb2af87627d19f 12-Nov-2010 Jason Molenda <jmolenda@apple.com> I'm not thrilled with how I structured this but RegisterContextLLDB
needs to use the current pc and current offset in two ways: To
determine which function we are currently executing, and the decide
how much of that function has executed so far. For the former use,
we need to back up the saved pc value by one byte if we're going to
use the correct function's unwind information -- we may be executing
a CALL instruction at the end of a function and the following instruction
belongs to a new function, or we may be looking at unwind information
which only covers the call instruction and not the subsequent instruction.

But when we're talking about deciding which row of an UnwindPlan to
execute, we want to use the actual byte offset in the function, not the
byte offset - 1.

Right now RegisterContextLLDB is tracking both the "real" offset and
an "offset minus one" and different parts of the class have to know
which one to use and they need to be updated/set in tandem. I want
to revisit this at some point.

The second change made in looking up eh_frame information; it was
formerly done by looking for the start address of the function we
are currently executing. But it is possible to have unwind information
for a function which only covers a small section of the function's
address range. In which case looking up by the start pc value may not
find the eh_frame FDE.

The hand-written _sigtramp() unwind info on Mac OS X, which covers
exactly one instruction in the middle of the function, happens to
trigger both of these issues.

I still need to get the UnwindPlan runner to handle arbitrary dwarf
expressions in the FDE but there's a good chance it will be easy to
reuse the DWARFExpression class to do this.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118882 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/FuncUnwinders.h
5b0228a06dedf7d450308a443c255f2d28c247f3 12-Nov-2010 Sean Callanan <scallanan@apple.com> Added a thread plan tracer that prints lines of
assembly as well as registers that changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118879 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanTracer.h
da6b16eeae3a071a98072b991d89c5682939bf9f 12-Nov-2010 Jim Ingham <jingham@apple.com> Added OnStart and OnEnd methods to the tracer.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118876 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanTracer.h
48685687640e88515cd17b6fa613d13e180558d6 12-Nov-2010 Sean Callanan <scallanan@apple.com> Excised a version of the low-level function calling
logic that supported calling functions with arbitrary
arguments. We use ClangFunction for this, and the
low-level logic is only required to support one or two
pointer arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118871 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ABI.h
arget/Thread.h
arget/ThreadPlanCallFunction.h
745ac7a5826fe7c392007941a4046bfb1a8dff81 11-Nov-2010 Jim Ingham <jingham@apple.com> Add ThreadPlanTracer class to allow instruction step tracing of execution.
Also changed eSetVarTypeBool to eSetVarTypeBoolean to make it consistent with eArgTypeBoolean.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118824 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanBase.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanRunToAddress.h
arget/ThreadPlanStepInstruction.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverBreakpoint.h
arget/ThreadPlanStepRange.h
arget/ThreadPlanStepThrough.h
arget/ThreadPlanStepUntil.h
arget/ThreadPlanTestCondition.h
arget/ThreadPlanTracer.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
d7cb26e87841731c6452a9f2e997ed0f9c92625c 11-Nov-2010 Greg Clayton <gclayton@apple.com> Added initial support to the lldb_private::SymbolFile for finding
namespaces by name given an optional symbol context. I might end up
dressing up the "clang::NamespaceDecl" into a lldb_private::Namespace
class if we need to do more than is currenlty required of namespaces.
Currently we only need to be able to lookup a namespace by name when
parsing expressions, so I kept it simple for now. The idea here is
even though we are passing around a "clang::NamespaceDecl *", that
we always have it be an opaque pointer (it is forward declared inside
of "lldb/Core/ClangForward.h") and we only use clang::NamespaceDecl
implementations inside of ClangASTContext, or ClangASTType when we need
to extract information from the namespace decl object.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118737 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/SymbolFile.h
2ade6115e2aaf88cd90ccc8bf499108099bdeb86 10-Nov-2010 Caroline Tice <ctice@apple.com> Move the embedded Python interpreter onto a separate thread, to prevent
main thread from having to wait on it (which was causing some I/O
hangs).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118700 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreterPython.h
ldb-private-log.h
e98ac25604b3d967158917f6fdd5289b3096fd80 10-Nov-2010 Greg Clayton <gclayton@apple.com> Modified lldb_private::SymboleFile to be able to override where its TypeList
comes from by using a virtual function to provide it from the Module's
SymbolVendor by default. This allows the DWARF parser, when being used to
parse DWARF in .o files with a parent DWARF + debug map parser, to get its
type list from the DWARF + debug map parser so when we go and find full
definitions for types (that might come from other .o files), we can use the
type list from the debug map parser. Otherwise we ended up mixing clang types
from one .o file (say a const pointer to a forward declaration "class A") with
the a full type from another .o file. This causes expression parsing, when
copying the clang types from those parsed by the DWARF parser into the
expression AST, to fail -- for good reason. Now all types are created in the
same list.

Also added host support for crash description strings that can be set before
doing a piece of work. On MacOSX, this ties in with CrashReporter support
that allows a string to be dispalyed when the app crashes and allows
LLDB.framework to print a description string in the crash log. Right now this
is hookup up the the CommandInterpreter::HandleCommand() where each command
notes that it is about to be executed, so if we crash while trying to do this
command, we should be able to see the command that caused LLDB to exit. For
all other platforms, this is a nop.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118672 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
ymbol/SymbolFile.h
e5748d889fb7fb97b3ff07444894d7714776b609 10-Nov-2010 Greg Clayton <gclayton@apple.com> Did a lot of code cleanup.

Fixed the DWARF plug-in such that when it gets all attributes for a DIE, that
it omits the DW_AT_sibling and DW_AT_declaration when getting attributes
from a DW_AT_abstract_origin or DW_AT_specification DIE.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118654 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ClangASTSource.h
d6ef16aab825a1319179d1445f35538f535e9bf1 09-Nov-2010 Jason Molenda <jmolenda@apple.com> Fix thinko in UnwindTable.cpp where it wouldn't provde a
FuncUnwinders object if the eh_frame section was missing
from an objfile. Worked fine on x86_64 but on i386 where
eh_frame is unusual, that resulted in the arch default
UnwindPlan being used all the time instead of picking up
an assembly profile based unwindplan.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118467 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/FuncUnwinders.h
1d1b39c93c64294ae1c6e5cfe6de584716c284bc 08-Nov-2010 Sean Callanan <scallanan@apple.com> Made variable resolution more robust by handling
every external variable reference in the module,
and returning a clean error (instead of letting
LLVM issue a fatal error) if the variable could
not be resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118388 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
d6d806ceff943ca26c008f704013f18920685cfd 08-Nov-2010 Greg Clayton <gclayton@apple.com> Fixed FileSpec's operator == to deal with equivalent paths such as "/tmp/a.c"
and "/private/tmp/a.c". This was done by adding a "mutable bool m_is_resolved;"
member to FileSpec and then modifying the equal operator to check if the
filenames are equal, and if they are, then check the directories. If they are
not equal, then both paths are checked to see if they have been resolved. If
they have been resolved, we resolve the paths in temporary FileSpec objects
and set each of the m_is_resolved bools to try (for lhs and rhs) if the paths
match what is contained in the path. This allows us to do more intelligent
compares without having to resolve all paths found in the debug info (which
can quickly get costly if the files are on remote NFS mounts).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118387 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
e005f2ce03c489ebde9110678a29cbfe8488d5b4 06-Nov-2010 Greg Clayton <gclayton@apple.com> Modified all logging calls to hand out shared pointers to make sure we
don't crash if we disable logging when some code already has a copy of the
logger. Prior to this fix, logs were handed out as pointers and if they were
held onto while a log got disabled, then it could cause a crash. Now all logs
are handed out as shared pointers so this problem shouldn't happen anymore.
We are also using our new shared pointers that put the shared pointer count
and the object into the same allocation for a tad better performance.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118319 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Log.h
xpression/RecordingMemoryManager.h
tility/SharingPtr.h
ldb-private-log.h
101530ac16d5309953e1fe4416cfc407f10fae0a 06-Nov-2010 Greg Clayton <gclayton@apple.com> Howard Hinnant gave us changes for lldb_private::SharingPtr that gives us the ability have a single allocation contain both the class and the ref count without having to do intrusive pointer type stuff. They will intermingle correctly with other shared pointers as well. In order to take advantage of this you need to create your pointer in your class with the make_shared function:

lldb_private::SharingPtr<A> p = llvm::make_shared<A>(i, j);

Currently up to five constructor arguments are supported and each must be an LValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118317 91177308-0d34-0410-b5e6-96231b3b80d8
tility/SharingPtr.h
538eb82a89a68dbc57251915080bd5152b333978 06-Nov-2010 Greg Clayton <gclayton@apple.com> Added copy constructors and assignment operators to all lldb::SB* classes
so we don't end up with weak exports with some compilers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118312 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBBroadcaster.h
PI/SBCommandInterpreter.h
PI/SBCommandReturnObject.h
PI/SBCommunication.h
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBError.h
PI/SBEvent.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBInputReader.h
PI/SBInstruction.h
PI/SBInstructionList.h
PI/SBListener.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSourceManager.h
PI/SBStringList.h
PI/SBSymbol.h
PI/SBTarget.h
PI/SBType.h
PI/SBValue.h
ea9d4267a629a1c732eb0400fa0288cee31ad49d 05-Nov-2010 Jim Ingham <jingham@apple.com> Added the equivalent of gdb's "unwind-on-signal" to the expression command, and a parameter to control it in ClangUserExpression, and on down to ClangFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118290 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangFunction.h
xpression/ClangUserExpression.h
arget/Thread.h
6ddae13f7d9552f73518bd4dfa606675c8d4b1c3 05-Nov-2010 Jim Ingham <jingham@apple.com> Don't need both LIBLLDB_LOG_DYNAMIC_LOADER and LIBLLDB_LOG_SHLIB. Go with the former.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118284 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-private-log.h
4ba3999e714c73ef52a21b0d59f705c0cad98810 05-Nov-2010 Jim Ingham <jingham@apple.com> Added a setting to "log timer" so you can see the incremental timings as well:

log timer increment true/false

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118268 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Timer.h
2eac2b9b61bfbe6079bab86e879263d63046ac0a 04-Nov-2010 Jim Ingham <jingham@apple.com> Add a ObjC V1 runtime, and a generic AppleObjCRuntime plugin.

Also move the Checker creation into the Apple Runtime code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118255 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ObjCLanguageRuntime.h
a6b71de68536fd9c9917f59e42f1d8e39b06f8fc 04-Nov-2010 Jason Molenda <jmolenda@apple.com> Built the native unwinder with all the warnings c++-4.2 could muster;
fixed them. Added DISALLOW_COPY_AND_ASSIGN to classes that should
not be bitwise copied. Added default initializers for member
variables that weren't being initialized in the ctor. Fixed a few
shadowed local variable mistakes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118240 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/DWARFCallFrameInfo.h
ymbol/FuncUnwinders.h
ymbol/UnwindPlan.h
0baa394cd55c6dfb7a6259d215d0dea2b708067b 04-Nov-2010 Greg Clayton <gclayton@apple.com> Added support for loading and unloading shared libraries. This was done by
adding support into lldb_private::Process:

virtual uint32_t
lldb_private::Process::LoadImage (const FileSpec &image_spec,
Error &error);

virtual Error
lldb_private::Process::UnloadImage (uint32_t image_token);

There is a default implementation that should work for both linux and MacOSX.
This ability has also been exported through the SBProcess API:

uint32_t
lldb::SBProcess::LoadImage (lldb::SBFileSpec &image_spec,
lldb::SBError &error);

lldb::SBError
lldb::SBProcess::UnloadImage (uint32_t image_token);

Modified the DynamicLoader plug-in interface to require it to be able to
tell us if it is currently possible to load/unload a shared library:

virtual lldb_private::Error
DynamicLoader::CanLoadImage () = 0;

This way the dynamic loader plug-ins are allows to veto whether we can
currently load a shared library since the dynamic loader might know if it is
currenlty loading/unloading shared libraries. It might also know about the
current host system and know where to check to make sure runtime or malloc
locks are currently being held.

Modified the expression parser to have ClangUserExpression::Evaluate() be
the one that causes the dynamic checkers to be loaded instead of other code
that shouldn't have to worry about it.






git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118227 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBError.h
PI/SBFileSpec.h
PI/SBProcess.h
ore/ValueObject.h
arget/DynamicLoader.h
arget/Process.h
ldb-defines.h
14a97ff7ccb8d40fee3c6ff136a2c602819174dd 04-Nov-2010 Sean Callanan <scallanan@apple.com> Re-enabled LLDB's pointer checkers, and moved the
implementation of the Objective-C object checkers
into the Objective-C language runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118226 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ObjCLanguageRuntime.h
arget/ThreadPlanCallFunction.h
29756d452be39535ded2cff50d9db4df46fe6400 03-Nov-2010 Sean Callanan <scallanan@apple.com> Factored the code that implements breakpoints on
exceptions for different languages out of
ThreadPlanCallFunction and put it into the
appropriate language runtimes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118200 91177308-0d34-0410-b5e6-96231b3b80d8
arget/LanguageRuntime.h
arget/ThreadPlanCallFunction.h
e3bb7ec622e383037a48a7feba5c83b205a10999 03-Nov-2010 Johnny Chen <johnny.chen@apple.com> Fix comment about eValueTypeConstResult.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118196 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
94fb5432f10882f8917acb7849abdba7c61277ac 03-Nov-2010 Sean Callanan <scallanan@apple.com> Modified ThreadPlanCallFunction to perform the
exception checks at the right time, and modified
ClangFunction so that it doesn't misinterpret the
stop as a timeout stop.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118189 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlan.h
arget/ThreadPlanCallFunction.h
9d2993d9b4663c02aaada6c1a887f348f43438cd 03-Nov-2010 Greg Clayton <gclayton@apple.com> Fixed shared library unloads when the unloaded library doesn't come off
the end of the list. We had an issue in the MacOSX dynamic loader where if
we had shlibs:
1 - a.out
2 - a.dylib
3 - b.dylib

And then a.dylib got unloaded, we would unload b.dylib due to the assumption
that only shared libraries could come off the end of the list. We now properly
search and find which ones get loaded.

Added a new internal logging category for the "lldb" log channel named "dyld".
This should allow all dynamic loaders to use this as a generic log channel so
we can track shared library loads and unloads in the logs without having to
have each plug-in make up its own logging channel.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118147 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-private-log.h
07f3d8d674350e5efc7f762f18c82c8c6f2abb10 03-Nov-2010 Sean Callanan <scallanan@apple.com> Modified the thread plan that calls functions to
set breakpoints at the different locations where
an exception could be thrown, so that exceptions
thrown by expressions are properly caught.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118142 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanCallFunction.h
49ce682dfa7993d31206cea19ce7006cd3f3077e 31-Oct-2010 Greg Clayton <gclayton@apple.com> Cleaned up the API logging a lot more to reduce redundant information and
keep the file size a bit smaller.

Exposed SBValue::GetExpressionPath() so SBValue users can get an expression
path for their values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117851 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBroadcaster.h
PI/SBStream.h
PI/SBValue.h
ore/Address.h
ore/Broadcaster.h
ore/FileSpec.h
ore/ValueObject.h
a66ba46379fe41036d870975c56ccc2319cb6618 30-Oct-2010 Greg Clayton <gclayton@apple.com> Improved API logging.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117772 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBlock.h
PI/SBFrame.h
PI/SBProcess.h
PI/SBTarget.h
PI/SBThread.h
926060e198137f8a64face70455324a8cd4362a5 29-Oct-2010 Caroline Tice <ctice@apple.com> Add the ability to disable individual log categories, rather
than just the entire log channel.

Add checks, where appropriate, to make sure a log channel/category has
not been disabled before attempting to write to it.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117715 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Log.h
ldb-private-log.h
8950c9a1faa1eb762d92ccdc860dc2eaa88a6868 29-Oct-2010 Sean Callanan <scallanan@apple.com> Updated LLVM to latest version as of 10/28 at
7pm, and made minor integration fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117680 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
3f5ee7fd6991891f0892bd71537763d9b59acd12 29-Oct-2010 Greg Clayton <gclayton@apple.com> Modified the lldb_private::TypeList to use a std::multimap for quicker lookup
by type ID (the most common type of type lookup).

Changed the API logging a bit to always show the objects in the OBJECT(POINTER)
format so it will be easy to locate all instances of an object or references
to it when looking at logs.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117641 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFileSpec.h
PI/SBListener.h
ymbol/TypeList.h
77e9394f0af653ac0842066a9c7766a28d6c6b94 29-Oct-2010 Sean Callanan <scallanan@apple.com> Added a user-settable variable, 'target.expr-prefix',
which holds the name of a file whose contents are
prefixed to each expression. For example, if the file
~/lldb.prefix.header contains:

typedef unsigned short my_type;

then you can do this:

(lldb) settings set target.expr-prefix '~/lldb.prefix.header'
(lldb) expr sizeof(my_type)
(unsigned long) $0 = 2

When the variable is changed, the corresponding file
is loaded and its contents are fetched into a string
that is stored along with the target. This string
is then passed to each expression and inserted into
it during parsing, like this:

typedef unsigned short my_type;

void
$__lldb_expr(void *$__lldb_arg)
{
sizeof(my_type);
}


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117627 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangUserExpression.h
arget/Target.h
a62ad7c886252a08d614a2b391d0774a151b7196 28-Oct-2010 Johnny Chen <johnny.chen@apple.com> Check in an initial implementation of the "breakpoint clear" command, whose purpose is clear
the breakpoint associated with the (filename, line_number) combo when an arrow is pointing to
a source position using Emacs Grand Unified Debugger library to interact with lldb.

The current implmentation is insufficient in that it only asks the breakpoint whether it is
associated with a breakpoint resolver with FileLine type and whether it matches the (filename, line_number)
combo. There are other breakpoint resolver types whose breakpoint locations can potentially
match the (filename, line_number) combo.

The BreakpointResolver, BreakpointResolverName, BreakpointResolverAddress, and BreakpointResolverFileLine
classes have extra static classof methods to support LLVM style type inquiry through isa, cast, and dyn_cast.

The Breakpoint class has an API method bool GetMatchingFileLine(...) which is invoked from CommandObjectBreak.cpp
to implement the "breakpoint clear" command.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117562 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
reakpoint/BreakpointResolver.h
reakpoint/BreakpointResolverAddress.h
reakpoint/BreakpointResolverFileLine.h
reakpoint/BreakpointResolverName.h
f3d0b0c8081691128626eb496fdfcbf8ae54c1de 27-Oct-2010 Greg Clayton <gclayton@apple.com> Updated the lldb_private::Flags class to have better method names and made
all of the calls inlined in the header file for better performance.

Fixed the summary for C string types (array of chars (with any combo if
modifiers), and pointers to chars) work in all cases.

Fixed an issue where a forward declaration to a clang type could cause itself
to resolve itself more than once if, during the resolving of the type itself
it caused something to try and resolve itself again. We now remove the clang
type from the forward declaration map in the DWARF parser when we start to
resolve it and avoid this additional call. This should stop any duplicate
members from appearing and throwing all the alignment of structs, unions and
classes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117437 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/Flags.h
ore/ValueObject.h
ymbol/ClangASTContext.h
61ba7ec20f616f907473dd501341cef5b47fa3f8 27-Oct-2010 Caroline Tice <ctice@apple.com> Clean up the API logging code:
- Try to reduce logging to one line per function call instead of tw
- Put all arguments & their values into log for calls
- Add 'this' parameter information to function call logging, making it show the appropriate
internal pointer (this.obj, this.sp, this.ap...)
- Clean up some return values
- Remove logging of constructors that construct empty objects
- Change '==>' to '=>' for showing result values...
- Fix various minor bugs
- Add some protected 'get' functions to help getting the internal pointers for the 'this' arguments...



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117417 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBCompileUnit.h
PI/SBFunction.h
PI/SBLineEntry.h
PI/SBSymbol.h
PI/SBValueList.h
7826c8894803dc729f29789ebc038956a94d3e7a 26-Oct-2010 Caroline Tice <ctice@apple.com> First pass at adding logging capabilities for the API functions. At the moment
it logs the function calls, their arguments and the return values. This is not
complete or polished, but I am committing it now, at the request of someone who
really wants to use it, even though it's not really done. It currently does not
attempt to log all the functions, just the most important ones. I will be
making further adjustments to the API logging code over the next few days/weeks.
(Suggestions for improvements are welcome).


Update the Python build scripts to re-build the swig C++ file whenever
the python-extensions.swig file is modified.

Correct the help for 'log enable' command (give it the correct number & type of
arguments).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117349 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpointLocation.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBTarget.h
PI/SBThread.h
ore/Communication.h
ore/InputReader.h
ore/Module.h
arget/Target.h
arget/Thread.h
ldb-enumerations.h
ldb-private-log.h
988ddbcdc1a7f362968a1e3bfcd7fda39e7345ee 26-Oct-2010 Jim Ingham <jingham@apple.com> The call function thread plan should allow internal breakpoints to continue on. Also made stopping
in mid-expression evaluation when we hit a breakpoint/signal work.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117341 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StopInfo.h
8280cbe80c79bc206335831dd732e0f9fb69c519 25-Oct-2010 Jason Molenda <jmolenda@apple.com> Check in the native lldb unwinder.

Not yet enabled as the default unwinder but there are no known
backtrace problems with the code at this point.

Added 'log enable lldb unwind' to help diagnose backtrace problems;
this output needs a little refining but it's a good first step.

eh_frame information is currently read unconditionally - the code
is structured to allow this to be delayed until it's actually needed.
There is a performance hit when you have to parse the eh_frame
information for any largeish executable/library so it's necessary
to avoid if possible.

It's confusing having both the UnwindPlan::RegisterLocation struct
and the RegisterConextLLDB::RegisterLocation struct, I need to rename
one of them.

The writing of registers isn't done in the RegisterConextLLDB subclass
yet; neither is the running of complex DWARF expressions from eh_frame
(e.g. used for _sigtramp on Mac OS X).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117256 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/UnwindPlan.h
arget/RegisterContext.h
ldb-private-log.h
e3740831203337f606008b7c8d7ea34b521c8600 22-Oct-2010 Jim Ingham <jingham@apple.com> Add and SB API to set breakpoint conditions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117082 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
3d0e2c2de1b965b6dc171a618ddb8144419ae6f5 21-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed a crasher that could happen if a FileSpec had a filename only, or vice
versa.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116963 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
8d522c23691d431b479546a7c1b4f967cf6484c0 20-Oct-2010 Johnny Chen <johnny.chen@apple.com> Fixed a typo in the comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116949 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
537a7a86687683fd403ce652d178fbc89e06ef9f 20-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where we were resolving paths when we should have been.

So the issue here was that we have lldb_private::FileSpec that by default was
always resolving a path when using the:

FileSpec::FileSpec (const char *path);

and in the:

void FileSpec::SetFile(const char *pathname, bool resolve = true);

This isn't what we want in many many cases. One example is you have "/tmp" on
your file system which is really "/private/tmp". You compile code in that
directory and end up with debug info that mentions "/tmp/file.c". Then you
type:

(lldb) breakpoint set --file file.c --line 5

If your current working directory is "/tmp", then "file.c" would be turned
into "/private/tmp/file.c" which won't match anything in the debug info.
Also, it should have been just a FileSpec with no directory and a filename
of "file.c" which could (and should) potentially match any instances of "file.c"
in the debug info.

So I removed the constructor that just takes a path:

FileSpec::FileSpec (const char *path); // REMOVED

You must now use the other constructor that has a "bool resolve" parameter that you must always supply:

FileSpec::FileSpec (const char *path, bool resolve);

I also removed the default parameter to SetFile():

void FileSpec::SetFile(const char *pathname, bool resolve);

And fixed all of the code to use the right settings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116944 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFileSpec.h
ore/FileSpec.h
6297a3a5c4d8b61f2429f371bdf207043dbca832 20-Oct-2010 Jim Ingham <jingham@apple.com> Don't cache the public stop reason, since it can change as plan completion gets processed. That means GetStopReason needs to return a shared pointer, not a pointer to the thread's cached version. Also allow the thread plans to get and set the thread private stop reason - that is usually more appropriate for the logic the thread plans need to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116892 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanStepOverBreakpoint.h
ab06af92020fd4a21eaa5daac3853596b9c45398 20-Oct-2010 Sean Callanan <scallanan@apple.com> Fixed a silly bug that was causing the "this" pointer
to be passed improperly to expressions in certain
cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116884 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangUserExpression.h
bb0c91fa5e8516016908dbd4cb79542ea4312b41 20-Oct-2010 Greg Clayton <gclayton@apple.com> Ok, last commit for the running processes in a new window. Now you can
optionally specify the tty you want to use if you want to use an existing
terminal window by giving a partial or full path name:

(lldb) process launch --tty=ttys002

This would find the terminal window (or tab on MacOSX) that has ttys002 in its
tty path and use it. If it isn't found, it will use a new terminal window.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116878 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
36f63a92bae332929e1a047b59ed6df651d8537f 19-Oct-2010 Greg Clayton <gclayton@apple.com> Stop the driver from handling SIGPIPE in case we communicate with stale
sockets so the driver doesn't just crash.

Added support for connecting to named sockets (unix IPC sockets) in
ConnectionFileDescriptor.

Modified the Host::LaunchInNewTerminal() for MacOSX to return the process
ID of the inferior process instead of the process ID of the Terminal.app. This
was done by modifying the "darwin-debug" executable to connect to lldb through
a named unix socket which is passed down as an argument. This allows a quick
handshake between "lldb" and "darwin-debug" so we can get the process ID
of the inferior and then attach by process ID and avoid attaching to the
inferior by process name since there could be more than one process with
that name. This still has possible race conditions, those will be fixed
in the near future. This fixes the SIGPIPE issues that were sometimes being
seen when task_for_pid was failing.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116792 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConnectionFileDescriptor.h
3a62e6d75447822b184f6501331079fe47283c49 19-Oct-2010 Caroline Tice <ctice@apple.com> Combine eArgTypeSignalName and eArgTypeUnixSignalNumber into a single
argument type, eArgTypeUnixSignal.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116764 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
24b48ff28b7c60dd4598212c3e77935a0fc1142d 18-Oct-2010 Greg Clayton <gclayton@apple.com> Added a new Host call to find LLDB related paths:

static bool
Host::GetLLDBPath (lldb::PathType path_type, FileSpec &file_spec);

This will fill in "file_spec" with an appropriate path that is appropriate
for the current Host OS. MacOSX will return paths within the LLDB.framework,
and other unixes will return the paths they want. The current PathType
enums are:

typedef enum PathType
{
ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc)
ePathTypeHeaderDir, // Find LLDB header file directory
ePathTypePythonDir // Find Python modules (PYTHONPATH) directory
} PathType;

All places that were finding executables are and python paths are now updated
to use this Host call.

Added another new host call to launch the inferior in a terminal. This ability
will be very host specific and doesn't need to be supported on all systems.
MacOSX currently will create a new .command file and tell Terminal.app to open
the .command file. It also uses the new "darwin-debug" app which is a small
app that uses posix to exec (no fork) and stop at the entry point of the
program. The GDB remote plug-in is almost able launch a process and attach to
it, it currently will spawn the process, but it won't attach to it just yet.
This will let LLDB not have to share the terminal with another process and a
new terminal window will pop up when you launch. This won't get hooked up
until we work out all of the kinks. The new Host function is:

static lldb::pid_t
Host::LaunchInNewTerminal (
const char **argv, // argv[0] is executable
const char **envp,
const ArchSpec *arch_spec,
bool stop_at_entry,
bool disable_aslr);

Cleaned up FileSpec::GetPath to not use strncpy() as it was always zero
filling the entire path buffer.

Fixed an issue with the dynamic checker function where I missed a '$' prefix
that should have been added.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116690 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
ldb-enumerations.h
bd296c661cdbb96f8bc172791441e4c2fc7e71f4 16-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed the UnixSignals class to be able to get a signal by name, short name, or signal number when using:

int32_t UnixSignals::GetSignalNumberFromName (const char *name) const;


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116641 91177308-0d34-0410-b5e6-96231b3b80d8
arget/UnixSignals.h
8de27c761a22187ef63fb60000894be163e7285f 16-Oct-2010 Greg Clayton <gclayton@apple.com> Made many ConstString functions inlined in the header file.

Changed all of our synthesized "___clang" functions, types and variables
that get used in expressions over to have a prefix of "$_lldb". Now when we
do name lookups we can easily switch off of the first '$' character to know
if we should look through only our internal (when first char is '$') stuff,
or when we should look through program variables, functions and types.

Converted all of the clang expression code over to using "const ConstString&"
values for names instead of "const char *" since there were many places that
were converting the "const char *" names into ConstString names and them
throwing them away. We now avoid making a lot of ConstString conversions and
benefit from the quick comparisons in a few extra spots.

Converted a lot of code from LLVM coding conventions into LLDB coding
conventions.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116634 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
xpression/ASTResultSynthesizer.h
xpression/ASTStructExtractor.h
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangPersistentVariables.h
xpression/ClangUserExpression.h
xpression/IRDynamicChecks.h
xpression/IRForTarget.h
xpression/IRToDWARF.h
deb391c13cab68fe3d04c824a651d091b3402899 15-Oct-2010 Greg Clayton <gclayton@apple.com> Added short names and descriptions to the UnixSignals class. Also cleaned up
the code a bit.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116561 91177308-0d34-0410-b5e6-96231b3b80d8
arget/UnixSignals.h
d168690e51f9020b926d3d0d57dc9a2cfb2095a8 15-Oct-2010 Jim Ingham <jingham@apple.com> Added support for breakpoint conditions. I also had to separate the "run the expression" part of ClangFunction::Execute from the "Gather the expression result" so that in the case of the Breakpoint condition I can move the condition evaluation into the normal thread plan processing.

Also added support for remembering the "last set breakpoint" so that "break modify" will act on the last set breakpoint.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116542 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
ore/Event.h
xpression/ClangExpressionVariable.h
xpression/ClangUserExpression.h
arget/Process.h
arget/StopInfo.h
arget/Target.h
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanTestCondition.h
bf8e42b9da0e1c6349a727d644ad37610b00d556 15-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an expression parsing issue where if you were stopped somewhere without
debug information and you evaluated an expression, a crash would occur as a
result of an unchecked pointer.

Added the ability to get the expression path for a ValueObject. For a rectangle
point child "x" the expression path would be something like: "rect.top_left.x".
This will allow GUI and command lines to get ahold of the expression path for
a value object without having to explicitly know about the hierarchy. This
means the ValueObject base class now has a "ValueObject *m_parent;" member.
All ValueObject subclasses now correctly track their lineage and are able
to provide value expression paths as well.

Added a new "--flat" option to the "frame variable" to allow for flat variable
output. An example of the current and new outputs:

(lldb) frame variable
argc = 1
argv = 0x00007fff5fbffe80
pt = {
x = 2
y = 3
}
rect = {
bottom_left = {
x = 1
y = 2
}
top_right = {
x = 3
y = 4
}
}
(lldb) frame variable --flat
argc = 1
argv = 0x00007fff5fbffe80
pt.x = 2
pt.y = 3
rect.bottom_left.x = 1
rect.bottom_left.y = 2
rect.top_right.x = 3
rect.top_right.y = 4


As you can see when there is a lot of hierarchy it can help flatten things out.
Also if you want to use a member in an expression, you can copy the text from
the "--flat" output and not have to piece it together manually. This can help
when you want to use parts of the STL in expressions:

(lldb) frame variable --flat
argc = 1
argv = 0x00007fff5fbffea8
hello_world._M_dataplus._M_p = 0x0000000000000000
(lldb) expr hello_world._M_dataplus._M_p[0] == '\0'




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116532 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectRegister.h
ymbol/ClangASTContext.h
ymbol/Type.h
23d6f274bdb3d91d8c78b24f008ef1e7ce63dbbe 13-Oct-2010 Caroline Tice <ctice@apple.com> Add new argument type, eArgSignalName,

Add missing break statment to case statement in Process::ShouldBroadcastEvent.

Add new command, "process handle" to allow users to control process behavior on
the receipt of various Unix signals (whether the process should stop; whether the
process should be passed the signal; whether the debugger user should be notified
that the signal came in).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116430 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
48fbdf7ffd3c5e28e7b954ed92345c1c45256109 12-Oct-2010 Greg Clayton <gclayton@apple.com> Modified the "breakpoint set --name NAME" to be the auto breakpoint set
function. It will inspect NAME and do the following:
- if the name contains '(' or starts with "-[" or "+[" then a full name search
will happen to match full function names with args (C++ demangled names) or
full objective C method prototypes.
- if the name contains "::" and no '(', then it is assumed to be a qualified
function name that is in a namespace or class. For "foo::bar::baz" we will
search for any functions with the basename or method name of "baz", then
filter the results to only those that contain "foo::bar::baz". This allows
setting breakpoint on C++ functions and methods without having to fully
qualify all of the types that would appear in C++ mangled names.
- if the name contains ":" (not "::"), then NAME is assumed to be an ObjC
selector.
_ otherwise, we assume just a plain function basename.

Now that "--name" is our "auto" mode, I introduced the new "--basename" option
("breakpoint set --basename NAME") to allow for function names that aren't
methods or selectors, just basenames. This can also be used to ignore C++
namespaces and class hierarchies for class methods.

Fixed clang enumeration promotion types to be correct.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116293 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointResolverName.h
ldb-enumerations.h
63e24d7aeae8a7feb2aae0581e597b922749d4a1 12-Oct-2010 Jim Ingham <jingham@apple.com> Add a way to temporarily divert events from a broadcaster to a private listener.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116271 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Broadcaster.h
arget/Process.h
887aa2898314218406275a34cbec30c11cd00acd 11-Oct-2010 Greg Clayton <gclayton@apple.com> Added a "--no-lldbinit" option (-n for short (which magically matches
what gdb uses)) so we can tell our "lldb" driver program to not automatically
parse any .lldbinit files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116179 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
nterpreter/CommandInterpreter.h
6bc0b5d69f6f5f46055be6cfea6f9a0eb11b1943 11-Oct-2010 Greg Clayton <gclayton@apple.com> Added the ability to get error strings back from failed
lldb_private::RegularExpression compiles and matches with:

size_t
RegularExpression::GetErrorAsCString (char *err_str,
size_t err_str_max_len) const;

Added the ability to search a variable list for variables whose names match
a regular expression:

size_t
VariableList::AppendVariablesIfUnique (const RegularExpression& regex,
VariableList &var_list,
size_t& total_matches);


Also added the ability to append a variable to a VariableList only if it is
not already in the list:

bool
VariableList::AddVariableIfUnique (const lldb::VariableSP &var_sp);

Cleaned up the "frame variable" command:
- Removed the "-n NAME" option as this is the default way for the command to
work.
- Enable uniqued regex searches on variable names by fixing the "--regex RE"
command to work correctly. It will match all variables that match any
regular expressions and only print each variable the first time it matches.
- Fixed the option type for the "--regex" command to by eArgTypeRegularExpression
instead of eArgTypeCount




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116178 91177308-0d34-0410-b5e6-96231b3b80d8
ore/RegularExpression.h
ymbol/VariableList.h
c12b6b40b93687539b0ca303f64eb77b6af6924d 11-Oct-2010 Greg Clayton <gclayton@apple.com> Added a new test case to test signals with.

Added frame relative frame selection to "frame select". You can now select
frames relative to the current frame (which defaults to zero if the current
frame hasn't yet been set for a thread):

The gdb "up" command can be done as:
(lldb) frame select -r 1
The gdb "down" command can be done as:
(lldb) frame select -r -1

Place the following in your ~/.lldbinit file for "up" and "down":

command alias up frame select -r 1
command alias down frame select -r -1




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116176 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
8d3802d9d6c1be4c0d37c4d269b18bcb865823e6 08-Oct-2010 Greg Clayton <gclayton@apple.com> Added mutex protection to the Symtab class.

Added a new SortOrder enumeration and hooked it up to the "image dump symtab"
command so we can dump symbol tables in the original order, sorted by address,
or sorted by name.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116049 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
ldb-enumerations.h
3fed8b9b2696fc2ea78005c8f9b1c621d5748042 08-Oct-2010 Greg Clayton <gclayton@apple.com> Hooked up ability to look up data symbols so they show up in disassembly
if the address comes from a data section.

Fixed an issue that could occur when looking up a symbol that has a zero
byte size where no match would be returned even if there was an exact symbol
match.

Cleaned up the section dump output and added the section type into the output.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116017 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-private.h
d8c625380b56759fc3fef8b9cf0389ae1a07f44d 07-Oct-2010 Greg Clayton <gclayton@apple.com> Cleaned up the SWIG stuff so all includes happen as they should, no pulling
tricks to get types to resolve. I did this by correctly including the correct
files: stdint.h and all lldb-*.h files first before including the API files.
This allowed me to remove all of the hacks that were in the lldb.swig file
and it also allows all of the #defines in lldb-defines.h and enumerations
in lldb-enumerations.h to appear in the lldb.py module. This will make the
python script code a lot more readable.

Cleaned up the "process launch" command to not execute a "process continue"
command, it now just does what it should have with the internal API calls
instead of executing another command line command.

Made the lldb_private::Process set the state to launching and attaching if
WillLaunch/WillAttach return no error respectively.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115902 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBCommandInterpreter.h
PI/SBTarget.h
ldb-defines.h
e47649c441e7abe1dc5158ec36bba1bb66fcbb08 07-Oct-2010 Johnny Chen <johnny.chen@apple.com> o SBtarget.cpp/.h:

Temporarily commenting out the deprecated LaunchProcess() method.
SWIG is not able to handle the overloaded functions.

o dotest.py/lldbtest.py:

Add an '-w' option to insert some wait time between consecutive test cases.

o TestClassTypes.py:

Make the breakpoint_creation_by_filespec_python() test method more robust and
more descriptive by printing out a more insightful assert message.

o lldb.swig: Coaches swig to treat StateType as an int type, instead of a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115899 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
c5f728c81b4896cfbbc87ed1daedf42ba2c0ee63 07-Oct-2010 Greg Clayton <gclayton@apple.com> Expose the error contained within an SBValue.

Move anything that creates a new process into SBTarget. Marked some functions
as deprecated. I will remove them after our new API changes make it through
a build cycle.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115854 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBError.h
PI/SBProcess.h
PI/SBTarget.h
PI/SBValue.h
992ce267ba735d6ec834cd0778ebb891121690a2 06-Oct-2010 Greg Clayton <gclayton@apple.com> Leaving in deprecated functions until we can get a clean build with the new APIs in place before removing the deprecated functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115815 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
1a3083a04c20cc8e7298e03b731cab5d09aa7bad 06-Oct-2010 Greg Clayton <gclayton@apple.com> Added the first of hopefully many python example scripts that show how to
use the python API that is exposed through SWIG to do some cool stuff.

Also fixed synchronous debugging so that all process control APIs exposed
through the python API will now wait for the process to stop if you set
the async mode to false (see disasm.py).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115738 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
5c4c746a3a83c1aad411c6cdc5f9525a4fc2d17e 06-Oct-2010 Greg Clayton <gclayton@apple.com> Added the ability to get the disassembly instructions from the function and
symbol.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115734 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBFunction.h
PI/SBInstruction.h
PI/SBInstructionList.h
PI/SBProcess.h
PI/SBStream.h
PI/SBSymbol.h
PI/SBTarget.h
ore/Disassembler.h
ldb-forward-rtti.h
ldb-forward.h
11730f38ab136f60497beb2ef15feb98a6c33a50 06-Oct-2010 Greg Clayton <gclayton@apple.com> Restored the ability to set the format for expressions after changing the expression results over to ValueObjectSP objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115733 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
dc27aba0bdf7c2aa4f59374d4b612bf84bfe70c8 06-Oct-2010 Sean Callanan <scallanan@apple.com> Added handling for external variables in function
arguments to the expression parser. This means that
structs can be returned from the "expr" command.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115698 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
d171972ecc7788bdb02d3e81420a24841e09a2bf 05-Oct-2010 Greg Clayton <gclayton@apple.com> Added the notion that a value object can be constant by adding:
bool ValueObject::GetIsConstant() const;
void ValueObject::SetIsConstant();

This will stop anything from being re-evaluated within the value object so
that constant result value objects can maintain their frozen values without
anything being updated or changed within the value object.

Made it so the ValueObjectConstResult can be constructed with an
lldb_private::Error object to allow for expression results to have errors.

Since ValueObject objects contain error objects, I changed the expression
evaluation in ClangUserExpression from

static Error
ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
const char *expr_cstr,
lldb::ValueObjectSP &result_valobj_sp);

to:

static lldb::ValueObjectSP
Evaluate (ExecutionContext &exe_ctx, const char *expr_cstr);

Even though expression parsing is borked right now (pending fixes coming from
Sean Callanan), I filled in the implementation for:

SBValue SBFrame::EvaluateExpression (const char *expr);

Modified all expression code to deal with the above changes.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115589 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ore/ValueObjectConstResult.h
xpression/ClangUserExpression.h
ldb-forward.h
377e0b4b4677128244b151396f77b3421bf2b9fa 05-Oct-2010 Greg Clayton <gclayton@apple.com> Moved expression evaluation from CommandObjectExpression into
ClangUserExpression::Evaluate () as a public static function so anyone can
evaluate an expression.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115581 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangUserExpression.h
66ed2fbeaf588fe4105a1305f7e956dcf9fbe299 05-Oct-2010 Greg Clayton <gclayton@apple.com> Added a new ValueObject type that will be used to freeze dry expression
results. The clang opaque type for the expression result will be added to the
Target's ASTContext, and the bytes will be stored in a DataBuffer inside
the new object. The class is named: ValueObjectConstResult

Now after an expression is evaluated, we can get a ValueObjectSP back that
contains a ValueObjectConstResult object.

Relocated the value object dumping code into a static function within
the ValueObject class instead of being in the CommandObjectFrame.cpp file
which is what contained the code to dump variables ("frame variables").




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115578 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
ore/DataExtractor.h
ore/ValueObject.h
ore/ValueObjectConstResult.h
xpression/ClangExpressionVariable.h
ldb-enumerations.h
9305747659465e27c87a5bc5ff60c7a36fc8fefc 05-Oct-2010 Jim Ingham <jingham@apple.com> Add an "auto-confirm" setting to the debugger so you can turn off the confirmations if you want to.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115572 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
43b014aa33e20e61790e16ed69a2c57aae2fbc6e 05-Oct-2010 Caroline Tice <ctice@apple.com> Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115570 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
ldb-enumerations.h
5e16ef58a8bc2788be0ba03d8b2d0e9f3650fa5d 04-Oct-2010 Jim Ingham <jingham@apple.com> Add a "Confirm" function to the CommandInterpreter so you can confirm potentially dangerous operations in a generic way.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115546 91177308-0d34-0410-b5e6-96231b3b80d8
ore/InputReader.h
nterpreter/CommandInterpreter.h
1393da9a4df074f1b41a2725b578463e4968ab7b 04-Oct-2010 Jim Ingham <jingham@apple.com> Have to friend SBFrame or it can't make symbols for the frame.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115543 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBSymbol.h
8f1e08b43c84001dad99022799a08f4523592b8f 04-Oct-2010 Greg Clayton <gclayton@apple.com> Added GetSymbol to the frame.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115535 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFrame.h
a830adbcd63d1995a01e6e18da79893c1426ca43 04-Oct-2010 Greg Clayton <gclayton@apple.com> There are now to new "settings set" variables that live in each debugger
instance:

settings set frame-format <string>
settings set thread-format <string>

This allows users to control the information that is seen when dumping
threads and frames. The default values are set such that they do what they
used to do prior to changing over the the user defined formats.

This allows users with terminals that can display color to make different
items different colors using the escape control codes. A few alias examples
that will colorize your thread and frame prompts are:

settings set frame-format 'frame #${frame.index}: \033[0;33m${frame.pc}\033[0m{ \033[1;4;36m${module.file.basename}\033[0;36m ${function.name}{${function.pc-offset}}\033[0m}{ \033[0;35mat \033[1;35m${line.file.basename}:${line.number}}\033[0m\n'

settings set thread-format 'thread #${thread.index}: \033[1;33mtid\033[0;33m = ${thread.id}\033[0m{, \033[0;33m${frame.pc}\033[0m}{ \033[1;4;36m${module.file.basename}\033[0;36m ${function.name}{${function.pc-offset}}\033[0m}{, \033[1;35mstop reason\033[0;35m = ${thread.stop-reason}\033[0m}{, \033[1;36mname = \033[0;36m${thread.name}\033[0m}{, \033[1;32mqueue = \033[0;32m${thread.queue}}\033[0m\n'

A quick web search for "colorize terminal output" should allow you to see what
you can do to make your output look like you want it.

The "settings set" commands above can of course be added to your ~/.lldbinit
file for permanent use.

Changed the pure virtual
void ExecutionContextScope::Calculate (ExecutionContext&);
To:
void ExecutionContextScope::CalculateExecutionContext (ExecutionContext&);

I did this because this is a class that anything in the execution context
heirarchy inherits from and "target->Calculate (exe_ctx)" didn't always tell
you what it was really trying to do unless you look at the parameter.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115485 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
arget/ExecutionContextScope.h
arget/Process.h
arget/RegisterContext.h
arget/StackFrame.h
arget/Target.h
arget/Thread.h
b433a3d8b910d571c0bcdcd5018778ac3763e703 01-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where if a method funciton was asked to be parsed before
its containing class was parsed, we would crash.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115343 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTType.h
ymbol/Type.h
ymbol/TypeList.h
4d6675c8e1cab6360f59865229835ae137d6f68a 01-Oct-2010 Caroline Tice <ctice@apple.com> Modify command options to use the new arguments mechanism. Now all command option
arguments are specified in a standardized way, will have a standardized name, and
have functioning help.

The next step is to start writing useful help for all the argument types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115335 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
ldb-enumerations.h
ldb-types.h
fb355113cef81a6fa56b468bec7798a24d027b6d 01-Oct-2010 Caroline Tice <ctice@apple.com> Add infrastructure for standardizing arguments for commands and
command options; makes it easier to ensure that the same type of
argument will have the same name everywhere, hooks up help for command
arguments, so that users can ask for help when they are confused about
what an argument should be; puts in the beginnings of the ability to
do tab-completion for certain types of arguments, allows automatic
syntax help generation for commands with arguments, and adds command
arguments into command options help correctly.

Currently only the breakpoint-id and breakpoint-id-range arguments, in
the breakpoint commands, have been hooked up to use the new mechanism.
The next steps will be to fix the command options arguments to use
this mechanism, and to fix the rest of the regular command arguments
to use this mechanism. Most of the help text is currently missing or
dummy text; this will need to be filled in, and the existing argument
help text will need to be cleaned up a bit (it was thrown in quickly,
mostly for testing purposes).

Help command now works for all argument types, although the help may not
be very helpful yet.

Those commands that take "raw" command strings now indicate it in their
help text.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115318 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
ldb-enumerations.h
30449d50f5328ca745d09d943b7e3b1ba41bff08 01-Oct-2010 Greg Clayton <gclayton@apple.com> Make C++ constructors and destructors correctly within the clang types we
generate from DWARF.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115268 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
ea58a3cfac7ff90cd86c707d65dbd7d345a12bbe 01-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where byte sizes were not able to be calculated for forward
declarations because we lost the original context which was needed to be
able to figure out the byte size.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115223 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Type.h
4b40711e7950310afb74835820eb669004cd8c44 30-Sep-2010 Greg Clayton <gclayton@apple.com> Cleaned up a unused member variable in Debugger.

Added the start of Host specific launch services, though it currently isn't
hookup up to anything. We want to be able to launch a process and use the
native launch services to launch an app like it would be launched by the
user double clicking on the app. We also eventually want to be able to run
a command line app in a newly spawned terminal to avoid terminal sharing.

Fixed an issue with the new DWARF forward type declaration stuff. A crasher
was found that was happening when trying to properly expand the forward
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115213 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ost/Host.h
ymbol/Type.h
771131d04344e57abb340699f54dce77a511bc71 30-Sep-2010 Sean Callanan <scallanan@apple.com> Switched the expression parser from using TargetData
to using Clang to get type sizes. This fixes a bug
where the type size for a double[2] was being wrongly
reported as 8 instead of 16 bytes, causing problems
for IRForTarget.

Also improved logging so that the next bug in this
area will be easier to find.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115208 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
324067bc91877dbbd6ec3a8663914fa3dbb7e3c9 30-Sep-2010 Jim Ingham <jingham@apple.com> Add "-o" option to "expression" which prints the object description if available.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115115 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
arget/CPPLanguageRuntime.h
arget/LanguageRuntime.h
462d4147f3bb9141bf62d904f58a623db00669df 29-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed the forward declaration issue that was present in the DWARF parser after
adding methods to C++ and objective C classes. In order to make methods, we
need the function prototype which means we need the arguments. Parsing these
could cause a circular reference that caused an assertion.

Added a new typedef for the clang opaque types which are just void pointers:
lldb::clang_type_t. This appears in lldb-types.h.

This was fixed by enabling struct, union, class, and enum types to only get
a forward declaration when we make the clang opaque qual type for these
types. When they need to actually be resolved, lldb_private::Type will call
a new function in the SymbolFile protocol to resolve a clang type when it is
not fully defined (clang::TagDecl::getDefinition() returns NULL). This allows
us to be a lot more lazy when parsing clang types and keeps down the amount
of data that gets parsed into the ASTContext for each module.

Getting the clang type from a "lldb_private::Type" object now takes a boolean
that indicates if a forward declaration is ok:

clang_type_t lldb_private::Type::GetClangType (bool forward_decl_is_ok);

So function prototypes that define parameters that are "const T&" can now just
parse the forward declaration for type 'T' and we avoid circular references in
the type system.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115012 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Value.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectRegister.h
ore/ValueObjectVariable.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/SymbolFile.h
ymbol/Type.h
ymbol/TypeList.h
ldb-types.h
b66cd074ec097b5b0a6f2ce292f5072aa1217ca6 28-Sep-2010 Jim Ingham <jingham@apple.com> Replace the vestigial Value::GetOpaqueCLangQualType with the more correct Value::GetValueOpaqueClangQualType.

But mostly, move the ObjC Trampoline handling code from the MacOSX dyld plugin to the AppleObjCRuntime classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114935 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Value.h
ore/ValueObject.h
arget/CPPLanguageRuntime.h
arget/LanguageRuntime.h
arget/ObjCLanguageRuntime.h
arget/ObjCObjectPrinter.h
arget/Process.h
ldb-forward.h
6df0840c87be29724055716db951aa6d494ddabc 28-Sep-2010 Sean Callanan <scallanan@apple.com> Added type lookup, so variables with user-defined types
can be allocated and manipulated.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114928 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
59c5d5dbe1b565bca389c9547377a2dd17b9e956 27-Sep-2010 Caroline Tice <ctice@apple.com> Automatically wrap *all* Python code entered for a breakpoint command inside
an auto-generated Python function, and pass the stoppoint context frame and
breakpoint location as parameters to the function (named 'frame' and 'bp_loc'),
to be used inside the breakpoint command Python code, if desired.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114849 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpointLocation.h
PI/SBFrame.h
1ebef44c126bd3a615b3ad844c46a82a82efa0e7 27-Sep-2010 Caroline Tice <ctice@apple.com> Create more useful instance names for target, process and thread instances.

Change default 'set' behavior so that all instance settings for the specified variable will be
updated, unless the "-n" ("--no_override") command options is specified.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114808 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
arget/Target.h
arget/Thread.h
6a5aa8ab240a13f397e3e09f2ca1ea3f16b451c2 25-Sep-2010 Greg Clayton <gclayton@apple.com> Cleaned a few build related things up:

Added a virtual destructor to ClangUtilityFunction with a body to it cleans
itself up.

Moved our SharingPtr into the lldb_private namespace to keep it easy to make
an exports file that exports only what is needed ("lldb::*").



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114771 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
tility/SharingPtr.h
ldb-types.h
1d8173f1b622482bd6610cc34ffd5668b75cf7bd 24-Sep-2010 Greg Clayton <gclayton@apple.com> Added the ability to create an objective C method for an objective C
interface in ClangASTContext. Also added two bool returning functions that
indicated if an opaque clang qual type is a CXX class type, and if it is an
ObjC class type.

Objective C classes now will get their methods added lazily as they are
encountered. The reason for this is currently, unlike C++, the
DW_TAG_structure_type and owns the ivars, doesn't not also contain the
member functions. This means when we parse the objective C class interface
we either need to find all functions whose names start with "+[CLASS_NAME"
or "-[CLASS_NAME" and add them all to the class, or when we parse each objective
C function, we slowly add it to the class interface definition. Since objective
C's class doesn't change internal bits according to whether it has certain types
of member functions (like C++ does if it has virtual functions, or if it has
user ctors/dtors), I currently chose to lazily populate the class when each
functions is parsed. Another issue we run into with ObjC method declarations
is the "self" and "_cmd" implicit args are not marked as artificial in the
DWARF (DW_AT_artifical), so we currently have to look for the parameters by
name if we are trying to omit artificial function args if the language of the
compile unit is ObjC or ObjC++.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114722 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
ccd584dccb920cdb028de69950774c3bcdc025ec 23-Sep-2010 Jim Ingham <jingham@apple.com> Add GetSP to the StackFrame.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114674 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
arget/StackFrameList.h
arget/Thread.h
47a5c4c01066ece2d41cba56c3a065eeca12d47c 23-Sep-2010 Sean Callanan <scallanan@apple.com> Updated to latest LLVM. Major LLVM changes:

- Sema is now exported (and there was much rejoicing.)

- Storage classes are now centrally defined.

Also fixed some bugs that the new LLVM picked up.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114622 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ASTResultSynthesizer.h
xpression/ClangASTSource.h
xpression/ClangExpressionParser.h
ymbol/ClangASTContext.h
642036f22366d47ea8e6f8498bedb92b88f7f79f 23-Sep-2010 Jim Ingham <jingham@apple.com> Committing the skeleton of Language runtime plugin classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114620 91177308-0d34-0410-b5e6-96231b3b80d8
ore/PluginManager.h
ore/ValueObject.h
arget/CPPLanguageRuntime.h
arget/LanguageRuntime.h
arget/ObjCLanguageRuntime.h
arget/Process.h
ldb-forward-rtti.h
ldb-forward.h
ldb-private-interfaces.h
412440aa3a110e4068ee99729f7883c828fb3dce 23-Sep-2010 Greg Clayton <gclayton@apple.com> Added motheds to C++ classes as we parse them to keep clang happy.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114616 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
ymbol/ClangASTContext.h
e49ec18f1868168c8927ae30a379db176ca8cce3 23-Sep-2010 Caroline Tice <ctice@apple.com> Remove all the __repr__ methods from the API/*.h files, and put them
into python-extensions.swig, which gets included into lldb.swig, and
adds them back into the classes when swig generates it's C++ file. This
keeps the Python stuff out of the general API classes.

Also fixed a small bug in the copy constructor for SBSymbolContext.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114602 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBCommandReturnObject.h
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBDefines.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBInstruction.h
PI/SBLineEntry.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBTarget.h
PI/SBThread.h
PI/SBType.h
PI/SBValue.h
1ca48b0529de3d8efc05037649fe178e90e36bb7 22-Sep-2010 Caroline Tice <ctice@apple.com> Remove SBCommandContext which was not needed or doing anything.

Add SBValueList.h & SBStream.h to build-swig-Python.sh; add SBValueList.h to lldb.swig



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114549 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandContext.h
ea0dbca6e8bc9e6150442e60121f313ea77b5a8f 22-Sep-2010 Jason Molenda <jmolenda@apple.com> Add a new ArchVolatileRegs plugin class to identify
whether a given register number is treated as volatile
or not for a given architecture/platform.

approx 450 lines of boilerplate, 50 lines of actual code. :)



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114537 91177308-0d34-0410-b5e6-96231b3b80d8
ore/PluginManager.h
tility/ArchVolatileRegs.h
ldb-forward.h
ldb-private-interfaces.h
3c9c5eb466869ede185e879d14a47335fb43194d 21-Sep-2010 Sean Callanan <scallanan@apple.com> Removed the hacky "#define this ___clang_this" handler
for C++ classes. Replaced it with a less hacky approach:

- If an expression is defined in the context of a
method of class A, then that expression is wrapped as
___clang_class::___clang_expr(void*) { ... }
instead of ___clang_expr(void*) { ... }.

- ___clang_class is resolved as the type of the target
of the "this" pointer in the method the expression
is defined in.

- When reporting the type of ___clang_class, a method
with the signature ___clang_expr(void*) is added to
that class, so that Clang doesn't complain about a
method being defined without a corresponding
declaration.

- Whenever the expression gets called, "this" gets
looked up, type-checked, and then passed in as the
first argument.

This required the following changes:

- The ABIs were changed to support passing of the "this"
pointer as part of trivial calls.

- ThreadPlanCallFunction and ClangFunction were changed
to support passing of an optional "this" pointer.

- ClangUserExpression was extended to perform the
wrapping described above.

- ClangASTSource was changed to revert the changes
required by the hack.

- ClangExpressionParser, IRForTarget, and
ClangExpressionDeclMap were changed to handle
different manglings of ___clang_expr flexibly. This
meant no longer searching for a function called
___clang_expr, but rather looking for a function whose
name *contains* ___clang_expr.

- ClangExpressionParser and ClangExpressionDeclMap now
remember whether "this" is required, and know how to
look it up as necessary.

A few inheritance bugs remain, and I'm trying to resolve
these. But it is now possible to use "this" as well as
refer implicitly to member variables, when in the proper
context.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114384 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
arget/ABI.h
arget/ThreadPlanCallFunction.h
bcb5b454767121980d937d2610ba762fdb575c45 20-Sep-2010 Caroline Tice <ctice@apple.com> Make GetInstanceSettingsValue methods take an Error * rather than an Error &,
and have them return a bool to indicate success or not.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114361 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/UserSettingsController.h
arget/Process.h
arget/Target.h
arget/Thread.h
5bc8c97d62b2e399bd90fb7e00c903d7887412ab 20-Sep-2010 Caroline Tice <ctice@apple.com> Add UserSettings to Target class, making Target settings
the parent of Process settings; add 'default-arch' as a
class-wide setting for Target. Replace lldb::GetDefaultArchitecture
with Target::GetDefaultArchitecture & Target::SetDefaultArchitecture.

Add 'use-external-editor' as user setting to Debugger class & update
code appropriately.

Add Error parameter to methods that get user settings, for easier
reporting of bad requests.

Fix various other minor related bugs.

Fix test cases to work with new changes.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114352 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
ore/UserSettingsController.h
arget/Process.h
arget/Target.h
arget/Thread.h
ldb-private.h
98f930f429160f9777f626c3ac6aa609f4e965d2 20-Sep-2010 Caroline Tice <ctice@apple.com> Add GetDescription() and __repr__ () methods to most API classes, to allow
"print" from inside Python to print out the objects in a more useful
manner.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114321 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBCommandReturnObject.h
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBDefines.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBInstruction.h
PI/SBLineEntry.h
PI/SBModule.h
PI/SBProcess.h
PI/SBStream.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBTarget.h
PI/SBThread.h
PI/SBType.h
PI/SBValue.h
ymbol/Block.h
d0a5a23d734da7a2170802ccd096f53b8a527811 19-Sep-2010 Greg Clayton <gclayton@apple.com> Added code that will allow completely customizable prompts for use in
replacing the "(lldb)" prompt, the "frame #1..." displays when doing
stack backtracing and the "thread #1....". This will allow you to see
exactly the information that you want to see where you want to see it.
This currently isn't hookup up to the prompts yet, but it will be soon.

So what is the format of the prompts? Prompts can contain variables that
have access to the current program state. Variables are text that appears
in between a prefix of "${" and ends with a "}". Some of the interesting
variables include:

// The frame index (0, 1, 2, 3...)
${frame.index}

// common frame registers with generic names
${frame.pc}
${frame.sp}
${frame.fp}
${frame.ra}
${frame.flags}

// Access to any frame registers by name where REGNAME is any register name:
${frame.reg.REGNAME}

// The current compile unit file where the frame is located
${file.basename}
${file.fullpath}

// Function information
${function.name}
${function.pc-offset}

// Process info
${process.file.basename}
${process.file.fullpath}
${process.id}
${process.name}

// Thread info
${thread.id}
${thread.index}
${thread.name}
${thread.queue}
${thread.stop-reason}

// Target information
${target.arch}

// The current module for the current frame (the shared library or executable
// that contains the current frame PC value):
${module.file.basename}
${module.file.fullpath}

// Access to the line entry for where the current frame is when your thread
// is stopped:
${line.file.basename}
${line.file.fullpath}
${line.number}
${line.start-addr}
${line.end-addr}

Many times the information that you might have in your prompt might not be
available and you won't want it to print out if it isn't valid. To take care
of this you can enclose everything that must resolve into a scope. A scope
is starts with '{' and ends with '}'. For example in order to only display
the current file and line number when the information is available the format
would be:

"{ at {$line.file.basename}:${line.number}}"

Broken down this is:

start the scope: "{"

format whose content will only be displayed if all information is available:
"at {$line.file.basename}:${line.number}"

end the scope: "}"

We currently can represent the infomration we see when stopped at a frame:

frame #0: 0x0000000100000e85 a.out`main + 4 at test.c:19

with the following format:

"frame #${frame.index}: ${frame.pc} {${module.file.basename}`}{${function.name}{${function.pc-offset}}{ at ${line.file.basename}:${line.number}}\n"

This breaks down to always print:

"frame #${frame.index}: ${frame.pc} "

only print the module followed by a tick if we have a valid module:

"{${module.file.basename}`}"

print the function name with optional offset:
"{${function.name}{${function.pc-offset}}"

print the line info if it is available:

"{ at ${line.file.basename}:${line.number}}"

then finish off with a newline:

"\n"

Notice you can also put newlines ("\n") and tabs and everything else you
are used to putting in a format string when desensitized with the \ character.

Cleaned up some of the user settings controller subclasses. All of them
do not have any global settings variables and were all implementing stubs
for the get/set global settings variable. Now there is a default version
in UserSettingsController that will do nothing.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114306 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/UserSettingsController.h
ymbol/Function.h
ymbol/Symbol.h
arget/Process.h
arget/Thread.h
fe424a92fc6fd92f810d243912461fe028a2b63c 18-Sep-2010 Greg Clayton <gclayton@apple.com> General command line help cleanup:
- All single character options will now be printed together
- Changed all options that contains underscores to contain '-' instead
- Made the help come out a little flatter by showing the long and short
option on the same line.
- Modified the short character for "--ignore-count" options to "-i"



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114265 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
ymbol/ObjectFile.h
arget/DynamicLoader.h
arget/Process.h
238c0a1e7b733cee539258faa656159c63f9e893 18-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed the way set/show variables were being accessed to being natively
accessed by the objects that own the settings. The previous approach wasn't
very usable and made for a lot of unnecessary code just to access variables
that were already owned by the objects.

While I fixed those things, I saw that CommandObject objects should really
have a reference to their command interpreter so they can access the terminal
with if they want to output usaage. Fixed up all CommandObjects to take
an interpreter and cleaned up the API to not need the interpreter to be
passed in.

Fixed the disassemble command to output the usage if no options are passed
down and arguments are passed (all disassebmle variants take options, there
are no "args only").



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114252 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/CommandObjectMultiword.h
nterpreter/CommandObjectRegexCommand.h
nterpreter/Options.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/ScriptInterpreterPython.h
arget/Process.h
86ba24de3b14dedb52d9c97269d23a90692626aa 17-Sep-2010 Johnny Chen <johnny.chen@apple.com> Fixed build error of LLDBWrapPython.cpp by removing the "protected" access modifier.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114194 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBStringList.h
ab7b39c679528fa2574430ec8035ee83d664acb8 17-Sep-2010 Greg Clayton <gclayton@apple.com> We now have SBStream that mirrors the generic stream classes we
use inside lldb (lldb_private::StreamFile, and lldb_private::StreamString).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114188 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBStream.h
PI/SBStringList.h
ore/StreamFile.h
795230029c9c8ff35c167ee5f548b1b373b89c33 17-Sep-2010 Sean Callanan <scallanan@apple.com> Re-committed AddMethodToCXXRecordType, now that
the bug I introduced to ClangASTContext is
resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114157 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
a751f7b1baa037ab6e9398f7bf5eb3a36a84e984 17-Sep-2010 Sean Callanan <scallanan@apple.com> Added a static function to get the void type for
an ASTContext; also added a function to get the
Clang-style CVR qualifiers for a type as an
unsigned int.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114152 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
ca4a1822367c7090498ee99a0ee297c76023df68 17-Sep-2010 Johnny Chen <johnny.chen@apple.com> Reverted r114125, r114124, and r114123 as it broke the test suite - segfaults
when running test/class_types.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114132 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
cc31338239fd31a1f159d6ebed1c715bd0943fb2 17-Sep-2010 Sean Callanan <scallanan@apple.com> GetBuiltInType_void(clang::ASTContext*) should be
static.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114125 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
409be0448d02b7e0eb890009926b42f35eabf6cc 17-Sep-2010 Sean Callanan <scallanan@apple.com> Well, it shouldn't be quite *that* obviously broken.
Quick fix to AddMethodToCXXRecordType's non-static
definition.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114124 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
d7d82d4c068b7dfadbac818f46dbc11c0f623c81 17-Sep-2010 Sean Callanan <scallanan@apple.com> Added AddMethodToCXXRecordType. This is not yet
tested, but I'm committing because it's not used
anywhere and I want to avoid conflicts.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114123 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
2ea8f27fe76e30ba8fff1f58a50ad3e409e8a8ba 16-Sep-2010 Sean Callanan <scallanan@apple.com> Made CreateFunctionType static. Also fixed the spelling
for CreateParameterDeclaration.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114111 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
60a0ced7da29dbe746115d7ae3498c0e1af5d58a 16-Sep-2010 Sean Callanan <scallanan@apple.com> Made AddFieldToRecordType a static method on
ClangASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114110 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
75b11a343a035ab426473a785a045f0614af9984 16-Sep-2010 Caroline Tice <ctice@apple.com> Fix issues with CreateInstanceName, a virtual function, being called
in an initializer.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114107 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
0021c97fbd17e38113d2e76b93c94ee05213ee45 16-Sep-2010 Johnny Chen <johnny.chen@apple.com> Undo 114084 and 114087 to unbreak the build for the time being.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114095 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
arget/Process.h
arget/Thread.h
a2784ee3c8451936d50abf94dcb29527d1a2a85a 16-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Turns out CreateInstanceName is duplicated in two other places. Make them static too, sigh.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114087 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
arget/Thread.h
f95e7076417dcaeedbd98f46e83b1ba658842a01 16-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Make this method static. Bad things(tm) happen when a non-static method is called in a constructor's initializer list.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114084 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
4c273fd84b6233fba1f2ce9d34affa5c349d0911 16-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Unbreak build, you can't take a pointer from a "register" variable. Most compilers ignore this keyword anyways.

Also remove a typedef that typedefs nothing.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114083 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/UnwindPlan.h
0e81b6475a71b32d1edf30a26487c003cc308bf3 16-Sep-2010 Jim Ingham <jingham@apple.com> Step past prologues when we step into functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114055 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanStepInRange.h
c4547c59f2e8390bdbf92484c851be06395b8e77 16-Sep-2010 Jim Ingham <jingham@apple.com> Add the ability to not resolve the name passed to FileSpec. Then don't resolve the names of compilation units found in DWARF.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114054 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
dfc91c368886f961b5cac95efc9adfe9be05cf73 15-Sep-2010 Caroline Tice <ctice@apple.com> Remove unnecessary/inappropriate output-printing functions from
the API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113993 91177308-0d34-0410-b5e6-96231b3b80d8
PI/LLDB.h
PI/SBBreakpoint.h
PI/SBCommandInterpreter.h
PI/SBDefines.h
PI/SBEvent.h
PI/SBThread.h
PI/SBValue.h
5fcff9ac1a713d5e814b4a05edef7544be470ad0 15-Sep-2010 Greg Clayton <gclayton@apple.com> 15-20% speed improvement when parsing DWARF. I used instruments to
find the hotspots in our code when indexing the DWARF. A combination of
using SmallVector to avoid collection allocations, using fixed form
sizes when possible, and optimizing the hot loops contributed to the
speedup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113961 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataExtractor.h
41ae21783ad6827b4c2e0f6856ecee730f925d78 15-Sep-2010 Caroline Tice <ctice@apple.com> Modify "settings list" so you can specify a particular instance setting name,
or a settings prefix, and it will list information about the subset of settings
you requested. Also added tab-completion (now that it takes an optional argument).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113952 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
1924e2408687e0ee41976010c6b9410bdd01270d 15-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed a missing newline when dumping mixed disassembly.

Added a "bool show_fullpaths" to many more objects that were
previously always dumping full paths.

Fixed a few places where the DWARF was not indexed when we
we needed it to be when making queries. Also fixed an issue
where the DWARF in .o files wasn't searching all .o files
for the types.

Fixed an issue with the output from "image lookup --type <TYPENAME>"
where the name and byte size might not be resolved and might not
display. We now call the accessors so we end up seeing all of the
type info.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113951 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Declaration.h
ymbol/Function.h
d9ece2a74d30a0610e56b85dc472b9b09344c2c3 15-Sep-2010 Caroline Tice <ctice@apple.com> Remove all visible uses of "[DEFAULT]" instance name.

Add ability to rename UserSettingsInstances after they have been created
(via UserSettingsController::RenameInstanceSettings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113950 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
49480b158ee907f30afea651d2c81a67b5dbc971 15-Sep-2010 Greg Clayton <gclayton@apple.com> Clear the section list when a our current process is destroyed.

Add missing files that I forgot to checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113902 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ThreadSafeSTLMap.h
arget/SectionLoadList.h
eea264007bc5fb42c8f3239726a9d28ae42e1b7b 15-Sep-2010 Greg Clayton <gclayton@apple.com> Moved the section load list up into the target so we can use the target
to symbolicate things without the need for a valid process subclass.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113895 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBTarget.h
ore/Address.h
ore/AddressRange.h
ore/Section.h
ore/ThreadSafeSTLMap.h
ymbol/Block.h
ymbol/Function.h
ymbol/LineEntry.h
ymbol/LineTable.h
ymbol/Symbol.h
ymbol/SymbolContext.h
ymbol/Symtab.h
ymbol/UnwindPlan.h
arget/Process.h
arget/Target.h
17454cfc6a757305a7d9d4c31313c38981b57b01 15-Sep-2010 Jim Ingham <jingham@apple.com> Add the ability for "ThreadPlanRunToAddress" to run to multiple addresses.
Added the ability to specify a preference for mangled or demangled to Mangled::GetName.
Changed one place where mangled was prefered in GetName.
The Dynamic loader should look up the target of a stub by mangled name if it exists.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113869 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Mangled.h
arget/ThreadPlanRunToAddress.h
cc0746247880e9c87711031ce8a535544f4499d7 14-Sep-2010 Sean Callanan <scallanan@apple.com> Added code to support use of "this" and "self" in
expressions. This involved three main changes:

- In ClangUserExpression::ClangUserExpression(),
we now insert the following lines into the
expression:
#define this ___clang_this
#define self ___clang_self

- In ClangExpressionDeclMap::GetDecls(), we
special-case ___clang_(this|self) and instead
look up "this" or "self"

- In ClangASTSource, we introduce the capability
to generate Decls with a different, overridden,
name from the one that was requested, e.g.
this for ___clang_this.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113866 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
a357ecfaec0c9c718e26d5558499622110993e73 14-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed the implementation of "bool Block::Contains (const Block *block) const"
to return the correct result.

Fixed "bool Variable::IsInScope (StackFrame *frame)" to return the correct
result when there are no location lists.

Modified the "frame variable" command such that:
- if no arguments are given (dump all frame variables), then we only show
variables that are currently in scope
- if some arguments are given, we show an error if the variable is out of
scope



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113830 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
178710cd4307f3d44dc76ebd70fc7daf7ebe17c5 14-Sep-2010 Greg Clayton <gclayton@apple.com> Looking at some of the test suite failures in DWARF in .o files with the
debug map showed that the location lists in the .o files needed some
refactoring in order to work. The case that was failing was where a function
that was in the "__TEXT.__textcoal_nt" in the .o file, and in the
"__TEXT.__text" section in the main executable. This made symbol lookup fail
due to the way we were finding a real address in the debug map which was
by finding the section that the function was in in the .o file and trying to
find this in the main executable. Now the section list supports finding a
linked address in a section or any child sections. After fixing this, we ran
into issue that were due to DWARF and how it represents locations lists.
DWARF makes a list of address ranges and expressions that go along with those
address ranges. The location addresses are expressed in terms of a compile
unit address + offset. This works fine as long as nothing moves around. When
stuff moves around and offsets change between the remapped compile unit base
address and the new function address, then we can run into trouble. To deal
with this, we now store supply a location list slide amount to any location
list expressions that will allow us to make the location list addresses into
zero based offsets from the object that owns the location list (always a
function in our case).

With these fixes we can now re-link random address ranges inside the debugger
for use with our DWARF + debug map, incremental linking, and more.

Another issue that arose when doing the DWARF in the .o files was that GCC
4.2 emits a ".debug_aranges" that only mentions functions that are externally
visible. This makes .debug_aranges useless to us and we now generate a real
address range lookup table in the DWARF parser at the same time as we index
the name tables (that are needed because .debug_pubnames is just as useless).
llvm-gcc doesn't generate a .debug_aranges section, though this could be
fixed, we aren't going to rely upon it.

Renamed a bunch of "UINT_MAX" to "UINT32_MAX".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113829 91177308-0d34-0410-b5e6-96231b3b80d8
ore/DataExtractor.h
ore/Module.h
ore/ModuleList.h
ore/Section.h
xpression/DWARFExpression.h
ymbol/Symtab.h
e8a59a8ec92e71203e434f28b5bac6606aacaf3c 13-Sep-2010 Sean Callanan <scallanan@apple.com> Bugfixes to the expression parser. Fixes include:

- If you put a semicolon at the end of an expression,
this no longer causes the expression parser to
error out. This was a two-part fix: first,
ClangExpressionDeclMap::Materialize now handles
an empty struct (such as when there is no return
value); second, ASTResultSynthesizer walks backward
from the end of the ASTs until it reaches something
that's not a NullStmt.

- ClangExpressionVariable now properly byte-swaps when
printing itself.

- ClangUtilityFunction now cleans up after itself when
it's done compiling itself.

- Utility functions can now use external functions just
like user expressions.

- If you end your expression with a statement that does
not return a value, the expression now runs correctly
anyway.

Also, added the beginnings of an Objective-C object
validator function, which is neither installed nor used
as yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113789 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/ClangFunction.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/IRDynamicChecks.h
xpression/IRForTarget.h
03e0f97cfa469792dd69b36f782d33a014225788 13-Sep-2010 Greg Clayton <gclayton@apple.com> Added the summary values for function pointers so we can show where they
point to.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113735 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObject.h
ymbol/ClangASTContext.h
e37f23c664f91f38b77029159b29dc62ca19bcb0 13-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed a crash that would happen when using "frame variables" on any struct,
union, or class that contained an enumeration type. When I was creating
the clang enumeration decl, I wasn't calling "EnumDecl::setIntegerType (QualType)"
which means that if the enum decl was ever asked to figure out it's bit width
(getTypeInfo()) it would crash. We didn't run into this with enum types that
weren't inside classes because the DWARF already told us how big the type was
and when we printed an enum we would never need to calculate the size, we
would use the pre-cached byte size we got from the DWARF. When the enum was
in a struct/union/class and we tried to layout the struct, the layout code
would attempt to get the type info and segfault.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113729 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
8019d7f651be85cbe480abc2dd78991af3eedb3c 12-Sep-2010 Greg Clayton <gclayton@apple.com> Bug #: 8408441

Fixed an issue where LLDB would fail to set a breakpoint by
file and line if the DWARF line table has multiple file entries
in the support files for a source file.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113721 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/LineTable.h
e9ca3a4130bfb76765256549e01c759da8ec2f1d 12-Sep-2010 Caroline Tice <ctice@apple.com> Remove Host::ResolveExecutableLocation (very recent addition); replace use of
it with llvm::sys::Program::FindProgramByName.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113709 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
7c36fa07bc2c2c7efc4a28ad540f7711491f379d 11-Sep-2010 Greg Clayton <gclayton@apple.com> Remove the eSymbolTypeFunction, eSymbolTypeGlobal, and eSymbolTypeStatic.
They will now be represented as:
eSymbolTypeFunction: eSymbolTypeCode with IsDebug() == true
eSymbolTypeGlobal: eSymbolTypeData with IsDebug() == true and IsExternal() == true
eSymbolTypeStatic: eSymbolTypeData with IsDebug() == true and IsExternal() == false

This simplifies the logic when dealing with symbols and allows for symbols
to be coalesced into a single symbol most of the time.

Enabled the minimal symbol table for mach-o again after working out all the
kinks. We now get nice concise symbol tables and debugging with DWARF in the
.o files with a debug map in the binary works well again. There were issues
where the SymbolFileDWARFDebugMap symbol file parser was using symbol IDs and
symbol indexes interchangeably. Now that all those issues are resolved
debugging is working nicely.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113678 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
ldb-enumerations.h
3e0571b6e8fe4cc0946529525e6a29eb0f1a8f70 11-Sep-2010 Johnny Chen <johnny.chen@apple.com> Fixed some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113673 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
4ae519666628cca07c194bf677163009cc2e5a8b 11-Sep-2010 Jim Ingham <jingham@apple.com> Move the "Object Description" into the ValueObject, and the add an API to
SBValue to access it. For now this is just the result of ObjC NSPrintForDebugger,
but could be extended. Also store the results of the ObjC Object Printer in a
Stream, not a ConstString.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113660 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/ValueObject.h
arget/ObjCObjectPrinter.h
466f6c4c0783c6b5197059caccab94faf1e605e9 10-Sep-2010 Greg Clayton <gclayton@apple.com> Added some missing API for address resolving within a module, and looking
up a seciton offset address (SBAddress) within a module that returns a
symbol context (SBSymbolContext). Also added a SBSymbolContextList in
preparation for adding find/lookup APIs that can return multiple results.

Added a lookup example code that shows how to do address lookups.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113599 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBModule.h
PI/SBSymbolContext.h
PI/SBSymbolContextList.h
d1c2dcac1c8509a77e6d9227c1285f96cbfadeb3 10-Sep-2010 Johnny Chen <johnny.chen@apple.com> Added the capability to specify a one-liner Python script as the callback
command for a breakpoint, for example:

(lldb) breakpoint command add -p 1 "conditional_break.stop_if_called_from_a()"

The ScriptInterpreter interface has an extra method:

/// Set a one-liner as the callback for the breakpoint command.
virtual void
SetBreakpointCommandCallback (CommandInterpreter &interpreter,
BreakpointOptions *bp_options,
const char *oneliner);

to accomplish the above.

Also added a test case to demonstrate lldb's use of breakpoint callback command
to stop at function c() only when its immediate caller is function a(). The
following session shows the user entering the following commands:

1) command source .lldb (set up executable, breakpoint, and breakpoint command)
2) run (the callback mechanism will skip two breakpoints where c()'s immeidate caller is not a())
3) bt (to see that indeed c()'s immediate caller is a())
4) c (to continue and finish the program)

test/conditional_break $ ../../build/Debug/lldb
(lldb) command source .lldb
Executing commands in '.lldb'.
(lldb) file a.out
Current executable set to 'a.out' (x86_64).
(lldb) breakpoint set -n c
Breakpoint created: 1: name = 'c', locations = 1
(lldb) script import sys, os
(lldb) script sys.path.append(os.path.join(os.getcwd(), os.pardir))
(lldb) script import conditional_break
(lldb) breakpoint command add -p 1 "conditional_break.stop_if_called_from_a()"
(lldb) run
run
Launching '/Volumes/data/lldb/svn/trunk/test/conditional_break/a.out' (x86_64)
(lldb) Checking call frames...
Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread:
frame #0: a.out`c at main.c:39
frame #1: a.out`b at main.c:34
frame #2: a.out`a at main.c:25
frame #3: a.out`main at main.c:44
frame #4: a.out`start
c called from b
Continuing...
Checking call frames...
Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread:
frame #0: a.out`c at main.c:39
frame #1: a.out`b at main.c:34
frame #2: a.out`main at main.c:47
frame #3: a.out`start
c called from b
Continuing...
Checking call frames...
Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread:
frame #0: a.out`c at main.c:39
frame #1: a.out`a at main.c:27
frame #2: a.out`main at main.c:50
frame #3: a.out`start
c called from a
Stopped at c() with immediate caller as a().
a(1) returns 4
b(2) returns 5
Process 20420 Stopped
* thread #1: tid = 0x2e03, 0x0000000100000de8 a.out`c + 7 at main.c:39, stop reason = breakpoint 1.1, queue = com.apple.main-thread
36
37 int c(int val)
38 {
39 -> return val + 3;
40 }
41
42 int main (int argc, char const *argv[])
(lldb) bt
bt
thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread
frame #0: 0x0000000100000de8 a.out`c + 7 at main.c:39
frame #1: 0x0000000100000dbc a.out`a + 44 at main.c:27
frame #2: 0x0000000100000e4b a.out`main + 91 at main.c:50
frame #3: 0x0000000100000d88 a.out`start + 52
(lldb) c
c
Resuming process 20420
Process 20420 Exited
a(3) returns 6
(lldb)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113596 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterPython.h
3a4ea24572fad1e22525f8efb718d49d41e30398 10-Sep-2010 Jason Molenda <jmolenda@apple.com> The first part of an lldb native stack unwinder.

The Unwind and RegisterContext subclasses still need
to be finished; none of this code is used by lldb at
this point (unless you call into it by hand).

The ObjectFile class now has an UnwindTable object.

The UnwindTable object has a series of FuncUnwinders
objects (Function Unwinders) -- one for each function
in that ObjectFile we've backtraced through during this
debug session.

The FuncUnwinders object has a few different UnwindPlans.
UnwindPlans are a generic way of describing how to find
the canonical address of a given function's stack frame
(the CFA idea from DWARF/eh_frame) and how to restore the
caller frame's register values, if they have been saved
by this function.

UnwindPlans are created from different sources. One source is the
eh_frame exception handling information generated by the compiler
for unwinding an exception throw. Another source is an assembly
language inspection class (UnwindAssemblyProfiler, uses the Plugin
architecture) which looks at the instructions in the funciton
prologue and describes the stack movements/register saves that are
done.

Two additional types of UnwindPlans that are worth noting are
the "fast" stack UnwindPlan which is useful for making a first
pass over a thread's stack, determining how many stack frames there
are and retrieving the pc and CFA values for each frame (enough
to create StackFrameIDs). Only a minimal set of registers is
recovered during a fast stack walk.

The final UnwindPlan is an architectural default unwind plan.
These are provided by the ArchDefaultUnwindPlan class (which uses
the plugin architecture). When no symbol/function address range can
be found for a given pc value -- when we have no eh_frame information
and when we don't have a start address so we can't examine the assembly
language instrucitons -- we have to make a best guess about how to
unwind. That's when we use the architectural default UnwindPlan.
On x86_64, this would be to assume that rbp is used as a stack pointer
and we can use that to find the caller's frame pointer and pc value.
It's a last-ditch best guess about how to unwind out of a frame.

There are heuristics about when to use one UnwindPlan versues the other --
this will all happen in the still-begin-written UnwindLLDB subclass of
Unwind which runs the UnwindPlans.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113581 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ore/PluginManager.h
ymbol/DWARFCallFrameInfo.h
ymbol/FuncUnwinders.h
ymbol/ObjectFile.h
ymbol/UnwindPlan.h
ymbol/UnwindTable.h
arget/RegisterContext.h
tility/ArchDefaultUnwindPlan.h
tility/UnwindAssemblyProfiler.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
ldb-private-interfaces.h
ldb-types.h
eddffe93d2c9ebb575e7b03fe1c5e71f9ecaf9f1 10-Sep-2010 Caroline Tice <ctice@apple.com> If the file the user specifies can't be found in the current directory,
and the user didn't specify a particular directory, search for the file
using the $PATH environment variable.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113575 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFileSpec.h
ore/FileSpec.h
ost/Host.h
f2c330df115cfdaedbf9d359b00f3ebb3cab9887 09-Sep-2010 Caroline Tice <ctice@apple.com> Move the ProcessPlugins enum definition from lldb-enumerations.h to
Process.h; modify the process.plugins settings variable to use the
correct plugin names.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113510 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
ldb-enumerations.h
b8314fe67960cfcc5d9e9232be4c1914c9ef0ce3 09-Sep-2010 Caroline Tice <ctice@apple.com> Make API calls for setting/getting user settable variables static.
Modify Driver to handle SIGWINCH signals and automatically re-set the
term-width variable.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113506 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
1d2aefd474c9893407ef4deacefd08dd2ca2e806 09-Sep-2010 Caroline Tice <ctice@apple.com> Make all debugger-level user settable variables into instance variables.
Make get/set variable at the debugger level always set the particular debugger's instance variables rather than
the default variables.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113474 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/UserSettingsController.h
nterpreter/CommandObject.h
nterpreter/Options.h
5bc7b67ccc8bb4a977d129e51313067dcbc7bb94 09-Sep-2010 Chris Lattner <sabre@nondot.org> eliminate some clang warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113438 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointOptions.h
nterpreter/Options.h
004afcb95736e97d071b1dd9b5254800e11e581c 08-Sep-2010 Caroline Tice <ctice@apple.com> Make sure creating a pending instance doesn't also trigger creating a live instance; also make sure creating a
pending instance uses the specified instance name rather than creating a new one; add brackets to instance names
when searching for and removing pending instances.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113370 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
ore/UserSettingsController.h
arget/Process.h
arget/Thread.h
20594b1b003f63ed34ebafeec37634ee44552339 08-Sep-2010 Jim Ingham <jingham@apple.com> Add a user settings controller to Thread. Then added a step-avoid-regexp setting
which controls whether to stop in a function matching the regexp.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113335 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
c3c24084efb0e1c4734c136532c1e43e9427c912 08-Sep-2010 Jim Ingham <jingham@apple.com> The functions that return the static ConstString names of the settings should be static
as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113328 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
arget/Process.h
236c1c71fab5d56a4dbebaabb969a238f11d142e 08-Sep-2010 Greg Clayton <gclayton@apple.com> Remove the Flags member in lldb_private::Module in favor of bitfield boolean
member variables.

Modified lldb_private::Module to have an accessor that can be used to tell if
a module is a dynamic link editor (dyld) as there are functions in dyld on
darwin that mirror functions in libc (malloc, free, etc) that should not
be used when doing function lookups by name in expressions if there are more
than one match when looking up functions by name.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113313 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
7ac83bd367f4baf856cbb8a1fa82f8edf44edb93 07-Sep-2010 Jim Ingham <jingham@apple.com> Move common code from GetSettingsController in Process & Debugger into static functions
in UserSettingsController.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113268 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserSettingsController.h
8f3b21daa0d509ac49b2b82f45aaed35f6874502 07-Sep-2010 Greg Clayton <gclayton@apple.com> Patch from Jay Cornwall that modifies the LLDB "Host" layer to reuse more
code between linux, darwin and BSD.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113263 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
0ad086f3ab18d6927b9df2f79169607d3a5d90e4 07-Sep-2010 Greg Clayton <gclayton@apple.com> Added Symtab::FindSymbolByID() in preparation for enabling the minimal
symbol tables. Minimal symbol tables enable us to merge two symbols, one
debug symbol and one linker symbol, into a single symbol that can carry
just as much information and will avoid duplicate symbols in the symbol
table.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113223 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
69aa5d9a7620a183cdc4da12cc87ea82e2ffcbf9 07-Sep-2010 Greg Clayton <gclayton@apple.com> Added more API to lldb::SBBlock to allow getting the block
parent, sibling and first child block, and access to the
inline function information.

Added an accessor the StackFrame:

Block * lldb_private::StackFrame::GetFrameBlock();

LLDB represents inline functions as lexical blocks that have
inlined function information in them. The function above allows
us to easily get the top most lexical block that defines a stack
frame. When there are no inline functions in function, the block
returned ends up being the top most block for the function. When
the PC is in an inlined funciton for a frame, this will return the
first parent block that has inlined function information. The
other accessor: StackFrame::GetBlock() will return the deepest block
that matches the frame's PC value. Since most debuggers want to display
all variables in the current frame, the Block returned by
StackFrame::GetFrameBlock can be used to retrieve all variables for
the current frame.

Fixed the lldb_private::Block::DumpStopContext(...) to properly
display inline frames a block should display all of its inlined
functions. Prior to this fix, one of the call sites was being skipped.
This is a separate code path from the current default where inlined
functions get their own frames.

Fixed an issue where a block would always grab variables for any
child inline function blocks.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113195 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBlock.h
PI/SBFileSpec.h
PI/SBFrame.h
ymbol/Block.h
arget/StackFrame.h
6e4c5ce0f697eb9899a54854a2a9004e961b0de2 04-Sep-2010 Caroline Tice <ctice@apple.com> This is a very large commit that completely re-does the way lldb
handles user settable internal variables (the equivalent of set/show
variables in gdb). In addition to the basic infrastructure (most of
which is defined in UserSettingsController.{h,cpp}, there are examples
of two classes that have been set up to contain user settable
variables (the Debugger and Process classes). The 'settings' command
has been modified to be a command-subcommand structure, and the 'set',
'show' and 'append' commands have been moved into this sub-commabnd
structure. The old StateVariable class has been completely replaced
by this, and the state variable dictionary has been removed from the
Command Interpreter. Places that formerly accessed the state variable
mechanism have been modified to access the variables in this new
structure instead (checking the term-width; getting/checking the
prompt; etc.)

Variables are attached to classes; there are two basic "flavors" of
variables that can be set: "global" variables (static/class-wide), and
"instance" variables (one per instance of the class). The whole thing
has been set up so that any global or instance variable can be set at
any time (e.g. on start up, in your .lldbinit file), whether or not
any instances actually exist (there's a whole pending and default
values mechanism to help deal with that).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113041 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBCommandInterpreter.h
PI/SBDebugger.h
PI/SBDefines.h
PI/SBError.h
ore/Debugger.h
ore/UserSettingsController.h
nterpreter/CommandCompletions.h
nterpreter/CommandInterpreter.h
nterpreter/ScriptInterpreter.h
nterpreter/StateVariable.h
arget/Process.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
e33bdd301b775bbcc4526d409bc37b435c02a843 04-Sep-2010 Greg Clayton <gclayton@apple.com> Improved name demangling performance by 20% on darwin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113032 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ConstString.h
5205f0b6585a127acc6ed210021abb6091220a89 03-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed the StackFrame to correctly resolve the StackID's SymbolContextScope.

Added extra logging for stepping.

Fixed an issue where cached stack frame data could be lost between runs when
the thread plans read a stack frame.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112973 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
arget/StackFrameList.h
arget/StackID.h
arget/Thread.h
arget/ThreadList.h
ldb-private.h
72b7158235500ae6d4b69ed378cbc36bf6e5cbe1 02-Sep-2010 Greg Clayton <gclayton@apple.com> Added a new bool parameter to many of the DumpStopContext() methods that
might dump file paths that allows the dumping of full paths or just the
basenames. Switched the stack frame dumping code to use just the basenames for
the files instead of the full path.

Modified the StackID class to no rely on needing the start PC for the current
function/symbol since we can use the SymbolContextScope to uniquely identify
that, unless there is no symbol context scope. In that case we can rely upon
the current PC value. This saves the StackID from having to calculate the
start PC when the StackFrame::GetStackID() accessor is called.

Also improved the StackID less than operator to correctly handle inlined stack
frames in the same stack.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112867 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Block.h
ymbol/Declaration.h
ymbol/LineEntry.h
ymbol/SymbolContext.h
arget/StackFrame.h
arget/StackID.h
17dae081d7b88d24a7af6b07c10fc5981f81e2a9 02-Sep-2010 Greg Clayton <gclayton@apple.com> StackFrame objects now own ValueObjects for any frame variables (locals, args,
function statics, file globals and static variables) that a frame contains.
The StackFrame objects can give out ValueObjects instances for
each variable which allows us to track when a variable changes and doesn't
depend on variable names when getting value objects.

StackFrame::GetVariableList now takes a boolean to indicate if we want to
get the frame compile unit globals and static variables.

The value objects in the stack frames can now correctly track when they have
been modified. There are a few more tweaks needed to complete this work. The
biggest issue is when stepping creates partial stacks (just frame zero usually)
and causes previous stack frames not to match up with the current stack frames
because the previous frames only has frame zero. We don't really want to
require that all previous frames be complete since stepping often must check
stack frames to complete their jobs. I will fix this issue tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112800 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
ore/ValueObject.h
ore/ValueObjectList.h
ore/ValueObjectVariable.h
ymbol/VariableList.h
arget/StackFrame.h
ldb-forward-rtti.h
0526233d38d2b5b957bc3c1fc5e26c2d8e30904f 02-Sep-2010 Sean Callanan <scallanan@apple.com> Added code to run pointer validation checks in
expressions. If an expression dereferences an
invalid pointer, there will still be a crash -
just now the crash will be in the function
___clang_valid_pointer_check().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112785 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRDynamicChecks.h
b36218d9e448a41ea47f03b9e5b0dec942c29e53 01-Sep-2010 Sean Callanan <scallanan@apple.com> Fixed a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112725 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
f18d91c9bbd01152b29d84ab55ad2f0bbc9baf6c 01-Sep-2010 Sean Callanan <scallanan@apple.com> Added support for dynamic sanity checking in
expressions. Values used by the expression are
checked by validation functions which cause the
program to crash if the values are unsafe.

Major changes:

- Added IRDynamicChecks.[ch], which contains the
core code related to this feature

- Modified CommandObjectExpression to install the
validator functions into the target process.

- Added an accessor to Process that gets/sets the
helper functions


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112690 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRDynamicChecks.h
arget/Process.h
452bf613496c7290c6b7a1a1eb28efbce63fd3b9 31-Aug-2010 Greg Clayton <gclayton@apple.com> Added the ability to disable ASLR (Address Space Layout Randomization). ASLR
is disabled by default, and can be enabled using:

(lldb) set disable-aslr 0



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112616 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
nterpreter/CommandInterpreter.h
arget/Process.h
ldb-enumerations.h
b0fff359652c7b3c0eb6fb6c37995e61e6cc652d 31-Aug-2010 Jim Ingham <jingham@apple.com> Add a "lldb host" logging channel, and put logging in the Host::OpenInExternalEditor code.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112614 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-private-log.h
ef2298ad0213dfa267e77b1de74b61ba052a73c8 31-Aug-2010 Sean Callanan <scallanan@apple.com> Removed documentation for a non-existent function
parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112548 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
45690fe3b8b4efb101dd31085413381021a69c2f 31-Aug-2010 Sean Callanan <scallanan@apple.com> Fixed a bug where the parser-specific members of
persistent variables were staying around too long.
This caused the following problem:

- A persistent result variable is created for the
result of an expression. The pointer to the
corresponding Decl is stored in the variable.

- The persistent variable is looked up during
struct generation (correctly) using its Decl.

- Another expression defines a new result variable
which happens to have a Decl in the same place
as the original result variable.

- The persistent variable is looked up during
struct generation using its Decl, but the old
result variable appears first in the list and
has the same Decl pointer.

The fix is to destroy parser-specific data when
it is no longer valid.

Also improved some logging as I diagnosed the
bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112540 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
8194e42fa9e0fe204ebadb2368eb486054d66bd3 30-Aug-2010 Sean Callanan <scallanan@apple.com> Fixed a bug where ClangExpressionVariableList was
storing pointers to objects inside a std::vector.
These objects can move around as the std::vector
changes, invalidating the pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112527 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
74989e88af7e04f3fe0bb3a800163113d7e0ca12 30-Aug-2010 Jim Ingham <jingham@apple.com> Added a way to open the current source file & line in an external editor, and you can turn this on with:

lldb -e

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112502 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
ost/Host.h
4fb08150367853dae24bb92904356788e919a72f 30-Aug-2010 Greg Clayton <gclayton@apple.com> Clarified the intent of the SymbolContextScope class in the header
documentation. Symbol now inherits from the symbol
context scope so that the StackID can use a "SymbolContextScope *"
instead of a blockID (which could have been the same as some other
blockID from another symbol file).

Modified the stacks that are created on subsequent stops to reuse
the previous stack frame objects which will allow for some internal
optimization using pointer comparisons during stepping.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112495 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ymbol/Symbol.h
ymbol/SymbolContextScope.h
ymbol/Variable.h
arget/StackFrame.h
arget/StackID.h
830a903fd7cd4595cf52e1630b6491930ada0400 28-Aug-2010 Sean Callanan <scallanan@apple.com> Added a ClangUtilityFunction class that allows the
debugger to insert self-contained functions for use by
expressions (mainly for error-checking).

In order to support detecting whether a crash occurred
in one of these helpers -- currently our preferred way
of reporting that an error-check failed -- added a bit
of support for getting the extent of a JITted function
in addition to just its base.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112324 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/ClangExpressionParser.h
xpression/ClangUserExpression.h
xpression/ClangUtilityFunction.h
xpression/RecordingMemoryManager.h
4ead2e9a5a74f465d00b0301c165fbebf4ee4ff3 28-Aug-2010 Johnny Chen <johnny.chen@apple.com> o Exposed SBFileSpec to the Python APIs in lldb.py.

o Fixed a crasher when getting it via SBTarget.GetExecutable().

>>> filespec = target.GetExecutable()
Segmentation fault

o And renamed SBFileSpec::GetFileName() to GetFilename() to be consistent with FileSpec::GetFilename().



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112308 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBFileSpec.h
870a1cdb923ce708d474af357dd1fea3d063ab97 27-Aug-2010 Greg Clayton <gclayton@apple.com> Made it so we update the current frames from the previous frames by doing STL
swaps on the variable list, value object list, and disassembly. This avoids
us having to try and update frame indexes and other things that were getting
out of sync.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112301 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObjectList.h
arget/StackFrame.h
1d66ef5d31a8326d5495f56b0cfbf2fd1bff67d8 27-Aug-2010 Greg Clayton <gclayton@apple.com> Simplified the StackFrameList class down to a single frames list again
instead of trying to maintain the real frame list (unwind frames) and an
inline frame list. The information is cheap to produce when we already have
looked up a block and was making stack frame uniquing difficult when trying
to use the previous stack when making the current stack.

We now maintain the previous value object lists for common frames between
a previous and current frames so we will be able to tell when variable values
change.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112277 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
arget/StackFrameList.h
65dafa8344c8c018e346dd331a7782081a896239 27-Aug-2010 Sean Callanan <scallanan@apple.com> This is a major refactoring of the expression parser.
The goal is to separate the parser's data from the data
belonging to the parser's clients. This allows clients
to use the parser to obtain (for example) a JIT compiled
function or some DWARF code, and then discard the parser
state.

Previously, parser state was held in ClangExpression and
used liberally by ClangFunction, which inherited from
ClangExpression. The main effects of this refactoring
are:

- reducing ClangExpression to an abstract class that
declares methods that any client must expose to the
expression parser,

- moving the code specific to implementing the "expr"
command from ClangExpression and
CommandObjectExpression into ClangUserExpression,
a new class,

- moving the common parser interaction code from
ClangExpression into ClangExpressionParser, a new
class, and

- making ClangFunction rely only on
ClangExpressionParser and not depend on the
internal implementation of ClangExpression.

Side effects include:

- the compiler interaction code has been factored
out of ClangFunction and is now in an AST pass
(ASTStructExtractor),

- the header file for ClangFunction is now fully
documented,

- several bugs that only popped up when Clang was
deallocated (which never happened, since the
lifetime of the compiler was essentially infinite)
are now fixed, and

- the developer-only "call" command has been
disabled.

I have tested the expr command and the Objective-C
step-into code, which use ClangUserExpression and
ClangFunction, respectively, and verified that they
work. Please let me know if you encounter bugs or
poor documentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112249 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ASTResultSynthesizer.h
xpression/ASTStructExtractor.h
xpression/ClangExpression.h
xpression/ClangExpressionParser.h
xpression/ClangFunction.h
xpression/ClangResultSynthesizer.h
xpression/ClangUserExpression.h
xpression/IRForTarget.h
xpression/IRToDWARF.h
xpression/RecordingMemoryManager.h
ldb-forward.h
65124eac53b7a214906e8931be314e429bbbeb30 27-Aug-2010 Greg Clayton <gclayton@apple.com> Changed the StackID to store its start PC address as a load address instead of
a section offset address.

Fixed up some very inefficient STL code.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112230 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
arget/StackFrame.h
arget/StackID.h
c833295baeec641086f536e78050388af36784f8 26-Aug-2010 Jim Ingham <jingham@apple.com> Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112221 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBProcess.h
PI/SBTarget.h
PI/SBThread.h
PI/SBValue.h
ore/Debugger.h
arget/StackFrameList.h
arget/TargetList.h
arget/Thread.h
arget/ThreadList.h
2154da49d2db0b478d54c077d2b3825380a24f4c 26-Aug-2010 Jim Ingham <jingham@apple.com> Add StackFrame::IsInlined.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112217 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
f40e30823926f27e3cb9364f3c8fe2e4be0c7658 26-Aug-2010 Greg Clayton <gclayton@apple.com> Cleaned up the inline stack frame code one more time to prepare for inlined
code stepping. Also we now store the stack frames for the current and previous
stops in the thread in std::auto_ptr objects. When we create a thread stack
frame list we pass the previous frame into it so it can re-use the frames
and maintain will allow for variable changes to be detected. I will implement
the stack frame reuse next.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112152 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrame.h
arget/StackFrameList.h
arget/StackID.h
arget/Thread.h
bcfce909e2fb66932472b19706aae002f7734550 25-Aug-2010 Greg Clayton <gclayton@apple.com> The destructor for StackFrameList doesn't need to be virtual as we aren't
subclassing it anywhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112010 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrameList.h
a92d893af2b1790a40fbbd0c237671ab3010345c 25-Aug-2010 Greg Clayton <gclayton@apple.com> Thread no longer needs to be a friend in StackFrameList now that StackFrameList
contains the entire stack backtrace.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112009 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrameList.h
782b9ccd9f2b290585cd6bb4c1f0cc6cb7e22e15 25-Aug-2010 Greg Clayton <gclayton@apple.com> Cleaned up the inline backtrace code even more by moving all stack backtracing
functionality into StackFrameList. This will allow us to copy the previous
stack backtrace from the previous stop into another variable so we can re-use
as much as possible from the previous stack backtrace.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112007 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StackFrameList.h
arget/Thread.h
ldb-forward-rtti.h
32f4fdde0882395aec2ea56d1adcce78759105b7 25-Aug-2010 Greg Clayton <gclayton@apple.com> Fixed another issue with the inline stack frames where if the first frame
has inlined functions that all started at the same address, then the inlined
backtrace would not produce correct stack frames.

Also cleaned up and inlined a lot of stuff in lldb_private::Address.

Added a function to StackFrame to detect if the frame is a concrete frame so
we can detect the difference between actual frames and inlined frames.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111989 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
arget/StackFrame.h
arget/Thread.h
b04e7a805310f2f2cc77947a8b263de9061617ae 24-Aug-2010 Greg Clayton <gclayton@apple.com> Got a lot of the kinks worked out in the inline support after debugging more
complex inlined examples.

StackFrame classes don't have a "GetPC" anymore, they have "GetFrameCodeAddress()".
This is because inlined frames will have a PC value that is the same as the
concrete frame that owns the inlined frame, yet the code locations for the
frame can be different. We also need to be able to get the real PC value for
a given frame so that variables evaluate correctly. To get the actual PC
value for a frame you can use:

addr_t pc = frame->GetRegisterContext()->GetPC();

Some issues with the StackFrame stomping on its own symbol context were
resolved which were causing the information to change for a frame when the
stack ID was calculated. Also the StackFrame will now correctly store the
symbol context resolve flags for any extra bits of information that were
looked up (if you ask for a block only and you find one, you will alwasy have
the compile unit and function).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111964 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
ore/VMRange.h
xpression/DWARFExpression.h
ymbol/Block.h
arget/StackFrame.h
22a6bf31b82dcf47ff6014bc47a99173595f156f 24-Aug-2010 Greg Clayton <gclayton@apple.com> Clear the inline stack frame info when we clean all stack frames.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111891 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
33ed170599d41fe407a4dcf5f0875c75e1ad1375 24-Aug-2010 Greg Clayton <gclayton@apple.com> Added support for inlined stack frames being represented as real stack frames
which is now on by default. Frames are gotten from the unwinder as concrete
frames, then if inline frames are to be shown, extra information to track
and reconstruct these frames is cached with each Thread and exanded as needed.

I added an inline height as part of the lldb_private::StackID class, the class
that helps us uniquely identify stack frames. This allows for two frames to
shared the same call frame address, yet differ only in inline height.

Fixed setting breakpoint by address to not require addresses to resolve.

A quick example:

% cat main.cpp

% ./build/Debug/lldb test/stl/a.out
Current executable set to 'test/stl/a.out' (x86_64).
(lldb) breakpoint set --address 0x0000000100000d31
Breakpoint created: 1: address = 0x0000000100000d31, locations = 1
(lldb) r
Launching 'a.out' (x86_64)
(lldb) Process 38031 Stopped
* thread #1: tid = 0x2e03, pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280, stop reason = breakpoint 1.1, queue = com.apple.main-thread
277
278 _CharT*
279 _M_data() const
280 -> { return _M_dataplus._M_p; }
281
282 _CharT*
283 _M_data(_CharT* __p)
(lldb) bt
thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread
frame #0: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280
frame #1: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_rep() const at /usr/include/c++/4.2.1/bits/basic_string.h:288
frame #2: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::size() const at /usr/include/c++/4.2.1/bits/basic_string.h:606
frame #3: pc = 0x0000000100000d31, where = a.out`main [inlined] operator<< <char, std::char_traits<char>, std::allocator<char> > at /usr/include/c++/4.2.1/bits/basic_string.h:2414
frame #4: pc = 0x0000000100000d31, where = a.out`main + 33 at /Volumes/work/gclayton/Documents/src/lldb/test/stl/main.cpp:14
frame #5: pc = 0x0000000100000d08, where = a.out`start + 52

Each inline frame contains only the variables that they contain and each inlined
stack frame is treated as a single entity.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111877 91177308-0d34-0410-b5e6-96231b3b80d8
ore/VMRange.h
ymbol/Block.h
ymbol/Function.h
ymbol/SymbolContext.h
arget/StackFrame.h
arget/StackID.h
arget/Thread.h
8c12720c108cd5e7ed792596749218d8400f647e 24-Aug-2010 Sean Callanan <scallanan@apple.com> Refactored ClangExpressionDeclMap to use
ClangExpressionVariables for found external variables
as well as for struct members, replacing the Tuple
and StructMember data structures.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111859 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
75ccf50c3371d8c8e293af25461705b86fb10a46 21-Aug-2010 Greg Clayton <gclayton@apple.com> Modified the host process monitor callback function Host::StartMonitoringChildProcess
to spawn a thread for each process that is being monitored. Previously
LLDB would spawn a single thread that would wait for any child process which
isn't ok to do as a shared library (LLDB.framework on Mac OSX, or lldb.so on
linux). The old single thread used to call wait4() with a pid of -1 which
could cause it to reap child processes that it shouldn't have.

Re-wrote the way Function blocks are handles. Previously I attempted to keep
all blocks in a single memory allocation (in a std::vector). This made the
code somewhat efficient, but hard to work with. I got rid of the old BlockList
class, and went to a straight parent with children relationship. This new
approach will allow for partial parsing of the blocks within a function.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111706 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Host.h
ymbol/Block.h
ymbol/Function.h
ldb-forward.h
0bda40346c10604b3cef2e42bef4f4d6f534e18b 20-Aug-2010 Jim Ingham <jingham@apple.com> Add an accessor to get the Declaration for a type.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111607 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Type.h
b75b466aac3fac6f49c429a11129fa5648db3f7c 20-Aug-2010 Jim Ingham <jingham@apple.com> Add methods to Function to get the first and last source lines of the function, and to get whether this Function is an inlined instance or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111606 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Function.h
a6223431cf44c6c1e885d2f04cc78cb4155375e5 20-Aug-2010 Sean Callanan <scallanan@apple.com> First step of refactoring variable handling in the
expression parser. There shouldn't be four separate
classes encapsulating a variable.

ClangExpressionVariable is now meant to be the
container for all variable information. It has
several optional components that hold data for
different subsystems.

ClangPersistentVariable has been removed; we now
use ClangExpressionVariable instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111600 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangPersistentVariables.h
3351dacda090c21c203d2300f38e2f45d8f78f4d 18-Aug-2010 Sean Callanan <scallanan@apple.com> Patch by Bill Lynch fixing handling of the pid
in the IR transformation passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111388 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
xpression/IRToDWARF.h
2f9b9bc9e1718626b008b6408c44bd2f52c9bbbc 18-Aug-2010 Greg Clayton <gclayton@apple.com> Added a Thread accessor to the register context.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111378 91177308-0d34-0410-b5e6-96231b3b80d8
arget/RegisterContext.h
03f2b3bdd37d922efc9ddb1b015a1feb55cdbe1e 18-Aug-2010 Greg Clayton <gclayton@apple.com> Allow the SBDebugger to construct itself with the default constructor so
objects can own one of these objects and assign a valid value at a later point.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111377 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
5fd1a30ded444f8bd87796a78e909284e894b319 18-Aug-2010 Sean Callanan <scallanan@apple.com> Documented RecordingMemoryManager and removed an
undefined, unused function from its API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111335 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/RecordingMemoryManager.h
f285ebcfa3ce0fd200b6a566eb1196927e618fc6 18-Aug-2010 Sean Callanan <scallanan@apple.com> Documented IRToDWARF, and added return value
documentation to IRForTarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111323 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
xpression/IRToDWARF.h
ca948fc83d87888d5e56417c9b674680c728da9c 18-Aug-2010 Sean Callanan <scallanan@apple.com> Documented IRForTarget


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111313 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
3530022304599ed4a2f915454eaaf91e25d640fe 17-Aug-2010 Sean Callanan <scallanan@apple.com> Documented DWARFExpression.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111276 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/DWARFExpression.h
bfc33ced23ad31c8532673456836c7a299d39aab 17-Aug-2010 Sean Callanan <scallanan@apple.com> Documented ClangResultSynthesizer and added very minor
API fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111202 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangResultSynthesizer.h
db5d8e8f71e13aaebd3bae8e06f5d66f2f78c3b0 17-Aug-2010 Sean Callanan <scallanan@apple.com> Documented ClangPersistentVariable(s). No API
cleanup here, since this is a new and fairly
clean class already.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111194 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangPersistentVariables.h
4a7c6c62ac427ac3a390809a6ab1fe325cc69a0e 14-Aug-2010 Sean Callanan <scallanan@apple.com> Documented ClangExpressionVariable(List), and
cleaned up its API slightly.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111053 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionVariable.h
a386e05ea6d20cdcedc80c23cf771d5030db43d6 14-Aug-2010 Sean Callanan <scallanan@apple.com> Added documentation to ClangExpressionDeclMap.
Also cleaned up its API a tiny bit (but not the
extensive amount that is actually needed. That's
still coming.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111049 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
39ee600f216302d9c4776bec67602182b8cdee5f 13-Aug-2010 Sean Callanan <scallanan@apple.com> Documented ClangExpression and made parts of it
more sane (i.e., removed dead arguments, made
sensible defaults, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110990 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
b291abe0be41fd503e1b25d20a95c65130f8db4c 13-Aug-2010 Sean Callanan <scallanan@apple.com> Added documentation to ClangASTSource and
NameSearchContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110980 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
90bebb258b9184a7f9b94d85bb7a723c8aad1a2f 13-Aug-2010 Sean Callanan <scallanan@apple.com> Fixed copyright notice on ClangASTSource.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110977 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
200dce58282258cddd4ddbdd3b147589d5387f36 12-Aug-2010 Sean Callanan <scallanan@apple.com> Removed the ClangStmtVisitor, which is old code
that translates Clang ASTs straight to DWARF. We
are now using IR instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110957 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/ClangStmtVisitor.h
5337558eebc37f8e5831d25512404fbe775db637 12-Aug-2010 Johnny Chen <johnny.chen@apple.com> Applied Pawel Wodnicki's fix for "missing" lldb-forward-rtti.h header file.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110943 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangPersistentVariables.h
71219089a9896e3c5c307f7465c8f90f2a9f6d68 12-Aug-2010 Jim Ingham <jingham@apple.com> Now that we are using the Unwinder (or Jason's new unwinder when that comes about) all the plugin-specific details of getting stack frames
should be hidden behind that, and the "GetStackFrameAtIndex" and "GetStackFrameCount" algorithms become generic. So I moved them to Thread.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110899 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
82b74c85f719be67b78f9284a6a1341d47f7ac9c 12-Aug-2010 Sean Callanan <scallanan@apple.com> Added automatically generated result variables for each
expression. It is now possible to do things like this:

(lldb) expr int $i = 5; $i + 1
$0 = (int) 6
(lldb) expr $i + 3
$1 = (int) 8
(lldb) expr $1 + $0
$2 = (int) 14

As a bonus, this allowed us to move printing of
expression results into the ClangPersistentVariable
class. This code needs a bit of refactoring -- in
particular, ClangExpressionDeclMap has eaten one too
many bacteria and needs to undergo mitosis -- but the
infrastructure appears to be holding up nicely.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110896 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangPersistentVariables.h
xpression/IRForTarget.h
a48fe1637ec6a381e500633c087f76662e364c20 11-Aug-2010 Sean Callanan <scallanan@apple.com> Added support for persistent variables to the
expression parser. It is now possible to type:

(lldb) expr int $i = 5; $i + 1
(int) 6
(lldb) expr $i + 2
(int) 7

The skeleton for automatic result variables is
also implemented. The changes affect:

- the process, which now contains a
ClangPersistentVariables object that holds
persistent variables associated with it
- the expression parser, which now uses
the persistent variables during variable
lookup
- TaggedASTType, where I loaded some commonly
used tags into a header so that they are
interchangeable between different clients of
the class


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110777 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangPersistentVariables.h
xpression/IRForTarget.h
ymbol/TaggedASTType.h
arget/Process.h
6fb8baa66796cdb23f337dd03272bf15d97fdab9 10-Aug-2010 Jim Ingham <jingham@apple.com> Make breakpoint commands work again. Added a PerformAction to the stop info - actions are run when the
stop event is pulled from the event queue. Then made the StopInfoBreakpoint's PerformAction do the
breakpoint command.
Also fixed the StopInfoBreakpoint's GetDescription so it gets the breakpoint location info, not the breakpoint
site info.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110637 91177308-0d34-0410-b5e6-96231b3b80d8
arget/StopInfo.h
7508e732818c32e1cfeaaf7d1d507fe3834ce9d2 10-Aug-2010 Jim Ingham <jingham@apple.com> Change Target & Process so they can really be initialized with an invalid architecture.
Arrange that this then gets properly set on attach, or when a "file" is set.
Add a completer for "process attach -n".

Caveats: there isn't currently a way to handle multiple processes with the same name. That
will have to wait on a way to pass annotations along with the completion strings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110624 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ost/Host.h
ymbol/ObjectFile.h
arget/Process.h
arget/Target.h
e562a073bba53fa46161feb51d1b1e36f9af9666 06-Aug-2010 Sean Callanan <scallanan@apple.com> Removed the -i option from the expr command, and
made IR-based expression evaluation the default.

Also added a new class to hold persistent variables.
The class is empty as yet while I write up a design
document for what it will do. Also the place where
it is currently created (by the Expression command)
is certainly wrong.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110415 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
78ead8b92cdde803f360736a1dc893299d9d9785 06-Aug-2010 Sean Callanan <scallanan@apple.com> Fixed namespace issues that were breaking the
SWIG wrappers on a non-internal SnowLeopard
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110413 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
585660cc442f7faf8d2cbd936e4c92ac689c30e5 05-Aug-2010 Greg Clayton <gclayton@apple.com> More missing files from my previous checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110299 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
27c83f92d598d8ddc5a8ca8001cf833417b7a4b2 05-Aug-2010 Greg Clayton <gclayton@apple.com> Added functionality to our API for SBType. This will allow users to eventually find and peruse static type information from modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110298 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
ef28e2ab6bc6273c129f0bc8a0c88a24d3b6876e 05-Aug-2010 Greg Clayton <gclayton@apple.com> Added functionality to our API for SBType. This will allow users to eventually find and peruse static type information from modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110297 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBType.h
643ee7301b5d4b05c321d906bc0d7ff11f571295 04-Aug-2010 Greg Clayton <gclayton@apple.com> Abtracted the old "lldb_private::Thread::StopInfo" into an abtract class.
This will allow debugger plug-ins to make any instance of "lldb_private::StopInfo"
that can completely describe any stop reason. It also provides a framework for
doing intelligent things with the stop info at important times in the lifetime
of the inferior.

Examples include the signal stop info in StopInfoUnixSignal. It will check with
the process to see that the current action is for the signal. These actions
include wether to stop for the signal, wether the notify that the signal was
hit, and wether to pass the signal along to the inferior process. The
StopInfoUnixSignal class overrides the "ShouldStop()" method of StopInfo and
this allows the stop info to determine if it should stop at the signal or
continue the process.


StopInfo subclasses must override the following functions:

virtual lldb::StopReason
GetStopReason () const = 0;

virtual const char *
GetDescription () = 0;


StopInfo subclasses can override the following functions:


// If the subclass returns "false", the inferior will resume. The default
// version of this function returns "true" which means the default stop
// info will stop the process. The breakpoint subclass will check if
// the breakpoint wants us to stop by calling any installed callback on
// the breakpoint, and also checking if the breakpoint is for the current
// thread. Signals will check if they should stop based off of the
// UnixSignal settings in the process.
virtual bool
ShouldStop (Event *event_ptr);

// Sublasses can state if they want to notify the debugger when "ShouldStop"
// returns false. This would be handy for breakpoints where you want to
// log information and continue and is also used by the signal stop info
// to notify that a signal was received (after it checks with the process
// signal settings).
virtual bool
ShouldNotify (Event *event_ptr)
{
return false;
}

// Allow subclasses to do something intelligent right before we resume.
// The signal class will figure out if the signal should be propagated
// to the inferior process and pass that along to the debugger plug-ins.
virtual void
WillResume (lldb::StateType resume_state)
{
// By default, don't do anything
}


The support the Mach exceptions was moved into the lldb/source/Plugins/Process/Utility
folder and now doesn't polute the lldb_private::Thread class with platform
specific code.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110184 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/Breakpoint.h
reakpoint/BreakpointLocation.h
arget/StopInfo.h
arget/Thread.h
ldb-forward-rtti.h
ldb-forward.h
93a4b1a8d6ad9a5d1e18a38b5ec55de5b7f6e724 04-Aug-2010 Sean Callanan <scallanan@apple.com> Added support for accessing members of C++ objects,
including superclass members. This involved ensuring
that access control was ignored, and ensuring that
the operands of BitCasts were properly scanned for
variables that needed importing.

Also laid the groundwork for declaring objects of
custom types; however, this functionality is disabled
for now because of a potential loop in ASTImporter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110174 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
ymbol/SymbolContext.h
7aff9ffaec7ffc44dec3c64557dfadcc8a0833a6 03-Aug-2010 Greg Clayton <gclayton@apple.com> Added FindTypes to Module and ModuleList.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110093 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Module.h
ore/ModuleList.h
960d6a40711f05effe6fcc5b66f0952450f79ea2 03-Aug-2010 Greg Clayton <gclayton@apple.com> Added support for objective C built-in types: id, Class, and SEL. This
involved watching for the objective C built-in types in DWARF and making sure
when we convert the DWARF types into clang types that we use the appropriate
ASTContext types.

Added a way to find and dump types in lldb (something equivalent to gdb's
"ptype" command):

image lookup --type <TYPENAME>

This only works for looking up types by name and won't work with variables.
It also currently dumps out verbose internal information. I will modify it
to dump more appropriate user level info in my next submission.

Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so
we can lookup types by name in one or more images.

Fixed "image lookup --address <ADDRESS>" to be able to correctly show all
symbol context information, but it will only show this extra information when
the new "--verbose" flag is used.

Updated to latest LLVM to get a few needed fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110089 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
f5857a002d1e0c5fe29b8af9f9e2fe4fac0298d8 31-Jul-2010 Sean Callanan <scallanan@apple.com> Added support for rewriting objc_msgSend so we can
call Objective-C methods from expressions. Also added
some more logging to the function-calling thread plan
so that we can see the registers when a function
finishes.

Also documented things maybe a bit better.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109938 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/IRForTarget.h
60dde64d699c71807dc95d75b40f5b777d167cc4 31-Jul-2010 Johnny Chen <johnny.chen@apple.com> We can do better when reporting the status of one-liner script execution.

Change the prototype of ScriptInterpreter::ExecuteOneLine() to return bool
instead of void and take one additional parameter as CommandReturnObject *.

Propagate the status of one-liner execution back appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109899 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/ScriptInterpreterPython.h
43490d1332d13694fb6690365984bf0ecdd8dcc3 30-Jul-2010 Greg Clayton <gclayton@apple.com> Added "void Clear();" methods to SBDebugger, SBTarget and SBThread so they can release their shared pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109882 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBTarget.h
PI/SBThread.h
9488b7423b556c7c777b721d2094fd5ec4a47578 28-Jul-2010 Greg Clayton <gclayton@apple.com> Created lldb::LanguageType by moving an enumeration from the
lldb_private::Language class into the enumerations header so it can be freely
used by other interfaces.

Added correct objective C class support to the DWARF symbol parser. Prior to
this fix we were parsing objective C classes as C++ classes and now that the
expression parser is ready to call functions we need to make sure the objective
C classes have correct AST types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109574 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Language.h
ymbol/ClangASTContext.h
ymbol/CompileUnit.h
ymbol/SymbolContext.h
ldb-enumerations.h
321fe9e06c68dfeed55839d71603713b1ea3bb70 28-Jul-2010 Sean Callanan <scallanan@apple.com> Added and improved logging. This is helping us as we
diagnose a problem where we're not correctly emitting
PIC code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109568 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/RecordingMemoryManager.h
02fbafa1bf2bb77bf8f25af3403d7d8721a3f8b1 27-Jul-2010 Sean Callanan <scallanan@apple.com> Added support for calling functions from expressions.
Right now we mock up the function as a variadic
function when generating the IR for the call; we need
to eventually make the function be the right type if
the type is available.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109543 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
ba992c58b25ec0a67ef430024dc3dca154982dc9 27-Jul-2010 Sean Callanan <scallanan@apple.com> Added support for locating a function that is
referenced in the IR. We don't yet support updating
the call to that function.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109483 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/IRForTarget.h
0fc7358d61218ba5d5abb5c2ea489a9ef936bbf7 27-Jul-2010 Sean Callanan <scallanan@apple.com> Changed SymbolContext so when you search for functions
it returns a list of functions as a SymbolContextList.

Rewrote the clients of SymbolContext to use this
SymbolContextList.

Rewrote some of the providers of the data to SymbolContext
to make them respect preferences as to whether the list
should be cleared first; propagated that change out.

ClangExpressionDeclMap and ClangASTSource use this new
function list to properly generate function definitions -
even for functions that don't have a prototype in the
debug information.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109476 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
ymbol/SymbolContext.h
45839276c3de51a55adef98a2a20a98f2ba428a9 24-Jul-2010 Sean Callanan <scallanan@apple.com> Updated the IR converter for the target to eliminate
spurious guard variables on expression statics.

Updated the AST result synthesizer to eliminate the
unneeded result pointer.

Very rudimentary expressions now evaluate correctly
in the target using the new JIT-based mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109317 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRForTarget.h
c7f5d5c3a3b48869f5ad2a3cdc4b20ca40929ba3 24-Jul-2010 Greg Clayton <gclayton@apple.com> Added needed breakpoint functionality to the public API that includes:
SBTarget:
- get breakpoint count
- get breakpoint at index
SBBreakpoint:
- Extract data from breakpoint events



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109289 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBEvent.h
PI/SBTarget.h
reakpoint/Breakpoint.h
reakpoint/BreakpointList.h
reakpoint/BreakpointLocationList.h
ldb-enumerations.h
32824aa43fdc8393d829c16f126f32ca8d3582ad 24-Jul-2010 Sean Callanan <scallanan@apple.com> Added logging:
- When we JIT an expression, we print the disassembly
of the generated code
- When we put the structure into the target, we print
the individual entries in the structure byte for
byte.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109278 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
1240f74ee74426067fe49d6a35f191e510775be4 23-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove useless typedef keyword, fix a clang warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109254 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
96cc4d000865827b59cce5829c06a1a797524ef8 23-Jul-2010 Greg Clayton <gclayton@apple.com> Added a new utility class that I have wanted for a while. The CleanUp
class is a templatized class that allows you to have a cleanup function called
on a data value of type T when the value is set or when the object goes
out of scope. It has support for very rudimentary invalid value detection that
can be enabled by using the appropriate constructor.

Anyone with template experience that can see ways of improving this class
please let me know. The example code shows a few typical scenarios in which
I would like to use it. It is currently coded with simple type T values
in mind (integer file descriptors, pointers, etc), but I am sure some
specialization might help out the class for more complex types.

There is a lot of documentation including examples in the CleanUp.h header
file.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109239 91177308-0d34-0410-b5e6-96231b3b80d8
tility/CleanUp.h
7661a98ba99c585034bc60dbe43ad80599cc6dd3 23-Jul-2010 Greg Clayton <gclayton@apple.com> Centralized the Mach exception stop info code by adding it as a first
class citizen on the StopInfo class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109235 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
f8e98a6e4560c632a9c0373abee247e747097845 23-Jul-2010 Greg Clayton <gclayton@apple.com> Warnings cleanup patch from Jean-Daniel Dupas.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109226 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Predicate.h
nterpreter/CommandObjectRegexCommand.h
8541f2f8e4069e442ed0bf1cc37cf72284195fc4 23-Jul-2010 Sean Callanan <scallanan@apple.com> Added extensive logging of the code that is actually going
to be executed by the inferior. This required explicit support
from RecordingMemoryManager for finding the address range
belonging to a particular function.

Also fixed a bug in DisassemblerLLVM where the disassembler
assumed there was an AddressRange available even when it was
NULL.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109209 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/RecordingMemoryManager.h
841026fc8d1cc22bd3b9e74623b413a3e6aa9d38 23-Jul-2010 Sean Callanan <scallanan@apple.com> Modified TaggedASTType to inherit from ClangASTType
and moved it to its own header file for cleanliness.

Added more logging to ClangFunction so that we can
diagnose crashes in the executing expression.

Added code to extract the result of the expression
from the struct that is passed to the JIT-compiled
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109199 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/ClangFunction.h
ymbol/TaggedASTType.h
84f8075072eef306234f8109573067647735c111 22-Jul-2010 Greg Clayton <gclayton@apple.com> Added a new enumeration named "ClangASTContext::AccessType" that abstracts the type creation from the various access enumerations in Clang. Currently there are clang::AccessSpecifier and the objective C ivars have their own enumeration. So I added a new enumeration that will allow a consistent interface when creating types through ClangASTContext.

I also added new functions to create an Objective C class, ivar and set an objective C superclass. They aren't hooked up in the DWARF parser yet. That is the next step, though I am unsure if I will do this in the DWARF parser or try and do it generically in the existing Record manipulation functions.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109130 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
32a8c7e02b84fbc36ee0fdb553002a1880c8d83e 22-Jul-2010 Greg Clayton <gclayton@apple.com> Modified both the ObjectFileMachO and ObjectFileELF to correctly set the
SectionType for Section objects for DWARF.

Modified the DWARF plug-in to get the DWARF sections by SectionType so we
can safely abstract the LLDB core from section names for the various object
file formats.

Modified the SectionType definitions for .debug_pubnames and .debug_pubtypes
to use the correct case.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109054 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Section.h
ldb-enumerations.h
1674b12bbc3dae7b9543b8c5f958e90ddc767fa4 22-Jul-2010 Greg Clayton <gclayton@apple.com> Change over to using the definitions for mach-o types and defines to the
defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO
and ObjectContainerUniversalMachO to be able to be cross compiled in Linux.

Also did some cleanup on the ASTType by renaming it to ClangASTType and
renaming the header file. Moved a lot of "AST * + opaque clang type *"
functionality from lldb_private::Type over into ClangASTType.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109046 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ClangForward.h
xpression/ClangExpressionDeclMap.h
xpression/ClangFunction.h
xpression/ClangResultSynthesizer.h
ymbol/ASTType.h
ymbol/ClangASTContext.h
ymbol/ClangASTType.h
ymbol/Type.h
a36f1b759c1597261b6436b2b9fdf56a82d96abd 21-Jul-2010 Greg Clayton <gclayton@apple.com> Add new SectionType enumerations for all DWARF sections. ObjectFile parsers should start properly setting the section types for DWARF sections, then we can move the DWARF SymbolFile parser over to finding the sections by the appropriate SectionType.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109041 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
15be8eddf3a2f9aff328197822ad8f338f96232b 21-Jul-2010 Greg Clayton <gclayton@apple.com> Allow searching for a section by SectionType.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109040 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Section.h
9fed0247390710f822e0150e03ff0032549bf82a 21-Jul-2010 Sean Callanan <scallanan@apple.com> Whoops, forgot to guard ASTType.h. Fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108970 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ASTType.h
f328c9ffe0bb00f48601027ec86dbdf238b42c2a 21-Jul-2010 Sean Callanan <scallanan@apple.com> Added functionality to dematerialize values that were
used by the JIT compiled expression, including the
result of the expression.

Also added a new class, ASTType, which encapsulates an
opaque Clang type and its associated AST context.

Refactored ClangExpressionDeclMap to use ASTTypes,
significantly reducing the possibility of mixups of
types from different AST contexts.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108965 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
ymbol/ASTType.h
ymbol/ClangASTContext.h
53d68e749f0715691a95f23e9490d97e484b15da 21-Jul-2010 Greg Clayton <gclayton@apple.com> Remove use of STL collection class use of the "data()" method since it isn't
part of C++'98. Most of these were "std::vector<T>::data()" and
"std::string::data()".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108957 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UniqueCStringMap.h
2d84974fcfcf8ee02fce6a8d73d21be7b5d1a880 20-Jul-2010 Stephen Wilson <wilsons@start.ca> Add missing include.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108878 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ObjectFile.h
3fd1f36c937575dbf57bae04c7ebaef78d8ecc1d 17-Jul-2010 Stephen Wilson <wilsons@start.ca> Have Process::CreateBreakpointSite return a break_id_t instead of a user_id_t.
Also, update BreakpointLocation::ResolveBreakpointSite to check for invalid
breakpoint ID's using the proper magic constant.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108598 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Process.h
336a0002b94c7f23573ec613c4d4ac89a67fd299 17-Jul-2010 Sean Callanan <scallanan@apple.com> Added the necessary code to copy variables used by
an expression into the struct prepared for the JIT
compiled code to use.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108596 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
810f22d18ca8f9d31f49d79bb4b51a9f2fd96dea 16-Jul-2010 Sean Callanan <scallanan@apple.com> Wrote the code that looks at a context to see
if the variables in that context allow a particular
JIT compiled expression to run in that context.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108485 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
5510dddc33260a991284ef81ca343594f23262e8 16-Jul-2010 Sean Callanan <scallanan@apple.com> Added a function to test whether two types are
the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108467 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
bef1583b89e73de77c8b0897fcf42b5b1fcabe4c 14-Jul-2010 Greg Clayton <gclayton@apple.com> I enabled some extra warnings for hidden local variables and for hidden
virtual functions and caught some things and did some general code cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108299 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
nterpreter/ScriptInterpreter.h
8bce665569ea08dd43d9ff21e23f14ebbc191d12 13-Jul-2010 Sean Callanan <scallanan@apple.com> "expr -i" now performs the required transforms to
prepare the IR for JIT compilation. We still need
to do the JIT compilation and move the arguments
in/out of target memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108279 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpressionDeclMap.h
xpression/IRForTarget.h
809ab9bcd5eb7aa87fb662a89a327384f892b923 10-Jul-2010 Jim Ingham <jingham@apple.com> Add an "Avoid Frames matching this regular expression" to ThreadPlanStepInRange.
This relies on ThreadPlanStepOut working correctly, which it doesn't currently for Inlined functions, so this feature is only partially useful until we take care of Stepping Out of inlined functions.
Added an option to "thread step-in" to set the avoid regular expression. This is mostly for testing, once the Setting code is redone, we'll move this to a general setting.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108036 91177308-0d34-0410-b5e6-96231b3b80d8
arget/ThreadPlanStepInRange.h
54e7afa84d945f9137f9372ecde432f9e1a702fc 09-Jul-2010 Greg Clayton <gclayton@apple.com> Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108009 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
reakpoint/Breakpoint.h
reakpoint/BreakpointIDList.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointLocationCollection.h
reakpoint/BreakpointLocationList.h
reakpoint/BreakpointOptions.h
reakpoint/BreakpointSite.h
reakpoint/BreakpointSiteList.h
reakpoint/StoppointLocation.h
reakpoint/WatchpointLocation.h
ore/FileSpec.h
xpression/ClangExpression.h
xpression/ClangFunction.h
ost/Predicate.h
nterpreter/CommandCompletions.h
akefile
arget/Process.h
arget/ThreadPlanShouldStopHere.h
arget/ThreadSpec.h
c0418155302e97d37571dfa41a38f6b33759a5e0 07-Jul-2010 Greg Clayton <gclayton@apple.com> typedef fixups, patch from Jean-Daniel Dupas.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107794 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/DWARFCallFrameInfo.h
767af88aa617288e584afcfed055f7755e408542 07-Jul-2010 Jim Ingham <jingham@apple.com> Fix GetRepeatCommand so it works with multi-word commands.
Move the "source", "alias", and "unalias" commands to "commands *".
Move "source-file" to "source list".
Added a "source info" command but it isn't implemented yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107751 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandObject.h
nterpreter/CommandObjectMultiword.h
5d9cbd4d92831b9f255b4e5b5304bfd0cdff29c7 07-Jul-2010 Jim Ingham <jingham@apple.com> Added a "GetRepeatCommand" to the command object. The Interpreter uses this
instead of the last history item to provide a command for the "empty" command.
Use this in the source-file command to make <RETURN> continue the listing rather
than relist the first listing...


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107736 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
d40f8a68b49a43264ff41a0f0ef51bef6372e8b3 07-Jul-2010 Jim Ingham <jingham@apple.com> Hide the logic for command resolution for commands, aliases & user commands behind a single
interface so everybody does it the same way. Add an "exact" lookup for internal uses.

Fix up a few little cases where we weren't reporting command lookup errors correctly.

Added "b" as an alias for "breakpoint" so it doesn't collide with "bt".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107718 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
ccfba727178bb919cdff3365839bed9584df2560 07-Jul-2010 Jason Molenda <jmolenda@apple.com> Switch over to using llvm's dwarf constants file.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107716 91177308-0d34-0410-b5e6-96231b3b80d8
ore/dwarf.h
5cf4a1ca412654c3f912e2b3cea931fb814f322f 03-Jul-2010 Sean Callanan <scallanan@apple.com> Added the skeleton of an IR transformer that will
prepare IR for execution in the target. Wired the
expression command to use this IR transformer when
conversion to DWARF fails, and wired conversion to
DWARF to always fail (well, we don't generate any
DWARF...)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107559 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/IRForTarget.h
dcb658b2d2e56276348977c84895f1fe0acf47d6 02-Jul-2010 Sean Callanan <scallanan@apple.com> Added the skeleton of a transformation pass to
convert IR to DWARF. So far, this pass only
performs a depth-first traversal of the IR,
logging each basic block as it finds it.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107515 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/IRToDWARF.h
c4f51108ccb0189f3f277168a668a23d6fa15cfe 02-Jul-2010 Greg Clayton <gclayton@apple.com> Updated to llvm/clang from July 2, 2010 at 8:00AM.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107494 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
b352ebdfef166f3d0363fe9af50dcf063638d9f7 02-Jul-2010 Sean Callanan <scallanan@apple.com> Added a method to get a stream's byte order.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107460 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Stream.h
e9d0df45df0ee87623985d1e59947a2ca50c14ea 02-Jul-2010 Greg Clayton <gclayton@apple.com> More leaks detection:
- fixed 3 posix spawn attributes leaks
- fixed us always leaking CXXBaseSpecifier objects when we create class
base classes. Clang apparently copies the base classes we pass in.

Fixed some code formatting in ClangASTContext.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107459 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
4cfa2a21b54dcd0b616e420b2c93e4ee5f16a389 02-Jul-2010 Jim Ingham <jingham@apple.com> Remember to save first...


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107457 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
bc406e479b888fecd3490824c422629768710f7c 02-Jul-2010 Jim Ingham <jingham@apple.com> Resolve dueling commits... Plus add docs for Resolve & ResolveUsername.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107456 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
84a0d3389fbb1927a92b4a4de2b1e8788f748d28 02-Jul-2010 Jim Ingham <jingham@apple.com> Remove duplicate def'n from FileSpec.h.
Add user name completion to the file completer.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107455 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
8c6934d1ada526541e85aa381f07089764408a3b 01-Jul-2010 Sean Callanan <scallanan@apple.com> Added a SemaConsumer that transforms the ASTs for
an expression, adding code to put the value of the
last expression (if there is one) into a variable
and write the address of that variable to a global
pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107419 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/ClangResultSynthesizer.h
b1a8e2060d610f1ab8578800ae12b4d045dcd578 01-Jul-2010 Greg Clayton <gclayton@apple.com> Undid extra changes I already checked in.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107413 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
ee2a03cdb26195695d0c218f3f4411b3fe7d3d92 01-Jul-2010 Jim Ingham <jingham@apple.com> Missed one file in my last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107410 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
b1a9862ba1ceb219b6042ff3f8c6ff591867ae26 01-Jul-2010 Greg Clayton <gclayton@apple.com> Added a missing static function prototype to FileSpec.h for ResolveUsername.

Did a bit of code formatting and cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107403 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
cf7f1ad9860ad2447680d427be87f85f3a1396d9 01-Jul-2010 Greg Clayton <gclayton@apple.com> Fixed up disassembly to not emit the module name before all function names
that are in the disassembly comments since most of them are in the same
module (shared library).

Fixed a crasher that could happen when disassembling special section data.

Added an address dump style that shows the symbol context without the module
(used in the disassembly code).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107366 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
704363531ee4877ccc6d35d0702876096f54c67b 01-Jul-2010 Greg Clayton <gclayton@apple.com> Centralized all disassembly into static functions in source/Core/Disassembler.cpp.

Added the ability to read memory from the target's object files when we aren't
running, so disassembling works before you run!

Cleaned up the API to lldb_private::Target::ReadMemory().

Cleaned up the API to the Disassembler to use actual "lldb_private::Address"
objects instead of just an "addr_t". This is nice because the Address objects
when resolved carry along their section and module which can get us the
object file. This allows Target::ReadMemory to be used when we are not
running.

Added a new lldb_private::Address dump style: DumpStyleDetailedSymbolContext
This will show a full breakdown of what an address points to. To see some
sample output, execute a "image lookup --address <addr>".

Fixed SymbolContext::DumpStopContext(...) to not require a live process in
order to be able to print function and symbol offsets.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107350 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBTarget.h
ore/Address.h
ore/Disassembler.h
ore/FileSpec.h
ore/Section.h
arget/Target.h
558be58c085ed1d3e33c01f5ea3bf0eff63ab827 30-Jun-2010 Caroline Tice <ctice@apple.com> Add a unique ID to each debugger instance.
Add functions to look up debugger by id
Add global variable to lldb python module, to hold debugger id
Modify embedded Python interpreter to update the global variable with the
id of its current debugger.
Modify the char ** typemap definition in lldb.swig to accept 'None' (for NULL)
as a valid value.

The point of all this is so that, when you drop into the embedded interpreter
from the command interpreter (or when doing Python-based breakpoint commands),
there is a way for the Python side to find/get the correct debugger
instance ( by checking debugger_unique_id, then calling
SBDebugger::FindDebuggerWithID on it).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107287 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Debugger.h
802f8b0e11525a61f6becfd3562222b2cfaea965 30-Jun-2010 Jim Ingham <jingham@apple.com> Add a source file completer to the CommandCompleters.
Add a way for the completers to say whether the completed argument should have a space inserted after is
or not.
Added the file name completer to the "file" command.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107247 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/CommandCompletions.h
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandObjectMultiword.h
nterpreter/Options.h
661825b68e95abdfab2c7242c0d515e8260d1431 29-Jun-2010 Greg Clayton <gclayton@apple.com> Fixed debug map in executable + DWARF in .o debugging on Mac OS X.

Added the ability to dump any file in the global module cache using any of
the "image dump" commands. This allows us to dump the .o files that are used
with DWARF + .o since they don't belong the the target list for the current
target.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107100 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ModuleList.h
ore/Section.h
12bec71b323dc520f0e985a86e09c4712559e115 28-Jun-2010 Greg Clayton <gclayton@apple.com> Added function name types to allow us to set breakpoints by name more
intelligently. The four name types we currently have are:

eFunctionNameTypeFull = (1 << 1), // The function name.
// For C this is the same as just the name of the function
// For C++ this is the demangled version of the mangled name.
// For ObjC this is the full function signature with the + or
// - and the square brackets and the class and selector
eFunctionNameTypeBase = (1 << 2), // The function name only, no namespaces or arguments and no class
// methods or selectors will be searched.
eFunctionNameTypeMethod = (1 << 3), // Find function by method name (C++) with no namespace or arguments
eFunctionNameTypeSelector = (1 << 4) // Find function by selector name (ObjC) names


this allows much more flexibility when setting breakoints:

(lldb) breakpoint set --name main --basename
(lldb) breakpoint set --name main --fullname
(lldb) breakpoint set --name main --method
(lldb) breakpoint set --name main --selector

The default:

(lldb) breakpoint set --name main

will inspect the name "main" and look for any parens, or if the name starts
with "-[" or "+[" and if any are found then a full name search will happen.
Else a basename search will be the default.

Fixed some command option structures so not all options are required when they
shouldn't be.

Cleaned up the breakpoint output summary.

Made the "image lookup --address <addr>" output much more verbose so it shows
all the important symbol context results. Added a GetDescription method to
many of the SymbolContext objects for the more verbose output.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107075 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointResolverName.h
ore/Module.h
ore/ModuleList.h
ore/VMRange.h
ymbol/Block.h
ymbol/CompileUnit.h
ymbol/Function.h
ymbol/LineEntry.h
ymbol/Symbol.h
ymbol/SymbolContext.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
ymbol/Type.h
arget/Target.h
ldb-enumerations.h
adb8429ff57c3d54300dd6a8a1ed993d655c1931 24-Jun-2010 Jim Ingham <jingham@apple.com> Handle completing "-" and "--".

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106784 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Args.h
8b9af1caac91c9e66440370a79705a3370e0a360 24-Jun-2010 Jim Ingham <jingham@apple.com> Convert direct access to the required & optional option sets to an accessor so we can lazily run BuildValidOptionSet, but make sure it is done before access.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106783 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/Options.h
848960c21065e7a9219bff3270c7d120c820cfcc 24-Jun-2010 Sean Callanan <scallanan@apple.com> Added the temporary -i option to expr, which
switches the expression parsing over to use the
LLVM IR as opposed to Clang ASTs. Right now,
that functionality only logs.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106695 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
705d6782f95a38caa5cddf8dcc32d6b13fab20fc 23-Jun-2010 Sean Callanan <scallanan@apple.com> Fixed the log streams for logs that output to
standard output, resolving a crasher.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106682 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Log.h
63094e0bb161580564954dee512955c1c79d3476 23-Jun-2010 Greg Clayton <gclayton@apple.com> Very large changes that were needed in order to allow multiple connections
to the debugger from GUI windows. Previously there was one global debugger
instance that could be accessed that had its own command interpreter and
current state (current target/process/thread/frame). When a GUI debugger
was attached, if it opened more than one window that each had a console
window, there were issues where the last one to setup the global debugger
object won and got control of the debugger.

To avoid this we now create instances of the lldb_private::Debugger that each
has its own state:
- target list for targets the debugger instance owns
- current process/thread/frame
- its own command interpreter
- its own input, output and error file handles to avoid conflicts
- its own input reader stack

So now clients should call:

SBDebugger::Initialize(); // (static function)

SBDebugger debugger (SBDebugger::Create());
// Use which ever file handles you wish
debugger.SetErrorFileHandle (stderr, false);
debugger.SetOutputFileHandle (stdout, false);
debugger.SetInputFileHandle (stdin, true);

// main loop

SBDebugger::Terminate(); // (static function)

SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to
ensure nothing gets destroyed too early when multiple clients might be
attached.

Cleaned up the command interpreter and the CommandObject and all subclasses
to take more appropriate arguments.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106615 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBBroadcaster.h
PI/SBCommandContext.h
PI/SBCommandInterpreter.h
PI/SBCommandReturnObject.h
PI/SBCommunication.h
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBInputReader.h
PI/SBInstruction.h
PI/SBLineEntry.h
PI/SBListener.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSourceManager.h
PI/SBStringList.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBTarget.h
PI/SBThread.h
PI/SBValue.h
PI/SBValueList.h
reakpoint/StoppointCallbackContext.h
ore/Debugger.h
ore/Disassembler.h
ore/InputReader.h
nterpreter/CommandCompletions.h
nterpreter/CommandContext.h
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/CommandObjectMultiword.h
nterpreter/CommandObjectRegexCommand.h
nterpreter/Options.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/ScriptInterpreterPython.h
arget/Target.h
arget/TargetList.h
ldb-forward-rtti.h
ldb-forward.h
8f0dc34f45576dfb719f879b6d3ea5f61de0e918 23-Jun-2010 Sean Callanan <scallanan@apple.com> Added support to the expression parser for locating
externally-defined functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106606 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangASTSource.h
xpression/ClangExpressionDeclMap.h
9c6898b5686984baa09d0c694169cc935fc99562 22-Jun-2010 Jim Ingham <jingham@apple.com> Make an explicit GetThreadSpecNoCreate accessor so you don't have to get the const-ness right to ensure you are not making a copy of the owning breakpoint's ThreadSpec in a breakpoint location. Also change the name from NoCopy to NoCreate since that's clearer.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106578 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointLocation.h
reakpoint/BreakpointOptions.h
726cccbbe0087d5269c465da5433cbf1269700b0 22-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> Move trivial parts of UserID into the header.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106535 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UserID.h
f9a232b8befaf0e1584906ed7b862d64b6fedb6d 21-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> Move a bunch of trivial methods into the header. These compile down to 1-2
instructions so it's really profitable to inline them.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106450 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Address.h
ore/AddressRange.h
ymbol/Symbol.h
5a47e8bcc7277dc3683f2af2aeb9717184e8360c 19-Jun-2010 Jim Ingham <jingham@apple.com> Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan
without having to use RTTI.
Removed the ThreadPlanContinue and replaced with a ShouldAutoContinue query that serves the same purpose. Having to push
another plan to assert that if there's no other indication the target should continue when this plan is popped was flakey
and error prone. This method is more stable, and fixed problems we were having with thread specific breakpoints.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106378 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
arget/ThreadPlan.h
arget/ThreadPlanContinue.h
arget/ThreadPlanStepOverBreakpoint.h
arget/ThreadPlanStepRange.h
ldb-forward.h
8e5e38f584a613f601a37f62e1b25230cb400c6f 18-Jun-2010 Jim Ingham <jingham@apple.com> Adding setting thread specific breakpoints by name, ID, index & queue name to the SB interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106268 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
649492b3614c11e52a2dbe3693bbdf97efec9ba0 18-Jun-2010 Jim Ingham <jingham@apple.com> Change the Breakpoint & BreakpointLocation GetDescription methods so they call the BreakpointOptions::GetDescription rather
than picking bits out of the breakpoint options. Added BreakpointOptions::GetDescription to do this job. Some more mucking
around to keep the breakpoint listing from getting too verbose.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106262 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointOptions.h
arget/Thread.h
arget/ThreadSpec.h
a00ca6dca3e2031387d2c651b5b42423f05bd50e 16-Jun-2010 Johnny Chen <johnny.chen@apple.com> Fixed a typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106133 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Timer.h
c3d68556a5ae14219eb7638dade1799ab94b69fe 16-Jun-2010 Owen Anderson <resistor@mac.com> Switch from qsort_r to std::stable_sort for a performance win and improved portability.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106116 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
3c7b5b9f83cae58ca366db2bba37dc09485f7dcc 16-Jun-2010 Jim Ingham <jingham@apple.com> Add a "thread specification" class that specifies thread specific breakpoints by name, index, queue or TID.
Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created.
Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a
breakpoint hit event for that thread.
Added a "breakpoint configure" command to allow you to reset any of the thread
specific options (or the ignore count.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106078 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointList.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointLocationCollection.h
reakpoint/BreakpointOptions.h
reakpoint/BreakpointSite.h
reakpoint/StoppointLocation.h
arget/Thread.h
arget/ThreadSpec.h
ldb-forward.h
18728209d1ed915dcc5815a89f4e0c66aff128c7 15-Jun-2010 Jason Molenda <jmolenda@apple.com> Add definition for DW_LANG_MIPS_Assembler. This file was originally
generated by a script. I don't know if we're still regenerating
it or not; will have to check with Greg about how he's handling this
now. Should update it for the final DWARF3 and soon-to-be-released
DWARF4 constants while I'm at it..



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106045 91177308-0d34-0410-b5e6-96231b3b80d8
ore/dwarf.h
bcec309dd85dc1e005848b014445c6ce55e173fb 15-Jun-2010 Jason Molenda <jmolenda@apple.com> It makes me nervous seeing those bitfield shift values without parens.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106036 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-defines.h
84cdc15005983e5244d665fa779e33c2b6fac95f 15-Jun-2010 Jim Ingham <jingham@apple.com> Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106034 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Args.h
ore/Options.h
nterpreter/Args.h
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/Options.h
nterpreter/StateVariable.h
341f9b6dff63b486887ec80077fd54c8b2970e2c 15-Jun-2010 Jim Ingham <jingham@apple.com> Fix a typo in a comment...


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106022 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-types.h
34e9a98dcff785b0693594b6d6753f560abf8be2 15-Jun-2010 Jim Ingham <jingham@apple.com> Change the Options parser over to use a mask rather than an ordinal for option sets.
Fixed the Disassemble arguments so you can't specify start address or name in multiple ways.
Fixed the command line input so you can specify the filename without "-f" even if you use other options.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106020 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Options.h
ldb-defines.h
ldb-types.h
273a8e58a03ebf44fba04bd006b832882c80a9a0 14-Jun-2010 Greg Clayton <gclayton@apple.com> patch from: Jean-Daniel Dupas

BreakpointLocation::GetLoadAddress() does not match the 'StoppointLocation::GetLoadAddress() const' virtual function prototype, and so, does not override the superclass function.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105927 91177308-0d34-0410-b5e6-96231b3b80d8
reakpoint/BreakpointLocation.h
8f5fd6b999b0c9b7398870ccc3ed438d7a6a0830 12-Jun-2010 Greg Clayton <gclayton@apple.com> I have eliminated RTTI from LLDB!

Also added a shell script build phase that fixes the headers in
LLDB.framework.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105899 91177308-0d34-0410-b5e6-96231b3b80d8
arget/Thread.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepOverRange.h
ldb-types.h
382eb3a60d25409612e0bb33fd4db7f848fb2c55 12-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Add missing include.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105898 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Timer.h
7884ab842f7f0be6c583eac2904f5763706816bc 12-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Add missing includes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105897 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBBreakpoint.h
PI/SBEvent.h
PI/SBInstruction.h
PI/SBInstructionList.h
PI/SBProcess.h
PI/SBSourceManager.h
PI/SBThread.h
PI/SBValue.h
17b71361774cce1c5cbc2b31e0181a932634073d 12-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Move SharingPtr.h into include/.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105896 91177308-0d34-0410-b5e6-96231b3b80d8
tility/SharingPtr.h
ldb-types.h
e49f79dd0afe39829873fa2dcede8ef68b2485f0 12-Jun-2010 Greg Clayton <gclayton@apple.com> Switched over to using the new lldb::SharingPtr from Howard Hinnant.
We need to put this in LLDB since we need to vend this in our API
because our public API uses shared pointers to our private objects.

Removed a deprecated file: include/lldb/Host/Types.h

Added the new SharingPtr.cpp/.h files into source/Utility.

Added a shell script build phase that fixes up all headers in the
LLDB.framework.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105895 91177308-0d34-0410-b5e6-96231b3b80d8
ost/Types.h
ldb-forward-rtti.h
ldb-private-interfaces.h
ldb-private-log.h
ldb-types.h
546618cfedfe61063be084654347bc9067b20545 12-Jun-2010 Greg Clayton <gclayton@apple.com> Reverted changes for eByteOrderHost detection, but added linux support for using <endian.h>. No files in "API" can include any LLVM header files. We must keep LLVM behind our API.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105892 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
fa97069b86f30aa44bb23a1de506ae220359b4fa 12-Jun-2010 Greg Clayton <gclayton@apple.com> Anders Carlsson patch for member pointers. Thanks Anders.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105868 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/ClangASTContext.h
05faf67f894348849cba4055e76da89f3aa883ab 12-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Remove platform-specific includes from platform-independent code. Mac users,
please check whether this breaks anything.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105863 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-types.h
7dbd6da9a222b6bcef35f1cb8ab838a30b7f75e5 11-Jun-2010 Owen Anderson <resistor@mac.com> Revert my previous patch. Apparently the code-size impact of std::sort isn't acceptable.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105835 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
c0b52f43342b9916c4c384a3a78fdf72d753d375 11-Jun-2010 Owen Anderson <resistor@mac.com> Replace qsort_r with std::sort. This gets rid of a lot of portability
ickiness, and is cleaner to boot.

I'm fairly confident that I converted the comparator over properly,
and what testing I could figure out how to run seemed to pass, but it
would be great if someone in the know could check behind me.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105834 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
5b5985d9fc8ac0bf15057c3c65e296e9aa924845 11-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix TimeValue::Offset* to take uint64_t



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105812 91177308-0d34-0410-b5e6-96231b3b80d8
ost/TimeValue.h
fec663fa5fa8f793a9f77910ecf05a559893bffd 11-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix warning.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105808 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
cf0150574a0a97049efe2dce2cc0aa433705feb3 11-Jun-2010 Greg Clayton <gclayton@apple.com> Made lldb_private::ArchSpec more generic so that it can take a mach-o cpu
type and sub-type, or an ELF e_machine value. Also added a generic CPU type
to the arch spec class so we can have a single arch definition that the LLDB
core code can use. Previously a lot of places in the code were using the
mach-o definitions from a macosx header file.

Switches over to using "llvm/Support/MachO.h" for the llvm::MachO::XXX for the
CPU types and sub types for mach-o ArchSpecs. Added "llvm/Support/ELF.h" so
we can use the "llvm::ELF::XXX" defines for the ELF ArchSpecs.

Got rid of all CPU_TYPE_ and CPU_SUBTYPE_ defines that were previously being
used in LLDB.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105806 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ArchSpec.h
ymbol/ObjectFile.h
ldb-enumerations.h
6206317b8d8b0e8b51a9ab7d75803340216a57e6 11-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Make Error.h and Error.cpp compile on Linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105798 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Error.h
020f353bf792f1028e4037ea92d03acc90594c40 11-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Make qsort_r usage "portable". Why does a function which seems so simple
have to be so complicated?



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105797 91177308-0d34-0410-b5e6-96231b3b80d8
ymbol/Symtab.h
40cb2cd1aa19a8cf5b35a0fe3513a55dcb479d30 11-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Remove global init constructor from r105746.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105794 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
e02154d29ecf7459c6649880bec3dcb4f779c9a9 10-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Remove unused uuid_t constructor for lldb_private::UUID.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105780 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UUID.h
4bd81b807832d28e1e5762e2a7a27407ea272f31 10-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Don't use std::tr1::shared_ptr directly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105773 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Debugger.h
96f5ac65fe54bae98f8d5ce11553c14e1885476e 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Warning fix.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105754 91177308-0d34-0410-b5e6-96231b3b80d8
tility/PseudoTerminal.h
dea5ea78ef9bf371a0d19590c6b7c6989cba9a89 09-Jun-2010 Jason Molenda <jmolenda@apple.com> Move source/Utility/PseudoTerminal.h into include/lldb/Utility.
The top of the header file seems to indicate that this was
intended to be over at include/lldb/Core but we should be in line
with the .cpp file's location so it's include/lldb/Utility for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105753 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreter.h
tility/PseudoTerminal.h
8cd4a945aac95da258574844fc9196ea427a5961 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Use portable endianness routine from LLVM.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105746 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
3c90d99d1520c45942479257a632f38f0191a360 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Don't include Python.h in the shared header.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105737 91177308-0d34-0410-b5e6-96231b3b80d8
nterpreter/ScriptInterpreterPython.h
9948838695b3e62dd2db1662a503953fa3a5d59f 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Revert this fix for now, since it breaks the build.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105729 91177308-0d34-0410-b5e6-96231b3b80d8
ore/UUID.h
ced18cd66f0f32ec1d2226005044dd1cd44710c6 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> A few more minor fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105721 91177308-0d34-0410-b5e6-96231b3b80d8
ore/ValueObjectChild.h
ymbol/ClangASTContext.h
656a30ee792b6d5911ed8b2140e67f5a1ec4e79a 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> A couple more minor error/warning fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105715 91177308-0d34-0410-b5e6-96231b3b80d8
xpression/ClangExpression.h
xpression/RecordingMemoryManager.h
9dd6edde116d93777dae51ec550dee741019487e 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> More warning/error fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105714 91177308-0d34-0410-b5e6-96231b3b80d8
ore/Log.h
ore/Mangled.h
ore/RegularExpression.h
ore/Section.h
ore/UUID.h
arget/ThreadPlan.h
87c871847dba627a07cf6f4ac8cfb4d6722eccb5 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Misc warning/error fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105713 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBValue.h
PI/SBValueList.h
ore/DataBufferMemoryMap.h
ore/Value.h
xpression/ClangFunction.h
nterpreter/CommandCompletions.h
ymbol/LineTable.h
1501a967735469f0e21950905cc64ca24d305fa0 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Per surrounding style, use stdarg.h instead of cstdio, etc.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105711 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
ore/Stream.h
e28824e0b988221c7eedf8e3d212527d2bdac6a7 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> And a few more warning/error fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105698 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBDebugger.h
PI/SBProcess.h
ore/Language.h
ore/Scalar.h
ost/Mutex.h
ymbol/CompileUnit.h
ymbol/Function.h
arget/Process.h
b6773a75100fe0db284cda36abd6b65e95554fab 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> More random error/warning fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105695 91177308-0d34-0410-b5e6-96231b3b80d8
ore/FileSpec.h
ore/STLUtils.h
ore/Stream.h
ymbol/Block.h
d762e68777e195e1f5d5a1b907eb9b13b0336565 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Minor warning fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105691 91177308-0d34-0410-b5e6-96231b3b80d8
ldb-enumerations.h
74089e10cfbb4665da128f26d78c2b4006b5f1c6 09-Jun-2010 Christopher Friesen <friesen@apple.com> missed a greater than to quote conversion

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105690 91177308-0d34-0410-b5e6-96231b3b80d8
PI/SBThread.h
5f81547fd786584b10999c087528b323b5945896 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix include lines to use more conventional paths, part 1.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105688 91177308-0d34-0410-b5e6-96231b3b80d8
PI/LLDB.h
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBBroadcaster.h
PI/SBCommandContext.h
PI/SBCommandInterpreter.h
PI/SBCommandReturnObject.h
PI/SBCommunication.h
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBDefines.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBHostOS.h
PI/SBInputReader.h
PI/SBInstruction.h
PI/SBInstructionList.h
PI/SBLineEntry.h
PI/SBListener.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSourceManager.h
PI/SBStringList.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBTarget.h
PI/SBThread.h
PI/SBType.h
PI/SBValue.h
PI/SBValueList.h
ldb-defines.h
ldb-forward-rtti.h
ldb-include.h
ldb-types.h
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
PI/LLDB.h
PI/SBAddress.h
PI/SBBlock.h
PI/SBBreakpoint.h
PI/SBBreakpointLocation.h
PI/SBBroadcaster.h
PI/SBCommandContext.h
PI/SBCommandInterpreter.h
PI/SBCommandReturnObject.h
PI/SBCommunication.h
PI/SBCompileUnit.h
PI/SBDebugger.h
PI/SBDefines.h
PI/SBError.h
PI/SBEvent.h
PI/SBFileSpec.h
PI/SBFrame.h
PI/SBFunction.h
PI/SBHostOS.h
PI/SBInputReader.h
PI/SBInstruction.h
PI/SBInstructionList.h
PI/SBLineEntry.h
PI/SBListener.h
PI/SBModule.h
PI/SBProcess.h
PI/SBSourceManager.h
PI/SBStringList.h
PI/SBSymbol.h
PI/SBSymbolContext.h
PI/SBTarget.h
PI/SBThread.h
PI/SBType.h
PI/SBValue.h
PI/SBValueList.h
reakpoint/Breakpoint.h
reakpoint/BreakpointID.h
reakpoint/BreakpointIDList.h
reakpoint/BreakpointList.h
reakpoint/BreakpointLocation.h
reakpoint/BreakpointLocationCollection.h
reakpoint/BreakpointLocationList.h
reakpoint/BreakpointOptions.h
reakpoint/BreakpointResolver.h
reakpoint/BreakpointResolverAddress.h
reakpoint/BreakpointResolverFileLine.h
reakpoint/BreakpointResolverName.h
reakpoint/BreakpointSite.h
reakpoint/BreakpointSiteList.h
reakpoint/Stoppoint.h
reakpoint/StoppointCallbackContext.h
reakpoint/StoppointLocation.h
reakpoint/WatchpointLocation.h
ore/Address.h
ore/AddressRange.h
ore/AddressResolver.h
ore/AddressResolverFileLine.h
ore/AddressResolverName.h
ore/ArchSpec.h
ore/Args.h
ore/Baton.h
ore/Broadcaster.h
ore/ClangForward.h
ore/Communication.h
ore/Connection.h
ore/ConnectionFileDescriptor.h
ore/ConstString.h
ore/DataBuffer.h
ore/DataBufferHeap.h
ore/DataBufferMemoryMap.h
ore/DataExtractor.h
ore/Debugger.h
ore/Disassembler.h
ore/Error.h
ore/Event.h
ore/FileSpec.h
ore/FileSpecList.h
ore/Flags.h
ore/IOStreamMacros.h
ore/InputReader.h
ore/Language.h
ore/Listener.h
ore/Log.h
ore/Mangled.h
ore/Module.h
ore/ModuleChild.h
ore/ModuleList.h
ore/Options.h
ore/PluginInterface.h
ore/PluginManager.h
ore/RegularExpression.h
ore/STLUtils.h
ore/Scalar.h
ore/SearchFilter.h
ore/Section.h
ore/SourceManager.h
ore/State.h
ore/Stream.h
ore/StreamFile.h
ore/StreamString.h
ore/StringList.h
ore/TTYState.h
ore/ThreadSafeSTLMap.h
ore/ThreadSafeValue.h
ore/Timer.h
ore/UUID.h
ore/UniqueCStringMap.h
ore/UserID.h
ore/VMRange.h
ore/Value.h
ore/ValueObject.h
ore/ValueObjectChild.h
ore/ValueObjectList.h
ore/ValueObjectRegister.h
ore/ValueObjectVariable.h
ore/dwarf.h
xpression/ClangASTSource.h
xpression/ClangExpression.h
xpression/ClangExpressionDeclMap.h
xpression/ClangExpressionVariable.h
xpression/ClangFunction.h
xpression/ClangStmtVisitor.h
xpression/DWARFExpression.h
xpression/RecordingMemoryManager.h
ost/Condition.h
ost/Endian.h
ost/Host.h
ost/Mutex.h
ost/Predicate.h
ost/Symbols.h
ost/TimeValue.h
ost/Types.h
nterpreter/CommandCompletions.h
nterpreter/CommandContext.h
nterpreter/CommandInterpreter.h
nterpreter/CommandObject.h
nterpreter/CommandObjectCrossref.h
nterpreter/CommandObjectMultiword.h
nterpreter/CommandObjectRegexCommand.h
nterpreter/CommandReturnObject.h
nterpreter/ScriptInterpreter.h
nterpreter/ScriptInterpreterNone.h
nterpreter/ScriptInterpreterPython.h
nterpreter/StateVariable.h
ymbol/Block.h
ymbol/ClangASTContext.h
ymbol/CompileUnit.h
ymbol/DWARFCallFrameInfo.h
ymbol/Declaration.h
ymbol/Function.h
ymbol/LineEntry.h
ymbol/LineTable.h
ymbol/ObjectContainer.h
ymbol/ObjectFile.h
ymbol/Symbol.h
ymbol/SymbolContext.h
ymbol/SymbolContextScope.h
ymbol/SymbolFile.h
ymbol/SymbolVendor.h
ymbol/Symtab.h
ymbol/Type.h
ymbol/TypeList.h
ymbol/Variable.h
ymbol/VariableList.h
arget/ABI.h
arget/DynamicLoader.h
arget/ExecutionContext.h
arget/ExecutionContextScope.h
arget/ObjCObjectPrinter.h
arget/PathMappingList.h
arget/Process.h
arget/RegisterContext.h
arget/StackFrame.h
arget/StackFrameList.h
arget/StackID.h
arget/Target.h
arget/TargetList.h
arget/Thread.h
arget/ThreadList.h
arget/ThreadPlan.h
arget/ThreadPlanBase.h
arget/ThreadPlanCallFunction.h
arget/ThreadPlanContinue.h
arget/ThreadPlanRunToAddress.h
arget/ThreadPlanShouldStopHere.h
arget/ThreadPlanStepInRange.h
arget/ThreadPlanStepInstruction.h
arget/ThreadPlanStepOut.h
arget/ThreadPlanStepOverBreakpoint.h
arget/ThreadPlanStepOverRange.h
arget/ThreadPlanStepRange.h
arget/ThreadPlanStepThrough.h
arget/ThreadPlanStepUntil.h
arget/UnixSignals.h
arget/Unwind.h
ldb-defines.h
ldb-enumerations.h
ldb-forward-rtti.h
ldb-forward.h
ldb-include.h
ldb-private-interfaces.h
ldb-private-log.h
ldb-private.h
ldb-types.h