Commit Graph

5268 Commits

Author SHA1 Message Date
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
Sean Callanan 96088b75ad Integrated a fix to LLVM's disassembler that
corrected the offsets for x86_64 conditional
branch instructions.

<rdar://problem/11502148>

llvm-svn: 160769
2012-07-26 01:15:27 +00:00
Jim Ingham 279ceecf65 Add a call to "sync" a thread state before checkpointing registers in preparation for
calling functions.  This is necessary on Mac OS X, since bad things can happen if you set
the registers of a thread that's sitting in a kernel trap.

<rdar://problem/11145013>

llvm-svn: 160756
2012-07-25 21:12:43 +00:00
Filipe Cabecinhas f4156d496e Make git not delete some empty dirs. Otherwise a git checkout would be different from an svn checkout.
llvm-svn: 160717
2012-07-25 10:34:53 +00:00
Jason Molenda c42d243ace Provide subdir of StopInfoMachException.h in #include.
llvm-svn: 160704
2012-07-25 03:40:06 +00:00
Jim Ingham c8ff80d6b0 Sanity check the result of Symbol::GetPrologueByteSize - make sure it is not greater than the size of the Symbol returning it.
llvm-svn: 160656
2012-07-24 01:31:19 +00:00
Jim Ingham 1bfe4f6417 Use a more efficient API to tell if a process belongs to springboard or not.
llvm-svn: 160655
2012-07-24 01:23:53 +00:00
Sean Callanan 6e6d4a6223 Added a fix that allows newly-constructed objects
to returned by expressions, by removing the
__cxa_atexit call that would normally cause these
objects to be destroyed.  This also prevents many
errors of the form

Couldn't rewrite one of the arguments of a function call
error: Couldn't materialize struct: Structure hasn't been laid out yet

<rdar://problem/11309402>

llvm-svn: 160596
2012-07-21 02:02:15 +00:00
Jim Ingham a39fb7a4e1 Handle backslash protection inside unquoted commands like:
(lldb) file hello\ world

correctly.
<rdar://problem/11093911>

llvm-svn: 160591
2012-07-21 00:12:58 +00:00
Sean Callanan dff711ed75 Added a fix to LLVM that corrects PC-relative
branch address printing in the x86 disassembler.

<rdar://problem/11925357>

llvm-svn: 160588
2012-07-20 22:47:19 +00:00
Jim Ingham cd16df9154 Add "vAttachOrWait" to debugserver, so you can implement "attach to the process if it exists OR wait for it" without race conditions. Use that in lldb.
llvm-svn: 160578
2012-07-20 21:37:13 +00:00
Jason Molenda d9d5cf5413 Change the things we pass to Mangled::SetValue to be ConstStrings instead of
char*'s - Greg removed the methods which accept char*'s earlier today.

llvm-svn: 160539
2012-07-20 03:35:44 +00:00
Greg Clayton 8e59d2d940 Fixed the file header to match the filename.
llvm-svn: 160524
2012-07-19 21:24:56 +00:00
Greg Clayton f866543a36 Fixed the comment for the lldb_private::PathType enumerations.
llvm-svn: 160523
2012-07-19 21:23:34 +00:00
Sean Callanan 224f6f5382 Changed ProcessGDBRemote to avoid the reserved
port range.  Also added a comment indicating that
more work is needed.

<rdar://problem/11580051>

llvm-svn: 160514
2012-07-19 18:07:36 +00:00
Filipe Cabecinhas e6dc330748 Make git not delete my_working_dir. Otherwise a git checkout would be different from an svn checkout.
llvm-svn: 160506
2012-07-19 13:53:12 +00:00
Greg Clayton 7dab2be287 <rdar://problem/11908082>
Allow debugserver to match process names that are longer than MAXCOMLEN (16) characters. We do this by digging up argv[0] from another sysctl if the process name supplied is longer than 16 characters.

llvm-svn: 160487
2012-07-19 02:45:35 +00:00
Greg Clayton 037520e9cf Cleaned up the lldb_private::Mangled class to get rid of the tokenizing code that has bit rotted and isn't being used. Also cleaned up the API to the "lldb_private::Mangled" to always take "const ConstString &" arguments instead of both "const ConstString &" and "const char *".
llvm-svn: 160466
2012-07-18 23:18:10 +00:00
Greg Clayton 5e0c5e8108 <rdar://problem/10998370>
Improved the error message when we can find a function in the current program by printing the demangled name.

Also added the ability to create lldb_private::Mangled instances with a ConstString when we already have a ConstString for a mangled or demangled name. Also added the ability to call SetValue with a ConstString and also without a boolean to indicate if the string is mangled where we will now auto-detect if the string is mangled.

llvm-svn: 160450
2012-07-18 20:47:40 +00:00
Sean Callanan 6b76bc76fa Removed a hack that gives zero-length arrays a
single element.  Also modified our struct test
case to test this.

llvm-svn: 160449
2012-07-18 20:39:26 +00:00
Greg Clayton 358a789744 Cleaned up incorrect STL std::map comparison code and use the operator == on std::map objects instead of manually implementing the comparisons. Also modified the UnwindPlan::AppendRow() function to take a "const RowSP &" object so we don't have to copy shared pointers when calling this function.
llvm-svn: 160448
2012-07-18 20:37:53 +00:00
Jim Ingham b83e72097f Add useful documentation to the "target.source-map" setting.
<rdar://problem/11893881>

llvm-svn: 160442
2012-07-18 18:42:57 +00:00
Greg Clayton b9cafbb509 <rdar://problem/11852285>
Remove assertions and turn what used the be the assertion into a logged error with instructions on what to attach to a radar so we can track down why this is happening.

llvm-svn: 160392
2012-07-17 20:18:12 +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
Greg Clayton 9c3f4101bc Call "drain" on the auto release pool as it will do the right thing for both GC and non-GC apps. It will also quiet the static analyzer.
llvm-svn: 160390
2012-07-17 19:46:12 +00:00
Greg Clayton 23f59509a8 Ran the static analyzer on the codebase and found a few things.
llvm-svn: 160338
2012-07-17 03:23:13 +00:00
Jason Molenda 24a8378c4f Change UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly so it records
the state of the unwind instructions once the prologue has finished.  If it hits an
early return epilogue in the middle of the function, re-instate the prologue after that
epilogue has completed so that we can still unwind for cases where the flow of control
goes past that early-return.  <rdar://problem/11775059>

Move the UnwindPlan operator== definition into the .cpp file, expand the definition a bit.

Add some casts to a SBCommandInterpreter::HandleCompletion() log statement so it builds without
warning on 64- and 32-bit systems.

llvm-svn: 160337
2012-07-17 01:57:24 +00:00
Jim Ingham ab728678ee Lock around reading as well as connecting & disconnecting so we don't start reading after
someone has set our file descriptor to -1 and crash in FD_SET...
<rdar://problem/11653966>

llvm-svn: 160336
2012-07-17 01:47:11 +00:00
Enrico Granata 3372f581eb <rdar://problem/11672978> Fixing an issue where an ObjC object might come out without a description because the expression used to obtain it would timeout before running to completion
llvm-svn: 160326
2012-07-16 23:10:35 +00:00
Greg Clayton 784933b791 Enable the "symbolicate" interactive command to symbolicate all crash logs if no indexes are supplied. This can be handy to use as:
(lldb) script import lldb.macosx.crashlog
(lldb) crashlog -i /tmp/*.crash
% symbolicate --crashed-only

This will symbolicate all of the crash logs only for the crashed thread.

Also print out the crash log index number in the output of the interactive "image" command:

(lldb) script import lldb.macosx.crashlog
(lldb) crashlog -i /tmp/*.crash
% image LLDB.framework
...

This then allows you to symbolicate a crash log by index accurately when you looked for an image of a specific version

llvm-svn: 160316
2012-07-16 20:40:20 +00:00
Jim Ingham 73472eef4d Fix an off by one error when handling a packet where our read buffer size truncates the first chunk of the packet
between the two chars representing the checksum.

<rdar://problem/11882074>

llvm-svn: 160310
2012-07-16 18:56:05 +00:00
Jason Molenda 1d42c7bc32 Switch nearly all of the use of the UnwindPlan::Row's to go through
a shared pointer to ease some memory management issues with a patch
I'm working on.

The main complication with using SPs for these objects is that most
methods that build up an UnwindPlan will construct a Row to a given
instruction point in a function, then add additional regsaves in
the next instruction point to that row and push it again.  A little
care is needed to not mutate the previous instruction point's Row
once these are switched to being held behing shared pointers.

llvm-svn: 160214
2012-07-14 04:52:53 +00:00
Jason Molenda 64e1d4abc7 Bump to lldb-162 / debugserver-189.
llvm-svn: 160212
2012-07-14 01:12:03 +00:00
Greg Clayton 685c88c5a8 <rdar://problem/11870357>
Allow "frame variable" to find ivars without the need for "this->" or "self->".  

llvm-svn: 160211
2012-07-14 00:53:55 +00:00
Enrico Granata 1c5431af81 Fixing a buildbot issue in GDBRemoteCommunicationServer due to an undefined constant in latest commit
llvm-svn: 160208
2012-07-13 23:55:22 +00:00
Enrico Granata f04a21917c <rdar://problem/11782789> Changes to the watchpoint implementation on ARM so that we single-step before stopping at the WP. This is necessary because on ARM the WP triggers before the opcode is actually executed, so we would be unable to continue since we would keep hitting the WP. We work around this by disabling the WP, single stepping and then putting the WP back in place.
llvm-svn: 160199
2012-07-13 23:18:48 +00:00
Jason Molenda 7298ea1871 Revert the change I committed yesterday, it caused a regression
with one armv7 unwind.  I'll look at updating this or finding a
different way of fixing it later tonight.

llvm-svn: 160198
2012-07-13 22:40:51 +00:00
Sean Callanan 5dd6c3dfcc Be a little more safe when checking whether the
current symbol context is a C++ or Objective-C
instance method.

Specifically, ensure that we fetch information
on the current block, not just the current
function.

llvm-svn: 160195
2012-07-13 21:20:29 +00:00
Jim Ingham 18b4689639 Add accessors on process to get & set the selected thread by IndexID (useful since that's the one that "thread list" shows and it won't get reused even if the underlying system thread ID gets reused.
llvm-svn: 160187
2012-07-13 20:18:18 +00:00
Sean Callanan 5ed3ac189f Updated LLVM and added a fix to LLDB which allows
LLDB to distinguish between multiple anonymous
structs/unions in the same class.

<rdar://problem/11466212>

llvm-svn: 160186
2012-07-13 20:01:02 +00:00
Enrico Granata 4b7b5aa0bc <rdar://problem/11773899> Formatters for BOOL* and BOOL&
llvm-svn: 160181
2012-07-13 18:55:41 +00:00
Enrico Granata 4ed7ef1f72 <rdar://problem/11628688> Making sure to use the ostype format for OSType values
llvm-svn: 160180
2012-07-13 18:54:40 +00:00
Enrico Granata 811e9055fd <rdar://problem/11753405> Making sure we deal correctly with signed NSNumber values
llvm-svn: 160179
2012-07-13 18:53:14 +00:00
Greg Clayton c51d70d9d5 Show source by default for the first 4 frames of the crash thread. Also added options to allow showing source for all frames (--source-frames=NFRAMES) and for all threads (--source-all).
llvm-svn: 160175
2012-07-13 17:58:52 +00:00
Greg Clayton 563d03934c Added the ability to see source context with each frame in the "crashlog" command with the "--source-context" (-C for short to match grep) option.
Also made the symbolication of the crash logs more efficient when using the "--crashed-only" ("-c") option where only the crashed thread is symbolicated. We now only download the images for the frames in the crashed thread.

llvm-svn: 160160
2012-07-13 03:19:35 +00:00
Greg Clayton 96816e4848 Resolve source paths that start with ~ when doing substitutions.
llvm-svn: 160158
2012-07-13 01:20:25 +00:00
Greg Clayton 4592cbc473 Make the setting for "target.process.thread.step-avoid-regexp" work for inlined functions, not just concrete top level functions.
llvm-svn: 160151
2012-07-13 00:19:40 +00:00
Jason Molenda d59fd74eec When parsing the epilogue of a thumbv2 function, when we see the
frame pointer overwritten with the caller's fp value, return to 
expressing the CFA in terms of the stack pointer.
<rdar://problem/11855862>

llvm-svn: 160150
2012-07-12 23:43:02 +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
Greg Clayton 1d60909e81 <rdar://problem/11740973>
Fixed issues that could happen when the UUID doesn't change in a binary and old stale debug info could end up being used.

llvm-svn: 160145
2012-07-12 22:51:12 +00:00