summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform
Commit message (Collapse)AuthorAgeFilesLines
...
* Changed "Windows.h" to "windows.h".Hafiz Abid Qadeer2014-03-131-1/+1
| | | | | | I missed this one in my earlier commit a few days ago. llvm-svn: 203787
* PlatformWindows: Fix ObjectFile presence test conditions (could result in ↵Virgile Bello2014-03-091-1/+1
| | | | | | NULL memory access) llvm-svn: 203384
* Fixed SBDebugger.CreateTarget("filename") and also make sure remote targets ↵Greg Clayton2014-03-041-79/+90
| | | | | | | | | don't pickup bogus locally cached files. <rdar://problem/16217254> <rdar://problem/16078651> llvm-svn: 202890
* Temporarily revert part of Greg's changes in r202738 which are causing ↵Jason Molenda2014-03-041-76/+76
| | | | | | problems with the testsuite and SBDebugger::CreateTarget(). llvm-svn: 202776
* "size_t" isn't always 64 bit, it is 32 bit on 32 bit systems. All printf ↵Greg Clayton2014-03-031-76/+76
| | | | | | | | style statements that were assuming size_t were 64 bit were changed, and they were also changed to display them as unsigned values as "size_t" isn't signed. If you print anything with 'size_t', please cast it to "uint64_t" in the printf and use PRIu64 or PRIx64. llvm-svn: 202738
* Remove an assertion that was being hit due to slow DNS name lookups on ↵Greg Clayton2014-02-271-2/+2
| | | | | | | | | | MacOSX for "localhost". Changed all "localhost" to "127.0.0.1" to prevent potentially long name lookups. <rdar://problem/16154630> llvm-svn: 202424
* Remove the packet speed lines that were "#if 0"'ed out.Greg Clayton2014-02-211-3/+0
| | | | llvm-svn: 201873
* Don't have both lldb and debugserver call waitpid on the target process. ↵Jim Ingham2014-02-201-0/+4
| | | | | | | | | | This sets up a race condition, and if lldb wins, then debugserver won't get the correct error status to lldb. <rdar://problem/16030008> llvm-svn: 201744
* Initial patch for supporting Hexagon DSPDeepak Panickal2014-02-192-0/+4
| | | | llvm-svn: 201665
* Also recognize interrupt as a possible trap handler name.Jason Molenda2014-02-181-0/+1
| | | | llvm-svn: 201611
* Add two additional trap handler names for PlatformDarwinKernel.Jason Molenda2014-02-181-1/+3
| | | | | | <rdar://problem/15246793> llvm-svn: 201609
* Change the way the m_trap_handlers Platform base class ivar is initialized;Jason Molenda2014-02-1313-8/+60
| | | | | | | | add a new pure virtual CalculateTrapHandlerSymbolNames() that Platform subclasses must implement which fills in the function name list with any trap handlers that are expected on that platform. llvm-svn: 201364
* The Platform base class now maintains a list of trap handlersJason Molenda2014-02-136-1/+9
| | | | | | | | | | | | | | | | aka asynchronous signal handlers, which subclasses should fill in as appropriate. For most Unix user process environments, the one entry in this list is _sigtramp. For bare-board and kernel environments, there will be different sets of trap handlers. The unwinder needs to know when a frame is a trap handler because the rules it enforces for the frame "above" the trap handler is different from most middle-of-the-stack frames. <rdar://problem/15835846> llvm-svn: 201300
* Change the Mac OS X SystemRuntime plugin from using the placeholderJason Molenda2014-02-052-159/+1
| | | | | | | | | | | | | | 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
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-0/+5
| | | | | | | | | | | | 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
* Add support for Haswell on x86_64.Greg Clayton2014-01-225-13/+69
| | | | | | <rdar://problem/15312873> llvm-svn: 199854
* Rename Platform::GetFile (3-arg version) to GetFileWithUUIDSteve Pucci2014-01-1710-30/+30
| | | | | | | | | | | 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
* Fix bug in Linux remote dynamic loader setup and fix test.Todd Fiala2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Part 1 changes PlatformLinux::CreateInstance to always create with is_host=false; that method is only used as the plug-in creator method associated with the remote-linux platform plugin, and should therefore always be remote. Part 1 patch by Steve Pucci. Part 2: fix a test break on linux. In test/functionalities/thread/thread_specific_break, when using gcc, either C99 mode would need to be enabled, or the code would need to change. I changed a couple loop variable definitions to conform to pre-C99 to simplify testing the fix. The second issue was the necessity to include -lpthread as a linker option in the Makefile. Any issues with that part are due to me (Todd Fiala). llvm-svn: 199426
* Fix return type of ReadLibdispatchOffsetsAddress.Jason Molenda2013-12-191-1/+1
| | | | llvm-svn: 197632
* Code reorganization in PlatformDarwin for how the libdispatchJason Molenda2013-12-182-74/+123
| | | | | | | | offsets structure is read & saved in the platform object -- soon we'll be getting more than the queue name offset out of this structure so we'll need to reuse the information in other methods. llvm-svn: 197620
* Replace 'mkdir' shell invocation by native function call.Jean-Daniel Dupas2013-12-092-17/+5
| | | | | | | | | | Summary: Now that Host provide a MakeDirectory function, we can use it instead of relying on command line tool to create a directory. CC: lldb-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2356 llvm-svn: 196801
* Replace the last auto_ptr by unique_ptrJean-Daniel Dupas2013-12-061-1/+1
| | | | llvm-svn: 196625
* Allow the hostname to be specified when asking a platform to launch another ↵Greg Clayton2013-12-041-2/+30
| | | | | | | | debugserver in case you want to change it. The GDB server remote platform how has the debugserver that are launched on iOS devices to use localhost due to the use of a USB mux. llvm-svn: 196405
* Fixed internal code to not link against and code from "lldb/API/*". Greg Clayton2013-12-022-12/+20
| | | | | | | | | | 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
* Improved platform support.Greg Clayton2013-11-231-6/+2
| | | | | | | | | | | | Improved the detection of a valid GDB server where we actually can connect to a socket, but then it doesn't read or write anything (which happens with some USB mux software). Host::MakeDirectory() now can make as many intermediate directories as needed. The testsuite now has very initial support for remote test suite running. When running on a remote platform, the setUp function for the test will make a new directory and select it as the working directory on the remote host. Added a common function that can be used to create the short option string for getopt_long calls. llvm-svn: 195541
* Expose SBPlatform through the public API.Greg Clayton2013-11-206-93/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed a warning in PlatformiOSSimulator where GetSDKDirectory was hiding ↵Greg Clayton2013-10-302-4/+4
| | | | | | recently added virtual function. Renamed GetSDKDirectory to GetSDKsDirectory to fix the issue. GetSDKsDirectory is a better fit because it finds the directory that contains all SDKs, not the current one. llvm-svn: 193707
* Added the ability to get the SDK path for a target using the platform ↵Greg Clayton2013-10-242-1/+80
| | | | | | | | plugins. If LLDB lives inside an Xcode.app bundle, it will select the SDK in the Xcode bundle, else it will use the currently selected Xcode. Also added the DWARFDataExtractor classes to the Xcode project file. llvm-svn: 193380
* Move the code which translates a dispatch_qaddr into aJason Molenda2013-10-182-1/+116
| | | | | | | | | | | | queue name out of ProcessGDBRemote and in to the Platform plugin, specifically PlatformDarwin. Also add a Platform method to translate a dispatch_quaddr to a QueueID, and a Thread::GetQueueID(). I'll add an SBThread::GetQueueID() next. llvm-svn: 192949
* Unbreak the gcc build (complain about duplicate definition of ↵Sylvestre Ledru2013-10-161-2/+2
| | | | | | Initialize/Terminate (done in the cpp code) llvm-svn: 192780
* Unbreak the build on OSX by defining Initialize() and Terminate() for the ↵Enrico Granata2013-10-151-2/+2
| | | | | | Windows platform plugin llvm-svn: 192724
* Update makefiles to build PlatformWindowsDeepak Panickal2013-10-152-1/+15
| | | | llvm-svn: 192702
* Patch to add PlatformWindows, based on Carlo Kok's version from the Windows ↵Deepak Panickal2013-10-154-1/+810
| | | | | | branch. llvm-svn: 192693
* <rdar://problem/13635174>Greg Clayton2013-10-111-1/+3
| | | | | | | | Added a way to set hardware breakpoints from the "breakpoint set" command with the new "--hardware" option. Hardware breakpoints are not a request, they currently are a requirement. So when breakpoints are specified as hardware breakpoints, they might fail to be set when they are able to be resolved and should be used sparingly. This is currently hooked up for GDB remote debugging. Linux and FreeBSD should quickly enable this feature if possible, or return an error for any breakpoints that are hardware breakpoint sites in the "virtual Error Process::EnableBreakpointSite (BreakpointSite *bp_site);" function. llvm-svn: 192491
* Add definitions for "armv6m", which indicates a Cortex-M0 processor.Jason Molenda2013-09-271-59/+90
| | | | | | | It uses the T16 and a few T32 instructions from the ARMv7-A ISA. <rdar://problem/15099306> llvm-svn: 191587
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-254-31/+31
| | | | llvm-svn: 191367
* Fixed a crasher where the remote platform was NULL and was being used.Greg Clayton2013-09-161-0/+1
| | | | llvm-svn: 190823
* Turns out the number of times you need to resume the process for /bin/sh ↵Jim Ingham2013-09-113-4/+19
| | | | | | | | | | depends on the setting of the environment variable COMMAND_MODE. Changed the Platform::GetResumeCountForShell to Platform::GetResumeCountForLaunchInfo, and check both the shell and in the case of /bin/sh the environment as well. llvm-svn: 190538
* Changing the default shell to /bin/sh brought up a long-standing bug on OS X,Jim Ingham2013-09-103-1/+31
| | | | | | | | | | | | | that /bin/sh re-exec's itself to /bin/bash, so it needs one more resume when you are using it as the shell than /bin/bash did or you will stop at the start of your program, rather than running it. So I added a Platform API to get the number of resumes needed when launching with a particular shell, and set the right values for Mac OS X. <rdar://problem/14935282> llvm-svn: 190381
* Don't hide errors in PlatformFreeBSD::ResolveExecutableEd Maste2013-08-301-8/+2
| | | | | | | If error is already set then there's no reason to replace it with a generic "<file> does not exist" message. llvm-svn: 189686
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-2618-85/+1174
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-234-2/+19
| | | | | | portability. llvm-svn: 189107
* Following the modification introduced in llvm by commit 185311Sylvestre Ledru2013-07-011-0/+4
| | | | | | | | | | | | | | | | | | The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. This kind of simplification is sometimes useful, but in general it's not correct. As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the build definitions used for FreeBSD, whereas for userland-related issues we want to match the definitions used for other systems with Glibc. The current modification adjusts the build system so that they can be distinguished, and explicitly adds GNU/kFreeBSD to the build checks in which it belongs. Fixes bug #16446. Patch by Robert Millan in the context of Debian. llvm-svn: 185313
* Sync FreeBSD files to Linux equivalents, to reduce noise in diffEd Maste2013-06-242-5/+2
| | | | | | | | | - Sort functions in the same order - Match whitespace - Remove commetned out code - Make filename in comments match filename llvm-svn: 184746
* Sort out a number of mismatched integer types in order to cut down the ↵Andy Gibbs2013-06-192-3/+3
| | | | | | number of compiler warnings. llvm-svn: 184333
* PlatformDarwinKernel was treating its file path arg as a kext bundle id -- ↵Jason Molenda2013-06-181-1/+4
| | | | | | | | | | but when the user did a manual "target modules add", it would be a file path. If the kext bundle lookup fails, fall back to calling PlatformDarwin's GetSharedModule which will handle a file path correctly. <rdar://problem/14179858> llvm-svn: 184237
* Implement ObjectFileELF::GetModuleSpecifications(), and add PlatformLinux ↵Michael Sartain2013-05-171-0/+23
| | | | | | | code to deal with unknown arch properties. CR: Greg Clayton llvm-svn: 182065
* Fix Linux 'platform status' command. Its output is now closer to that on Mac ↵Daniel Malea2013-05-161-4/+6
| | | | | | | | | | OS X - resolves llvm.org/pr14806 Patch by Matthew Sorrels! llvm-svn: 182030
* Fix Mac OS X build issue introduced by incorrect using statementsDaniel Malea2013-05-131-4/+4
| | | | llvm-svn: 181739
* Fixed build break introduced by r181717Daniel Malea2013-05-132-3/+5
| | | | | | | - added missing ConstString header - moved "using lldb*" statements to OS-independent section llvm-svn: 181724
OpenPOWER on IntegriCloud