Commit Graph

5152 Commits

Author SHA1 Message Date
Sean Callanan 8d825786d1 Enabled C++11 in the expression parser. auto and
various other syntactic sugar work.  Lambdas do
not due to some problems relocating code containing
lambdas.  Rvalue references work when returned from
expressions, but need more testing.

llvm-svn: 156948
2012-05-16 21:03:38 +00:00
Greg Clayton 73dfcbbc29 Disassemble the signal number and also the mach exceptions when dumping stop reply packets.
llvm-svn: 156946
2012-05-16 20:49:54 +00:00
Greg Clayton 563566c9dd Fixed an exception when parsing crash logs.
llvm-svn: 156945
2012-05-16 20:49:19 +00:00
Sean Callanan 19a42f3b0f Updated LLVM to fix a problem where the Thumb
disassembler improperly sign-extended the target
for BL instructions in certain cases.

llvm-svn: 156944
2012-05-16 20:48:19 +00:00
Johnny Chen c98892ec1f Update the comments for lldbtest module. The test driver is the only way to run the test suite.
llvm-svn: 156943
2012-05-16 20:41:28 +00:00
Johnny Chen b8684b3c82 Make the script more friendly when running under python debugger.
llvm-svn: 156939
2012-05-16 19:43:14 +00:00
Johnny Chen a620e376e1 The redo.py script can take no argument where it uses heuristics to find the latest session directory.
llvm-svn: 156931
2012-05-16 18:32:05 +00:00
Jim Ingham b3574ff8d0 Don't do a stat compare of the module with its underlying file if we already matched the UUID.
llvm-svn: 156928
2012-05-16 17:16:59 +00:00
Jim Ingham 6904a934ec Add GetID to the .i file.
llvm-svn: 156927
2012-05-16 17:15:08 +00:00
Filipe Cabecinhas 4d16c4c669 Cleanup after functionalities/alias/TestAliases.py
This test is run after TestAbbreviations and was making runCmd("h") fail
in that test, on the second tested architecture (two commands would be
avilable for "h": "help" and "hello").

Later I'm sending a patch for review to add some information to the error
message for that case.

llvm-svn: 156918
2012-05-16 15:07:07 +00:00
Greg Clayton 0772ded251 Make sure that our thread list can't get out of date like was happening before Jims fix in revision 156894.
llvm-svn: 156898
2012-05-16 02:48:06 +00:00
Jim Ingham cb4ca11bef Always call RefreshStateAfterStop when we get a stop event. We were skipping doing it in the case where we had interrupted the target. Presumably at some point in the past RefreshStateAfterStop was done more directly when we handled the interrupt, but it isn't any more so now we need to do it all the time.
llvm-svn: 156894
2012-05-16 01:32:14 +00:00
Jim Ingham b08a9442fd Add an accessor on SBBreakpointLocation to get its location ID.
llvm-svn: 156891
2012-05-16 00:51:15 +00:00
Jason Molenda 3bcf4b5cc7 Bump debugserver version # to 187.
llvm-svn: 156888
2012-05-16 00:40:45 +00:00
Jason Molenda 43e70807da Bump version # to lldb-147.
llvm-svn: 156887
2012-05-16 00:40:14 +00:00
Jason Molenda 7a9a72b423 Add LLDB_DISABLE_PYTHON around newly added methods in
DataVisualization.h / DataVisualization.cpp / ValueObject.cpp
and
FormatManager.h / FormatManager.cpp

llvm-svn: 156886
2012-05-16 00:38:08 +00:00
Jim Ingham 29412d1c5c Set the result status correctly for asynchronous step-in/out/over commands.
llvm-svn: 156885
2012-05-16 00:37:40 +00:00
Jason Molenda 644f7f1df1 Fix comment typeo.
llvm-svn: 156884
2012-05-16 00:36:41 +00:00
Jason Molenda 94379541e2 Change lockdown API use in RNBSocket::ConnectToService.
<rdar://problem/10800927> 

llvm-svn: 156883
2012-05-16 00:36:21 +00:00
Johnny Chen e7ae16fa83 Fix Makefile to pass the correct -arch flag to the toolchains.
llvm-svn: 156882
2012-05-16 00:33:34 +00:00
Greg Clayton 0d69a3a4b3 <rdar://problem/11246147>
Make sure our debugger STDIN read thread shuts down quickly when we are done with it. We had a case where the owner of the file handle was not closing it and caused spins.

llvm-svn: 156879
2012-05-16 00:11:54 +00:00
Johnny Chen 6ebc8c4598 Include llvm/ADT/STLExtras.h from lldb/Utility/Utils.h and use llvm::array_lengthof(), instead.
llvm-svn: 156876
2012-05-15 23:21:36 +00:00
Johnny Chen 5604c98fec Add i386-only expectedFailure decorators for current ToT.
llvm-svn: 156855
2012-05-15 21:27:40 +00:00
Greg Clayton aafa5c9ecd Modified "image lookup -t <typename>" to expand typedefs.
llvm-svn: 156845
2012-05-15 19:26:12 +00:00
Greg Clayton c4a8a76048 <rdar://problem/11455398>
Add "--name" option to "image lookup" that will search both functions and symbols.

Also made all of the output from any of the "image lookup" commands be the same regardless of the lookup type (function name, symbol name, func or symbol, file and line, address, etc). The --verbose or -v option also will expand the results as needed and display things so they look the same.

llvm-svn: 156835
2012-05-15 18:43:44 +00:00
Greg Clayton fb72fde837 Fixed a typo: "aync" => "async"
llvm-svn: 156797
2012-05-15 02:50:49 +00:00
Greg Clayton 8910c90cdc <rdar://problem/11451919>
Fixed the test suite not working on i386 due to recent default arch detection changes.

llvm-svn: 156796
2012-05-15 02:44:13 +00:00
Greg Clayton 4116e93dc5 <rdar://problem/11240464>
Correctly unique a class' methods when we detect that a class has been uniqued to another.

llvm-svn: 156795
2012-05-15 02:33:01 +00:00
Enrico Granata bd5a7a9f03 Fixing a bug where the summary for certain NSStrings was being returned as empty in spite of the string actually having a content
llvm-svn: 156793
2012-05-15 01:22:45 +00:00
Enrico Granata e89f3fe3f3 Fixing a typo in the lldb-gdb webpage
llvm-svn: 156779
2012-05-14 21:39:38 +00:00
Johnny Chen 2fa9de1080 Fix missing NEON registers for the 'register read' command with the lldb debugserver which supports the 'qRegisterInfo' packet
that dynamically discovers remote register context information.

o GDBRemoteRegisterContext.h:

Change the prototype of HardcodeARMRegisters() to take a boolean flag, which now becomes

    void
    HardcodeARMRegisters(bool from_scratch);

o GDBRemoteRegisterContext.cpp:

HardcodeARMRegisters() now checks the from_scratch flag and decides whether to add composite registers to the already
existing primordial registers based on a table called g_composites which describes the composite registers.

o ProcessGDBRemote.cpp:

Modify the logic of ProcessGDBRemote::BuildDynamicRegisterInfo() to call m_register_info.HardcodeARMRegisters()
with the newly introduced 'bool from_scrach' flag.

rdar://problem/10652076

llvm-svn: 156773
2012-05-14 18:44:23 +00:00
Jim Ingham dff0440405 Add a useful error message to "log enable" with the wrong number of arguments, and reject "log enable lldb" which just silently did nothing before.
llvm-svn: 156686
2012-05-12 00:38:30 +00:00
Greg Clayton 1a362fbb86 <rdar://problem/11439169>
"lldb -a i386" doesn't set the calculator mode correctly if run on a 64 bit system. 

The previous logic always used the current host architecture, not the default architecture. The default arch gets set into a static varaible in lldb_private::Target when an arch is set from the command line:

lldb -a i386

We now use the default arch correctly.

llvm-svn: 156680
2012-05-12 00:26:42 +00:00
Greg Clayton 950971f77c <rdar://problem/11439022>
Restore expressions with no target.

llvm-svn: 156669
2012-05-12 00:01:21 +00:00
Jim Ingham 031177e4df Fix a comment I had incorrectly altered.
llvm-svn: 156668
2012-05-11 23:49:49 +00:00
Jim Ingham 7ba6e99158 Found one more place where the OkayToDiscard needs to be consulted.
Also changed the defaults for SBThread::Step* to not delete extant plans.
Also added some test cases to test more complex stepping scenarios.

llvm-svn: 156667
2012-05-11 23:47:32 +00:00
Greg Clayton 0021bd2fe3 Remove comments and an extra print statement.
llvm-svn: 156651
2012-05-11 21:57:50 +00:00
Filipe Cabecinhas 1a96ef800b Make every Python API __len__() method return a PyIntObject.
swig 2.0+ seems to default to using PyLongObjects, but the __len__()
method _must_ return a PyIntObject.

llvm-svn: 156639
2012-05-11 20:39:42 +00:00
Filipe Cabecinhas 0bfed4bc7a Fix SBProcess::ReadMemory's typemap to handle PyLongObjects.
llvm-svn: 156638
2012-05-11 20:38:28 +00:00
Filipe Cabecinhas 0c543ea186 Make issue_11588/Test11588 work with a recent swig that converts ints to PyLongObjects
llvm-svn: 156637
2012-05-11 20:37:34 +00:00
Jim Ingham 923886ce2c Don't try to use "OkayToDiscard" to mean BOTH this plan is a user plan or not AND unwind on error.
rdar://problem/11419156

llvm-svn: 156627
2012-05-11 18:43:38 +00:00
Greg Clayton 4ae4160974 Fixed an issue in the platform options where if no architecture was specified where the platform would fail to select itself with something like:
(lldb) platfrom select remote-ios

llvm-svn: 156626
2012-05-11 18:37:58 +00:00
Jim Ingham db81e83c2e Add "echo" -> "script print".
llvm-svn: 156624
2012-05-11 18:01:15 +00:00
Greg Clayton 341039faca More fixes to "malloc_history".
llvm-svn: 156605
2012-05-11 02:42:36 +00:00
Greg Clayton 60bb58f669 Modified the symbolication.Image object to store its uuid as a uuid.UUID object and made an accessor for getting a normalized UUID value out of the image object.
Modified the crashlog darwin module to always create a uuid.UUID object when making the symbolication.Image objects. Also modified it to handle some more types of crash log files and improved the register reading for thread registers of crashed threads.

llvm-svn: 156596
2012-05-11 00:30:14 +00:00
Greg Clayton c0debe8566 Don't intercept the quit command and override what is was doing. This was causing the "lldb" command line to deadlock when the quit command was executed sometimes.
llvm-svn: 156595
2012-05-11 00:27:51 +00:00
Greg Clayton 7200ed1b94 "--stack-history" now works if you have MallocStackLogggingNoCompact defined in your app's environment.
llvm-svn: 156588
2012-05-10 23:37:52 +00:00
Greg Clayton 370f5fd20a Fixed a build error.
llvm-svn: 156586
2012-05-10 23:20:50 +00:00
Greg Clayton d9fc53509e Added the ability to get the stack history for a malloc block. This is a work in progress. Checking this in so I can work on it some more.
llvm-svn: 156584
2012-05-10 23:17:28 +00:00
Johnny Chen afc98a6d7e Make crashlog.py more robust when dealing with the "Version: ..." header from the crash log file.
rdar://problem/11428134

llvm-svn: 156581
2012-05-10 22:45:54 +00:00
Sean Callanan 6f3b394bfa Updated LLVM/Clang to force the record layout engine
to complete C++ classes before traversing their base
classes.

llvm-svn: 156570
2012-05-10 20:29:51 +00:00
Johnny Chen bbc00939f2 Sanity check the return value from SBSCopyApplicationDisplayIdentifiers() before calling CFArrayGetCount() on it.
rdar://problem/11331867

llvm-svn: 156562
2012-05-10 19:24:41 +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
Greg Clayton 5cc6ef9e89 Remove stuff from the xcscheme file that need not be checked in.
llvm-svn: 156533
2012-05-10 02:52:56 +00:00
Greg Clayton ba812f4284 <rdar://problem/11330621>
Fixed the DisassemblerLLVMC disassembler to parse more efficiently instead of parsing opcodes over and over. The InstructionLLVMC class now only reads the opcode in the InstructionLLVMC::Decode function. This can be done very efficiently for ARM and architectures that have fixed opcode sizes. For x64 it still calls the disassembler to get the byte size.

Moved the lldb_private::Instruction::Dump(...) function up into the lldb_private::Instruction class and it now uses the function that gets the mnemonic, operandes and comments so that all disassembly is using the same code.

Added StreamString::FillLastLineToColumn() to allow filling a line up to a column with a character (which is used by the lldb_private::Instruction::Dump(...) function).

Modified the Opcode::GetData() fucntion to "do the right thing" for thumb instructions.

llvm-svn: 156532
2012-05-10 02:52:23 +00:00
Jim Ingham 18de2fdc55 If the ObjC Step Through Trampoline plan causes a target crash, properly propagate the error back to
the controlling plans so that they don't lose control.

Also change "ThreadPlanStepThrough" to take the return StackID for its backstop breakpoint as an argument
to the constructor rather than having it try to figure it out itself, since it might get it wrong whereas
the caller always knows where it is coming from.

rdar://problem/11402287

llvm-svn: 156529
2012-05-10 01:35:39 +00:00
Sean Callanan 26e184d4e4 Added a #define of NULL to 0 to make NULL usable
in expressions.

llvm-svn: 156514
2012-05-09 21:27:03 +00:00
Johnny Chen fd02a89960 Make ctrl-c terminate the current input line and start an empty line, instead of the previous content.
rdar://problem/11412821

llvm-svn: 156510
2012-05-09 21:03:07 +00:00
Johnny Chen a21bd407e5 Option processing fix: should match '-F' exactly, instead.
llvm-svn: 156509
2012-05-09 21:00:03 +00:00
Filipe Cabecinhas 3a9b6e7140 Make redo.py more error-proof
Deal with being passed no parameters
Remove the infinite loop when it's passed something like --help

llvm-svn: 156504
2012-05-09 19:02:19 +00:00
Jim Ingham 5ce45fdfb1 Remove the string pool from the global destructor chain so it doesn't get yanked out from under us prematurely on exit.
rdar://problem/11358062

llvm-svn: 156496
2012-05-09 18:37:10 +00:00
Jim Ingham 8499e1a4cb Print out a notification when the process of a target other than the currently selected target stops.
llvm-svn: 156433
2012-05-08 23:06:07 +00:00
Enrico Granata a777dc2abe <rdar://problem/11338654> Fixing a bug where having a summary for a bitfield without a format specified would in certain cases crash LLDB - This has also led to refactoring the by-type accessors for the data formatter subsystem. These now belong in our internal layer, and are just invoked by the public API stratum
llvm-svn: 156429
2012-05-08 21:49:57 +00:00
Han Ming Ong b9c53daa55 <rdar://problem/11400476>
On Lion, because the rights initially doesn't exist in /etc/authorization, if an admin user logs in and uses lldb within the first 5 minutes, it is possible to do AuthorizationCopyRights on LaunchUsingXPCRightName and get the rights back. As another security measure, we make sure that the LaunchUsingXPCRightName rights actually exists.

Removed Xcode as the user of the XPC service to shrink the security surface area.

llvm-svn: 156424
2012-05-08 21:35:52 +00:00
Han Ming Ong 222bb03518 <rdar://problem/11408853>
We make sure that if the user cancels out of the authentication dialog to add 'com.apple.lldb.LaunchUsingXPC' rights to /etc/authorization, we don't try to do AuthorizationCopyRights.

As well, refactored a bit so that control flow is easier to read for other folks. Added more comments.

llvm-svn: 156423
2012-05-08 21:32:32 +00:00
Enrico Granata 07a4ac22ed <rdar://problem/11239650> Fixing a bug where the SetValueFromCString() method failed to operate on dynamic values. The fix consists in making the set operation fall through to the parent. We only actually allow this if the dynamic value is at a 0-offset from the parent, or the new value is 0. Other scenarios would need agreement on the actual meaning of the set operation (do we keep offsetting? do we just assume the user knows what they are doing?) so we prevent them, and let the expression parser deal with the complexity
llvm-svn: 156422
2012-05-08 21:25:06 +00:00
Jim Ingham 5bad4799a3 Fixing some indentation.
llvm-svn: 156412
2012-05-08 20:05:08 +00:00
Enrico Granata 9123950ab1 A simple implementation of a summary and synthetic children providers for LLDB-specific shared pointers - This could be generalized to work with C++11 shared pointers with relative ease
llvm-svn: 156410
2012-05-08 19:21:13 +00:00
Enrico Granata 601ccb583f Removing spurious friend declaration
llvm-svn: 156398
2012-05-08 18:49:36 +00:00
Enrico Granata 886147f0ac First part of a fix to make GetNonSyntheticValue() work correctly
llvm-svn: 156397
2012-05-08 18:47:08 +00:00
Greg Clayton af6f2755ab <rdar://problem/10605072>
Fixed the command callback override lookup function so we can now override the "process launch" command  (or any other multi-word commands).

llvm-svn: 156368
2012-05-08 04:29:20 +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
Greg Clayton 7051231709 <rdar://problem/11358639>
Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples.

Also make the selection process for auto selecting platforms based off of an arch much better.

llvm-svn: 156354
2012-05-08 01:45:38 +00:00
Johnny Chen 6943e7c569 Add clarification comments.
llvm-svn: 156350
2012-05-08 00:43:20 +00:00
Sean Callanan 0a2722d63d Updated LLVM to take a fix for disassembly of
Thumb branch operands.

llvm-svn: 156344
2012-05-08 00:01:21 +00:00
Johnny Chen 4ab2e6be38 Updated to a more meaningful macro name.
llvm-svn: 156340
2012-05-07 23:23:41 +00:00
Johnny Chen 5ec8fcbf0c Fix the problem that 'help breakpoint set' is printing a lot of redundant lines.
Correctly specify the LLDB_OPT_SET's that the 'shlib' command option belongs to by using a newly added macro like this:

    #define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM(1, 10) & ~LLDB_OPT_SET_10 )

rdar://problem/11393864

llvm-svn: 156337
2012-05-07 23:04:49 +00:00
Johnny Chen ddb149069e Add an -F option to the redo.py script to selectively re-run only those failed sessions whose filenames contain the component(s)
specified.  For example:

    ./redo.py -F x86_64 -n 2012-05-07-15_28_24

will redo the failed sessions under the 2012-05-07-15_28_24 directory, but only for session names which contain 'x86_64' in it.

llvm-svn: 156335
2012-05-07 22:59:00 +00:00
Johnny Chen 5a4b4b86d6 Move the el_source() call after the section of code which sets up the default "ctrl-r" and "ctrl-w" bindings
so that user-provided .editrc has a chance to override the lldb's default key bindings.

llvm-svn: 156314
2012-05-07 18:18:08 +00:00
Sean Callanan bcaa94db6c Updated LLVM to fix bad disassembly of operands
and occasionally failure to recognize instructions.
This problem affects ARM and Thumb BLX instructions.

llvm-svn: 156307
2012-05-07 16:50:20 +00:00
Filipe Cabecinhas f86cf78190 Remove repeated word.
llvm-svn: 156300
2012-05-07 09:30:51 +00:00
Filipe Cabecinhas 75bc95ec28 Fixed some strncat/strlcat uses.
llvm-svn: 156264
2012-05-06 17:56:42 +00:00
Johnny Chen 66b7c59593 Jason Molenda convinced me that we should make ctrl-w on the command line bind to ed-delete-prev-word.
If you have ctrl-w key binding specified with your .editrc file, it will be overridden with ed-delete-prev-word. :-)

llvm-svn: 156230
2012-05-05 04:44:12 +00:00
Jim Ingham 444717b318 Missed a few uses of Mutex::GetMutex in template functions that don't seem to get instantiated on the Mac OS X build,
but were causing build failures on Linux.

llvm-svn: 156224
2012-05-04 23:54:57 +00:00
Sean Callanan 247e62a706 Added an "attach" alias as promised on the web page.
llvm-svn: 156223
2012-05-04 23:15:02 +00:00
Jim Ingham 10ebffa48a Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes.
No one was using it and Locker(pthread_mutex_t *) immediately asserts for 
pthread_mutex_t's that don't come from a Mutex anyway.  Rather than try to make
that work, we should maintain the Mutex abstraction and not pass around the
platform implementation...

Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor
taking a pthread_mutex_t *.  You no longer need to call Mutex::GetMutex to pass
your mutex to a Locker (you can't in fact, since I made it private.)

llvm-svn: 156221
2012-05-04 23:02:50 +00:00
Greg Clayton c8f73d7b96 Added an interactive mode to the "crashlog" command so that we can look at multiple crash logs at once and do some data mining. Added an interactive command prompt that allows you to do:
% PYTHONPATH=./build/Debug/LLDB.framework/Resources/Python ; ./build/Debug//LLDB.framework/Resources/Python/lldb/macosx/crashlog.py -i ~/Downloads/crashes2/*.crash ) 

then you get an interactive prompt where you can search for data within all crash logs. For example you can do:

% list

which will list all crash logs

And you can search for all images given an image basename, or full path:

% image LLDB
% image /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB
% image LLDB.framework

Which would all produce an output listing like:

40CD4430-7D27-3248-BE4C-71B1F36FC5D0 (1.132 - 132) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x000000011f8bc000 - 0x0000000120d3efbf)
B727A528-FF1F-3B20-9E4F-BBE96C7D922D (1.136 - 136) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x000000011e7f7000 - 0x000000011fc7ff87)
4D6F8DC2-5757-39C7-96B0-1A5B5171DC6B (1.137 - 137) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x000000012bd7f000 - 0x000000012d1fcfef)
FBF8786F-92B9-31E3-8BCD-A82148338966 (1.137 - 137) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000122d78000 - 0x00000001241f5fd7)
7AE082E3-3BB7-3F64-A308-063E559DFC45 (1.143 - 143) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000119b8d000 - 0x000000011b02ef5f)
7AE082E3-3BB7-3F64-A308-063E559DFC45 (1.143 - 143) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000111497000 - 0x0000000112938f5f)
7AE082E3-3BB7-3F64-A308-063E559DFC45 (1.143 - 143) /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB, __TEXT=[0x0000000116680000 - 0x0000000117b21f5f)

llvm-svn: 156201
2012-05-04 20:44:14 +00:00
Johnny Chen 30e422d7ba When the current thread state is NULL, PyThreadState_Get() issues a fatal error.
Use a gentler API PyThreadState_GetDict(), instead.

rdar://problem/11292882

llvm-svn: 156200
2012-05-04 20:37:11 +00:00
Jim Ingham c075ecd833 Fix a think in Mutex::Locker::Locker(pthread_mutex_t *) Really should lock the mutex handed in, not the m_mutex_ptr that you've set to NULL...
Rework the Host.cpp::ThreadNameAccessor to use ThreadSafeSTLMap - we've got it so we might as well use it.  Also works around a problem with the
Mutex::Locker class raising fallacious asserts in debug mode when used with pthread_mutex_t's that weren't backed by Mutex objects.

llvm-svn: 156193
2012-05-04 19:24:49 +00:00
Jason Molenda 16d127cb7b In ProcessGDBRemote::DoConnectRemote(), if the remote system informed
us of its architecture, use that to set the Target's arch if it
doesn't already have one set.

In Process::CompleteAttach(), if the Target has a valid arch make
sure that the Platform we pick up is compatible with that arch; if
not, find a Platform that is compatible.  Don't let the the default
platform override the Target's arch.

<rdar://problem/11185420>

llvm-svn: 156116
2012-05-03 22:37:30 +00:00
Johnny Chen 356782f5f6 Fix the following error when importing crashlog.py from a Python interactive session:
AttributeError: 'module' object has no attribute 'debugger'

llvm-svn: 156115
2012-05-03 22:31:30 +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 64cc29cb84 Document the fact that you can repeat "-n" and similar options to make one breakpoint on multiple names.
llvm-svn: 156098
2012-05-03 20:30:08 +00:00
Johnny Chen 8e1fd43ad7 Fix AttributeError when using crashlog with verbose mode.
rdar://problem/11374653

llvm-svn: 156088
2012-05-03 18:46:28 +00:00
Enrico Granata 78453eed12 Adding a new 'type category disable *' feature that disables all categories - This is intended as a quick kill switch for data formatters for cases where the user wants as little extra processing as possible to be done on their target, or to override major data formatters bug, should they occur
llvm-svn: 156044
2012-05-03 01:08:44 +00:00
Sean Callanan e38e69f204 Patched our local Clang to fix a crash when parsing
classes/structs that have variable-length arrays at
the end.

llvm-svn: 156026
2012-05-02 21:54:54 +00:00
Enrico Granata 2980927107 Update the docs to reflect the recent changes to categories
llvm-svn: 156020
2012-05-02 21:13:16 +00:00
Enrico Granata 19e7a185f2 Mentioning in the docs that Python commands can have docstrings
llvm-svn: 156018
2012-05-02 21:00:41 +00:00
Jim Ingham c007e84621 If a command takes options and arguments, the help text should warn the user to use "--" to terminate the options.
llvm-svn: 155973
2012-05-02 01:12:54 +00:00
Jim Ingham c7dccb797e Jeeze... Remove two unneeded #include's of ThreadPlanTestCondition.h, and replace them with
includes of ClangUserExpression that were being errantly dragged in through same.

llvm-svn: 155970
2012-05-02 00:30:53 +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
Jim Ingham 92e1cd431c Cleanup - removing the ThreadPlanTestCondition and its helper functions. It is not needed,
since we now run the condition in the StopInfoBreakpoint's PerformAction, and don't need
to refer it to another "continue".  Actually, we haven't needed to do this for a year or
so, I just hadn't gotten around to deleting the dead wood.

llvm-svn: 155967
2012-05-02 00:23:18 +00:00
Jim Ingham fbbfe6ecf0 Fix reporting of stop reasons when the StepOver & StepIn plans stop because of a crash or breakpoint. Added the ability for a plan to say it is done but doesn't want to be the reason for the stop.
llvm-svn: 155927
2012-05-01 18:38:37 +00:00
Jim Ingham e2b6ad65a2 Use a cache of the results of "GetFileAddress" from a symbol in the Comparator we are using to sort the various lookup indices by symbol address. When we switched to weak pointers,
this lookup got slightly slower.  Not enough to matter for most uses, but in the sort algorithm it does matter.

llvm-svn: 155873
2012-05-01 01:34:15 +00:00
Sean Callanan 1276c33345 Added a --force option to "memory read,"
disallowing reads over 1KiB in total size
unless the user explicitly allows them.

llvm-svn: 155750
2012-04-28 01:27:38 +00:00
Johnny Chen bd5bb6fda3 Clarify "watchpoint set" help text.
rdar://problem/11327790

llvm-svn: 155694
2012-04-27 05:27:07 +00:00
Jason Molenda 30815837b0 Bump to lldb-145.
llvm-svn: 155687
2012-04-27 02:25:20 +00:00
Greg Clayton b69bb2e43f Clean up the way modules are looked for when calling Target::GetSharedModule(...). We were ignoring remapped files, even if they were valid. Also if we have a UUID, we should check our global module list first.
llvm-svn: 155683
2012-04-27 00:58:27 +00:00
Jim Ingham 57190baa6c Don't call SBDebugger::SetInternalVariable in the sigwinch_handler, since that takes locks and potentially does allocations.
Just call SBDebugger::SetTerminalWidth on the driver's SBDebugger, which does the same job, but no locks.
Also add the value checking to SetTerminalWidth you get with SetInternalVariable(..., "term-width", ...).

rdar://problem/11310563

llvm-svn: 155665
2012-04-26 21:39:32 +00:00
Sean Callanan 822944c97d Made the IR interpreter move all floats, not just "wide"
ones, to its own constant pool.  This reflects the fact
that the LLVM code generators for different targets move
floats to their constant pools under varying conditions,
and the JIT cannot (yet) be relied upon to relocate references to
its constant pool correctly.

llvm-svn: 155660
2012-04-26 20:51:20 +00:00
Greg Clayton c32e5c9bc2 Patch from Filipe Cabecinhas.
llvm-svn: 155644
2012-04-26 17:33:20 +00:00
Greg Clayton 512034b8bd Patch from Filipe Cabecinhas.
llvm-svn: 155642
2012-04-26 17:12:07 +00:00
Greg Clayton caca09b628 Patch from Filipe Cabecinhas.
llvm-svn: 155641
2012-04-26 17:11:01 +00:00
Greg Clayton 7afbe07a0d Patch from Filipe Cabecinhas.
llvm-svn: 155640
2012-04-26 17:09:38 +00:00
Greg Clayton f22f6ff32a Patch from Filipe Cabecinhas.
llvm-svn: 155639
2012-04-26 17:07:53 +00:00
Greg Clayton 9efa076aa6 Save more memory by not parsing the symbol table for stand alone DWARF files. We currently have SymbolFile plug-ins which all get the chance to say what they can parse in a symbol file. Prior to this fix we would ask the SymbolFileDWARF plug-in what abilities it had, and it would answer with "everything", and then we would check the SymbolFileSymtab plug-in what abilities it had, in case it had more abilities. The checking that SymbolFileSymtab does is a bit expensive as it pulls in the entire symbol table just to see if it can offer a few scraps of debug information. This causes all stand along DWARF files to pull in their symbol tables even though those symbols will never be used. This fix will check all SymbolFile plug-ins for their abilities and if any plug-in responds with "everything", then we stop the search.
llvm-svn: 155638
2012-04-26 16:53:42 +00:00
Jason Molenda fc6a17b0a8 Add an Error string specifically for when we hit an ENOMEM when
trying to mmap a file fails so parent caller function can 
provide helpful information to use about what went wrong.

llvm-svn: 155617
2012-04-26 06:39:51 +00:00
Enrico Granata 73076f9269 Automatically enabling the Cocoa formatter categories for command-line LLDB. Previously, the categories were filled in but disabled by default. Tweaking test cases appropriately to keep working and do the right thing
llvm-svn: 155605
2012-04-26 01:40:38 +00:00
Greg Clayton 83b6fabdf7 <rdar://problem/11271074>
<rdar://problem/11285931>

Use the DWARRF end prologue markers when trying to skip prologue instructions instead of blindly using the second line table address entry.

llvm-svn: 155600
2012-04-26 01:01:34 +00:00
Greg Clayton da91b17bc7 Patch from Viktor Kutuzov: changes the method declarations to const for the Args::GetCommandString and Agrs::GetQuotedCommandString methods. It allows using of these methods within the other const methods.
llvm-svn: 155593
2012-04-25 22:30:32 +00:00
Greg Clayton 4f76fef267 Make the libheap.dylib build into a consistent temp directory so it can be reused between lldb invocations. Also add the module name into the directory path that is used to store the target triple specific build of libheap.dylib.
Also added code that will rebuild libheap.dylib if heap_find.cpp is newer that libheap.dylib.

llvm-svn: 155590
2012-04-25 21:23:07 +00:00
Enrico Granata de93b6b42f Fixing a typo in the NSArray data formatter
llvm-svn: 155586
2012-04-25 20:59:02 +00:00
Jim Ingham e5b2245d68 Make sure the end of the first line is still within the function, and if not, don't push the prologue past it.
rdar://problem/11271074

llvm-svn: 155579
2012-04-25 19:48:30 +00:00
Greg Clayton d712ef0fd7 Remove the "-x" from the finish-swig-Python-LLDB.sh shell options so it doesn't print out all of the commands when executing the shell script.
Cleaned up the lldb.utils.symbolication, lldb.macosx.heap and lldb.macosx.crashlog. The lldb.macosx.heap can now build a dylib for the current triple into a temp directory and use it from there.

llvm-svn: 155577
2012-04-25 18:40:20 +00:00
Enrico Granata 7d22221759 Returning data formatters to their previous working condition - Plus fixing an issue that was preventing Python oneliners from executing
llvm-svn: 155563
2012-04-25 17:53:41 +00:00
Sean Callanan e8dea98b5e Hardened LLDB against NULL identifiers being passed
into FindExternalVisibleDeclsByName.

llvm-svn: 155561
2012-04-25 17:46:01 +00:00
Jim Ingham 5d2735e502 Suspend program threads before sending the SIGSTOP & resuming, so other threads won't get into trouble while we are waiting for the SIGSTOP.
rdar://problem/11174834

llvm-svn: 155560
2012-04-25 17:45:26 +00:00
Enrico Granata eb36cadb68 Fixing an over-substitution of text
llvm-svn: 155556
2012-04-25 16:35:54 +00:00
Enrico Granata 85ce21c04d Make the C++ formatters importable by having them use the right package to import and reference the Logger
llvm-svn: 155555
2012-04-25 16:32:39 +00:00
Greg Clayton ed3eee6e55 Now that we have an LLDB package, make the "lldb.macosx.crashlog" module work with all of the new module paths.
llvm-svn: 155528
2012-04-25 01:49:50 +00:00
Jason Molenda 68b922590d Bump to lldb-144.
llvm-svn: 155527
2012-04-25 01:44:49 +00:00
Enrico Granata 28399adad8 Making the Cocoa formatters comply with the new on-disk layout of the Python resources - This is one of the steps towards making the data formatters work again
llvm-svn: 155526
2012-04-25 01:39:27 +00:00
Enrico Granata 5b4ab4c848 Ensure that lldb/runtime is not a dead point in the Python package hierarchy - This is a first preliminary step in fixing data formatters after Greg's changes to the Python resources on-disk layout
llvm-svn: 155525
2012-04-25 01:26:37 +00:00
Greg Clayton 938aa00795 Remove unneeded files.
llvm-svn: 155524
2012-04-25 01:25:22 +00:00
Greg Clayton 81e9ebf798 Move the source and Makefile into a directory so it will be easier to install.
llvm-svn: 155523
2012-04-25 01:25:04 +00:00
Johnny Chen 6381f01012 Renaming to rid of the '++' in the test file name and simplify the Makefile.
llvm-svn: 155521
2012-04-25 01:20:15 +00:00
Greg Clayton b1ba1bb194 Make the Makefile stand alone.
llvm-svn: 155520
2012-04-25 01:19:20 +00:00
Jim Ingham c9efdbb0d4 Fix the docs for "breakpoint command add" to specify the arguments passed into the python function.
llvm-svn: 155517
2012-04-25 01:05:21 +00:00
Sean Callanan dd42e097eb Removed a binary that I accidentally committed.
llvm-svn: 155516
2012-04-25 01:04:34 +00:00
Sean Callanan 7457f8d7c9 Recognize Objective-C classes with runtime class
ObjCPlusPlus as Objective-C classes.  Really the
compiler should say they have Objective-C runtime
class, but we should be a little more resilient
(we were refusing to find ivars in those classes
before).

Also added a test case.

llvm-svn: 155515
2012-04-25 01:03:57 +00:00
Greg Clayton 6d98f56c58 Maked LLDB into a package so we can import things without poluting the global namespace.
Enrico will follow this up with fixing the data formatter test cases that are failing.

llvm-svn: 155514
2012-04-25 00:58:03 +00:00
Sean Callanan 374bd0c9e5 Made it safe to re-import a Python module, allowing
the same test to be run multiple times in the same
session.

llvm-svn: 155511
2012-04-25 00:21:42 +00:00
Enrico Granata 45034810aa Fixing a bunch of i386 testsuite failures
llvm-svn: 155510
2012-04-25 00:13:06 +00:00
Jason Molenda 216d91f16e Change Target::ReadMemoryFromFileCache to not read from the file
if the section is marked as encrypted.  It will likely be readable
in live memory.
<rdar://problem/11305675>

llvm-svn: 155509
2012-04-25 00:06:56 +00:00
Johnny Chen c4f4d056ab Make the test case more robust in terms of remote testsuite execution.
rdar://problem/11312971

llvm-svn: 155505
2012-04-24 23:33:16 +00:00
Sean Callanan dfc066d274 Forgo the selector test on i386, where we can't
test whether an object responds to a selector
from outside the process.

llvm-svn: 155504
2012-04-24 23:31:54 +00:00
Sean Callanan 72546f01d3 Create an NSAutoreleasePool correctly in a test
case so that the Objective-C runtime doesn't
complain about lack of one, causing the test case
to fail.

llvm-svn: 155503
2012-04-24 23:18:47 +00:00
Johnny Chen 8da4ddf990 Add a suffix rule for compiling objc++ files and a sample directory under test/lang/objcxx.
llvm-svn: 155501
2012-04-24 23:05:07 +00:00
Enrico Granata bce6b17d7a Fixing a typo in the previous commit that broke the build
llvm-svn: 155497
2012-04-24 22:33:23 +00:00
Enrico Granata 9f1e204130 Fixing an issue where the expression parser was not correctly freeze-drying bitfields - This patch ensures that (a) freeze-drying bitfields works correctly and (b) that we actually access bitfields through IR instead of the 'frame var en lieu of expr' shortcut, for added safety in corner cases that may arise
llvm-svn: 155494
2012-04-24 22:15:37 +00:00
Johnny Chen 8f198c96fd Add a '-R' option, which is similar to '-r', except that the relocated directory, if exists, will be removed entirely
before running the test suite.  A usage example looks like this:

test $ ./dotest.py -A x86_64 -R /tmp/x86_64 &
test $ ./dotest.py -A i386 -R /tmp/i386 &

where we would want to run the x86_64 and i386 archs concurrently but relocate the test suite to different directory
hierarchies in order not to stump on each other's intermediate files.

llvm-svn: 155491
2012-04-24 21:44:10 +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
Sean Callanan 4538aa25bd Fixed a crasher that occurs when an expression
doesn't return a result.  If that expression can't
be run in the current context (for example, if it
uses a function and there is no running process)
then we used to try to destroy the nonexistent
result variable.  We now only destroy the result
variable if we actually made one.

llvm-svn: 155455
2012-04-24 17:56:40 +00:00
Greg Clayton 1eac0c729f Added support for the LC_ENCRYPTION_INFO load command.
llvm-svn: 155423
2012-04-24 03:06:13 +00:00
Jim Ingham a503881635 Report the command error when we are in "stop on error mode."
llvm-svn: 155422
2012-04-24 02:25:07 +00:00
Jason Molenda 0a287e0356 A small fix for ObjectFileMachO::ParseSymtab() where a pointer
into the middle of a vector was being used after the vector may
have been resized.  
<rdar://problem/11284937>

llvm-svn: 155421
2012-04-24 02:09:58 +00:00
Enrico Granata fe945e83e0 Fixing the test case so that it runs correctly on i386 as well as on x86_64
llvm-svn: 155420
2012-04-24 02:01:17 +00:00
Enrico Granata f1dfbad036 Removing the @expectedFailurei386 decorator from test cases that now work as a result of the latest changes to Value.cpp
llvm-svn: 155419
2012-04-24 01:45:19 +00:00
Enrico Granata b046e0320c This patch fixes a bug where LLDB was incorrectly setting the address-size on a DataExtractor to be sizeof(void*) when the ValueObject came out of the expression parser
This worked correctly for 64-bit targets, but broke down data formatters in i386 mode. The formatters would try to read pointers out of the frozen-dried objects,
but were unable to do so because they would try fetching 8 bytes from a DataExtractor with only 4 bytes in it. This patch fixes the issue by always making the pointer-size
for a DataExtractor match the target setting.

llvm-svn: 155418
2012-04-24 01:23:23 +00:00
Jim Ingham 927f09ca0e Pass *this in explicitly to save the FileSpec copy construction.
llvm-svn: 155407
2012-04-23 23:22:24 +00:00
Greg Clayton d61c0fc049 Added the ability to log a message with a backtrace when verbose logging is enabled to the Module class. Used this new function in the DWARF parser.
llvm-svn: 155404
2012-04-23 22:55:20 +00:00
Greg Clayton 2dafd8ed4b <rdar://problem/11282938>
Fixed an issue where we get NULL compile units back from the symbol vendor. We need symbol vendors to be able to quickly give an estimate of the compile units that they have without having to fully vette them first, so anyone getting compile units from a module should be able to deal with a NULL compile unit being returned for a given index.

llvm-svn: 155398
2012-04-23 22:00:21 +00:00
Greg Clayton b210aec64d Added the ability to specify the symbol file for a module when adding it to a target.
llvm-svn: 155384
2012-04-23 20:23:39 +00:00
Johnny Chen 7debd16c95 Test file renaming.
llvm-svn: 155369
2012-04-23 17:54:40 +00:00
Sean Callanan 1ef77434e3 Implemented zext as a no-op cast in the IR
interpreter.

llvm-svn: 155360
2012-04-23 17:25:38 +00:00
Jason Molenda 0c72f85690 Bump version to lldb-143.
llvm-svn: 155272
2012-04-21 02:10:22 +00:00
Johnny Chen 910667004f Remove the expectedFailure decorator as the bug has been fixed.
llvm-svn: 155264
2012-04-21 01:02:50 +00:00
Greg Clayton b403a15ded Added code to automatically load the libheap.dylib when ptr_refs, cstr_refs or malloc_info are called. If MallocStackLogging is enabled, then you can now use --stack to dump the backtrace of the code that allocated each malloc block.
llvm-svn: 155262
2012-04-21 00:11:26 +00:00
Johnny Chen 34d3a38a9c Method name change to avoid further conflicts when merging from ToT to branches/lldb-platform-work.
llvm-svn: 155260
2012-04-20 23:59:21 +00:00
Greg Clayton f99295c3a6 Fixed some issues with symbolicating things. Fixed symbolication.add_module() to not use the resolved_path before we have tried to locate it. Fixed crashlog.locate_module_and_debug_symbols() to return true and false correctly.
llvm-svn: 155255
2012-04-20 23:31:27 +00:00
Jim Ingham 6d66ce67d7 Make sure the "synchronous breakpoint callbacks" get called before the thread plan logic gets invoked, and if they
ask to continue that should short-circuit the thread plans for that thread.  Also add a bit more explanation for
how this machinery is supposed to work.  
Also pass eExecutionPolicyOnlyWhenNeeded, not eExecutionPolicyAlways when evaluating the expression for breakpoint
conditions.

llvm-svn: 155236
2012-04-20 21:16:56 +00:00
Greg Clayton 9bbddbf84a Added logging so we can see when we are trying to complete a forward type and pull in the world. This is due to a compiler bug we are tracking (<rdar://problem/11291658>) where forward decls to classes and types are not properly scoped in namespaces, which results in the current LLDB looking for a type it will find many times in the accelerator tables, but never match. For example, when debugging with clang we get a forward decl like:
class AnalysisResolver;

And we will look for it everywhere and find many many matches, but the decl context of those matching DIEs is "clang::AnalysisResolver", so we never match anything, yet we pull in waaayyy too much DWARF in the process.

To enable this logging enable the "lookups" category in the "dwarf" log channel:

(lldb) log enable dwarf lookups

llvm-svn: 155233
2012-04-20 20:35:47 +00:00
Greg Clayton 3e10cf3b51 Don't put the address of the module in the module basename as this hoses up our ability to find shared libraries by name. We now put it into the Module object name.
llvm-svn: 155223
2012-04-20 19:50:20 +00:00
Greg Clayton 3f24d36160 <rdar://problem/11259893>
Fixed an issue where iOS debugging would trust the first file it found in the SDK regardless of the UUID not matching. Now we actually get smart and can find modules in ANY of the installed SDKs and remember which SDK is our fallback SDK.

llvm-svn: 155184
2012-04-20 02:02:02 +00:00
Jim Ingham 28209d55fd Missed one place where the assert should have been in a #ifdef. Thanks Jason.
llvm-svn: 155175
2012-04-20 00:08:56 +00:00
Johnny Chen 6acfb690b5 Tests decorated with @benchmarks_test do not participate in the remote-macosx test suite run.
But, still, tearDown() should call super.tearDown(), not super.setUp(). :-)

llvm-svn: 155170
2012-04-19 23:50:00 +00:00
Johnny Chen c9cb71a0b3 LLDB test suite should also output the config info string along with the stack trace.
rdar://problem/11283401

Example:

Collected 1 test

1: test_with_dwarf (TestCallStdStringFunction.ExprCommandCallFunctionTestCase)
   Test calling std::String member function. ... FAIL

======================================================================
FAIL: test_with_dwarf (TestCallStdStringFunction.ExprCommandCallFunctionTestCase)
   Test calling std::String member function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/data/lldb/svn/ToT/test/lldbtest.py", line 427, in wrapper
    return func(self, *args, **kwargs)
  File "/Volumes/data/lldb/svn/ToT/test/expression_command/call-function/TestCallStdStringFunction.py", line 34, in test_with_dwarf
    self.call_function()
  File "/Volumes/data/lldb/svn/ToT/test/expression_command/call-function/TestCallStdStringFunction.py", line 48, in call_function
    substrs = ['Hello world'])
  File "/Volumes/data/lldb/svn/ToT/test/lldbtest.py", line 1235, in expect
    msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : 'Hello world' returns expected result
Config=i386-clang
----------------------------------------------------------------------
Ran 1 test in 1.148s

FAILED (failures=1)

llvm-svn: 155157
2012-04-19 21:33:55 +00:00
Johnny Chen 39b8c3567a Simplify the progress bar display when neither "-v" nor "-t" is passed to the test driver.
llvm-svn: 155152
2012-04-19 20:09:44 +00:00
Sean Callanan 82b6f48331 Updated LLVM to take a variety of ARM
disassembler fixes.  The ARM disassembler is
now crash-free on all opcodes.

llvm-svn: 155149
2012-04-19 20:00:54 +00:00
Johnny Chen 92f162a798 The session file name should be tagged with (architecture, compiler) in addition
to the already existing (test result, test id) to avoid collision and to
facilitate postmortem analysis.

llvm-svn: 155148
2012-04-19 19:39:11 +00:00
Johnny Chen 4fdc339db5 Not a test failure for i386; instead, the test case should be modified to not over-expect type fields for the synthetic childs.
rdar://problem/11277013

llvm-svn: 155144
2012-04-19 18:36:11 +00:00
Jim Ingham c1c19a6f02 In debug mode, assert when we fail to get the sequence mutex. We need to remove as many places where this can happen as possible.
llvm-svn: 155138
2012-04-19 16:57:50 +00:00
Jason Molenda 7c3e6f3134 bump version to lldb-142.
llvm-svn: 155093
2012-04-19 02:02:12 +00:00
Jim Ingham 3b8285d90d Switch to setting the write side of the run lock when we call Resume. Then make a PrivateResume that doesn't switch the run-lock state, and use that where we are resuming without changing the public resume state.
llvm-svn: 155092
2012-04-19 01:40:33 +00:00
Johnny Chen 61f305cdb8 Add expected failure decorators for test cases which are failing for i386 architecture.
Plus fix some test cases to skip/succeed for i386.

llvm-svn: 155087
2012-04-19 01:07:54 +00:00
Jim Ingham fd29c36fbf Add a WriteTryLock function.
llvm-svn: 155080
2012-04-19 00:19:47 +00:00
Jim Ingham e1471230e2 The plan stack should never be used while empty. GetCurrentPlan is the entry point to contol logic
for the plan stack, so assert here if it gets called with an empty plan stack.
<rdar://problem/11265974>

llvm-svn: 155078
2012-04-19 00:17:05 +00:00
Jim Ingham 1f628f4e8f We take the API mutex first and the stop mutex second in general, so do it here as well.
llvm-svn: 155077
2012-04-19 00:14:53 +00:00
Greg Clayton af54653c32 Make sure EmulateInstructionARM doesn't have to have "armv4", "armv6", "armv7" as the exact architecture name, the arch name can just start with any of these strings. We need to be able to recognize different variants that might come along and not fail to backtrace completely (which happens when we aren't able to find an architecture that matches) when we don't have exact matches.
llvm-svn: 155045
2012-04-18 21:16:06 +00:00
Greg Clayton 26b47e24fe Added an iOS local debugging optimization when reading the __LINKEDIT section data for files in the dyld shared cache.
llvm-svn: 154984
2012-04-18 05:19:20 +00:00
Greg Clayton bade1fb874 Find and allows users to use the cached SDK's that might be in "~/Library/Developer/Xcode/iOS DeviceSupport".
Also enabled PlatformRemoteiOS to select an SDK using the build number in case you have mutliple 5.0 SDKs installed:

(lldb) platform select remote-ios --build 11C123

llvm-svn: 154978
2012-04-18 02:08:08 +00:00
Jason Molenda edfb0dcf0c Bump to lldb-141.
llvm-svn: 154975
2012-04-18 01:35:37 +00:00
Jason Molenda 9cf296d177 Add armv7s to recognized cpu type for arm instruction emulation.
llvm-svn: 154974
2012-04-18 01:28:49 +00:00
Sean Callanan ad880767fc We now record metadata for Objective-C interfaces,
Objective-C methods, and Objective-C properties.

llvm-svn: 154972
2012-04-18 01:06:17 +00:00
Greg Clayton d38e55e815 Update the way SDK directories are found so we are not reliant on the old "Latest" symlinks in the DeviceSupport directory.
llvm-svn: 154966
2012-04-18 00:06:56 +00:00
Greg Clayton ac7a3db067 Make sure an error is returned when Process::LoadImage() fails.
llvm-svn: 154965
2012-04-18 00:05:19 +00:00
Sean Callanan d9804fbd01 When an AST import fails, provide the metadata
for the original Decl, for debugging purposes.

llvm-svn: 154957
2012-04-17 22:30:04 +00:00
Jason Molenda 7bfc33077e Bump to lldb-140.
llvm-svn: 154887
2012-04-17 00:59:15 +00:00
Sean Callanan 0765c82694 Disabled spell checking in the expression parser,
which incurs large overheads in terms of type
parsing and importing.

llvm-svn: 154885
2012-04-17 00:49:48 +00:00
Greg Clayton 1e8ac36b60 Fixed the ability to load multiple __LINKEDIT segments at the same address for darwin shared cache entries. Now when registering the load address of a section, the DynamicLoader objects can specify if they should warn or not. This will fix the ability to load the nlist entries for shared libraries in the darwin shared caches when no on disk representation is available for a shared library.
llvm-svn: 154860
2012-04-16 21:01:30 +00:00