summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove useless includesJean-Daniel Dupas2013-12-121-3/+0
| | | | llvm-svn: 197147
* FreeBSD and NetBSD have sa_len in struct sockaddrEd Maste2013-12-091-2/+2
| | | | llvm-svn: 196790
* Fix Debian GNU/kFreeBSD buildEd Maste2013-12-091-1/+1
| | | | | | Use the same LaunchProcessPosixSpawn as on FreeBSD and Linux. llvm-svn: 196742
* Replace all in_port_t with uint16_t to avoid compilation issues on different ↵Greg Clayton2013-12-061-4/+4
| | | | | | systems. llvm-svn: 196586
* Typo in commentsJean-Daniel Dupas2013-12-061-1/+1
| | | | llvm-svn: 196577
* Modified local spawning in debugserver processes to use a new ↵Greg Clayton2013-12-051-21/+47
| | | | | | | | | | | | | | | | | | --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver. This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to. Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format: listen://<port> But now it can accept: listen://<port> // Listen for connection from localhost on port <port> listen://<host>:<port> // Listen for connection from <host> and <port> listen://*:<port> // Listen for connection from any host on port <port> llvm-svn: 196547
* Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available ↵Greg Clayton2013-12-041-4/+4
| | | | | | when using posix_spawn to spawn processes to close all file handles. llvm-svn: 196404
* Added a new directory type for the "bool Host::GetLLDBPath (PathType ↵Greg Clayton2013-12-041-4/+43
| | | | | | | | | | path_type, FileSpec &file_spec)" function: ePathTypeLLDBTempSystemDir This will get the temporary directory on the current system. Removed a call to tmpnam() and replaced it with a call to mktemp() using a template that will be in the temp directory. llvm-svn: 196397
* Fix MSVC buildColin Riley2013-11-262-7/+9
| | | | | | Added _WIN32 guards to new platform features. Using correct SetErrorStringWithFormat within Host when LLDB_DISABLE_POSIX is defined. Also fixed an if defined block. llvm-svn: 195766
* Correct a standalone debug file pathEd Maste2013-11-251-4/+4
| | | | | | | | | | | | For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls. ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html llvm.org/pr17903 http://llvm-reviews.chandlerc.com/D2169 llvm-svn: 195681
* Removed printf and puts calls that were left in accidentally.Greg Clayton2013-11-231-13/+0
| | | | llvm-svn: 195542
* Improved platform support.Greg Clayton2013-11-232-5/+100
| | | | | | | | | | | | 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
* Fix ePathTypeSupportExecutableDir for shallow bundle Darwin targets and add ↵Greg Clayton2013-11-221-1/+22
| | | | | | "host" logging for the different paths. llvm-svn: 195484
* Fix File::GetPermissions() to only return the permission bits.Greg Clayton2013-11-221-2/+2
| | | | llvm-svn: 195482
* Fix indentation.Greg Clayton2013-11-221-3/+5
| | | | llvm-svn: 195481
* #include <AvailabilityMacros.h> if you want to use them. This was causing ↵Jim Ingham2013-11-221-0/+1
| | | | | | | | | | us to skip the code that should have set thread names on Mac OS X. <rdar://problem/15517264> llvm-svn: 195403
* sys/stat.h needed for mkdir, chmod, stat.Jason Molenda2013-11-211-0/+1
| | | | llvm-svn: 195305
* Expose SBPlatform through the public API.Greg Clayton2013-11-204-34/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixes to get LLDB building on Windows again.Deepak Panickal2013-10-221-0/+2
| | | | llvm-svn: 193159
* Add error checking to 'cmd' buffer as it may not be available (ie. in the ↵Matt Kopec2013-10-091-10/+13
| | | | | | case of exec). llvm-svn: 192318
* Changed the bool conversion operator on ConstStringSean Callanan2013-10-031-6/+6
| | | | | | | | | | | | | | | to be explicit, to prevent horrid things like std::string a = ConstString("foo") from taking the path ConstString -> bool -> char -> std::string. This fixes, among other things, ClangFunction. <rdar://problem/15137989> llvm-svn: 191934
* Fix a memory leak. Found by both scan-build and coverity. Close CID 1096442Sylvestre Ledru2013-09-281-0/+2
| | | | llvm-svn: 191619
* Fix OS Version reporting bug detected by TestPlatform for some Linux 3.x ↵Daniel Malea2013-09-271-1/+8
| | | | | | | | kernels that do not report the update version - should resolve the current failure on the Linux clang buildbot llvm-svn: 191568
* arpa/inet.h is the canonical source of htons and friends.Joerg Sonnenberger2013-09-251-0/+1
| | | | | | At least on NetBSD, none of the already included headers pulls it in. llvm-svn: 191386
* Handle ePathTypePythonDir even in the case of LLDB_DISABLE_PYTHON,Joerg Sonnenberger2013-09-251-2/+5
| | | | | | otherwise -Werror builds may fail. llvm-svn: 191385
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-253-32/+32
| | | | llvm-svn: 191367
* <rdar://problem/14701270>Han Ming Ong2013-09-231-4/+5
| | | | | | When logged in as root, just launch debugserver regularly. llvm-svn: 191230
* Various small changes for build of LLDB on Visual Studio 2013 RC (MSVC12)Virgile Bello2013-09-202-0/+17
| | | | llvm-svn: 191116
* Add backslash as path separator for Win32.Virgile Bello2013-09-201-1/+10
| | | | llvm-svn: 191115
* Changing the default shell to /bin/sh brought up a long-standing bug on OS X,Jim Ingham2013-09-101-1/+2
| | | | | | | | | | | | | 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
* Added some MSVC required functions in Windows.cpp. Moved MSVC specific ↵Virgile Bello2013-09-073-3/+104
| | | | | | getopt code inside its own folder. llvm-svn: 190238
* Add OptionParser.hVirgile Bello2013-09-053-0/+576
| | | | llvm-svn: 190063
* sysctl.h does not exist under GNU/HURD (like windows)Sylvestre Ledru2013-09-051-0/+4
| | | | llvm-svn: 190057
* Fixing a problem with inferior exit caused by signalAndrew Kaylor2013-09-041-2/+2
| | | | llvm-svn: 189953
* Remove <windows.h> from lldb-types.h.Virgile Bello2013-09-044-23/+25
| | | | llvm-svn: 189934
* Disable stub Host::FindProcesses on FreeBSDEd Maste2013-08-291-3/+1
| | | | | | A FreeBSD implementation was added in r189295. llvm-svn: 189598
* Cleanup/rearrange includes:Virgile Bello2013-08-284-4/+0
| | | | | | | - factorize unistd.h and stdbool.h in lldb-types.h. - Add <functional> and <string> where required. llvm-svn: 189477
* Enable Host::LaunchProcess on LinuxDaniel Malea2013-08-273-214/+216
| | | | | | | - move LaunchProcessPosixSpawn() and Host::LaunchProcess() from freebsd host plugin to common (linux/freebsd section) - modify MonitorChildProcessThreadFunction to use pid_t from sys/types.h to avoid Linux/FreeBSD/Mac warnings when calling waitpid() llvm-svn: 189404
* Fix warnings about redefined macros at the end of File.cppDaniel Malea2013-08-271-22/+0
| | | | | | - removed needless defines that snuck in as part of the lldb-platform-work merge llvm-svn: 189392
* Fix MinGW build after lldb-platform-work merge:Virgile Bello2013-08-272-3/+1
| | | | | | | | | - mode_t is defined in <sys/types.h> - reorganized S_* user rights into win32.h - Use Host::Kill instead of kill - Currently #ifdef functions using pread/pwrite. llvm-svn: 189364
* Fix missing declaration/includes in freebsd/Host.cppDaniel Malea2013-08-271-1/+2
| | | | | | Thanks for catching this Ed! llvm-svn: 189361
* Fix some names in the wake of my Mach-O changes to LLVM.Charles Davis2013-08-273-28/+23
| | | | llvm-svn: 189317
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-265-25/+713
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-2318-76/+1230
| | | | | | portability. llvm-svn: 189107
* Fix bug in Host::getLLDBPath() due to misusing TwineDaniel Malea2013-08-061-8/+7
| | | | | | | | | - use SmallString instead - original implementation resulted in incorrect behaviour of lldb -P Fix by Kal Conley! llvm-svn: 187818
* Fix Linux Host::GetCurrentThreadID() to return real tid (not pthread_t).Michael Sartain2013-08-012-16/+17
| | | | | | | This fixes threadname logging (--thread-name) Add "-t" to TestLogging.py script to enable threadsafe and disable threadname logging llvm-svn: 187599
* Optimize Host::GetThreadName() to read from /proc/$TID per Matt's suggestion.Michael Sartain2013-07-311-27/+10
| | | | | CR: mkopec llvm-svn: 187542
* Set thread names on FreeBSDEd Maste2013-07-253-26/+50
| | | | | | | Also move the logic to shorten thread names from linux/Host.cpp to a new SetShortThreadName as both FreeBSD and Linux need the functionality. llvm-svn: 187149
* Fixed a potential crash in the GetOSVersion codeSean Callanan2013-07-231-1/+1
| | | | | | caused by a CFStringRef going out of scope. llvm-svn: 186912
* simple plugin now works with Linux fix assert in SetPluginInfo implement ↵Michael Sartain2013-07-172-10/+67
| | | | | | | | Linux ePathTypeLLDBSystemPlugins and ePathTypeLLDBUserPlugins implement Linux Host::Backtrace and Host::GetEnvironment add .gnu_debugdata comment Differential Revision: http://llvm-reviews.chandlerc.com/D1159 llvm-svn: 186475
OpenPOWER on IntegriCloud