summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform
Commit message (Collapse)AuthorAgeFilesLines
...
* LLGS Android target support - for Andy Chien : http://reviews.llvm.org/D6166Shawn Best2014-11-081-2/+2
| | | | llvm-svn: 221570
* Fix a bunch of [-Werror,-Winconsistent-missing-override] errors.Eric Christopher2014-11-042-34/+35
| | | | llvm-svn: 221231
* Fix some bugs from D5988Justin Hibbits2014-10-311-7/+7
| | | | | | | | | | | | | | | | | | Summary: Ed Maste found some problems with the commit in D5988. Address most of these. While here, also add floating point return handling. This doesn't handle 128-bit long double yet. Since I don't have any system that uses it, I don't currently have plans to implement it. Reviewers: emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D6049 llvm-svn: 220963
* First cut of PowerPC(64) support in LLDB.Justin Hibbits2014-10-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds preliminary support for PowerPC/PowerPC64, for FreeBSD. There are some issues still: * Breakpoints don't work well on powerpc64. * Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host. * Backtraces don't work. This is due to PowerPC ABI using a backchain pointer in memory, instead of a dedicated frame pointer register for the backchain. * Breakpoints on functions without debug info may not work correctly for 32-bit powerpc. Reviewers: emaste, tfiala, jingham, clayborg Reviewed By: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D5988 llvm-svn: 220944
* Add breakpoint instruction byte sequences for arm toJason Molenda2014-10-281-0/+28
| | | | | | | | | PlatformLinux::GetSoftwareBreakpointTrapOpcode. Patch by Stephane Sezer. http://reviews.llvm.org/D5923 llvm-svn: 220762
* Fix implicit conversion of NULL constant to 'bool'.Eric Christopher2014-10-211-1/+1
| | | | llvm-svn: 220318
* Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.Zachary Turner2014-10-202-8/+10
| | | | | | | Differential Revision: http://reviews.llvm.org/D5805 Reviewed by: Greg Clayton llvm-svn: 220217
* When PlatformDarwinKernel::ExamineKextForMatchingUUID is givenJason Molenda2014-10-141-2/+5
| | | | | | | | | | | | | | | a FileSpec, UUID, and ArchSpec, and it's opening all the kexts with the same bundle id to see if they're a match, don't set the Arch in the ModuleSpec. If Module::GetObjectFile() sees that the architecture of the kext is a mismatch for the arch we're looking for, it'll spew a warning message to the dev (r217251). Rely on the UUID match to get the correct file if we have a UUID -- we'll get no warning if it's a mismatch. <rdar://problem/18641477> llvm-svn: 219728
* Use PARALLEL_DIRS instead of DIRS in the MakefileEric Christopher2014-10-141-1/+1
| | | | | | | | based build since the subdirectories all appear to have no inter-directory dependencies. This speeds up parallel makefile builds greatly. llvm-svn: 219660
* Enable local llgs debugging on Linux when the use-llgs-for-local setting is ↵Todd Fiala2014-10-106-173/+348
| | | | | | | | | | | | | | | | | | | enabled. See http://reviews.llvm.org/D5695 for details. This change does the following: Enable lldb-gdbserver (llgs) usage for local-process Linux debugging. To turn on local llgs debugging support, which is disabled by default, enable this setting: (lldb) settings set platform.plugin.linux.use-llgs-for-local true Adds a stream-based Dump() function to FileAction. Pushes some platform methods that Linux (and FreeBSD) will want to share with MacOSX from PlatformDarwin into PlatformPOSIX. Reviewed by Greg Clayton. llvm-svn: 219457
* Move ConnectionFileDescriptor to platform-specific Host directory.Zachary Turner2014-10-061-1/+1
| | | | | | | | | | | | As part of getting ConnectionFileDescriptor working on Windows, there is going to be alot of platform specific work to be done. As a result, the implementation is moving into Host. This patch performs the code move and fixes up call-sites appropriately. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5548 llvm-svn: 219143
* Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sectionsMatthew Gardiner2014-09-291-1/+11
| | | | | | | | | | | works, as do breakpoints, run and pause, display zeroth frame. See http://reviews.llvm.org/D5503 for a fuller description of the changes in this commit. llvm-svn: 218596
* Moved PlatformDarwin::GetEnvironment() to PlatformPOSIX to fix Linux/llgs issue.Todd Fiala2014-09-244-14/+15
| | | | | | | | | | | | | | | | | See http://reviews.llvm.org/D5486 for more details. I was tracking a problem where llgs on linux would not pick up any environment variables. On OSX there is a virtual function PlatformDarwin::GetEnvironment() which correctly sets up the list of environment variables. On linux llgs it defaults to a base class default implementation which clears the list. I moved the OSX implementation down to PlatformPOSIX. This fixes my problem on linux still works properly on OSX. Change by Shawn Best. Slight tweak to convert 'virtual' to 'override' in PlatformDarwin.h virtual method override by Todd. Tested: Ubuntu 14.04 x86_64, cmake/ninja build + tests. MacOSX 10.9.5 x86_64, Xcode 6.1 Beta build + tests. llvm-svn: 218424
* Fix a thinko in how the RemoteiOS Platform looked up files in the SDK & otherJim Ingham2014-09-191-66/+52
| | | | | | | | | | platform locations. We didn't always do an exhaustive search through all the platform locations, so we would have to read some files out of memory even though they existed in the exploded shared cache or SDK. <rdar://problem/18385947> llvm-svn: 218157
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-1919-44/+44
| | | | | | | | | | | | | if a "file a.out" auto selected a different platform than the selected one. Changes include: - fix it so you can select the "host" platform using "platform select host" - change all callbacks that create platforms to returns shared pointers - fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host" - Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform - cache platforms that are created and re-use them instead of always creating a new one llvm-svn: 218145
* Listen to the return value of the Platform::WriteFile() call within ↵Greg Clayton2014-09-181-2/+20
| | | | | | PlatformPOSIX::PutFile() in case we write less than we wanted to. Also adjust the input stream's offset in such cases. llvm-svn: 217999
* Retry remote connection one time in case of timeout and return an error that ↵Greg Clayton2014-09-181-0/+6
| | | | | | specifies why debugging failed. llvm-svn: 217998
* 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
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-212-2/+2
| | | | | | | | 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-211-0/+7
| | | | | | | | See http://reviews.llvm.org/D4969 for details. Change by Paul Osmialowski. llvm-svn: 216188
* Move Host::GetArchitecture to HostInfo::GetArchitecture.Zachary Turner2014-08-207-29/+30
| | | | | | | | As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
* Move some Host logic into HostInfo class.Zachary Turner2014-08-192-2/+6
| | | | | | | | | | | | | | | | | | This patch creates a HostInfo class, a static class used to answer basic queries about the host platform. As part of this change, some functionality is moved from Host to HostInfo, and relevant fixups are performed in the rest of the codebase. This is part of a larger effort to isolate more code in the Host layer into platform-specific groups, to make it easier to make platform specific changes for a particular Host without breaking other hosts. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4963 llvm-svn: 215992
* In order for the debug script filename to be valid as a module name, LLDB ↵Enrico Granata2014-08-162-2/+34
| | | | | | does some textual replacements. However, if one were unaware of this, they might name their script using the 'untampered' file name and they would get no feedback about it. Add logic to LLDB to make sure we tell people about those changes if it turns out they might need to know. Fixes rdar://14310572 llvm-svn: 215798
* Move FileSystem functions out of Host and into their own classes.Zachary Turner2014-08-153-21/+21
| | | | | | | | | | | | | | | | More specifically, this change can be summarized as follows: 1) Makes an lldbHostPosix library which contains code common to all posix platforms. 2) Creates Host/FileSystem.h which defines a common FileSystem interface. 3) Implements FileSystem.h in Host/windows and Host/posix. 4) Creates Host/FileCache.h, implemented in Host/common, which defines a class useful for storing handles to open files needed by the debugger. Differential Revision: http://reviews.llvm.org/D4889 llvm-svn: 215775
* Missed a few places where we need to report unreadable executables.Greg Clayton2014-08-156-24/+66
| | | | | | <rdar://problem/17727734> llvm-svn: 215743
* Don't crash when specifying a core file that isn't readable.Greg Clayton2014-08-151-7/+21
| | | | | | | | | | | | | Fixes include: 1 - added new FileSpec method: bool FileSpec::Readable() 2 - detect when an executable is not readable and give an appropriate error for: (lldb) file /tmp/unreadablefile 3 - detect when a core file is not readable and give an appropriate error 4 - detect when a specified core file doesn't exist and give an appropriate error <rdar://problem/17727734> llvm-svn: 215741
* Remove a few uses of LLDB_DISABLE_POSIX.Zachary Turner2014-08-113-17/+0
| | | | | | This all appears to have been dead, unnecessary code. llvm-svn: 215405
* Windows: update for LLVM API changeSaleem Abdulrasool2014-08-091-1/+0
| | | | | | | | MinGW32 and Cygwin have been removed from the OSType enumeration. They are represented as environments, and the OS is Windows in both of those cases. Simply remove the value from the switch. llvm-svn: 215304
* Fix a bug where SetFilePermissions was calling MakeDirectory.Zachary Turner2014-08-091-1/+1
| | | | | | This appears to have been a copy / paste error. llvm-svn: 215265
* Add a new directory path to Jason Molenda2014-07-311-4/+34
| | | | | | | | | | | | | | | | | PlatformDarwinKernel::GetGenericSDKDirectoriesToSearch - /Library/Developer/KDKs where users may store the kernel debug kits on their systems. Change PlatformDarwinKernel::GetKextDirectoriesInSDK to look in the root directory of places like /Library/Developer/KDKs/KDK_10.10_14A298i.kdk as well as the System/Library/Extensions subdir in that directory (if it exists) and the Library/Extensions subdir in that directory (if it exists). <rdar://problem/16568635> llvm-svn: 214391
* Fix supported architectures on PlatformWindows.Zachary Turner2014-07-281-20/+40
| | | | | | | | | | i386, i486, i486sx, and i686 are all indistinguishable as far as PE/COFF files are concerned. This patch adds support for all of these architectures to PlatformWindows. Differential Revision: http://reviews.llvm.org/D4658 llvm-svn: 214092
* Test commit, please ignoreMatthew Gardiner2014-07-281-0/+1
| | | | llvm-svn: 214062
* Update lldb to track recent Triple arm64 enum removal and collapse into aarch64.Todd Fiala2014-07-233-3/+3
| | | | | | | | | | | See the following llvm change for details: r213743 | tnorthover | 2014-07-23 05:32:47 -0700 (Wed, 23 Jul 2014) | 9 lines AArch64: remove arm64 triple enumerator. This change fixes build breaks on Linux and MacOSX lldb. llvm-svn: 213755
* Enable lldb-platform exe support for Linux.Todd Fiala2014-07-227-268/+324
| | | | | | | | | | | | | | This change enables lldb-platform for Linux. In addition, it does the following: * fixes Host::GetLLDBPath() to work on Linux/*BSD for ePathTypeSupportExecutableDir-relative paths. * adds more logging and comments around lldb-platform startup and remote lldb-platform usage. * refactors lldb-platform remote-* support for Darwin and Linux into PlatformPOSIX. This, in theory, is the bulk of what is needed for *BSD to make remote connections to lldb-platform as well (although I haven't tested that yet). FreeBSD can make similar changes to their Platform* as was made here for PlatformLinux to pick up the rest of the bits. * teaches GDBRemoteCommunication to use lldb-gdbserver for non-Apple hosts. llvm-svn: 213707
* Add the Hexagon DSP breakpoint opcode to PlatformWindows and PlatformLinuxDeepak Panickal2014-07-212-2/+12
| | | | llvm-svn: 213567
* Fix some warnings in the Windows build.Zachary Turner2014-07-161-4/+4
| | | | llvm-svn: 213194
* Add kalimba as a platform.Todd Fiala2014-07-166-1/+477
| | | | | | | | | | | | | | | | | | | | | | | | This change comprises of additions and some minor changes in order that "kalimba" is listed as a supported platform and that debugging any kalimbas results in PlatformKalimba being associated with the target. The changes are as follows: * The PlatformKalimba implementation itself * A tweak to ArchSpec * .note parsing for Kalimba in ObjectFileELF.cpp * Plugin registration * Makefile additions Change by Matthew Gardiner Minor tweak for cmake and Xcode by Todd Fiala Tested: Ubuntu 14.04 x86_64, clang 3.5-built lldb, all tests pass. MacOSX 10.9.4, Xcode 6.0 Beta 1-built lldb, all tests pass. llvm-svn: 213158
* Cleanup the iOS simulator code.Greg Clayton2014-07-101-16/+21
| | | | | | | | | | | Fixes include: - Don't say that "<arch>-apple-ios" is compatible with "<arch>-apple-macosx" - Fixed DynamicLoaderMacOSXDYLD so specify an architecture that was converted solely from a cputype and subtype, just specify the file + UUID. - Fixed PlatformiOSSimulator::GetSupportedArchitectureAtIndex() so it returns the correct archs - Fixed SymbolFileDWARFDebugMap to load .o files correctly by just specifying the architecture without the vendor and OS now that "<arch>-apple-ios" is not compatible with "<arch>-apple-macosx" so we can load .o files correctly for DWARF with debug map - Fixed the coded in TargetList::CreateTarget() so it does the right thing with an underspecified triple where just the arch is specified. llvm-svn: 212783
* __arm64__ and __aarch64__ #ifdef adjustmentsTodd Fiala2014-07-092-2/+2
| | | | | | | | Change by Paul Osmialowski See http://reviews.llvm.org/D4379 for details. llvm-svn: 212583
* Add lldb-gdbserver support for Linux x86_64.Todd Fiala2014-06-302-1/+71
| | | | | | | | | | | | | | | | | | | | | This change brings in lldb-gdbserver (llgs) specifically for Linux x86_64. (More architectures coming soon). Not every debugserver option is covered yet. Currently the lldb-gdbserver command line can start unattached, start attached to a pid (process-name attach not supported yet), or accept lldb attaching and launching a process or connecting by process id. The history of this large change can be found here: https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64 Until mid/late April, I was not sharing the work and continued to rebase it off of head (developed via id tfiala@google.com). I switched over to user todd.fiala@gmail.com in the middle, and once I went to github, I did merges rather than rebasing so I could share with others. llvm-svn: 212069
* lldb: remove adhoc implementation of array_sizeofSaleem Abdulrasool2014-06-271-2/+3
| | | | | | | | Replace adhoc inline implementation of llvm::array_lengthof in favour of the implementation in LLVM. This is simply a cleanup change, no functional change intended. llvm-svn: 211868
* Fix a few typos.Bruce Mitchener2014-06-275-10/+10
| | | | llvm-svn: 211851
* Added an option to turn OFF the "detach on error" behavior that was addedJim Ingham2014-06-252-1/+2
| | | | | | | | to debugserver when launching processes. <rdar://problem/16216199> llvm-svn: 211658
* Rework fix in r201744. You really DO need to waitpid twice to get theJim Ingham2014-06-241-4/+4
| | | | | | | | | | | process fully reaped. The race & bad behavior was because we were letting the reaping thread in LLDB to also set the Process exit status, so debugserver would sometimes be shut down before it got a chance to report the exit status, and then we got confused. <rdar://problem/16555850> llvm-svn: 211636
* Test commit: Correct type in two comments.John Wolfe2014-06-191-2/+2
| | | | llvm-svn: 211296
* Fix most of the remaining Windows build warnings.Todd Fiala2014-06-021-9/+7
| | | | | | | | See http://reviews.llvm.org/D3944 for more details. Change by Zachary Turner. llvm-svn: 210035
* iOS simulator cleanup to make sure we use "*-apple-ios" for iOS simulator ↵Greg Clayton2014-05-291-13/+46
| | | | | | | | | | | | | | | | | | apps and binaries. Changes include: - ObjectFileMachO can now determine if a binary is "*-apple-ios" or "*-apple-macosx" by checking the min OS and SDK load commands - ArchSpec now says "<arch>-apple-macosx" is equivalent to "<arch>-apple-ios" since the simulator mixes and matches binaries (some from the system and most from the iOS SDK). - Getting process inforamtion on MacOSX now correctly classifies iOS simulator processes so they have "*-apple-ios" architectures in the ProcessInstanceInfo - PlatformiOSSimulator can now list iOS simulator processes correctly instead of showing nothing by using: (lldb) platform select ios-simulator (lldb) platform process list - debugserver can now properly return "*-apple-ios" for the triple in the process info packets for iOS simulator executables - GDBRemoteCommunicationClient now correctly passes along the triples it gets for process info by setting the OS in the llvm::Triple correctly <rdar://problem/17060217> llvm-svn: 209852
* Fix whitespace / formattingEd Maste2014-05-282-15/+15
| | | | llvm-svn: 209737
* lldb arm64 import.Jason Molenda2014-03-295-14/+70
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* Switch over to use the ArchSpec::GetMachine() instead of ArchSpec::GetCore() ↵Greg Clayton2014-03-203-16/+12
| | | | | | to keep the code more portable as we add new core types to ArchSpec. llvm-svn: 204400
OpenPOWER on IntegriCloud