Greg Clayton
85fb1b93f3
<rdar://problem/11935492>
...
Fixed an issue where if we call "Process::Destroy()" and the process is running, if we try to stop it and get "exited" back as the stop reason, we will still deliver the exited event.
llvm-svn: 163591
2012-09-11 02:33:37 +00:00
Greg Clayton
0e3ab7ac5b
Fixed some logging messages.
...
llvm-svn: 163590
2012-09-11 02:28:49 +00:00
Greg Clayton
a4475f22fc
Print the stack size followed by the full stack info.
...
llvm-svn: 163589
2012-09-11 02:25:20 +00:00
Jim Ingham
a39ad077c9
Initialize a variable to quite a compiler warning.
...
llvm-svn: 163576
2012-09-11 00:09:25 +00:00
Jim Ingham
45350374f1
Typed too fast adding lockers. Actually put them in a locker.
...
llvm-svn: 163575
2012-09-11 00:08:52 +00:00
Jim Ingham
927bfa3fd9
Shortcut ThreadPlanStepRange::MischiefManaged - if we have pushed new plans and they are not done, then we aren't done either.
...
<rdar://problem/12259124>
llvm-svn: 163572
2012-09-10 23:42:44 +00:00
Sean Callanan
3ff3199e61
Fixed a bug where the LLDB_VERSION wasn't properly
...
truncated during install-headers.
<rdar://problem/12268130>
llvm-svn: 163559
2012-09-10 22:43:22 +00:00
Greg Clayton
6b152ff550
Added a python example that will compute which functions in a process are hogging the stack.
...
llvm-svn: 163543
2012-09-10 20:55:08 +00:00
Jim Ingham
41f2b940c9
Fixed a few places where we were doing:
...
uint32_t size = ThreadList.GetSize();
for (i=0; i < size; ++i)
without grabbing the thread list mutex.
llvm-svn: 163541
2012-09-10 20:50:15 +00:00
Greg Clayton
bded106120
Playing around with "objc_refs" over the weekend and improved it to work on a large ObjC program without running into expression timeouts. Now we get a full list of ObjC classes using a runtime function and then qsort the result. Also added code that can count all instances of each ObjC on the heap and also the total byte sizes for the object allocations.
...
llvm-svn: 163520
2012-09-10 17:22:45 +00:00
Sean Callanan
2201905b6c
Fixed a problem where watchpoint conditions would
...
run code when it didn't really need to run.
<rdar://problem/12145006>
llvm-svn: 163450
2012-09-08 01:51:48 +00:00
Greg Clayton
88344b7133
Don't allocate memory when enumerting stack. We now have fixed size buffers to avoid this issue.
...
llvm-svn: 163441
2012-09-08 01:16:16 +00:00
Sean Callanan
6e4100ead8
Fixed a crash in the testsuite because the wrong
...
type was being completed.
llvm-svn: 163440
2012-09-08 00:49:45 +00:00
Jim Ingham
c635500dbb
Fiddle with the heuristic about where to set the stop point in a nested inline stack when we get there by breakpoint. If we hit a user breakpoint, I set the stop point to the bottom-most frame 'cause that's what we did before.
...
<rdar://problem/12258999> Setting breakpoint in always inline function is stopping in function above it
llvm-svn: 163439
2012-09-08 00:26:49 +00:00
Jim Ingham
3a4599f6cb
A bunch of test cases for inlined stepping.
...
llvm-svn: 163436
2012-09-07 23:58:16 +00:00
Greg Clayton
93bfb29ada
Make file + line breakpoints even more efficient by using our SearchFilter objects correctly now that we sometimes don't check for inlined breakpoints.
...
llvm-svn: 163435
2012-09-07 23:48:57 +00:00
Jim Ingham
625fca7c5a
Save and restore the current inlined depth over function calls.
...
llvm-svn: 163433
2012-09-07 23:36:43 +00:00
Jim Ingham
6cd41da75d
Add SetCurrentInlinedDepth API.
...
In GetFramesUpTo, don't adjust the number of frames for the inlined depth if the number of frames in UINT32_MAX.
llvm-svn: 163432
2012-09-07 23:35:54 +00:00
Greg Clayton
ba1fad8420
Added a quick example to show how disasembly output can be customized.
...
llvm-svn: 163421
2012-09-07 21:18:45 +00:00
Greg Clayton
0662d966dc
Train LLDB to deal with bad linker N_SO entries that point to our source files for debug map + DWARF in .o file debugging.
...
llvm-svn: 163417
2012-09-07 20:29:13 +00:00
Greg Clayton
e2186ed6d9
Patch from Andrew Kaylor for linux:
...
The attached patch fixes a problem with performing an attach from the SBTarget API on Linux (and other systems that use ProcessPOSIX).
When Process::Attach was called from SBTarget, it resulted in a call to a form of the DoAttachWithID function that wasn't implemented in ProcessPOSIX, and so it fell back to the default implementation (which just returns an error). It didn't seem necessary to use the attach_info parameter for this case, so I just implemented it as a call to the simpler version of the function.
In debugging this problem, I also found that SBTarget wasn't checking the return value from the Attach call, causing it to hang when the attach fails.
llvm-svn: 163399
2012-09-07 17:51:47 +00:00
Greg Clayton
542e407581
Patch from Andrew Kaylor for linux:
...
The attached patch adds support for debugging 32-bit processes when running a 64-bit lldb on an x86_64 Linux system.
Making this work required two basic changes:
1) Getting lldb to report that it could debug 32-bit processes
2) Changing an assumption about how ptrace works when debugging cross-platform
For the first change, I took a conservative approach and only enabled this for x86_64 Linux platforms. It may be that the change I made in Host.cpp could be extended to other 64-bit Linux platforms, but I'm not familiar enough with the other platforms to know for sure.
For the second change, the Linux ProcessMonitor class was assuming that ptrace(PTRACE_[PEEK|POKE]DATA...) would read/write a "word" based on the child process word size. However, the ptrace documentation says that the "word" size read or written is "determined by the OS variant." I verified experimentally that when ptracing a 32-bit child from a 64-bit parent a 64-bit word is read or written.
llvm-svn: 163398
2012-09-07 17:49:29 +00:00
Jim Ingham
f02a2e96b8
Ensure that the ShouldStopHere plans get called even when doing "virtual" steps.
...
llvm-svn: 163366
2012-09-07 01:11:44 +00:00
Jim Ingham
7da851a3e2
For now, treat breakpoint hits like regular stops when calculation InlinedStackDepth.
...
llvm-svn: 163365
2012-09-07 01:11:08 +00:00
Enrico Granata
c30a73adf6
Fixing a constness issue in an otherwise trivial patch
...
llvm-svn: 163352
2012-09-06 22:02:28 +00:00
Enrico Granata
6b09d42335
Restoring an API as deprecated which was removed in a previous commit
...
llvm-svn: 163351
2012-09-06 21:58:25 +00:00
Jim Ingham
9786eeeb6f
When you reach the bottom of the inlined stack, don't say you can do a virtual step.
...
llvm-svn: 163341
2012-09-06 19:24:57 +00:00
Jim Ingham
46ef1807fc
Include a useful bit of log output in the "step" as well as the "process" logs.
...
llvm-svn: 163340
2012-09-06 19:24:17 +00:00
Enrico Granata
5c5ae47a8f
Patch from Daniel Malea to fix the build on Linux. Thanks
...
llvm-svn: 163332
2012-09-06 17:10:14 +00:00
Jason Molenda
9a9422a4ff
For the eEncodingIEEE754 registers in RegisterValue::SetType,
...
only accept the first matching type based on lldb's sizeofs.
<rdar://problem/12222109>
llvm-svn: 163285
2012-09-06 02:17:36 +00:00
Sean Callanan
4ed61b001c
Disable the "pretty stack trace" signal handler,
...
which can conflict with accurate crash reporting
in multithreaded contexts.
llvm-svn: 163282
2012-09-06 01:39:02 +00:00
Greg Clayton
946f890b78
<rdar://problem/12237556>
...
Fixed an issue where we didn't parse N_SO stab pairs where the first N_SO was a relative path.
llvm-svn: 163259
2012-09-05 22:30:51 +00:00
Enrico Granata
9b034c1558
Patch for clang to include the UTF conversion routines that LLDB needs
...
llvm-svn: 163250
2012-09-05 21:37:27 +00:00
Greg Clayton
dbc6c0bbc9
<rdar://problem/12211320>
...
When the vendor and OS are not specified in a triple, only let unspecified vendor and OS fields matchs for the current host platform.
llvm-svn: 163248
2012-09-05 21:19:23 +00:00
Jim Ingham
e7e6ffc600
Turn on the "fancy inlined stepping."
...
llvm-svn: 163246
2012-09-05 21:14:28 +00:00
Jim Ingham
cb95f34818
If the ThreadList ShouldStop restarts the target, don't resume it again.
...
llvm-svn: 163245
2012-09-05 21:13:56 +00:00
Jim Ingham
bad39e47cd
Move calculating the CurrentInlinedDepth to AFTER the synchronous breakpoint callback gets a chance to run.
...
If the stopped event comes in with the Restarted bit set, don't try to hand that to the plans, but just return ShouldStop = false. There's nothing useful the plans can do, since the target is already running.
llvm-svn: 163244
2012-09-05 21:12:49 +00:00
Enrico Granata
d4439aa9ed
Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'
...
llvm-svn: 163239
2012-09-05 20:41:26 +00:00
Greg Clayton
3f839a3cee
<rdar://problem/12100588>
...
Don't crash when we can't resolve our stub to a symbol.
llvm-svn: 163189
2012-09-05 01:38:55 +00:00
Greg Clayton
a28d2030e9
Fix the log channel used in Process.cpp.
...
llvm-svn: 163183
2012-09-05 00:37:58 +00:00
Enrico Granata
1364311f4d
Making the right thing with regards to disabling summaries on LLDB_DISABLE_PYTHON builds
...
llvm-svn: 163170
2012-09-04 22:04:50 +00:00
Greg Clayton
69fd4be5fb
Modified patch from Matt Kopec that fixes a process launch issue on linux where we wouldn't acquire the process run lock.
...
llvm-svn: 163163
2012-09-04 20:29:05 +00:00
Enrico Granata
39cf67e573
<rdar://problem/12068655> Make sure [NSDate distantPast] is formatted correctly
...
llvm-svn: 163162
2012-09-04 20:02:39 +00:00
Enrico Granata
7a204359dc
Editing a comment to make sure people know not to blame CFString.py for CFString summary errors
...
llvm-svn: 163157
2012-09-04 19:18:17 +00:00
Enrico Granata
f519628a10
Adding to files that were missing in the previous commit
...
llvm-svn: 163156
2012-09-04 18:48:21 +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
5ec9645f83
Patch from Filipe Cabecinhas that uses argparse in dotest.py instead of a hand coded option. I made a few modifications:
...
Changed the '-A' option to also have a long option of '--arch'. This is now specified multiple times to get multiple architectures.
Old: -A i386^x86_64
New: -A i386 -A x86_64
--arch i386 --arch x86_64
Changed the '-C' option to also have a long option of '--compiler'. This is now specified multiple times to get multiple compiler.
Old: -C clang^gcc
New: -C clang -C gcc
--compiler clang --compiler gcc
llvm-svn: 163141
2012-09-04 15:42:49 +00:00
Greg Clayton
dcbfd19e88
Patch from info from Daniel Malea that should fix the build on linux after fixes committed with revision 162860.
...
llvm-svn: 163139
2012-09-04 14:55:50 +00:00
Greg Clayton
7143f00ae9
Improved "objc_refs" a bit to be able to find all instances of a class'
...
superclasses on top of finding the exact class. The current attempt is still
too slow, but it lays the groundwork.
llvm-svn: 163135
2012-09-04 14:09:21 +00:00
Jim Ingham
513c6bb88c
Initial check-in of "fancy" inlined stepping. Doesn't do anything useful unless you switch LLDB_FANCY_INLINED_STEPPING to true. With that
...
on, basic inlined stepping works, including step-over of inlined functions. But for some as yet mysterious reason i386 debugging gets an
assert and dies immediately. So for now its off.
llvm-svn: 163044
2012-09-01 01:02:41 +00:00