summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a build problem dueo to changes in theSean Callanan2014-08-301-1/+1
| | | | | | | way ownership of memory buffers is handled in clang's SourceManager. llvm-svn: 216810
* lldb - fix misleading "valid target indexes are" error messageTodd Fiala2014-08-291-3/+10
| | | | | | | | See http://reviews.llvm.org/D4430 for more details. Change by Paul Osmialowski. llvm-svn: 216766
* Consolidate UnixSignals setting/getting in Process.Todd Fiala2014-08-2914-82/+92
| | | | | | | | | | | | | | | | 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
* Allow "breakpoint command add" to add commands to more than one breakpoint ↵Jim Ingham2014-08-293-78/+118
| | | | | | | | at a time. <rdar://problem/13314462> llvm-svn: 216747
* 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-298-302/+538
| | | | | | | | | | | | | 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
* Ensure the Host wait4 thread is able to show pid in thread name.Todd Fiala2014-08-281-1/+12
| | | | | | | | | For hosts that cannot support long thread names, shrink the host wait4 thread name so that it does not truncate the PID in the thread name. Change by Shawn Best. llvm-svn: 216686
* llgs: add proper exec support for Linux.Todd Fiala2014-08-287-10/+152
| | | | | | | | | | | | | | | 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
* lldb - towards AArch64 being recognised as platform architectureTodd Fiala2014-08-281-0/+36
| | | | | | | | See http://reviews.llvm.org/D4381. Change by Paul Osmialowski. llvm-svn: 216668
* Make it clear in the help that "breakpoint command add" will act on the last setJim Ingham2014-08-281-2/+3
| | | | | | | | breakpoint if no breakpoint id is specified. <rdar://problem/17885160> llvm-svn: 216637
* Add some logging around Process attaching and inferior exec handling.Todd Fiala2014-08-271-1/+73
| | | | llvm-svn: 216630
* A quoted - is not the beginning of an option, and should not be completed as ↵Jim Ingham2014-08-271-0/+2
| | | | | | | | | | | | such. This was causing: (lldb) disassemble -n '-<TAB> to crash. <rdar://problem/18134531> llvm-svn: 216626
* Fix linker error due to missing static variable instantiation.Zachary Turner2014-08-271-0/+2
| | | | llvm-svn: 216612
* Create a HostProcess class.Zachary Turner2014-08-273-0/+215
| | | | | | | | | | | This is a lightweight wrapper around a pid. It is intended to be lightweight enough to serve as a replacement anywhere we currently store a pid. It provides convenience methods and common process operations. This patch does not yet make use of HostProcess anywhere. llvm-svn: 216607
* Update LLDB to use LLVM's DynamicLibrary.Zachary Turner2014-08-277-214/+31
| | | | | | | | | LLDB had implemented its own DynamicLibrary class for plugin support. LLVM has an equivalent mechanism, so this patch deletes the duplicated code in LLDB and updates LLDB to reference the mechanism provided by LLVM. llvm-svn: 216606
* Update for LLVM API change.Rafael Espindola2014-08-271-2/+2
| | | | llvm-svn: 216603
* 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 AArch64 should be listed as yet another 64-bit architecture in ↵Todd Fiala2014-08-271-0/+1
| | | | | | | | | | HostInfoBase. See http://reviews.llvm.org/D5070. Change by Paul Osmialowski. llvm-svn: 216556
* 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-272-4/+54
| | | | | | | | 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
* Add __NSCFDictionary to the list of NSDictionary-like types for which we ↵Enrico Granata2014-08-271-0/+1
| | | | | | know to generate synthetic children llvm-svn: 216513
* 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
* It was pointed out to me that an offset of 0 makes sense for ObjC, but not ↵Enrico Granata2014-08-261-2/+1
| | | | | | always for C++, and this API claims to be general enough that it should not drop C++ usability on the floor for no good reason. Fix it with an explicit offset argument llvm-svn: 216487
* [dwarf] Add new language enumerations.Bruce Mitchener2014-08-261-0/+3
| | | | | | | This updates the DWARF language identifiers to include recent additions to the DWARF 5 specification (draft). llvm-svn: 216486
* Add an API on ValueObject to generate a 'synthetic child' of base class ↵Enrico Granata2014-08-261-0/+42
| | | | | | type. Note that in this commit, the term synthetic child is not meant to refer to data formatters, but to the programmatically-generated children stored inside a ValueObject itself llvm-svn: 216483
* 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
* Copy unwind plan instead of modifying it directly, so "image show-unwind" ↵Todd Fiala2014-08-251-3/+7
| | | | | | | | prints different plans for asynchronous and synchronous. Change by Tong Shen. llvm-svn: 216416
* Have augment_unwind_plan_from_call_site update the UnwindPlan Jason Molenda2014-08-252-1/+17
| | | | | | | name/from-compiler settings to indicate that it was augmented by assembly profiling. llvm-svn: 216412
* Add 64-bit eh_frame section CFI support.Todd Fiala2014-08-251-9/+33
| | | | | | | | | | In practice, 64bit eh_frame is not used even for x86_64 binaries. The main reason is in eh_frame we almost always use pc-relative addressing, so addresses are within 32bits and gcc just sticks to 32bit eh_frame. I generated 64bit eh_frame for Android Java runtime and unwind successfully in gdb, and in lldb with this patch. Patch by Tong Shen. llvm-svn: 216409
* On x86 & x86_64, try to use eh_frame for frame 0.Todd Fiala2014-08-258-16/+306
| | | | | | | | | | | | | 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
* Change back all paths returns for lldb::PathType enumerations from ↵Greg Clayton2014-08-255-16/+17
| | | | | | HostInfo::GetLLDBPath() to return the directories in the FileSpec.m_directory field to match previous implementations. This change previously broke some path stuff in upstream branches. llvm-svn: 216398
* Resurect preprocessor definitions that got lost moving to HostInfoKeno Fischer2014-08-231-0/+10
| | | | | | | | | | When building without XCode on sytems where these constants are not in the system header (or I presume with older versions of XCode), these are needed to make this file compile, since unlike most other uses of MachO specific constants, these use the system headers rather than the LLVM-defined ones. llvm-svn: 216332
* I forgot to include the header file for std::find, and that's breaking the ↵Enrico Granata2014-08-231-0/+2
| | | | | | Linux build. Push a fix out. Patch suggested by Paul Osmialowski and Randy Smith llvm-svn: 216323
* Initialize LLVM when LLDB is initialized, andSean Callanan2014-08-232-11/+16
| | | | | | | | install a crash handler. <rdar://problem/18083226> llvm-svn: 216309
* Extend the encoding parser to support the @typeName syntax for Objective-C ↵Enrico Granata2014-08-232-7/+24
| | | | | | object types llvm-svn: 216305
* Fix a couple of potential issues in the lexer where we were ignoring the ↵Enrico Granata2014-08-231-1/+7
| | | | | | putback data llvm-svn: 216304
* Fix a CMake error when using CMake 3.0.1Zachary Turner2014-08-221-5/+1
| | | | llvm-svn: 216286
* When adding a dSYM to an existing ObjectFile, we can have a situationJason Molenda2014-08-224-0/+51
| | | | | | | | | | | | | | | | | | 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-213-3/+3
| | | | llvm-svn: 216247
* Bump the verison number in the xcode project files.Jason Molenda2014-08-212-2/+2
| | | | llvm-svn: 216245
* Two small fixes to get Mac native + debugserver working after theJason Molenda2014-08-212-3/+3
| | | | | | | HostInfo et al changes from Zachary. Changes suggested by Zachary - fixes the problems I was seeing. llvm-svn: 216243
* Move the rest of the HostInfo functions over.Zachary Turner2014-08-219-120/+114
| | | | | | | | | This should bring HostInfo up to 99% completion. The remainder of code in Host will be split into instantiatable classes representing host processes, threads, dynamic libraries, and process launching strategies. llvm-svn: 216230
* Fix compile error on Linux due to previous commit.Zachary Turner2014-08-212-2/+3
| | | | llvm-svn: 216227
OpenPOWER on IntegriCloud