Commit Graph

5092 Commits

Author SHA1 Message Date
Filipe Cabecinhas 9c946f3e2d Return a constant of the appropriate type.
llvm-svn: 157241
2012-05-22 08:38:06 +00:00
Filipe Cabecinhas fccc829ce7 Remove trailing semicolons.
llvm-svn: 157240
2012-05-22 08:36:18 +00:00
Johnny Chen 7a34875b3b rdar://problem/11487457
Add convenience registers eax, ebx, ecx, edx, edi, esi, ebp, esp to the 'register read' command for x86_64.
Add a GDBRemoteRegisterContext::Addx86_64ConvenienceRegisters() method called from ProcessGDBRemote::BuildDynamicRegisterInfo().
Servicing of eax, for example, is accomplished by delegating to rax with an adjusted offset into the register context.

llvm-svn: 157230
2012-05-22 00:57:05 +00:00
Johnny Chen 058bb9908f Fix a bug where if I just run:
./dotest.py

No progress bar appears.

llvm-svn: 157226
2012-05-22 00:22:18 +00:00
Jim Ingham a8558b6289 Also push file & line breakpoints past the prologue. Also added a "-K" argument to the relevant
"break set" commands to set this per breakpoint.  Also, some CreateBreakpoint API's in the lldb_private
namespace had "internal" first and "skip_prologue" second.  "internal should always be last.  Fixed that.

rdar://problem/11484729

llvm-svn: 157225
2012-05-22 00:12:20 +00:00
Sean Callanan ce8af862ae Added support for rvalue references in debug information
(actually, mainly just hooked up support that was already
there).  Added a test case, although it's expected to fail
right now unless you're using top-of-tree LLVM.

llvm-svn: 157220
2012-05-21 23:31:51 +00:00
Jim Ingham 62ac08e4e6 CompileUnit::ResolveSymbolContext was only filling in the LineEntry regardless of what was passed in for "resolve_scope". I fixed that.
llvm-svn: 157217
2012-05-21 23:06:47 +00:00
Sean Callanan 3e606ea7ae Updated the object-pointer lookup logic to fix
Objective-C "self," which is not a regular pointer.

llvm-svn: 157214
2012-05-21 22:25:52 +00:00
Sean Callanan 0061222ed8 Fixed the new-syntax testcase to reflect how we
print string literals.

llvm-svn: 157213
2012-05-21 22:25:12 +00:00
Enrico Granata 7c015e1020 Fixes for performance to data formatters - Python < 3.0 is much slower when using True/False as compared to 1/0 for logical values. Wexploit this to our advantage. Other minor tweaks
llvm-svn: 157209
2012-05-21 21:52:38 +00:00
Sean Callanan 0259e51287 Fixed a nasty bug where JIT expressions didn't work
when stopped in a const method.  Also updated our
testsuite to ensure that JIT is forced in this case.

llvm-svn: 157208
2012-05-21 21:29:52 +00:00
Sean Callanan fc732755ad Added an "rb" alias that sets breakpoints by
regular expression.

llvm-svn: 157202
2012-05-21 18:25:19 +00:00
Sean Callanan 66ad3bcb16 Integrated a check into Clang that make sure that
it doesn't try to call LookupDestructor on an
incomplete class.

llvm-svn: 157199
2012-05-21 17:54:55 +00:00
Sean Callanan a69e64481d Added a GDB equivalent for saving binary memory
data.

llvm-svn: 157192
2012-05-21 17:01:59 +00:00
Enrico Granata fd4c84ee9f <rdar://problem/11355592> Fixing a bug where we would incorrectly try and determine a dynamic type for a variable of a pointer type that is not a valid generic type for dynamic pointers.
llvm-svn: 157190
2012-05-21 16:51:35 +00:00
Filipe Cabecinhas 721ba3ff77 Fixes the case where we created a dummy target, deleted it, and then tried to evaluate an expression with no target.
llvm-svn: 157110
2012-05-19 09:59:08 +00:00
Sean Callanan 02b00c9ba7 Updated LLVM to take a disassembler fix that causes
the LOCK prefix to be printed explicitly when it's
the first prefix on the instruction.

llvm-svn: 157096
2012-05-19 02:36:49 +00:00
Jason Molenda 8d27075c3d bump to lldb-150.
llvm-svn: 157090
2012-05-19 00:32:19 +00:00
Greg Clayton de87c0fdb4 Forgot to bump the local string buffer up in size after debugging to make sure long strings would be correctly read when the buffer is too small for the string.
llvm-svn: 157087
2012-05-19 00:18:00 +00:00
Johnny Chen 90830703b2 Add test cases where we start three worker threads, with a write watchpoint set. As soon as a watchpoint is hit in either of the worker thread,
we delete the watchpoint.  The test succeeds when no more watchpoint hit event fires after the deletion of the watchpoint.

related to rdar://problem/11320188

llvm-svn: 157084
2012-05-18 23:30:57 +00:00
Greg Clayton 4c82d425fa Found a quick way to improve the speed with which we can read object files from memory when they are in the shared cache: always read the symbol table strings from memory and let the process' memory cache do the work.
llvm-svn: 157083
2012-05-18 23:20:01 +00:00
Greg Clayton 6c59661e4f Warn when we detect a valid dSYM file that is empty. This can happen when a dSYM file is created from a binary with no debug info, that has been stripped, or when the .o files are not available when the dSYM is created.
llvm-svn: 157078
2012-05-18 21:47:20 +00:00
Filipe Cabecinhas 5158f3de24 Cleanup a custom thread-format so we don't fail TestLoadUnload when running the
test suite for two architectures (the full path to d.c would appear).

llvm-svn: 157077
2012-05-18 21:35:43 +00:00
Enrico Granata 263ebe5f78 Optimizations to the Python ObjC formatters - Benchmarking infrastructure
llvm-svn: 157066
2012-05-18 19:55:37 +00:00
Filipe Cabecinhas 518549e28d Fixed the test for the new process launch abbreviation.
llvm-svn: 157050
2012-05-18 13:21:05 +00:00
Greg Clayton fa559e5c6e <rdar://problem/11386214>
<rdar://problem/11455913>

"target symbol add" should flush the cached frames
"register write" should flush the thread state in case registers modifications change stack

 

llvm-svn: 157042
2012-05-18 02:38:05 +00:00
Jason Molenda f34358e90b bump to lldb 149.
llvm-svn: 157040
2012-05-18 02:03:26 +00:00
Johnny Chen aa739093df rdar://problem/11140741
For "process attach", make the success criterion as the inferior changes its state to eStateStopped.
Otherwise, mark it as a failure and say so.

llvm-svn: 157036
2012-05-18 00:51:36 +00:00
Jim Ingham 65960aec4a Make the debug output that comes as printf's from code called in the target for getting ObjC class names and ObjC method implementations only come out when doing verbose logging.
llvm-svn: 157029
2012-05-18 00:05:52 +00:00
Greg Clayton 0ca92a15b0 <rdar://problem/11405850>
The "run" and "r" aliases were for gdb compatability, so make then do what GDB does by default: launch in a shell.

For those that don't want launching with a shell by default, add the following to your ~/.lldbinit file:

command unalias run
command unalias r
command alias r process launch --
command alias run process launch --

llvm-svn: 157028
2012-05-18 00:04:38 +00:00
Sean Callanan 4407880666 I have updated Clang to include support for Objective-C
boxed expressions returning numbers and strings.

I also added boxed expressions to our testcases, and
enabled boxed expressions when libarclite is linked into
the inferior.

llvm-svn: 157026
2012-05-17 23:29:56 +00:00
Han Ming Ong 69b7412f34 <rdar://11477301>
Restore Xcode as a valid white list client using the XPC root launcher

llvm-svn: 157012
2012-05-17 20:41:48 +00:00
Jim Ingham 5738c95901 Reduce the timeout value for the "get class name" and "po" functions to .1 second. 1 second (what they were before) is way too long.
llvm-svn: 157009
2012-05-17 18:51:37 +00:00
Jim Ingham 4a94c91077 If we notice that a module with a given file path is replaced by another with the same file
path on rerunning, evict the old module from the target module list, inform the breakpoints
about this so they can do something intelligent as well.

rdar://problem/11273043

llvm-svn: 157008
2012-05-17 18:38:42 +00:00
Filipe Cabecinhas b018345ddc We shouldn't save g_dummy_target_sp. Other code will simply call Destroy() on it.
TestBackticksWithoutATarget.BackticksWithNoTargetTestCase was calling
GetDummyTarget() when executing for x86_64. When performing session
tearDown, it would get destroyed (and everything would be invalid (arch,
etc).

Then the test would run for i386. The dummy target wasn't being
reinitialized and was invalid. lldb complained that 'current process state
is unsuitable for expression parsing'.

llvm-svn: 156994
2012-05-17 15:48:02 +00:00
Greg Clayton f67002dd4c Make sure to subtract one from the PC when doing the symbolication of stack frames when it isn't the zero'th frame.
llvm-svn: 156974
2012-05-17 03:58:23 +00:00
Jason Molenda 5a725efeb0 Bump to version 148.
llvm-svn: 156971
2012-05-17 01:49:53 +00:00
Filipe Cabecinhas af1537f57c Warn the user when several commands match the input given.
Added a testcase.

llvm-svn: 156961
2012-05-16 23:25:54 +00:00
Greg Clayton 526a4ae5bf <rdar://problem/11439755>
Make sure we can fail to create a compile unit without asserting. We now emit a warning.

llvm-svn: 156956
2012-05-16 22:09:01 +00:00
Johnny Chen e26c721976 Fix a typo.
llvm-svn: 156952
2012-05-16 22:01:10 +00:00
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