aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/ThreadPlanBase.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone1-175/+150
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
2014-02-27Improve logging a bit by printing the exception or signal type description.Greg Clayton1-2/+2
llvm-svn: 202423
2013-06-04If ThreadPlanCallFunction hasn't set its notion of the "real stop info" yet, ↵Jim Ingham1-2/+2
just return the current PrivateStopInfo. Also renamed a few more places where we were using StopReason in functions that were returning StopInfo's. <rdar://problem/14042692> llvm-svn: 183177
2013-05-08Figure out the reply to "PlanExplainsStop" once when we stop and then use ↵Jim Ingham1-2/+18
the cached value. This fixes problems, for instance, with the StepRange plans, where they know that they explained the stop because they were at their "run to here" breakpoint, then deleted that breakpoint, so when they got asked again, doh! I had done this for a couple of plans in an ad hoc fashion, this just formalizes it. Also add a "ResumeRequested" in Process so that the code in the completion handlers can tell the ShouldStop logic they want to resume rather than just directly resuming. That allows us to handle resuming in a more controlled fashion. Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when the target was immediately restarted. --This line, and those below , will be ignored-- M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py M include/lldb/Target/ThreadList.h M include/lldb/Target/ThreadPlanStepOut.h M include/lldb/Target/Thread.h M include/lldb/Target/ThreadPlanBase.h M include/lldb/Target/ThreadPlanStepThrough.h M include/lldb/Target/ThreadPlanStepInstruction.h M include/lldb/Target/ThreadPlanStepInRange.h M include/lldb/Target/ThreadPlanStepOverBreakpoint.h M include/lldb/Target/ThreadPlanStepUntil.h M include/lldb/Target/StopInfo.h M include/lldb/Target/Process.h M include/lldb/Target/ThreadPlanRunToAddress.h M include/lldb/Target/ThreadPlan.h M include/lldb/Target/ThreadPlanCallFunction.h M include/lldb/Target/ThreadPlanStepOverRange.h M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp M source/Target/StopInfo.cpp M source/Target/Process.cpp M source/Target/ThreadPlanRunToAddress.cpp M source/Target/ThreadPlan.cpp M source/Target/ThreadPlanCallFunction.cpp M source/Target/ThreadPlanStepOverRange.cpp M source/Target/ThreadList.cpp M source/Target/ThreadPlanStepOut.cpp M source/Target/Thread.cpp M source/Target/ThreadPlanBase.cpp M source/Target/ThreadPlanStepThrough.cpp M source/Target/ThreadPlanStepInstruction.cpp M source/Target/ThreadPlanStepInRange.cpp M source/Target/ThreadPlanStepOverBreakpoint.cpp M source/Target/ThreadPlanStepUntil.cpp M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme llvm-svn: 181381
2013-05-01Revert 180829 as it causes hangs in TestTypeCompletion.py on 2 Linux buildbots:Daniel Malea1-16/+0
http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/3810 http://lab.llvm.org:8011/builders/lldb-x86_64-debian-clang/builds/2754 llvm-svn: 180870
2013-04-30Make "process handle -n true -s false" actually notifies of the signal.Jim Ingham1-0/+16
rdar://problem/12020085 llvm-svn: 180829
2013-03-27<rdar://problem/13521159>Greg Clayton1-1/+1
LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down. All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down. llvm-svn: 178191
2013-02-22The thread plans run before the event is broadcast, so they should be ↵Jim Ingham1-1/+1
calling ShouldStopSynchronous on any Stop Info's they want to check. The full ShouldStop should only be called on the public side of the event system. llvm-svn: 175922
2013-02-09Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction ↵Jim Ingham1-1/+1
interoperate to fix problems where hitting auto-continue signals while running a thread plan would cause us to lose control of the debug session. <rdar://problem/12993641> llvm-svn: 174793
2012-12-20Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.Andrew Kaylor1-1/+2
llvm-svn: 170800
2012-12-05<rdar://problem/12649160>Greg Clayton1-0/+8
Added the ability to debug through your process exec'ing itself to the same architecture. llvm-svn: 169340
2012-11-29Resolve printf formatting warnings on Linux:Daniel Malea1-3/+3
- use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
2012-04-09Rework how master plans declare themselves. Also make "PlanIsBasePlan" not ↵Jim Ingham1-0/+1
rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such. llvm-svn: 154351
2011-10-19Moved lldb::user_id_t values to be 64 bit. This was going to be needed forGreg Clayton1-3/+3
process IDs, and thread IDs, but was mainly needed for for the UserID's for Types so that DWARF with debug map can work flawlessly. With DWARF in .o files the type ID was the DIE offset in the DWARF for the .o file which is not unique across all .o files, so now the SymbolFileDWARFDebugMap class will make the .o file index part (the high 32 bits) of the unique type identifier so it can uniquely identify the types. llvm-svn: 142534
2011-09-21StopInfoWatchpoint should override the StopInfo::ShouldStop() virtual method ↵Johnny Chen1-0/+1
and delegate to the WatchpointLocation object to check whether it should stop and allow it to update the hit count, among other bookkeepings. llvm-svn: 140279
2011-02-08Rework the RunThreadPlan event handling to use Event Hijacking not stopping ↵Jim Ingham1-0/+9
the event thread. Also clarify the logic of the function. llvm-svn: 125083
2011-01-24More useful STEP logging.Jim Ingham1-2/+14
Be sure to clear out the base plan's m_report_run and m_report_stop each time we resume so we don't use stale values. llvm-svn: 124113
2010-11-18The thread plan destructors may call Thread virtual methods. That means ↵Jim Ingham1-0/+7
they have to get cleaned up in the derived class's destructor. Make sure that happens. llvm-svn: 119675
2010-11-11Add ThreadPlanTracer class to allow instruction step tracing of execution.Jim Ingham1-3/+11
Also changed eSetVarTypeBool to eSetVarTypeBoolean to make it consistent with eArgTypeBoolean. llvm-svn: 118824
2010-10-20Don't cache the public stop reason, since it can change as plan completion ↵Jim Ingham1-7/+7
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
2010-08-04Abtracted the old "lldb_private::Thread::StopInfo" into an abtract class.Greg Clayton1-89/+60
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
2010-06-19Two changes in this checkin. Added a ThreadPlanKind so that I can do some ↵Jim Ingham1-7/+8
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
2010-06-08Initial checkin of lldb code from internal Apple repo.Chris Lattner1-0/+202
llvm-svn: 105619