Commit Graph

546 Commits

Author SHA1 Message Date
Greg Clayton 57ee306789 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.

llvm-svn: 186130
2013-07-11 22:46:58 +00:00
Greg Clayton 226cce2511 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.

llvm-svn: 185877
2013-07-08 22:22:41 +00:00
Daniel Malea 9a71a7d81b 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.

llvm-svn: 185560
2013-07-03 17:58:31 +00:00
Jason Molenda 45f6b1f935 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> 

llvm-svn: 185510
2013-07-03 04:52:51 +00:00
Greg Clayton ab70d5dbaa Added SymbolVendorELF to the wrong target (lldb-tool), now it is correctly added to lldb-core.
llvm-svn: 185388
2013-07-01 21:44:02 +00:00
Greg Clayton 8918b4b4a2 Fixed Xcode project to include SymbolVendorELF.
llvm-svn: 185386
2013-07-01 21:37:51 +00:00
Enrico Granata b4675a4e12 <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

llvm-svn: 184893
2013-06-25 23:43:28 +00:00
Enrico Granata c20eed4280 Lots of cleanup on the SWIG wrapping layer
Now, the way SWIG wrappers call into Python is through a utility PyCallable object, which overloads operator () to look like a normal function call
Plus, using the SBTypeToSWIGWrapper() family of functions, we can call python functions transparently as if they were plain C functions
Using this new technique should make adding new Python call points easier and quicker

The PyCallable is a generally useful facility, and we might want to consider moving it to a separate layer where other parts of LLDB can use it

llvm-svn: 184608
2013-06-21 23:27:16 +00:00
Enrico Granata c972c70e60 Change the SWIG wrappers to stop directly casting SB object to SWIG objects, and instead use a safer type-checked API (thanks templates)
Any time a SWIG wrapper needs a PyObject for an SB object, it now should call into SBTypeToSWIGWrapper<SBType>(SBType*)
If you try to use it on an SBType for which there is not an implementation yet, LLDB will fail to link - just add your specialization to python-swigsafecast.swig and rebuild

This is the first step in simplifying our SWIG Wrapper layer

llvm-svn: 184580
2013-06-21 18:57:30 +00:00
Jim Ingham 8c8c6fab4c Make the lldb "Release" configuration use the same llvm build "Release+Asserts" as the lldb "Debug" configuration.
No need to rebuild llvm and remove asserts to build the local optimized lldb.

llvm-svn: 184243
2013-06-18 21:44:59 +00:00
Enrico Granata 8ca77852f4 Removing the lldb-perf file group from our Xcode project
This is in a separate project now so this duplication is unnecessary and some referenced files were also dangling after a rename

llvm-svn: 184209
2013-06-18 17:15:32 +00:00
Enrico Granata 7594f14f7d <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

llvm-svn: 184140
2013-06-17 22:51:50 +00:00
Enrico Granata 2e35cb7508 <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

llvm-svn: 183244
2013-06-04 18:57:09 +00:00
Greg Clayton e26dcbddda Remove unused OperatingSystem plugin.
llvm-svn: 180993
2013-05-03 03:05:52 +00:00
Greg Clayton 160c9d81e0 <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.

llvm-svn: 180886
2013-05-01 21:54:04 +00:00
Enrico Granata cbd79b6c84 <rdar://problem/13590152>
Providing a dummy RegisterContext to secure against faulty Python OS plugins that do not return a valid RegisterContext
The RegisterContextDummy exports a PC with a constant 0xFFFFFFFFFFFFFFFF value

llvm-svn: 180033
2013-04-22 18:26:52 +00:00
Sean Callanan 96d2730a7b 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.

llvm-svn: 179245
2013-04-11 00:09:05 +00:00
Sean Callanan 5a1af4e63a 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.

llvm-svn: 178832
2013-04-05 02:22:57 +00:00
Jason Molenda 5d5c49cef6 Ah, forgot to include the header file and project file changes in r178827.
llvm-svn: 178830
2013-04-05 02:02:43 +00:00
Enrico Granata 92373533a5 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

llvm-svn: 177454
2013-03-19 22:58:48 +00:00
Greg Clayton e0b924e3bf More cleanup on the lldb-perf code:
- TestCase.m_thread is now filled in with the first thread that has a valid
  stop reason. This eliminates the need for the SelectMyThread() functions.
- The first thread that stops for a reason is also set as the selected thread
  in the process in case any command line commands are run.
- Changed launch over to take a SBLaunchInfo parameter so that the launch
  function doesn't keep getting new arguments as they are needed.
- TestCase::Setup() and TestCase::Launch(SBLaunchInfo) now return bool to 
  indicate success of setup and launch.
- ActionWanted::Next(SBThread) was renamed to ActionWanted::StepOver(SBThread)
- ActionWanted::Finish(SBThread) was renamed to ActionWanted::StepOut(SBThread)

llvm-svn: 177376
2013-03-19 04:41:22 +00:00
Sean Callanan 8dfb68e039 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.

llvm-svn: 177364
2013-03-19 00:10:07 +00:00
Jim Ingham 65423de84d Move the performance test cases into their own project.
llvm-svn: 177341
2013-03-18 23:05:00 +00:00
Greg Clayton 7b8f738227 Code cleanup:
- don't use preprocessor macros
- use switch statements
- don't put anything in the lldb namespace, use "lldb_perf" namespace.
- Pass the action struct into each TestStep() for each step fill in
- Modify the ActionWanted class to have accessors to make the continue, next, finish, kill instead of using preproc macros

llvm-svn: 177332
2013-03-18 22:34:00 +00:00
Enrico Granata 86910577cc <rdar://problem/13228487>
A test case for the performance of some LLDB formatters
Changes and improvements to the testing infrastructure itself

llvm-svn: 177100
2013-03-14 19:00:42 +00:00
Jason Molenda 4439450803 Xcode seems to want these lines added to the project file.
llvm-svn: 176792
2013-03-10 21:56:57 +00:00
Jason Molenda cc526b797a We don't need to specify the VALID_ARCHS in the xcode project file.
Also, don't build debugserver with -DUSE_ARM_DISASSEMBLER_FRAMEWORK -
that framework isn't around at this point.

llvm-svn: 176759
2013-03-09 06:15:46 +00:00
Enrico Granata f58cececaa Initial checkin of a new project: LLDB Performance Testing Infrastructure
This is a very basic implementation of a library that easily allows to drive LLDB.framework to write test cases for performance

This is separate from the LLDB testsuite in test/ in that:
a) this uses C++ instead of Python to avoid measures being affected by SWIG
b) this is in very early development and needs lots of tweaking before it can be considered functionally complete
c) this is not meant to test correctness but to help catch performance regressions

There is a sample application built against the library (in darwin/sketch) that uses the famous sample app Sketch as an inferior to measure certain basic parameters of LLDB's behavior.
The resulting output is a PLIST much like the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>fetch-frames</key>
		<real>0.13161715522222225</real>
	</dict>
	<dict>
		<key>file-line-bkpt</key>
		<real>0.029111678750000002</real>
	</dict>
	<dict>
		<key>fetch-modules</key>
		<real>0.00026376766666666668</real>
	</dict>
	<dict>
		<key>fetch-vars</key>
		<real>0.17820429311111111</real>
	</dict>
	<dict>
		<key>run-expr</key>
		<real>0.029676525769230768</real>
	</dict>
</array>
</plist>

Areas for improvement:
- code cleanups (I will be out of the office for a couple days this coming week, but please keep ideas coming!)
- more metrics and test cases
- better error checking

This toolkit also comprises a simple event-loop-driven controller for LLDB, similar yet much simpler to what the Driver does to implement the lldb command-line tool.

llvm-svn: 176715
2013-03-08 20:29:13 +00:00
Sean Callanan 3d27e6603a Updated Apple LLDB version to lldb-300.99.0. Also
updated the build system to support the new Apple
LLDB versioning scheme.

llvm-svn: 176662
2013-03-07 22:29:06 +00:00
Enrico Granata d2f16e2c2d <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

llvm-svn: 175831
2013-02-21 23:57:25 +00:00
Enrico Granata ea2bc0fb1f <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

llvm-svn: 175787
2013-02-21 19:57:10 +00:00
Greg Clayton e48310dc6b Added a kqueue class which isn't being used yet, but was part of trying to work around the limitations with the unix select() call and how it is limited to FD_SETSIZE file descriptors.
Also added a TimeSpecTimeout class which can be used with any calls that take a "struct timespec *" as an argument. It is used by the KQueue class.

Also updated some project settings.

llvm-svn: 175377
2013-02-16 22:46:58 +00:00
Enrico Granata f615b80d08 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

llvm-svn: 175323
2013-02-15 23:38:37 +00:00
Enrico Granata 5548cb50b2 <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.

llvm-svn: 173728
2013-01-28 23:47:25 +00:00
Greg Clayton 8462687f4c Remove references to files that Sean recently removed from the Xcode project.
llvm-svn: 170250
2012-12-14 22:17:58 +00:00
Jason Molenda 420f81dc5d Bump lldb version num to lldb-178, debugserver version to debugserver-198.
llvm-svn: 169081
2012-12-01 04:50:09 +00:00
Greg Clayton 1eb0edcd97 <rdar://problem/12635804>
Add new rpath for LLDB: ../../Library/PrivateFrameworks

Also moved the debugserver plists into the Resources group.

llvm-svn: 168915
2012-11-29 18:40:38 +00:00
Greg Clayton dffc54be70 <rdar://problem/12695557>
Added missing plist files for iOS.

llvm-svn: 167895
2012-11-14 00:23:48 +00:00
Jason Molenda e7a9168908 Set the MACOSX_DEPLOYMENT_TARGET in a few more places.
llvm-svn: 167267
2012-11-02 00:35:51 +00:00
Jason Molenda 4cbf8f3d4b Set the MACOSX_DEPLOYMENT_TARGET for Debug/Release builds
(but not BuildAndIntegration builds).

llvm-svn: 167264
2012-11-01 23:37:53 +00:00
Sean Callanan 5bb2673fc8 Removed some spurious files from our Copy
Headers build phase.

llvm-svn: 167096
2012-10-31 02:03:31 +00:00
Enrico Granata 21fd13f9b7 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

llvm-svn: 166857
2012-10-27 02:05:48 +00:00
Jim Ingham a7dfb665e3 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.  

llvm-svn: 166472
2012-10-23 07:20:06 +00:00
Greg Clayton 1d19a2f253 <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

llvm-svn: 166346
2012-10-19 22:22:57 +00:00
Jim Ingham 35e1bda695 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>

llvm-svn: 166062
2012-10-16 21:41:58 +00:00
Greg Clayton 193f70427c Build with SDKROOT = macosx for "Debug" "DebugClang" and "Release" builds when building with Xcode.
llvm-svn: 165980
2012-10-15 21:17:37 +00:00
Sean Callanan 9a97f8fad3 Fixed build problems with LLDB on Mac OS X,
specifically related to the deployment settings.
Also some minor alphabetization.

<rdar://problem/12433905>

llvm-svn: 165823
2012-10-12 21:31:06 +00:00
Greg Clayton 25177af7a4 Make SBDeclaration.h a public header in the LLDB.framework.
llvm-svn: 165820
2012-10-12 20:31:06 +00:00
Jim Ingham 28eb57114d Bunch of cleanups for warnings found by the llvm static analyzer.
llvm-svn: 165808
2012-10-12 17:34:26 +00:00
Enrico Granata 10de09044e <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
llvm-svn: 165672
2012-10-10 22:54:17 +00:00
Enrico Granata 21dfcd9d41 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

llvm-svn: 164865
2012-09-28 23:57:51 +00:00
Sean Callanan 771f1de241 Added a new Xcode build configuration, DebugClang,
which builds a Debug+Asserts build of Clang and
links LLDB against it.  The Debug configuration
builds Clang with Release+Asserts, for faster
linking and smaller memory footprint when debugging
the build LLDB.

llvm-svn: 164573
2012-09-24 23:21:18 +00:00
Jason Molenda 944cc67eba Bump to lldb-168, debugserver-193.
llvm-svn: 164291
2012-09-20 06:42:30 +00:00
Sean Callanan 39def1f7c0 Fix to the project file, to prevent it from using
an out-of-date compiler in certain cases.

llvm-svn: 164255
2012-09-19 22:10:40 +00:00
Sean Callanan 2aaba00a6b Updated the project file to reflect the added
and deleted classes.

llvm-svn: 163652
2012-09-11 21:50:14 +00:00
Enrico Granata 3467d80ba3 <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.
llvm-svn: 163155
2012-09-04 18:47:54 +00:00
Greg Clayton 1f7460716b <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.

llvm-svn: 162860
2012-08-29 21:13:06 +00:00
Enrico Granata 0845a1a077 A first version of a bunch of classes that wrap commonly used Python objects in a ref-counting and type-safe C++ API
llvm-svn: 162481
2012-08-23 22:02:23 +00:00
Greg Clayton b3e776008b 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.
llvm-svn: 162472
2012-08-23 21:17:11 +00:00
Jason Molenda 26d3b2a272 Change the man page install phase to only run in "desktop" and "desktop-no-xpc" targets, not for the "ios" target.
llvm-svn: 162397
2012-08-22 21:17:08 +00:00
Greg Clayton 67cc06366c 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".

llvm-svn: 162366
2012-08-22 17:17:09 +00:00
Johnny Chen 209bd65ea4 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.

llvm-svn: 161785
2012-08-13 21:09:54 +00:00
Jim Ingham d6551dc0bf Change the minimum deployment target to 10.7 since clang requires 10.7 to use the new libc++.
llvm-svn: 161718
2012-08-11 00:33:08 +00:00
Johnny Chen e9a5627e7a rdar://problem/11457143 [ER] need "watchpoint command ..."
Add 'watchpoint command add/delete/list' to lldb, plus two .py test files.

llvm-svn: 161638
2012-08-09 23:09:42 +00:00
Sean Callanan 1727742634 On Mac OS X, lldb will now build c++11 and use
libc++.  We also no longer use the GNU extensions
to C++ and C (we didn't use them anyway).

This also means that the LLVM we use must be
built with the new libc++.

I will commit llvm.zip next.

<rdar://problem/11930775>

llvm-svn: 161562
2012-08-09 01:32:13 +00:00
Sean Callanan d5e37e4d2b Updating Xcode project version numbers for lldb-165 and debugserver-192
llvm-svn: 161374
2012-08-07 00:32:29 +00:00
Greg Clayton e998267282 <rdar://problem/12029894>
Use the built in demangler for Apple builds for now which has needed demangling fixes, and make the cxa_demangle.cpp use rtti in the Xcode project settings as it requires it be enabled.

llvm-svn: 161323
2012-08-06 15:55:38 +00:00
Johnny Chen 0efe2743f8 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.

llvm-svn: 161293
2012-08-04 01:36:57 +00:00
Sean Callanan c40b0f38b3 Updating Xcode project version numbers for lldb-164 and debugserver-191
llvm-svn: 161209
2012-08-02 20:40:53 +00:00
Sean Callanan 6981f1d856 Updating Xcode project version numbers for lldb-163 and debugserver-190
llvm-svn: 160770
2012-07-26 01:42:37 +00:00
Greg Clayton 9773542933 Update the project and schemes to the Xcode recommended settings.
llvm-svn: 160391
2012-07-17 19:47:06 +00:00
Jason Molenda 64e1d4abc7 Bump to lldb-162 / debugserver-189.
llvm-svn: 160212
2012-07-14 01:12:03 +00:00
Jim Ingham 9aa15a4562 Unify how we get host version on Mac OS X & iOS.
Also remove our dependency on UIKit & AppKit.
Cleaned up the project files a bit.

<rdar://problem/11814498>

llvm-svn: 160147
2012-07-12 23:16:43 +00:00
Jason Molenda 55831d8b9f Add lldb.1 to the xcode project file, add a copy files phase to install it.
<rdar://problem/10613024> 

llvm-svn: 159962
2012-07-09 21:16:31 +00:00
Jason Molenda 84d32ddfc8 Bump versions to lldb-161, debugserver-188.
llvm-svn: 159798
2012-07-06 01:32:10 +00:00
Han Ming Ong a96ba8768b <rdar://problem/11806995>
Need to include QA MAS certificate leaf for root XPC service

llvm-svn: 159782
2012-07-05 21:46:53 +00:00
Greg Clayton fe251c88d9 Added a new top level "Resources" group for plist files and moved a few dylib and .a files into the "Libraries" group.
llvm-svn: 159323
2012-06-28 01:28:49 +00:00
Greg Clayton fed39aa653 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.

llvm-svn: 159298
2012-06-27 22:22:28 +00:00
Jason Molenda 06bca9ed0e Bump version number to lldb-160.
llvm-svn: 158890
2012-06-21 01:41:15 +00:00
Jason Molenda 6bfd821ad0 Bump to lldb 152.
llvm-svn: 157456
2012-05-25 02:05:58 +00:00
Jim Ingham 777e6d01ea Change the "Debug" build to use the current MacOSX SDK. Fix the swig builder to have an explicit
short-circuit of the Python SWIG building, rather than relying on the SDKROOT being set.

llvm-svn: 157363
2012-05-24 01:16:09 +00:00
Jason Molenda 8d27075c3d bump to lldb-150.
llvm-svn: 157090
2012-05-19 00:32:19 +00:00
Jason Molenda f34358e90b bump to lldb 149.
llvm-svn: 157040
2012-05-18 02:03:26 +00:00
Jason Molenda 5a725efeb0 Bump to version 148.
llvm-svn: 156971
2012-05-17 01:49:53 +00:00
Jason Molenda 43e70807da Bump version # to lldb-147.
llvm-svn: 156887
2012-05-16 00:40:14 +00:00
Greg Clayton 3d081399f0 <rdar://problem/11388521>
Fixed a case where the install header phase in the Xcode project would not set the LLDB_VERSION #define correctly. It has now been fixed to key off of the CURRENT_PROJECT_VERSION which will get auto updated with "agvtool bump -all". This was done by adding a build setting to the install-headers makefile based target.

llvm-svn: 156535
2012-05-10 03:27:35 +00:00
Jason Molenda b2c7b92ae8 bump TOT version number to lldb-146 to match the checkin on the branch.
llvm-svn: 156359
2012-05-08 02:54:06 +00:00
Jim Ingham 64e7ead1d8 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.

llvm-svn: 156101
2012-05-03 21:19:36 +00:00
Jim Ingham 8e0b2e3614 Forgot to commit the change deleting the ThreadPlanTestCondition files from the project.
llvm-svn: 155968
2012-05-02 00:24:48 +00:00
Jason Molenda 30815837b0 Bump to lldb-145.
llvm-svn: 155687
2012-04-27 02:25:20 +00:00
Jason Molenda 68b922590d Bump to lldb-144.
llvm-svn: 155527
2012-04-25 01:44:49 +00:00
Greg Clayton a8022fa70d <rdar://problem/11291668>
Fixed an issue that would happen when using debug map with DWARF in the .o files where we wouldn't ever track down the actual definition for a type when things were in namespaces. We now serialize the decl context information into an intermediate format which allows us to track down the correct definition for a type regardless of which DWARF symbol file it comes from. We do this by creating a "DWARFDeclContext" object that contains the DW_TAG + name for each item in a decl context which we can then use to veto potential accelerator table matches. For example, the accelerator tables store the basename of the type, so if you have "std::vector<int>", we would end up with an accelerator table entry for the type that contained "vector<int>", which we would then search for using a DWARFDeclContext object that contained:

  [0] DW_TAG_class_type "vector<int>"
  [1] DW_TAG_namespace "std"

This is currently used to track down forward declarations for things like "class a:🅱️:Foo;". 

llvm-svn: 155488
2012-04-24 21:22:41 +00:00
Jason Molenda 0c72f85690 Bump version to lldb-143.
llvm-svn: 155272
2012-04-21 02:10:22 +00:00
Jason Molenda 7c3e6f3134 bump version to lldb-142.
llvm-svn: 155093
2012-04-19 02:02:12 +00:00
Jason Molenda edfb0dcf0c Bump to lldb-141.
llvm-svn: 154975
2012-04-18 01:35:37 +00:00
Jason Molenda 7bfc33077e Bump to lldb-140.
llvm-svn: 154887
2012-04-17 00:59:15 +00:00
Jason Molenda 5a9f9d3241 version bump to lldb-139.
llvm-svn: 154650
2012-04-13 02:00:58 +00:00
Jason Molenda 9704e82978 Tweak arm variants list for valid arches settings.
llvm-svn: 154450
2012-04-10 23:08:02 +00:00
Greg Clayton c1422c1d31 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.
llvm-svn: 154354
2012-04-09 22:46:21 +00:00
Jason Molenda 7a2f433367 Version bump to lldb-138.
llvm-svn: 154252
2012-04-07 06:18:20 +00:00