summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepRange.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up the usage of "MasterPlan" status in ThreadPlans. Only ↵Jim Ingham2012-05-031-0/+27
| | | | | | | | | | | | | | | 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
* Fix reporting of stop reasons when the StepOver & StepIn plans stop because ↵Jim Ingham2012-05-011-36/+0
| | | | | | 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
* Make sure the "synchronous breakpoint callbacks" get called before the ↵Jim Ingham2012-04-201-0/+3
| | | | | | | | | | | 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
* First stage of implementing step by "run to next branch". Doesn't work yet, ↵Jim Ingham2012-03-091-1/+156
| | | | | | | | is turned off. <rdar://problem/10975912> llvm-svn: 152376
* <rdar://problem/10997402>Greg Clayton2012-03-071-2/+3
| | | | | | | | | | | This fix really needed to happen as a previous fix I had submitted for calculating symbol sizes made many symbols appear to have zero size since the function that was calculating the symbol size was calling another function that would cause the calculation to happen again. This resulted in some symbols having zero size when they shouldn't. This could then cause infinite stack traces and many other side affects. llvm-svn: 152244
* Convert the thread plans over from using the stack count to do their logic ↵Jim Ingham2012-03-011-50/+20
| | | | | | | | to using StackID's. This should be more efficient. llvm-svn: 151780
* Thread hardening part 3. Now lldb_private::Thread objects have std::weak_ptrGreg Clayton2012-02-211-8/+8
| | | | | | | | | | | | | | | | | objects for the backlink to the lldb_private::Process. The issues we were running into before was someone was holding onto a shared pointer to a lldb_private::Thread for too long, and the lldb_private::Process parent object would get destroyed and the lldb_private::Thread had a "Process &m_process" member which would just treat whatever memory that used to be a Process as a valid Process. This was mostly happening for lldb_private::StackFrame objects that had a member like "Thread &m_thread". So this completes the internal strong/weak changes. Documented the ExecutionContext and ExecutionContextRef classes so that our LLDB developers can understand when and where to use ExecutionContext and ExecutionContextRef objects. llvm-svn: 151009
* Make the ThreadPlanStepThrough set a backstop breakpoint on the return ↵Jim Ingham2011-12-031-24/+0
| | | | | | | | | | | | | | address from the function it is being asked to step through, so that even if we get the trampoline target wrong (for instance) we will still not lose control. The other fix here is to tighten up the handling of the case where the current plan doesn't explain the stop, but a plan above us does. In that case, if the plan that does explain the stop says it is done, we need to clean up the plans below it and continue on with our processing. llvm-svn: 145740
* Make the step range plans capable of supporting multiple ranges. Also make ↵Jim Ingham2011-10-151-6/+45
| | | | | | their constructors public, there isn't any good reason why you shouldn't be able to make these plans. llvm-svn: 142026
* If stepping takes us from the line range we were stepping through into the ↵Jim Ingham2011-09-231-9/+33
| | | | | | MIDDLE of another line, then continue till we get to the real beginning of a line. This is mostly to work around debug information bugs. llvm-svn: 140416
* Formatting.Jim Ingham2011-02-081-1/+6
| | | | llvm-svn: 125076
* Fixed incorrect logging printf (patch from Stephen Wilson).Greg Clayton2011-01-181-1/+1
| | | | llvm-svn: 123780
* Add ThreadPlanTracer class to allow instruction step tracing of execution.Jim Ingham2010-11-111-1/+1
| | | | | | Also changed eSetVarTypeBool to eSetVarTypeBoolean to make it consistent with eArgTypeBoolean. llvm-svn: 118824
* Modified all logging calls to hand out shared pointers to make sure weGreg Clayton2010-11-061-5/+5
| | | | | | | | | | | don't crash if we disable logging when some code already has a copy of the logger. Prior to this fix, logs were handed out as pointers and if they were held onto while a log got disabled, then it could cause a crash. Now all logs are handed out as shared pointers so this problem shouldn't happen anymore. We are also using our new shared pointers that put the shared pointer count and the object into the same allocation for a tad better performance. llvm-svn: 118319
* Don't cache the public stop reason, since it can change as plan completion ↵Jim Ingham2010-10-201-3/+3
| | | | | | gets processed. That means GetStopReason needs to return a shared pointer, not a pointer to the thread's cached version. Also allow the thread plans to get and set the thread private stop reason - that is usually more appropriate for the logic the thread plans need to do. llvm-svn: 116892
* Step past prologues when we step into functions.Jim Ingham2010-09-161-0/+4
| | | | llvm-svn: 114055
* Moved the section load list up into the target so we can use the targetGreg Clayton2010-09-141-6/+4
| | | | | | to symbolicate things without the need for a valid process subclass. llvm-svn: 113895
* Fixed the StackFrame to correctly resolve the StackID's SymbolContextScope.Greg Clayton2010-09-031-4/+6
| | | | | | | | | Added extra logging for stepping. Fixed an issue where cached stack frame data could be lost between runs when the thread plans read a stack frame. llvm-svn: 112973
* Abtracted the old "lldb_private::Thread::StopInfo" into an abtract class.Greg Clayton2010-08-041-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow debugger plug-ins to make any instance of "lldb_private::StopInfo" that can completely describe any stop reason. It also provides a framework for doing intelligent things with the stop info at important times in the lifetime of the inferior. Examples include the signal stop info in StopInfoUnixSignal. It will check with the process to see that the current action is for the signal. These actions include wether to stop for the signal, wether the notify that the signal was hit, and wether to pass the signal along to the inferior process. The StopInfoUnixSignal class overrides the "ShouldStop()" method of StopInfo and this allows the stop info to determine if it should stop at the signal or continue the process. StopInfo subclasses must override the following functions: virtual lldb::StopReason GetStopReason () const = 0; virtual const char * GetDescription () = 0; StopInfo subclasses can override the following functions: // If the subclass returns "false", the inferior will resume. The default // version of this function returns "true" which means the default stop // info will stop the process. The breakpoint subclass will check if // the breakpoint wants us to stop by calling any installed callback on // the breakpoint, and also checking if the breakpoint is for the current // thread. Signals will check if they should stop based off of the // UnixSignal settings in the process. virtual bool ShouldStop (Event *event_ptr); // Sublasses can state if they want to notify the debugger when "ShouldStop" // returns false. This would be handy for breakpoints where you want to // log information and continue and is also used by the signal stop info // to notify that a signal was received (after it checks with the process // signal settings). virtual bool ShouldNotify (Event *event_ptr) { return false; } // Allow subclasses to do something intelligent right before we resume. // The signal class will figure out if the signal should be propagated // to the inferior process and pass that along to the debugger plug-ins. virtual void WillResume (lldb::StateType resume_state) { // By default, don't do anything } The support the Mach exceptions was moved into the lldb/source/Plugins/Process/Utility folder and now doesn't polute the lldb_private::Thread class with platform specific code. llvm-svn: 110184
* Properly set the PlanKind for the ThreadPlanStepRange derived classes.Jim Ingham2010-07-101-1/+1
| | | | llvm-svn: 108035
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-091-2/+2
| | | | | | | enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
* Two changes in this checkin. Added a ThreadPlanKind so that I can do some ↵Jim Ingham2010-06-191-2/+2
| | | | | | | | | | | reasoning based on the kind of thread plan without having to use RTTI. Removed the ThreadPlanContinue and replaced with a ShouldAutoContinue query that serves the same purpose. Having to push another plan to assert that if there's no other indication the target should continue when this plan is popped was flakey and error prone. This method is more stable, and fixed problems we were having with thread specific breakpoints. llvm-svn: 106378
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+263
llvm-svn: 105619
OpenPOWER on IntegriCloud