summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
Commit message (Collapse)AuthorAgeFilesLines
...
* Use getpgid() with waitpid() in case the process pgid is not equal to its ↵Andrew MacPherson2014-04-021-1/+1
| | | | | | pid, as is the case with a forked subprocess. Also a couple of fixes for unit test failures from Todd Fiala. llvm-svn: 205405
* sanitise sign comparisonsSaleem Abdulrasool2014-04-024-12/+14
| | | | | | | | This is a mechanical change addressing the various sign comparison warnings that are identified by both clang and gcc. This helps cleanup some of the warning spew that occurs during builds. llvm-svn: 205390
* Add mips64 to the list of 64-bit Host architecturesEd Maste2014-04-011-0/+1
| | | | llvm-svn: 205333
* lldb arm64 import.Jason Molenda2014-03-293-10/+34
| | | | | | | | | | | | | | | | 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
* Add the "lldb_complete" .editrc command back in case veteran users of LLDB ↵Greg Clayton2014-03-261-1/+2
| | | | | | | | had .editrc key mappings in their ~/.editrc. <rdar://problem/16279283> llvm-svn: 204870
* JITed functions can now have debug info and be debugged with debug and ↵Greg Clayton2014-03-241-3/+66
| | | | | | | | | | | | | | | | | | | source info: (lldb) b puts (lldb) expr -g -i0 -- (int)puts("hello") First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression. Main features: - New ObjectFileJIT class that can be easily created for JIT functions - debug info can now be enabled when parsing expressions - source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit - "expr -g --" allows you to single step through your expression function with source code <rdar://problem/16382881> llvm-svn: 204682
* Change the type in va_arg call from char to int.Hafiz Abid Qadeer2014-03-201-1/+1
| | | | | | It is supposed to take fully promoted types. llvm-svn: 204336
* cleanup unreferenced functionsSaleem Abdulrasool2014-03-202-29/+0
| | | | | | | | | | | | | This is a mechanical cleanup of unused functions. In the case where the functions are referenced (in comment form), I've simply commented out the functions. A second pass to clean that up is warranted. The functions which are otherwise unused have been removed. Some of these were introduced in the initial commit and not in use prior to that point! NFC llvm-svn: 204310
* build: fix libxml2 detection via CMakeSaleem Abdulrasool2014-03-141-1/+1
| | | | | | | | | | | | | | | | | libxml2's include path was unconditionally set to /usr/include/libxml2. This would work previously, however, Mavericks removed the /usr/include directory. Since LLDB already requires clang, which via LLVM's build infrastructure searches for libxml2, we have a proper include path for libxml2. If LIBXML2_FOUND is set, do not touch the libxml2 search path. Instead, allow the clang's definition to propagate throughout the LLVM build. Otherwise, switch to find_package(LibXml2) as clang does. This will ensure that the correct path is used for libxml2 irrespective of the platform. Furthermore, treat libxml2 as a system provided library. It is not part of the LLVM source base so it is of little value to enable all warnings on its headers. This unifies the treatment of libxml2 across clang and LLDB. llvm-svn: 203955
* Change type of a few members of a struct from unsigned to signed.Hafiz Abid Qadeer2014-03-131-2/+2
| | | | | | | They are used in Windows APIs which expect a signed argument and cause a build failure on Mingw. llvm-svn: 203783
* Replace some Windows specific string functions with std::string.Hafiz Abid Qadeer2014-03-121-4/+3
| | | | llvm-svn: 203654
* Moved a check in HostGetOpt.h.Hafiz Abid Qadeer2014-03-121-4/+0
| | | | | | It can be used in multiple files now. llvm-svn: 203652
* Replace some _MSC_VER with _WIN32.Hafiz Abid Qadeer2014-03-123-3/+3
| | | | | | | This allows to use some code for mingw which was previously only used for MSVC. llvm-svn: 203651
* Added some missing header files.Hafiz Abid Qadeer2014-03-121-0/+1
| | | | | | They help fix mingw build. llvm-svn: 203650
* Fix Mingw build error by using lower case name for windows header files.Hafiz Abid Qadeer2014-03-101-1/+1
| | | | llvm-svn: 203505
* Allow line numbers to be shown in multi-line expressions.Greg Clayton2014-03-071-0/+1
| | | | llvm-svn: 203185
* Check if the terminal is interactive and set the flags accordinglyDeepak Panickal2014-03-031-1/+7
| | | | llvm-svn: 202726
* Move Windows getopt for building the DLLDeepak Panickal2014-03-031-2/+2
| | | | llvm-svn: 202725
* Build liblldb.dll in WindowsDeepak Panickal2014-03-031-1/+0
| | | | llvm-svn: 202724
* Fix Windows build using portable types for formatting the log outputsDeepak Panickal2014-03-031-8/+4
| | | | llvm-svn: 202723
* Fix types to eliminate compiler warnings in FreeBSD host classEd Maste2014-02-281-2/+2
| | | | llvm-svn: 202498
* Check call to fgetc for EINTR.Jim Ingham2014-02-271-20/+31
| | | | | | <rdar://problem/16140277> llvm-svn: 202426
* There’s no need to call posix_spawnp_setbinpref_np when we are launching ↵Jim Ingham2014-02-211-18/+25
| | | | | | | | in the shell. That only sets the architecture of the shell, we use “arch —arch” to actually pick the binary we actually want to launch’s architecture. <rdar://problem/16103187> llvm-svn: 201831
* Replaced custom variable arguments to standard library for correcting 64 bit ↵Deepak Panickal2014-02-171-16/+33
| | | | | | Windows build llvm-svn: 201523
* Fix Windows build, broken by the inclusion of sys/ioctl.h and isatty()Deepak Panickal2014-02-171-1/+4
| | | | llvm-svn: 201522
* Fix the LLDB prompt for older Editline versions, specifically running on ↵Deepak Panickal2014-02-171-0/+5
| | | | | | Ubuntu 12.04 llvm-svn: 201521
* Avoid leaking namebuf in case of an early exitEnrico Granata2014-02-121-7/+5
| | | | llvm-svn: 201206
* <rdar://problem/15996848>Han Ming Ong2014-02-103-4/+49
| | | | | | | Made sure we pass along the file action paths for stdin/stdout/stderr to the XPC service. [Reviewed by Greg Clayton] llvm-svn: 201103
* Host: unconstify editline paramtersSaleem Abdulrasool2014-02-101-4/+8
| | | | | | | | | | | | | | Although the interface to el_push should be a constant parameter (as it is on Darwin), certain Linux distributions currently ship a header which does not provide proper const correctness. This causes compilation failures on Linux. Strip the constness on the parameter, which whilst incorrect, is mostly harmless. The parameter will not be changed by the interface and so it is acceptable to do this. When distributions have updated to a more correct declaration, it would be nice to revert this change. Addresses PR18784. llvm-svn: 201092
* Only set EL_PROMPT_ESC when existing - fix typoSylvestre Ledru2014-02-081-1/+1
| | | | llvm-svn: 201024
* Only set EL_PROMPT_ESC when existingSylvestre Ledru2014-02-081-0/+2
| | | | llvm-svn: 201023
* Fixed an issue where "command source" would not do the right thing:Greg Clayton2014-02-051-3/+52
| | | | | | | - empty lines in init files would repeat previous command and cause errors to be displayed - all options to control showing the command, its output, if it should stop on error or continue, weren't being obeyed. llvm-svn: 200860
* Update header comment to match filenameEd Maste2014-02-021-1/+1
| | | | llvm-svn: 200647
* Fixing the Windows build for the changes brought in from the iohandler merge.Deepak Panickal2014-01-314-189/+526
| | | | llvm-svn: 200565
* Pressing ^D in a non-empty input terminates LLDB. This was due to the fact ↵Greg Clayton2014-01-301-1/+15
| | | | | | | | that we stack more than one editline instance on top of each other and we still expect CTRL+D to exit the editline instance, but it should only do so when the line is empty. Otherwise it should (and does) delete the character at the cursor. <rdar://problem/15944703> llvm-svn: 200489
* Merging the iohandler branch back into main. Greg Clayton2014-01-273-27/+721
| | | | | | | | | | | | 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
* Candidate fix for bug 18592.Todd Fiala2014-01-231-1/+1
| | | | | | | | | This reverts Host.cpp LaunchProcess spawn behavior on FreeBSD to be like Linux (and unlike OS X) with regards to how default signal handlers and setup on the spawned process. FreeBSD does not reset default signal handlers on the spawned process after this change. llvm-svn: 199908
* Unify OS X/POSIX/Linux Host spawn support.Todd Fiala2014-01-232-284/+233
| | | | | | | | | | | | | | | This fixes a bug under Linux where spawning a process via Host::LaunchProcess was disabling all blockable signals on the launched process. This caused strange behavior when attempting to kill the lldb-gdbserver process, as the child generally would not die unless killed with a non-blockable signal (e.g. 'kill -9'). This change moves several functions out of macosx/Host.mm into common/Host.cpp. In addition, two functions that needed to work across common/Host.cpp and macosx/Host.mm were moved into the Host.h header file. llvm-svn: 199856
* Add support for Haswell on x86_64.Greg Clayton2014-01-221-2/+4
| | | | | | <rdar://problem/15312873> llvm-svn: 199854
* Make lldb build with Makefiles on OS X.Todd Fiala2014-01-181-10/+14
| | | | | | | | | | | | | | | | | | This change does the following: * Adds Makefile build scripts to debug server. * Fixes a few small mistakes in the other makefiles. * Modifies generate-vers.pl slightly to also work for debugserver. * Changes the OS X, non-framework python search path from libdir to libdir/python2.X/site-packages where it is installed by the build system (also where it is installed on other operating systems). Patch by Keno Fischer. llvm-svn: 199543
* Added distribution info to ArchSpec and qHostInfo message.Todd Fiala2014-01-181-0/+6
| | | | | | | | | | | | | | | | | | | ArchSpec now contains an optional distribution_id, with getters and setters. Host::GetArchitecture () sets it on non-Apple platforms using Host::GetDistributionId (). The distribution_id is ignored during ArchSpec comparisons. The gdb remote qHostInfo message transmits it, if set, via the distribution_id={id-value} key/value pair. Updated gdb remote docs to reflect this change. As before, GetDistributionId () returns nothing on non-Linux platforms at this time. On Linux, it is returned only if the lsb_platform command is installed (in /bin or /usr/bin), and only if the distributor id key is returned by 'lsb_platform -i'. This id is lowercased, and whitespace is replaced with underscores. llvm-svn: 199539
* Undo change to triple behavior from r199510.Todd Fiala2014-01-171-7/+1
| | | | | | | | | The Linux distribution will be added to the ArchSpec class in an upcoming change. This change only undoes the change to the triple. The distribution retrieval logic and enabling of lldb-gdbserver for linux x86_64 builds is still in place. llvm-svn: 199520
* Enable Linux distribution in vendor portion of host triple.Todd Fiala2014-01-172-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
* Fixed the Visual Studio Windows buildDeepak Panickal2014-01-131-1/+1
| | | | llvm-svn: 199111
* Update the lldb version number in the xcode project files from 310.99.0 to ↵Jason Molenda2014-01-102-2/+2
| | | | | | 320.99.0. llvm-svn: 198917
* Only check os version for POSIX_SPAWN_CLOEXEC_DEFAULT on desktop builds of LLDB.Greg Clayton2014-01-081-1/+1
| | | | llvm-svn: 198800
* Fixed a kernel panic that would occur if you debug anything on MacOSX 10.7 ↵Greg Clayton2014-01-081-43/+72
| | | | | | or earlier due to the use of the POSIX_SPAWN_CLOEXEC_DEFAULT attribute flag that closes all file descriptors on exec. We now dyamically detect the OS version and do the right thing. llvm-svn: 198776
* <rdar://problem/15639995>Han Ming Ong2013-12-191-19/+8
| | | | | | Allow the root XPC launcher to launch any target as root. llvm-svn: 197634
* Fixes an issue where a signum => name mapping function has multiple case ↵Sylvestre Ledru2013-12-131-0/+4
| | | | | | | | | statements that define to the same integral value on my Linux (Ubuntu 12.04, x86_64). It's for SIGIO and SIGPOLL. In the case that they are both defined the same. Patch by Todd Fiala (but typos are mine) llvm-svn: 197221
* Don't try to guess sys header conditions, and simply check if each signal is ↵Jean-Daniel Dupas2013-12-121-4/+6
| | | | | | | | | | defined. CC: lldb-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2394 llvm-svn: 197173
OpenPOWER on IntegriCloud