summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* Bug 24332 - Fix the build of lldb under GNU/Linux when using autotoolsSylvestre Ledru2015-08-053-1/+30
| | | | | | | | | | Reviewers: loladiro, jingham, emaste, zturner, brucem Subscribers: tberghammer, danalbert, srhines, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D11717 llvm-svn: 244039
* Fix cmake build on non-Windows platforms.Bruce Mitchener2015-08-041-1/+1
| | | | | | | r243914 introduced a change which mistakenly tried to build the Windows minidump code on all platforms rather than only on Windows. llvm-svn: 243941
* Create a Windows mini-dump target Differential Revision: ↵Adrian McCarthy2015-08-038-0/+794
| | | | | | http://reviews.llvm.org/D11611 llvm-svn: 243914
* GDBRemoteCommunication::DecompressPacket assumed that the buffer it wasJason Molenda2015-08-021-11/+20
| | | | | | | | | | working with (the Communication m_bytes ivar) contained a single packet. Instead, it may contain multitudes. Find the boundaries of the first packet in the buffer and replace that with the decompressed version leaving the rest of the buffer unmodified. <rdar://problem/21841377> llvm-svn: 243846
* Report original thread ID for FreeBSD core filesEd Maste2015-07-313-7/+8
| | | | | | | | | | | | | On FreeBSD the tid is (somewhat unintuitively) found in the pr_pid field of the NT_PRSTATUS note. Collect it when parsing the note and store it in the thread data. For Linux I've left the original behaviour of using sequential TIDs (0, 1, 2...) as I don't yet have code to obtain it. Differential Revision: http://reviews.llvm.org/D11652 llvm-svn: 243748
* Move the computation of whether a DWARF compile unitJason Molenda2015-07-313-6/+32
| | | | | | | | is optimized into DWARFCompileUnit, where it should have been. Next I'll need to call this from another section of code for DWARF-in-.o-file behavior correctness. llvm-svn: 243736
* Convert the ScriptInterpreter system to a plugin-based one.Zachary Turner2015-07-3012-3/+4842
| | | | | | | | | | | | | | | | | | | | | | | Previously embedded interpreters were handled as ad-hoc source files compiled into source/Interpreter. This made it hard to disable a specific interpreter, or to add support for other interpreters and allow the developer to choose which interpreter(s) were enabled for a particular build. This patch converts script interpreters over to a plugin-based system. Script interpreters now live in source/Plugins/ScriptInterpreter, and the canonical LLDB interpreter, ScriptInterpreterPython, is moved there as well. Any new code interfacing with the Python C API must live in this location from here on out. Additionally, generic code should never need to reference or make assumptions about the presence of a specific interpreter going forward. Differential Revision: http://reviews.llvm.org/D11431 Reviewed By: Greg Clayton llvm-svn: 243681
* Use only unnamed pipes to launch lldb-server gdbserver.Chaoren Lin2015-07-301-19/+21
| | | | | | | | | | | | | | | | | Summary: If we used unnamed pipes instead of named pipes, we can avoid having the file system littered with debugserver-named-pipes if lldb-server happens to crash for whatever reason. Also, on some buggy systems, it's possible to be able to create but not to delete a fifo. Ideally, support for unnamed pipes should be added to debugserver as well, so we can avoid the `#ifdef` here. Reviewers: clayborg, vharron, chying Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11609 llvm-svn: 243667
* Fix issues with separate symbolfile handlingTamas Berghammer2015-07-302-12/+30
| | | | | | Differential revision: http://reviews.llvm.org/D11595 llvm-svn: 243637
* [LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit addressMohit K. Bhakkad2015-07-301-10/+13
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits. Differential Revision: http://reviews.llvm.org/D11176 llvm-svn: 243620
* [LLDB][MIPS] Create Unix Signals based on target architectureJaydeep Patil2015-07-301-1/+7
| | | | | | | | | | | SUMMARY: The patch creates Unix Signals based on target architecture. For MIPS it creates MipsLinuxSignals. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, lldb-commits Differential Revision: http://reviews.llvm.org/D11455 llvm-svn: 243618
* Make DWARF at_comp_dir symbolic links configurable via ↵Oleksiy Vyalov2015-07-292-9/+78
| | | | | | | | plugin.symbol-file.dwarf.comp-dir-symlink-paths setting. http://reviews.llvm.org/D11586 llvm-svn: 243580
* Fix read/write context in EmulateInstructionARM strd/ldrdTamas Berghammer2015-07-291-4/+17
| | | | llvm-svn: 243521
* Remove non-utf-8 characters from EmulateInstructionARMTamas Berghammer2015-07-291-142/+142
| | | | llvm-svn: 243520
* [LLGS] Spawned process handling cleanupPavel Labath2015-07-296-202/+127
| | | | | | | | | | | | | | | | | | | Summary: This commit moves the m_spawned_pids member from the common LLGS/Platform class to the plaform specific part. This enables us to remove LLGS code, which was attempting to manage the m_spawned_pids contents, but at the same time making sure, there is only one debugged process. If we ever want to do multi-process debugging, we will probably want to replace this with a set of NativeProcessProtocolSP anyway. The only functional change is that support for qKillSpawnedProcess packet is removed from LLGS, but this was not used there anyway (we have the k packet for that). Reviewers: ovyalov, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11557 llvm-svn: 243513
* When debugserver fails to attach to a process on a DarwinJason Molenda2015-07-291-2/+22
| | | | | | | | | | | | | | | | | | | system, make a couple of additional checks to see if the attach was denied via the System Integrity Protection that is new in Mac OS X 10.11. If so, return a special E87 error code to indicate this to lldb. Up in lldb, if we receive the E87 error code, be specific about why the attach failed. Also detect the more common case of general attach failure and print a better error message than "lost connection". I believe this code will all build on Mac OS X 10.10 systems. It may not compile or run on earlier versions of the OS. None of this should build on other non-darwin systems. llvm-svn: 243511
* First part of an attempt to indicate to the user when they are Jason Molenda2015-07-293-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debugging optimized code. Adds new methods on Function/SBFunction to query whether a given function is optimized. Adds a new function.is-optimized format entity and changes the default frame-format to append "[opt]" if the function was built with optimization. The only indication that a binary was built with optimization that we have right now is the presence of the DW_AT_APPLE_optimized attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit. The absence of this flag may mean that the compile_unit was not compiled with optimization, or it may mean that the producer does not generate this attribute. Currently this only works for dSYM debugging. When we create the CompileUnit with dwarf-in-.o-file debugging we don't have the attribute value yet so it's not set. I need to find the flag value when we do start to read the .o file DWARF and set the CompileUnit's status at that point - but haven't done it yet. I'm also going to add a mechanism for issuing warnings to users such that they're only issued once in a debug session and there is away for users to suppress these warnings altogether via .lldbinit file settings. But I want to get this changeset committed now that it's at a useful state. <rdar://problem/19281172> llvm-svn: 243508
* FreeBSDThread::GetRegisterContext is only for FreeBSD targetsEd Maste2015-07-281-29/+20
| | | | | | | | The removal of in-process Linux debug support left a switch statement with llvm::Triple::FreeBSD as the only case. Simplify by replacing it with a now-equivalent assertion. llvm-svn: 243468
* Remove eNewThreadMessage from FreeBSD process monitorEd Maste2015-07-283-25/+1
| | | | | | | FreeBSD thread information is updated after stop - we do not use a message for thread creation. llvm-svn: 243448
* Remove two additional files missed in r243427Ed Maste2015-07-282-0/+0
| | | | llvm-svn: 243428
* Remove POSIX thread/process abstractionEd Maste2015-07-2818-1992/+1724
| | | | | | | | | As of r240543 ProcessPOSIX and POSIXThread are used only on FreeBSD, so just roll them into ProcessFreeBSD and FreeBSDThread. Differential Revision: http://reviews.llvm.org/D10698 llvm-svn: 243427
* Fix warnings detected by -Wpessimizing-movePavel Labath2015-07-281-6/+6
| | | | | | | | patch by Eugene Zelenko Differential Revision: http://reviews.llvm.org/D11429 llvm-svn: 243399
* [LLGS] Avoid bogus error message on process terminationPavel Labath2015-07-281-15/+10
| | | | | | | | | | | | | | | | | | Summary: Handle_k was printing an error when killing a process because KillSpawnedProcess was expecting to be asynchronously notified of the process death, which no longer works, since we don't wait for the process on a separate thread. However, the whole usage of KillSpawnedProcess is dubious here, since it tries to be nice and terminate the process first with SIGTERM, which will not have the intended effect on a ptraced process. I replace this code with a call to NativeProcessProtocol::Kill, which does not suffer from these problems. Reviewers: chaoren, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11520 llvm-svn: 243397
* Make sure we detect symbols in the new __DATA_DIRTY and __DATA_CONST ↵Greg Clayton2015-07-272-2/+26
| | | | | | | | segments and classify them correctly. <rdar://problem/20942073> llvm-svn: 243344
* If a path contains a '/' before a ':', then the ':' is not a hostname ↵Enrico Granata2015-07-271-3/+9
| | | | | | separator, but just a part of the path (e.g. /tmp/fi:lename vs. pro:/tmp/fi:lename) llvm-svn: 243330
* Add some initial logging for when lldb is searching for binaries,Jason Molenda2015-07-252-0/+70
| | | | | | | | | dSYMs, or reading binaries out of memory to the 'Host' log channel. There's more to be done here, both for Mac and for other platforms, but the initial set of new loggings are useful enough to check in at this point. llvm-svn: 243200
* Make sure we resolve ~ in paths coming from the plist in a dSYM before ↵Jim Ingham2015-07-241-0/+5
| | | | | | | | | | | | adding them to the path remappings. Also don't add the paths to the path mapping when DebugSymbols tells up about files, since we'll just do that again when we read in the dSYM. <rdar://problem/21986208> llvm-svn: 243181
* Initialize variable to prevent garbage values (RenderScriptRuntime)Ewan Crawford2015-07-241-1/+1
| | | | | | | | | | | The kernels_found variable is not initialized, so if it is not assigned true on line 823, then it will be a garbage value in the branch condition on line 828. This patch initializes the variable to false. Patch by neilparikh. Reviewers: domipheus Differential Revision: http://reviews.llvm.org/D11323 llvm-svn: 243104
* Handle old style S packet correctlyBhushan D. Attarde2015-07-241-14/+13
| | | | | | | | | | | | | SUMMARY: This patch fixes couple of issues: 1. A thread tries to lock a mutex which is already locked. 2. Updating a thread list before the stop packet is parsed so that it can get a valid thread id and allows to set the stop info correctly. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits Differential Revision: http://reviews.llvm.org/D11449 llvm-svn: 243091
* Add UNUSED_IF_ASSERT_DISABLED and apply it.Bruce Mitchener2015-07-243-3/+3
| | | | | | | | | | | | | | | Summary: This replaces (void)x; usages where they x was subsequently involved in an assertion with this macro to make the intent more clear. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11451 llvm-svn: 243074
* Speed up NativeProcessLinux::GetLoadedModuleFileSpecPavel Labath2015-07-231-28/+20
| | | | | | | | | | | | | | | Summary: GetLoadedModuleFileSpec was reading /proc/pid/maps character by character, which was very slow, since we do that for every shared library, which android tends to have a lot. Switching to ProcFileReader saves us about 0.4 seconds in attach time. Reviewers: tberghammer Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: http://reviews.llvm.org/D11460 llvm-svn: 243019
* [NativeProcessLinux] Fix a couple of warningsPavel Labath2015-07-231-3/+3
| | | | llvm-svn: 243013
* Add jstopinfo support to llgsPavel Labath2015-07-234-71/+119
| | | | | | | | | | | | | | Summary: This adds support for jstopinfo field of stop-reply packets. This field enables us to avoid querying full thread stop data on most stops (see r242593 for more details). Reviewers: ovyalov, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11415 llvm-svn: 242997
* Fix TestReturnValue.py after 242903 changes that added vector register ↵Greg Clayton2015-07-222-14/+83
| | | | | | | | return value tests. These were failing on x86_64 and i386. It also pointed out an error in our return values where the ABI only relies on xmm registers, not ymm registers for vector return types. llvm-svn: 242972
* Don't specify languages when setting breakpoints in C function names. We ↵Greg Clayton2015-07-223-3/+3
| | | | | | won't be able to tell from the symbol value alone what language the symbol is. llvm-svn: 242969
* Fix warnings related to virtual functions not being marked as override.Greg Clayton2015-07-221-20/+19
| | | | llvm-svn: 242918
* Fix warnings.Bruce Mitchener2015-07-221-0/+1
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11404 llvm-svn: 242913
* Improve SysV ABI for ARM to handle return values with vector return typeTamas Berghammer2015-07-221-10/+39
| | | | | | | | | | | This is required to print out the rerun value of funcions returning types with the following attributes: __attribute__((__vector_size__(8))); __attribute__((ext_vector_type(2))); Differential revision: http://reviews.llvm.org/D11416 llvm-svn: 242903
* [asan] Display ASan history threads in reverse chronological orderKuba Brecka2015-07-221-1/+1
| | | | | | | | For use-after-free bugs caught by ASan, we show an allocation and a deallocation stack trace. Let's display them in a "most recent event first" order, this patch does that. Differential Revision: http://reviews.llvm.org/D11295 llvm-svn: 242902
* Fix warnings found by -Wextra-semiPavel Labath2015-07-224-7/+5
| | | | | | patch by Eugene Zelenko. llvm-svn: 242875
* Fix typos.Bruce Mitchener2015-07-226-16/+16
| | | | | | | | | | | | Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
* Improve the performance of DWARFDebugInfo::GetCompileUnitContainingDIE() by ↵Greg Clayton2015-07-211-22/+41
| | | | | | | | using a binary search. Also switched DWARFDebugInfo::GetCompileUnit() over to using the same kind of binary search instead of using bsearch(). llvm-svn: 242852
* Add support for specifying a language to use when parsing breakpoints.Dawn Perchik2015-07-215-0/+5
| | | | | | | | | | | | | | | | | | | | Target and breakpoints options were added: breakpoint set --language lang --name func settings set target.language pascal These specify the Language to use when interpreting the breakpoint's expression (note: currently only implemented for breakpoints on identifiers). If the breakpoint language is not set, the target.language setting is used. This support is required by Pascal, for example, to set breakpoint at 'ns.foo' for function 'foo' in namespace 'ns'. Tests on the language were also added to Module::PrepareForFunctionNameLookup for efficiency. Reviewed by: clayborg Subscribers: jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D11119 llvm-svn: 242844
* [NativeProcessLinux] Integrate MainLoopPavel Labath2015-07-217-804/+261
| | | | | | | | | | | | | | | | | | | Summary: This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with the llgs main loop, we can get rid of the special monitor thread in NPL, which saves as a lot of thread ping-pong when responding to client requests (e.g. qThreadInfo processing time has been reduced by about 40%). It also makes the code simpler, IMHO. Reviewers: ovyalov, clayborg, tberghammer, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11150 This is a resubmission of r242305 after it was reverted due to bad interactions with the stdio thread. llvm-svn: 242783
* [LLGS] Get rid of the stdio forwarding threadPavel Labath2015-07-212-66/+70
| | | | | | | | | | | | | | | | Summary: This commit removes the stdio forwarding thread in lldb-server in favor of a MainLoop callback. As in some situations we need to forcibly flush the stream ( => Read() is called from multiple places) and we still have multiple threads, I have had to additionally protect the communication instance with a mutex. Reviewers: ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11296 llvm-svn: 242782
* Resolve DW_AT_comp_dir path if it contains a symlinkOleksiy Vyalov2015-07-211-8/+40
| | | | | | http://reviews.llvm.org/D11357 llvm-svn: 242757
* [NativeProcessLinux] Bugfix in the monitor threadPavel Labath2015-07-201-0/+3
| | | | | | | | Make sure we dont treat EINTR as a fatal error. I was getting this when trying to profile the debugger. I'm not sure why this wasn't surfacing before, it could be that the profiler is using some signals internally. llvm-svn: 242681
* Improve aarch64 instruction emulationTamas Berghammer2015-07-202-86/+216
| | | | | | | * Add emulation for STR/LDR immediate instructions * Cleanup existing emulation code llvm-svn: 242671
* More packet performance improvements. Greg Clayton2015-07-172-148/+212
| | | | | | | | Changed the "jthreads" key/value in the stop reply packets to be "jstopinfo". This JSON only contains threads with valid stop reasons and allows us not to have to ask about other threads via qThreadStopInfo when we are stepping. The "jstopinfo" only gets sent if there are more than one thread since the stop reply packet contains all the info needed for a single thread. Added a Process::WillPublicStop() in case process subclasses want to do any extra gathering for public stops. For ProcessGDBRemote, we end up sending a jThreadsInfo packet to gather all expedited registers, expedited memory and MacOSX queue information. We only do this for public stops to minimize the packets we send when we have multiple private stops. Multiple private stops happen when a source level single step, step into or step out run the process multiple times while implementing the stepping, and none of these private stops make it out to the UI via notifications because they are private stops. llvm-svn: 242593
* Improve conditional opcode handling in emulation based unwindingTamas Berghammer2015-07-175-68/+46
| | | | | | | | | | Don't chane the CFI information when a conditional instruction is emulated (eg.: popeq {r0, pc}) because the CFI for the next instruction should be the same as the CFI for the current instruction. Differential revision: http://reviews.llvm.org/D11258 llvm-svn: 242519
OpenPOWER on IntegriCloud