summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix null dereference if address is NULL.Jean-Daniel Dupas2014-02-081-3/+1
| | | | llvm-svn: 201026
* Change the Mac OS X SystemRuntime plugin from using the placeholderJason Molenda2014-02-054-40/+86
| | | | | | | | | | | | | | libldi library to collect extended backtrace information; switch to the libBacktraceRecording library and its APIs. Complete the work of adding QueueItems to Queues and allow for the QueueItems to be interrogated about their extended backtraces in turn. There's still cleanup and documentation to do on this code but the code is functional and I it's a good time to get the work-in-progress checked in. <rdar://problem/15314027> llvm-svn: 200822
* Fix UnwindAssembly memory leak by defining and using a shared ↵Jean-Daniel Dupas2014-02-031-3/+3
| | | | | | UnwindAssemblySP type. llvm-svn: 200725
* Fixing the Windows build for the changes brought in from the iohandler merge.Deepak Panickal2014-01-311-0/+8
| | | | llvm-svn: 200565
* Merging the iohandler branch back into main. Greg Clayton2014-01-276-132/+378
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Don't need to figure out the frame's module if we don't have any librariesJim Ingham2014-01-231-10/+14
| | | | | | in the step-avoid-libraries list. llvm-svn: 199944
* Add a "step-avoid-libraries" setting to complement the "step-avoid-regexp" ↵Jim Ingham2014-01-232-4/+39
| | | | | | setting. llvm-svn: 199943
* Rename Platform::GetFile (3-arg version) to GetFileWithUUIDSteve Pucci2014-01-172-4/+4
| | | | | | | | | | | This rename was suggested by gclayton as a way to silence gcc warnings; the warning is emitted when there is an overloaded function in a base class (Platform) for which a derived class redefines one of the overloads but not the other (because doing so hides the other overload from users of the derived class). By giving the two methods different names, the situation is avoided. llvm-svn: 199504
* Correct logic checking for the first stop IDEd Maste2014-01-171-1/+1
| | | | llvm-svn: 199503
* Fix a bug where if we stop but nobody says there was a reason for the stop, ↵Jim Ingham2014-01-151-5/+19
| | | | | | | | | | | | | we would return control to the user anyway. This was put in to handle monitors that would say there was no stop reason when you first attached to them. But it broke the case where you hit a thread specific breakpoint on many threads, but NOT the one specified in the breakpoint. I work around this by only doing the junky override when the StopID is 0 - i.e. on first attach. This commit also adds a test for thread specific breakpoints. llvm-svn: 199290
* Add a little more logging to the StopInfoBreakpoint::PerformAction.Jim Ingham2014-01-151-1/+14
| | | | llvm-svn: 199289
* Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression ↵Jim Ingham2014-01-103-59/+154
| | | | | | | | | | | | | | | | | | | | | | | | evaluator to handle Indirect symbols correctly. There were a couple of pieces to this. 1) When a breakpoint location finds itself pointing to an Indirect symbol, when the site for it is created it needs to resolve the symbol and actually set the site at its target. 2) Not all breakpoints want to do this (i.e. a straight address breakpoint should always set itself on the specified address, so somem machinery was needed to specify that. 3) I added some info to the break list output for indirect symbols so you could see what was happening. Also I made it clear when we re-route through re-exported symbols. 4) I moved ResolveIndirectFunction from ProcessPosix to Process since it works the exact same way on Mac OS X and the other posix systems. If we find a platform that doesn't do it this way, they can override the call in Process. 5) Fixed one bug in RunThreadPlan, if you were trying to run a thread plan after a "running" event had been broadcast, the event coalescing would cause you to miss the ThreadPlan running event. So I added a way to override the coalescing. 6) Made DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan handle Indirect & Re-exported symbols. <rdar://problem/15280639> llvm-svn: 198976
* Remove wait_for_launch parameter from DoAttachToProcessWithName(). This ↵Jean-Daniel Dupas2013-12-231-1/+1
| | | | | | | | | | parameter is redundant as this information is already provided by the ProcessAttachInfo parameter. CC: lldb-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2463 llvm-svn: 197923
* Fix std::string initialization in Queue ctor.Jason Molenda2013-12-191-1/+4
| | | | | | <rdar://problem/15694319> llvm-svn: 197631
* <rdar://problem/15668743>Greg Clayton2013-12-181-0/+10
| | | | | | Fixed a crasher that would only occur if Xcode attaches to a remote process first, then launches. llvm-svn: 197546
* Fix how Queue/QueueItem weak pointers are initialized in the ctors.Jason Molenda2013-12-182-2/+4
| | | | llvm-svn: 197541
* Centralized the launching of a process into Target::Launch()Greg Clayton2013-12-131-0/+109
| | | | | | | | | | | | | While investigating test suite failures when running the test suite remotely, I noticed we had 3 copies of code that launched a process: 1 - in "process launch" command 2 - SBTarget::Launch() with args 3 - SBTarget::Launch() with SBLaunchInfo "process launch" was launching through the platform if it was supported (this is needed for remote debugging) and the 2 and 3 were not. Now all code is in one place. llvm-svn: 197247
* Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to representJason Molenda2013-12-135-0/+291
| | | | | | | | | libdispatch aka Grand Central Dispatch (GCD) queues. Still fleshing out the documentation and testing of these but the overall API is settling down so it's a good time to check it in. <rdar://problem/15600370> llvm-svn: 197190
* Revert change I didn't mean to check in.Greg Clayton2013-12-101-1/+1
| | | | llvm-svn: 196956
* Fix autocompletion for multi-word commands.Greg Clayton2013-12-101-1/+1
| | | | | | <rdar://problem/14183288> llvm-svn: 196949
* If the StepThrough plan makes it back to the frame in which it started, it ↵Jim Ingham2013-12-071-1/+1
| | | | | | | | | | | should say it succeeded, since the plan that was using it can figure out what to do from there. It should only say it failed if it truely went off into the weeds. <rdar://problem/15597807> llvm-svn: 196631
* Add a setting to allow users to enable expressions that crash LLDB to show ↵Greg Clayton2013-12-061-1/+10
| | | | | | | | up in crash logs. <rdar://problem/11549320> llvm-svn: 196613
* Tell CMake about recently added SectionLoadHistory.cppArnaud A. de Grandmaison2013-12-061-0/+1
| | | | llvm-svn: 196566
* For logical backtrace work, lldb needs to track Module unloads etc & ↵Greg Clayton2013-12-064-10/+270
| | | | | | | | | | symoblicate an address based on a point in time <rdar://problem/15314403> This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future. llvm-svn: 196557
* Fixed internal code to not link against and code from "lldb/API/*". Greg Clayton2013-12-021-0/+14
| | | | | | | | | | lldb_private::Debugger was #including some "lldb/API" header files which causes tools (lldb-platform and lldb-gdbserver) that link against the internals only (no API layer) to fail to link depending on which calls were being used. Also fixed the current working directory so that it gets set correctly for remote test suite runs. Now the remote working directory is set to: "ARCH/TESTNUM/..." where ARCH is the current architecture name and "TESTNUM" is the current test number. Fixed the "lldb-platform" and "lldb-gdbserver" to not warn about mismatched visibility settings by having each have their own exports file which contains nothing. This forces all symbols to not be exported, and also quiets the linker warnings. llvm-svn: 196141
* Fix MSVC buildColin Riley2013-11-261-0/+5
| | | | | | Added _WIN32 guards to new platform features. Using correct SetErrorStringWithFormat within Host when LLDB_DISABLE_POSIX is defined. Also fixed an if defined block. llvm-svn: 195766
* Fix issue from r166732 found by Andrew KaylorEd Maste2013-11-251-2/+2
| | | | | | | | | | | | | | From Jim Ingham's email: It does look like ThreadPlanStepInRange test is some kind of thinko. In practice, in this case it is probably safe to run only one thread when doing the "step through" since that generally involved running from a shared library stub to its target. That could deadlock if the dynamic loader has to fix up the symbol, and another thread is in the middle of doing that. But that doesn't seem to be very common, or at least the code is clearly wrong but I haven't had any reports of this causing deadlocks... llvm-svn: 195657
* Patch from Todd Fiala: lldb will seg fault if for some reason there is no ↵Greg Clayton2013-11-221-8/+11
| | | | | | | | unwinder when StackFrameList::GetFramesUpTo() is called. Mainly patched to stop LLDB from crashing. This can easily happen if you debug to a remote gdbserver that doesn't have any dynamic register info and you don't have a target definition file specified. llvm-svn: 195499
* Expose SBPlatform through the public API.Greg Clayton2013-11-203-32/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example code: remote_platform = lldb.SBPlatform("remote-macosx"); remote_platform.SetWorkingDirectory("/private/tmp") debugger.SetSelectedPlatform(remote_platform) connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); err = remote_platform.ConnectRemote(connect_options) if err.Success(): print >> result, 'Connected to remote platform:' print >> result, 'hostname: %s' % (remote_platform.GetHostname()) src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False) dst = lldb.SBFileSpec() # copy src to platform working directory since "dst" is empty err = remote_platform.Install(src, dst); if err.Success(): print >> result, '%s installed successfully' % (src) else: print >> result, 'error: failed to install "%s": %s' % (src, err) Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories. The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform. The API in SBPlatform is subject to change and will be getting many new functions. llvm-svn: 195273
* Flush the Process' cache of extended threads every time theJason Molenda2013-11-201-2/+7
| | | | | | | natural stop id is updated. <rdar://problem/15496603> llvm-svn: 195177
* Add logging for the SB API which creates extendedJason Molenda2013-11-191-2/+3
| | | | | | | | | | threads. Take a stab at fixing the too-soon freeing of the extended backtrace thread list in Process. <rdar://problem/15496603> llvm-svn: 195104
* Commit a work-in-progress system runtime for Mac OS X which won'tJason Molenda2013-11-151-0/+1
| | | | | | | | do anything right now. Add a few new methods to the Thread base class which HistoryThread needs. I think I updated all the CMakeLists files correctly for the new plugin. llvm-svn: 194756
* <rdar://problem/15172417>Greg Clayton2013-11-132-44/+45
| | | | | | | | | | | | | | | Added two new GDB server packets to debugserver: "QSaveRegisterState" and "QRestoreRegiterState". "QSaveRegisterState" makes the remote GDB server save all register values and it returns a save identifier as an unsigned integer. This packet can be used prior to running expressions to save all registers. All registers can them we later restored with "QRestoreRegiterState:SAVEID" what SAVEID is the integer identifier that was returned from the call to QSaveRegisterState. Cleaned up redundant code in lldb_private::Thread, lldb_private::ThreadPlanCallFunction. Moved the lldb_private::Thread::RegisterCheckpoint into its own header file and it is now in the lldb_private namespace. Trimmed down the RegisterCheckpoint class to omit stuff that wasn't used (the stack ID). Added a few new virtual methods to lldb_private::RegisterContext that allow subclasses to efficiently save/restore register states and changed the RegisterContextGDBRemote to take advantage of these new calls. llvm-svn: 194621
* Change SBThread::GetExtendedBacktrace toJason Molenda2013-11-121-1/+1
| | | | | | | SBThread::GetExtendedBacktraceThread to make it more clear what is being returned. llvm-svn: 194531
* Log failure to restore thread state in ThreadPlanCallFunction::DoTakedownEd Maste2013-11-122-3/+6
| | | | | | In order to help track down llvm.org/pr17226. llvm-svn: 194487
* Add initial --extended / -e support to thread backtrace.Jason Molenda2013-11-121-4/+4
| | | | llvm-svn: 194455
* The Threads created when requesting extended backtraces need to be owned byJason Molenda2013-11-111-0/+4
| | | | | | | | something; add a new ExtendedThreadList to Process where they can be retained for the duration of a public stop. <rdar://problem/15314068> llvm-svn: 194367
* Fixed the the breakpoint test case failures. Greg Clayton2013-11-092-6/+18
| | | | | | There were 6 on darwin. All of these were related to the recent changes for exec. llvm-svn: 194298
* Changed the ABIs and ClangFunction to take aSean Callanan2013-11-082-86/+9
| | | | | | | | | | | | | llvm::ArrayRef of arguments rather than taking a fixed number of possibly-NULL pointers to arguments. Also changed ClangFunction::GetThreadPlanToCallFunction to take the address of the argument struct by value instead of by reference, since it doesn't actually modify the value passed into it. llvm-svn: 194232
* This patch does a couple of things. Jim Ingham2013-11-074-86/+80
| | | | | | | | | | | | | | | | | | | | | | It completes the job of using EvaluateExpressionOptions consistently throughout the inferior function calling mechanism in lldb begun in Greg's patch r194009. It removes a handful of alternate calls into the ClangUserExpression/ClangFunction/ThreadPlanCallFunction which were there for convenience. Using the EvaluateExpressionOptions removes the need for them. Using that it gets the --debug option from Greg's patch to work cleanly. It also adds another EvaluateExpressionOption to not trap exceptions when running expressions. You shouldn't use this option unless you KNOW your expression can't throw beyond itself. This is: <rdar://problem/15374885> At present this is only available through the SB API's or python. It fixes a bug where function calls would unset the ObjC & C++ exception breakpoints without checking whether they were set by somebody else already. llvm-svn: 194182
* Rename extended backtrace methods to take out the "ThreadOrigin"Jason Molenda2013-11-061-2/+2
| | | | | | | bit from the method names. <rdar://problem/15314369> llvm-svn: 194122
* Add a new GetThreadOriginExtendedBacktrace method to the Jason Molenda2013-11-061-0/+6
| | | | | | | SystemRuntime and SBThread classes. <rdar://problem/15314369> llvm-svn: 194111
* <rdar://problem/15367122>Greg Clayton2013-11-052-21/+23
| | | | | | | | Fixed the test case for "test/functionalities/exec/TestExec.py" on Darwin. The issue was breakpoints were persisting and causing problems. When we exec, we need to clear out the process and target and start fresh with nothing and let the breakpoints populate themselves again. This patch correctly clears out the breakpoints and also flushes the process so that the objects (process/thread/frame) give out valid information. llvm-svn: 194106
* Add a GetThreadOriginExtendedBacktraceTypes method to theJason Molenda2013-11-051-4/+4
| | | | | | | SystemRuntime class. <rdar://problem/15314369> llvm-svn: 194045
* Add a new system runtime plugin type - just the top levelJason Molenda2013-11-054-0/+102
| | | | | | | class, not any actual plugin implementation yet. <rdar://problem/15314068> llvm-svn: 194044
* Update ABISysV_x86_64.cpp to use more efficient register finding calls. Greg Clayton2013-11-051-0/+9
| | | | | | | | Instead of looking up registers by name, we use the generic ID when we can. Also added code that creates an extra frame when running expressions by pushing the current PC and FP and then hooking up the FP backchain. This code is "#if 0" out for now until we can pair it with unwinder fixes. llvm-svn: 194035
* Added a "--debug" option to the "expression" command. Greg Clayton2013-11-043-50/+39
| | | | | | | | Cleaned up ClangUserExpression::Evaluate() to have only one variant that takes a "const EvaluateExpressionOptions& options" instead of taking many arguments. The "--debug" option is designed to allow you to debug your expression by stopping at the first instruction (it enables --ignore-breakpoints=true and --unwind-on-error=false) and allowing you to step through your JIT code. It needs to be more integrated with the thread plan, so I am checking this in so Jim Ingham can make it happen. llvm-svn: 194009
* Add new ivars to StackFrame so it can represent a stack collectedJason Molenda2013-11-042-3/+56
| | | | | | | | | | | | | | | | | | at some point in the past. We may have nothing more than a pc value for this type of stack frame -- hopefully we'll have a pc and a stop_id so we can track module loads and unloads over time and symbolicate the pc at the correct point in time. Also add a flag to indicate if the CFA for the frame is available (a bit different from a CFA of LLDB_INVALID_ADDRESS) and also an overall setting to indicate whether this is a history stack frame or not. A history stack frame may not have a CFA, it may not have a register context, it may not have variables, it may not have a frame pointer or a stack pointer. <rdar://problem/15314068> llvm-svn: 193987
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-0414-130/+131
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-0214-131/+130
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
OpenPOWER on IntegriCloud