History log of /external/lldb/source/lldb.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f6f52692f0f8f79860e573ef18a9ed93ef5e2668 17-Jul-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Re-introduces ELF core file support for Linux x86-64
Usage: 'lldb a.out -c core'.
TODO: FreeBSD support.
TODO: Support for AVX registers.
TODO: Refactor so that RegisterContextCore* don't inherit from classes that use ProcessMonitor
to fix the build on OS/X.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
750ed92ac45e252f1c8b9c2dde31c497f277b2e8 13-Jul-2013 Greg Clayton <gclayton@apple.com> Revert the ELF core file support until a few things can be worked out:

RegisterContextCoreLinux_x86_64 inherits from RegisterContextLinux_x86_64 which inherits from RegisterContext_x86_64 which uses has:

ProcessMonitor &GetMonitor();

This register context used by the core file can't use this since the process plug-in will be ProcessElfCore and the implementation of GetMonitor() does:

ProcessMonitor &
RegisterContext_x86_64::GetMonitor()
{
ProcessSP base = CalculateProcess();
ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
return process->GetMonitor();
}

ProcessELFCore doesn't, nor should it inherit from ProcessPOSIX and any call to GetMonitor() will fail for ELF core files.

Suggested cleanups:
- Make a register context class that is a base class that doesn't have any reading smarts, then make one that uses ProcessPOSIX and the has the GetMonitor() call, and one that gets its data straight from the core file.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
26345cbada66df8e698111cdf8d1689ccefe8331 12-Jul-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Introduces core file support for Linux x86-64 using 'lldb a.out -c core'.
TODO: Support for RegisterContext_x86_64::ReadFPR.

Patch by Samuel Jacob!


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
daecec0154002813bb2f98d0640018bac76b45ed 03-May-2013 Jason Molenda <jmolenda@apple.com> Remove the initialization/termination of the now-removed OperatingSystemDarwinKernel.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
e369aedc1ef2fc983ee97ad75a2537b9a8f820bd 05-Apr-2013 Jason Molenda <jmolenda@apple.com> Add a new PlatformDarwinKernel for kernel debugging. This Platform
plugin will index the kext bundles on the local filesystem when
created. During a kernel debug session, when the DynamicLoader
plugin needs to locate a kext by name like
"com.apple.com.apple.filesystems.autofs", the Platform can quickly
look for a UUID match in those kernel debug kit directories it
previously indexed.

I'm still working on profiling the performance impact of the inital
kext bundle scan; there will likely need to be a switch to enable
or disable this plugin's scan.

This only affects Mac kernel debugging and the code is only built
on Apple systems because of some use of low-level CoreFoundation
to parse plists.

<rdar://problem/13503583>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
54ad8cf0c987a269ac9a002905096341d3a99101 28-Feb-2013 Greg Clayton <gclayton@apple.com> Made lldb.cpp build with clang 5.0.

Also removed the use of llvm::raw_string_ostream as it wasn't needed.

Also fixed a crasher that could occur when the following line returned a C string tied to a local variable:

return OS.str().c_str();

I am guessing "static std::string buf;" was supposed to get assigned to "OS.str()" and then have "buf.c_str()" returned.

Modified the non-apple version code to cache its value and not recompute the version every time.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
3dd21ab440633e38ab898587f0e199f121d2b555 28-Feb-2013 Daniel Malea <daniel.malea@intel.com> Remove LLDB dependency on xcodeworkspace (on Linux) for version number
- make LLDB version number match Clang (and the Debian package)
- use the same revision detection magic that Clang uses to report SVN/Git revisions
- update test case as per above

Example output:

$ lldb -v
lldb version 3.3 (https://dmalea@llvm.org/svn/llvm-project/lldb/trunk revision 176211 clang revision 176208 llvm revision 176208)
ss

This line, and those below, will be ignored--

M source/lldb.cpp
M test/help/TestHelp.py
M source/Makefile


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
a3eb5cd43a23f6b072177f6064acc7f16200634d 08-Jan-2013 Daniel Malea <daniel.malea@intel.com> Enable ProcessGDBRemote plugin on Linux
- Fixes test case TestConnectRemote



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
b090668e1cc4287b193e5bc7299eabcc2fde36d4 14-Dec-2012 Andrew Kaylor <andrew.kaylor@intel.com> Enabling ItaniumABILanguageRuntime and SymbolFileDWARFDebugMap plugins on non-Apple platforms.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
c9e47ddb5adcc6e6d9ac999883cfdc78caa08a01 14-Dec-2012 Sean Callanan <scallanan@apple.com> Rmoved the old LLVM disassembler based on libedis.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
d35b7b3bfd21f4fd6b048693563eef1b772ae197 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> More Linux warnings fixes (remove default labels as needed):
- as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
d815ded12b0c9fea2c8a38cc241d3609b3fe228a 23-Aug-2012 Greg Clayton <gclayton@apple.com> Added a hollowed out version of an OperatingSystem plugin that will use a class in python to get thread information for threads stored in memory.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
5d673ae54c0af95f5c167efc0d290e31be2b00c0 01-Jun-2012 Jason Molenda <jmolenda@apple.com> Register the ProcessGDBRemote plugin ahead of the ProcessKDP plugin
so a process connect without any plugin specified picks up the
gdb-remote plugin by default.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
78dae82bea7365f3a3501618c5d724a1a11d944f 14-Apr-2012 Johnny Chen <johnny.chen@apple.com> Patch from Viktor Kutuzov <vkutuzov@accesssoftek.com>:

Hello everyone,

please find the attached patch for TOT and lldb-platform-work branch, which provides the following changes:
- fixed a crash in the ProcessPOSIX constructor when an executable module object is not yet created.
- added support for the multi instanciated FreeBSD platform objects (the local host and remote as example).
- enabled the remote gdb plugin on FreeBSD.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
0fd911c116c40b628be0197142e61e0c5e172889 05-Apr-2012 Bill Wendling <isanbard@gmail.com> Revert r154086. It may be needed for Darwin. But the symbols are still missing in the dylib.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
b730b9d8b0256a0cadf2befdb6df0243f5554b66 05-Apr-2012 Bill Wendling <isanbard@gmail.com> The DynamicLoaderPOSIXDYLD calls aren't available on Apple systems.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
34814d60bdfd681dab4d604b640f2640a8c42630 22-Mar-2012 Greg Clayton <gclayton@apple.com> Since we are having issues with the new LLVM MC disassembler, we can have
them both installed with the LLVM MC version being the default. I renamed the
name of the LLVM MC disassembler plug-in to "llvm-mc" and the LLVM enhanced
disassembly plug-in to "llvm-edis" and they can both be installed for now.

To use the "llvm-edis" disassembler, you can just specify it while disassembling:

(lldb) disassemble --plugin llvm-edis --name main
(lldb) disassemble --plugin llvm-mc --name main

This will allow us to compare the output of the two disassembler and eventually
deprecate the old one when the new one is ready. But it does use the new disassembler
by default so we continue to test it on a daily basis.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
a605c64524e6bb1e43de4ca0ea95967a596f08dd 27-Feb-2012 Greg Clayton <gclayton@apple.com> Enabled the PlatformLinux and PlatforFreeBSD on MacOSX so they can be used
and also so we don't break them with our code changes.

The _only_ plug-ins that should be #ifdef'ed out and not compiled in LLDB
are those that only work when running natively on the host system.

This fixed bot the PlatformLinux and PlatformFreeBSD build breakages that
were due to ModuleSpec changes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
1fb32d12f6bc38675699a996372b50f8a976d952 27-Feb-2012 Greg Clayton <gclayton@apple.com> Added the POSIX-DYLD as a plug-in in the darwin build in the Xcode project
so that we don't break it with code changes.

After doing this I was able to fix the POSIX-DYLD plug-in so that it builds
after recent ModuleSpec changes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
f96c883fde04b2ef8733812c16b0a07ad0cc7439 25-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/9886712>

Added a dedicated platform for the iOS simulator. This helps us to find the
correct files for a simulator binary before running and helps us select the
right arch (i386 only) for files when we load them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
aa12be49067f5bb14cc3c4ba6d2e97b34e1aec35 24-Feb-2012 Sean Callanan <scallanan@apple.com> Updated LLVM to take some fixes that make the
Intel disassembler usable.

Also flipped the switch: we are now exclusively
using Disassembler.h instead of
EnhancedDisassembly.h for all disassembly in
LLDB.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
32a56ec72ca8558ff0ef0a129f7ac1ca9b79bde4 17-Feb-2012 Sean Callanan <scallanan@apple.com> Added a new disassembler plugin, DisassemblerLLVMC,
which uses the Disassembler.h interface to the LLVM
disassemblers rather than the EnhancedDisassembly.h
interface. Disassembler.h is a better-maintained
API and will be stabler in the long term.

Currently the output from Disassembler.h does not
provide for symbolic disassembly in all the places
that the old disassembler did, so I have gated (and
disabled) the disassembler. It'll be easy to flip
the switch later.

In the meantime, to enable the new disassembler,
uncomment "#define USE_NEW_DISASSEMBLER" in
lldb.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
fa407ad806b26be45511b0881d136a815715ee51 11-Oct-2011 Greg Clayton <gclayton@apple.com> Patch from Dragos Tatulea to re-enable the PECOFF object file parser for all
builds on all systems.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
b8f74aa72802d82466d3beadf2bd58616d2d26a6 11-Oct-2011 Johnny Chen <johnny.chen@apple.com> Patch from dawn@burble.org to build on linux!


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
e9f4982716a8b91007af2637bd32e8661e3a9103 09-Sep-2011 Greg Clayton <gclayton@apple.com> Added first pass at PE COFF file reading support. It parses the sections
correctly, symbols are coming soon. It also needs to be 32/64 bit hardened
with more testing.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
17f3d054e3d27fb7ce0892945c6ffb6c11516f88 23-Aug-2011 Greg Clayton <gclayton@apple.com> Finishing the renaming from "MacOSX-Kernel" to "Darwin-Kernel".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
e6526bbe9f537aab0c4668b6ba0e0bc94243a3fb 01-Aug-2011 Greg Clayton <gclayton@apple.com> Remove the deprecated MacOSX native plug-in.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
40f79177b1b63f4b718a6f1160ee6485a547365e 08-Jul-2011 Greg Clayton <gclayton@apple.com> LLDB now has a Kernel dynamic linker that can detect where kexts are
loaded. It locks onto *-apple-darwin binaries where the binary has
a "__KLD" segment. Soon I will modify the lldb_private::ObjectFile
class to return an executable type which will be an enum with values
something like:
eObjectFileTypeUserExectable,
eObjectFileTypeUserSharedLibrary,
eObjectFileTypeKernelExectable,
eObjectFileTypeKernelSharedLibrary,
eObjectFileTypeObjectFile,
eObjectFileTypeCoreFile

But for now we look at the section since a user and kernel mach-o
executable have the same mach-o file type.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
b7f5945a93644d062f3c986e01199db5da14993a 19-May-2011 Peter Collingbourne <peter@pcc.me.uk> Build and initialise the Darwin ABI plugins on all platforms

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
aa9719a0a4f1d4cad7b95d4b3995f0f2c70e8f4c 19-May-2011 Peter Collingbourne <peter@pcc.me.uk> Initialise the Darwin ABI plugins only on Darwin

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
9a1941b32dbd6de385a26fec7cac238a8fb9af25 25-Apr-2011 Greg Clayton <gclayton@apple.com> Even more renaming.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
f6e287a873007543f3b419a71546ab8f007be90b 25-Apr-2011 Greg Clayton <gclayton@apple.com> More moving things around for the unwind plan and assembly unwind plug-ins.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
015eb23136c5cfaf31574492dbd8e10fd3e9efd9 13-Mar-2011 Stephen Wilson <wilsons@start.ca> Add a missing include.

This change is needed to fix the build on Linux.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
ef6635b98df0daa0aeebfd8466c64529caea5816 10-Mar-2011 Stephen Wilson <wilsons@start.ca> Add Makefile support for the Platform plugins.

This patch supports building the Linux platform plugin, and should also support
the MacOSX plugin as well (the MacOSX side has not been tested, unfortunately).
A small typo was corrected in lldb.cpp to initialize the new platform code on
Linux.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
bd321c5d15bcf2f98dd90a5b7ad529ba98ba19e9 05-Mar-2011 Greg Clayton <gclayton@apple.com> Added a DynamicLoaderStatic plug-in that will act as a static dynamic loader.
It will just load all files exactly where the files state they are (file
addresses == load addresses). This is used when the llvm::Triple::OSType is
set to llvm::Triple::UnknownOS or llvm::Triple::NoOS.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
92241efe8ab5c5cd8d685e86dde28807549fcaf0 16-Jan-2011 Stephen Wilson <wilsons@start.ca> Initial support for a DynamicLoader plugin on Linux.

This patch is enough to have shared objects recognized by LLDB. We can handle
position independent executables. We can handle dynamically loaded modules
brought in via dlopen.

The DYLDRendezvous class provides an interface to a structure present in the
address space of ELF-based processes. This structure provides the address of a
function which is called by the linker each time a shared object is loaded and
unloaded (thus a breakpoint at that address will let LLDB intercept such
events), a list of entries describing the currently loaded shared objects, plus
a few other things.

On Linux, processes are brought up with an auxiliary vector on the stack. One
element in this vector contains the (possibly dynamic) entry address of the
process. One does not need to walk the stack to find this information as it is
also available under /proc/<pid>/auxv. The new AuxVector class provides a
convenient read-only view of this auxiliary vector information. We use the
dynamic entry address and the address as specified in the object file to compute
the actual load address of the inferior image. This strategy works for both
normal executables and PIE's.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
be1acb2ff1465c39a838c3726113c06bb211ca66 12-Jan-2011 Stephen Wilson <wilsons@start.ca> Initialize SymbolFileDWARFDebugMap on Apple platforms only.

SymbolFileDWARFDebugMap handles the parsing of OSO stabs which are effectively a
Mach-O specific feature and is incompatible with other object file formats.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
e01879abc1db997ea51f28072a5fcc765d1ff19c 16-Dec-2010 Greg Clayton <gclayton@apple.com> Fixes for linux building from Stephen Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
adb909b3df6171a5090e15bb691b1b7ea0f949a7 16-Dec-2010 Greg Clayton <gclayton@apple.com> Fixes for linux building from Stephen Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
734b483ae354a2510d53491ab62e0c8425ffc179 15-Oct-2010 Caroline Tice <ctice@apple.com> Disable "process.macosx" plugin, since it is not being actively supported
at the moment, and no longer works properly (bit rot).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
f04d661d50bdf32a64f8fc5f84c7fcda72d4cd5a 04-Sep-2010 Greg Clayton <gclayton@apple.com> Cleaned up step logging a bit.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
f6f40333e91c97cc3b3ad5fb9fc0549079a96788 24-Jul-2010 Stephen Wilson <wilsons@start.ca> Add a new Process plugin for Linux.

This component is still at an early stage, but allows for simple
breakpoint/step-over operations and basic process control.

The makefiles are set up to build the plugin under Linux only.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
ddd2962a3b9f22ddfe472ef6ba225d0c55b23727 14-Jul-2010 Stephen Wilson <wilsons@start.ca> Combine 32 and 64 bit ELF readers.

This patch provides a generic ELF reader plugin to handle both 32 and 64 bit
formats.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp
596ba27e55725bf1795e6abe79a17aaf72935c8d 07-Jul-2010 Greg Clayton <gclayton@apple.com> 64 bit ELF support from Stephen Wilson.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
c4e07529f6b0a28193c344d50a510d4ec3f8e3fc 07-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Declare LLDBVersionNumber extern "C" to make sure clang++ mangles it properly. Patch from Jean-Daniel Dupas!

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
e5cadba790194883b6dfdfc6cd899a203861f57b 13-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Make include paths work on Linux. ifdef out stuff that isn't relevant to
Linux or doesn't compile on Linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/lldb.cpp
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
/external/lldb/source/lldb.cpp