summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* Change SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes to use theJason Molenda2014-09-121-50/+26
| | | | | | | | ProcessStructReader instead of reading the structure out of libdispatch by hand. I will convert more of the struct readers in SystemRuntimeMacOSX over to use this class eventually. llvm-svn: 217649
* llgs: fix Ctrl-C inferior interrupt handling to do the right thing.Todd Fiala2014-09-115-42/+229
| | | | | | | | | | | | | | | | * Sends a SIGSTOP to the process. * Fixes busted SIGSTOP handling. Now builds a list of non-stopped that we wait for the PTRACE group-stop for. When the final must-stop tid gets its group stop, we propagate the process state change. Only the signal receiving the notification of the pending SIGSTOP is marked with the SIGSTOP signal. All the rest, if they weren't already stopped, are marked as stopped with signal 0. * Fixes a few broken tests. * Marks the Linux test I added earlier as expect-pass (no longer XFAIL). Implements fix for http://llvm.org/bugs/show_bug.cgi?id=20908. llvm-svn: 217647
* DWARF64 FixesTodd Fiala2014-09-1110-65/+145
| | | | | | | | | | | | | | | | 1. DW_FORM_strp and DW_FORM_sec_offset are 64bits for DWARF64 / 32bits for DWARF32 They are different from DW_FORM_addr, whose size is specified in .debug_info 2. Bump DWARF version support form [2,3] to [2,4] in DWARFDebugLine.cpp 3. Fix DWARFDebugLine to support DWARF64 See http://reviews.llvm.org/D5307 for more details. Reviewed by Greg Clayton and Jason Molenda. Change by Tong Shen. llvm-svn: 217607
* llgs: implement qThreadStopInfo.Todd Fiala2014-09-102-2/+27
| | | | | | | | | | | This change implements this ticket: http://llvm.org/bugs/show_bug.cgi?id=20899 Adds the qThreadStopInfo RSP command for llgs and includes a test that verifies both debugserver and llgs respond with something reasonable on a multithreaded app. llvm-svn: 217549
* Fix FreeBSD build after thread changesEd Maste2014-09-101-2/+2
| | | | | | | More work on the GetName/SetName arguments (thread_t vs tid_t) is needed but this change should restore the build and basic operation. llvm-svn: 217502
* Create a HostThread abstraction.Zachary Turner2014-09-0915-130/+104
| | | | | | | | | | | | | This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
* Remove unused class variable and update all callers/users.Eric Christopher2014-09-093-5/+2
| | | | llvm-svn: 217419
* Fix configure & make build with python disabledKeno Fischer2014-09-093-6/+6
| | | | | | | | | | | | | This makes sure that nothing that requires Python is being built when the LLDB_DISABLE_PYTHON flag is being passed in. It also changes a use of CPPFLAGS to CPP.Flags since the former is overridden when external flags are passed in while the later is not. I'm not sure exactly why LLDB_DISABLE_PYTHON is in CXXFLAGS rather than CPPFLAGS, but cleaning that up is for another commit. Differential Revision: http://reviews.llvm.org/D4918 llvm-svn: 217414
* Linux/FreeBSD local debugging: allow redirection to pts for POSIX process.Todd Fiala2014-09-082-8/+11
| | | | | | | | See http://reviews.llvm.org/D5135 for more details. Change by Zephyr Zhao. llvm-svn: 217382
* remove a couple of default cases from switchesSaleem Abdulrasool2014-09-081-5/+11
| | | | | | | | | This cleans up a couple of warnings [-Wcovered-switch-default] from the build by removing the default case from a couple of switches which are fully covered. This is generally better as it will help identify when a new item is added to the enumeration but the use sites are not updated. llvm-svn: 217376
* Added logging of the POSIX-DYLD rendezvous address (i.e. the info_location ↵Todd Fiala2014-09-051-1/+11
| | | | | | address) llvm-svn: 217287
* Add more logging to DynamicLoaderPOSIXDYLD, especially around rendezvous ↵Todd Fiala2014-09-051-15/+78
| | | | | | | | | handling. Covers more of the behavior of rendezvous breakpoint handling and other dynamic loader aspects, all on the 'enable log lldb dyld' log channel. llvm-svn: 217283
* Properly handle the DYLD attach step for GDB remotes.Todd Fiala2014-09-051-1/+20
| | | | | | Change by Stephane Sezer. llvm-svn: 217253
* Set the process vendor in GDBRemoteCommunicationClient::GetCurrentProcessInfo.Todd Fiala2014-09-051-0/+1
| | | | | | Change by Stephane Sezer. llvm-svn: 217252
* Fix up lldb build for llvm r217172.Todd Fiala2014-09-041-3/+3
| | | | | | Changes reference to 4th element in version_min_command from reserved to sdk. llvm-svn: 217185
* Fix build break on Ubuntu 12.04 with ARM64 changes.Todd Fiala2014-09-041-1/+3
| | | | | | | | | | See http://llvm.org/bugs/show_bug.cgi?id=20824 for more details. Tested: Ubuntu 12.04 x86_64, gcc-4.9.1-built lldb Ubuntu 14.04 x86_64, clang-3.5-build lldb llvm-svn: 217169
* Use the process' ReadCStringFromMemory from ↵Todd Fiala2014-09-041-13/+1
| | | | | | | | | | | | | | | DYLDRendezvous::ReadStringFromMemory. Tested: Ubuntu 14.04 x86_64, clang-3.5-built lldb. MacOSX 10.9.4, Xcode6-Beta7-built lldb. Visual packet inspection on lldb <-> llgs shows significant reduction in overly-verbose memory read traffic on start-up when scanning shared library info. Change by Stephane Sezer. llvm-svn: 217153
* ASan malloc/free history threadsKuba Brecka2014-09-048-1/+282
| | | | | | Reviewed at http://reviews.llvm.org/D4596 llvm-svn: 217116
* RegisterContextLLDB::InitializeNonZerothFrame had a bit of code toJason Molenda2014-09-027-84/+39
| | | | | | | | | | | | | | | | | | | | detct unwind loops but there was a code path through there (using architecture default unwind plans) that didn't do the check, and could end up with an infinite loop unwind. Move that code into a separate method and call it from both places where it is needed. Also remove the use of ABI::FunctionCallsChangeCFA in that check. I thought about it a lot and none of the architecutres that we're supporting today can have a looping CFA. Since the unwinder isn't using ABI::FunctionCallsChangeCFA() and ABI::StackUsesFrames(), and the unwinder was the only reason those methods exists, I removed them from the ABI and all its plugins. <rdar://problem/17364005> llvm-svn: 216992
* Linux ARM64: add ProcessMonitor-related RegisterContext support.Todd Fiala2014-09-027-0/+996
| | | | | | | | See http://reviews.llvm.org/D5089 for more details. Change by Paul Osmialowski. llvm-svn: 216907
* Consolidate UnixSignals setting/getting in Process.Todd Fiala2014-08-2910-80/+48
| | | | | | | | | | | | | | | | See http://reviews.llvm.org/D5108 for details. This change does the following: * eliminates the Process::GetUnixSignals() virtual method and replaces with a fixed getter. * replaces the Process UnixSignals storage with a shared pointer. * adds a Process constructor variant that can be passed the UnixSignalsSP. When the constructor without the UnixSignalsSP is specified, the Host's default UnixSignals is used. * adds a host-specific version of GetUnixSignals() that is used when we need the host's appropriate UnixSignals variant. * replaces GetUnixSignals() overrides in PlatformElfCore, ProcessGDBRemote, ProcessFreeBSD and ProcessLinux with code that appropriately sets the Process::UnixSignals for the process. This change also enables some future patches that will enable llgs to be used for local Linux debugging. llvm-svn: 216748
* Add arbitrary command line flags to llgs/debugserver startup for local ↵Todd Fiala2014-08-291-1/+19
| | | | | | | | | | | | | | | | | | | | debugging. This patch accepts environment variables of the form: LLDB_DEBUGSERVER_EXTRA_ARG_n where n starts with 1, and may continue nearly indefinitely (up through std::numeric_limits<uint32_t>::max()). The code loops around, starting with 1, until it doesn't find one of the environment variables. For each one it does find defined, it appends the environment variable's contents to the end of the debugserver/llgs startup command line issued when the stub is started for local debugging. I am using this to add arbitrary startup commands to the llgs command line for turning on additional logging. For example: export LLDB_DEBUGSERVER_EXTRA_ARG_1="-c" export LLDB_DEBUGSERVER_EXTRA_ARG_2="log enable -f /tmp/llgs_packets.log gdb-remote packets" export LLDB_DEBUGSERVER_EXTRA_ARG_3="-c" export LLDB_DEBUGSERVER_EXTRA_ARG_4="log enable -f /tmp/llgs_process.log lldb process" llvm-svn: 216745
* lldb - ELF: add ARM64 relocation jump slot handling in ELFHeader.Todd Fiala2014-08-291-0/+3
| | | | | | | | See http://reviews.llvm.org/D4579 for more details. Change by Paul Osmialowski. llvm-svn: 216739
* lldb - Register Context Linux ARM64Todd Fiala2014-08-297-301/+537
| | | | | | | | | | | | | Yet another step toward ARM64 support. With this commit, lldb-gdbserver started on ARM64 target can be accessed by lldb running on desktop PC and it can process simple commands (like 'continue'). Still ARM64 support lacks NativeRegisterContextLinux_arm64.* code which waits to be implemented. Based on similar files for Linux x86_64 and Darwin ARM64. Due to common code extraction from Darwin related files, lldb should be tested for any unexpected regression on Darwin ARM64 machines too. See the following for more details: http://reviews.llvm.org/D4580 http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140825/012670.html Change by Paul Osmialowski. llvm-svn: 216737
* Added setting: platform.plugin.linux.use-llgs-for-local (boolean), defaults ↵Todd Fiala2014-08-282-1/+80
| | | | | | | | | to false This setting is not yet hooked up to anything. In preparation for adding/testing llgs for local Linux debugging. llvm-svn: 216690
* llgs: add proper exec support for Linux.Todd Fiala2014-08-285-10/+125
| | | | | | | | | | | | | | | This change: * properly captures execs in NativeProcessLinux. * clears out all non-main-thread thread metadata in NativeProcessLinux on exec. * adds a DidExec() method to the NativeProcessProtocol delegate. * clears out the auxv data cache when we exec (on Linux). This is a small part of the llgs for local Linux debugging work going on here: https://github.com/tfiala/lldb/tree/dev-llgs-local I'm breaking it into small patches. llvm-svn: 216670
* NativeThreadLinux: remove translation of some Linux signals to gdb signals.Todd Fiala2014-08-271-26/+14
| | | | | | | | | | | I copied this originally based on what debugserver was doing. This appears to be incorrect and unncessary for Linux. The LinuxSignals on the lldb side don't look for these and therefore they get handled incorrectly. Leaving the hook in place since I think darwin will continue to need to translate those signal numbers. llvm-svn: 216564
* lldb Missing ARM64 breakpoint opcode for ProcessPOSIX added.Todd Fiala2014-08-271-0/+6
| | | | | | | | See http://reviews.llvm.org/D5078. Change by Paul Osmialowski. llvm-svn: 216559
* lldb Missing break statement added.Todd Fiala2014-08-271-0/+1
| | | | | | | | See http://reviews.llvm.org/D5069. Change by Paul Osmialowski. llvm-svn: 216554
* Add Linux support for get thread area on ARM64 using ProcessMonitor debugging.Todd Fiala2014-08-271-5/+14
| | | | | | | | See http://reviews.llvm.org/D5073. Change by Paul Osmialowski. llvm-svn: 216553
* Add support for kalimba architecture variants 3, 4 and 5.Matthew Gardiner2014-08-271-2/+36
| | | | | | | | Add entries to core_definitions and elf_arch_entries for those variants. Select the subtype for the variant by parsing the e_flags field of the elf header. llvm-svn: 216541
* Don't have ProcessMachCore::CanDebug use the Target's arch whenJason Molenda2014-08-261-1/+5
| | | | | | | | | | creating the ModuleSpec to load the core file - we won't have a fat core file and we can end up with cpu subtype mismatches if the core file header isn't written out completely accurately. We need to be a little loose in this particular case. <rdar://problem/17843388> llvm-svn: 216498
* Fix llgs to send triple for non-Apple platforms and lldb to interpret correctly.Todd Fiala2014-08-262-3/+24
| | | | | | | | | | | | | This change addresses this bug: http://llvm.org/bugs/show_bug.cgi?id=20755 This change: * Modifies llgs to send triple instead of cputype and cpusubtype when not on Apple platforms in qProcessInfo. * Modifies lldb's GDBRemoteCommunicationClient to handle the triple returned from qProcessInfo if given. When given, it will prefer to use triple over cputype and cpusubtype. * Adds gdb-remote protocol tests to verify that cputype and cpusubtype are specified on darwin, and that triple is specified on Linux. llvm-svn: 216470
* Remove the hostname part from compilation directories, if supplied by Matthew Gardiner2014-08-261-0/+40
| | | | | | DWARF2/3 compliant producers. llvm-svn: 216440
* Remove trailing whitespace from lines in UnwindAssembly-x86.cpp. No other ↵Jason Molenda2014-08-251-63/+63
| | | | | | changes. llvm-svn: 216420
* Clean up the coding conventions in UnwindAssembly-x86.cpp a little bit.Jason Molenda2014-08-251-38/+74
| | | | | | | | I wrote this originally as a part of an unwind library that was using a different coding convention and some of that old style remained after its integration into lldb. llvm-svn: 216419
* Have augment_unwind_plan_from_call_site update the UnwindPlan Jason Molenda2014-08-251-0/+15
| | | | | | | name/from-compiler settings to indicate that it was augmented by assembly profiling. llvm-svn: 216412
* On x86 & x86_64, try to use eh_frame for frame 0.Todd Fiala2014-08-255-13/+279
| | | | | | | | | | | | | We decided to use assmbly profiler instead of eh_frame for frame 0 because for compiler generated code, eh_frame is usually synchronous(a.k.a. only valid at call site); and we have no way to tell if it's asynchronous or not. But for x86 & x86_64 compiler generated code: 1. clang & GCC describes all prologue instructions in eh_frame; 2. mid-function stack pointer altering instructions can be easily detected. So we can grab eh_frame, and use assembly profiler to augment it into asynchronous unwind table. This change also benefits hand-written assembly; eh_frame for hand-written assembly is often asynchronous,so we have a much better chance to successfully unwind through them. Change by Tong Shen. llvm-svn: 216406
* Extend the encoding parser to support the @typeName syntax for Objective-C ↵Enrico Granata2014-08-232-7/+24
| | | | | | object types llvm-svn: 216305
* When adding a dSYM to an existing ObjectFile, we can have a situationJason Molenda2014-08-221-0/+12
| | | | | | | | | | | | | | | | | | with binaries in the dyld shared cache (esp on iOS) where the file address for the executable binary (maybe from memory, maybe from an expanded copy of the dyld shared cache) is different from the file address in the dSYM. In that case, ObjectFileMachO replaces the file addresses from the original binary with the dSYM file addresses (usually 0-based) -- lldb doesn't have a notion of two file addresses for a given module so they need to agree. There was a cache of file addresses over in the Symtab so I added a method to the Module and the objects within to clear any file address caches if they exist, and added an implementation in the Symtab module to do that. <rdar://problem/16929569> llvm-svn: 216258
* Fixes a few more places where we were manually setting the filename.Zachary Turner2014-08-211-1/+1
| | | | llvm-svn: 216247
* Two small fixes to get Mac native + debugserver working after theJason Molenda2014-08-211-1/+1
| | | | | | | HostInfo et al changes from Zachary. Changes suggested by Zachary - fixes the problems I was seeing. llvm-svn: 216243
* Move GetUsername and GetGroupname to HostInfoPosixZachary Turner2014-08-211-2/+6
| | | | llvm-svn: 216210
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-213-5/+6
| | | | | | | | This continues the effort to get Host code moved over to HostInfo, and removes many more instances of preprocessor defines along the way. llvm-svn: 216195
* Add software breakpoint support for Linux aarch64.Todd Fiala2014-08-212-0/+18
| | | | | | | | See http://reviews.llvm.org/D4969 for details. Change by Paul Osmialowski. llvm-svn: 216188
* Enable more Linux aarch64 PTRACE support for local and remote debugging.Todd Fiala2014-08-212-15/+105
| | | | | | | | See http://reviews.llvm.org/D4803 for more details. Change by Paul Osmialowski. llvm-svn: 216185
* Fix warnings about overloaded virtual functions.Greg Clayton2014-08-202-2/+2
| | | | llvm-svn: 216077
* Move Host::GetArchitecture to HostInfo::GetArchitecture.Zachary Turner2014-08-2012-44/+47
| | | | | | | | As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
* Changes uint to uint32_t.Zachary Turner2014-08-192-7/+7
| | | | | | This fixes the build broken as a result of r216026. llvm-svn: 216034
* Attempt to keep the Linux build happy in face of my changes. Non-Apple ↵Enrico Granata2014-08-191-0/+2
| | | | | | folks, can you confirm that this is good enough to keep things building for you? llvm-svn: 216028
OpenPOWER on IntegriCloud