summaryrefslogtreecommitdiffstats
path: root/lldb/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix some warnings in MSVC build.Hafiz Abid Qadeer2015-02-181-3/+2
| | | | | | | | | | Platform.h was causing soem warning due to multiple defined maros. It already has a define that excludes the singal.h but that was not being used at correct place. It has been fixed now. Tested by building on Windows(MSVC) and Linux(gcc). llvm-svn: 229664
* Make the sourcing of the local .lldbinit file quiet.Jim Ingham2014-11-222-22/+38
| | | | | | <rdar://problem/19065278> llvm-svn: 222599
* Make the option parsing of -k & -K match the help strings.Jim Ingham2014-11-201-2/+2
| | | | llvm-svn: 222479
* Add "-k" and "-K" options to the driver, that allow you to register Jim Ingham2014-11-192-98/+193
| | | | | | | | | | | | some commands that will get run if the target crashes. Also fix the bug where the local .lldbinit file was not getting sourced before not after the target was created from the file options on the driver command line. <rdar://problem/19019843> llvm-svn: 222295
* LLGS Android target support - for Andy Chien : http://reviews.llvm.org/D6166Shawn Best2014-11-082-6/+10
| | | | llvm-svn: 221570
* This adds a "batch mode" to lldb kinda like the gdb batch mode. It will ↵Jim Ingham2014-10-142-4/+28
| | | | | | | | | | | | | | | | quit the debugger after all the commands have been executed except if one of the commands was an execution control command that stopped because of a signal or exception. Also adds a variant of SBCommandInterpreter::HandleCommand that takes an SBExecutionContext. That way you can run an lldb command targeted at a particular target, thread or process w/o having to select same before running the command. Also exposes CommandInterpreter::HandleCommandsFromFile to the SBCommandInterpreter API, since that seemed generally useful. llvm-svn: 219654
* Rework the way we pass "run multiple command" options to the various API's thatJim Ingham2014-10-111-3/+21
| | | | | | | | | | | | | | | do that (RunCommandInterpreter, HandleCommands, HandleCommandsFromFile) to gather the options into an options class. Also expose that to the SB API's. Change the way the "-o" options to the lldb driver are processed so: 1) They are run synchronously - didn't really make any sense to run the asynchronously. 2) The stop on error 3) "quit" in one of the -o commands will not quit lldb - not the command interpreter that was running the -o commands. I added an entry to the run options to stop-on-crash, but I haven't implemented that yet. llvm-svn: 219553
* Fix build break in Xcode build of lldb-tool.Todd Fiala2014-09-151-0/+2
| | | | llvm-svn: 217772
* Fix Windows build.Zachary Turner2014-09-111-0/+2
| | | | | | | | * ssize_t isn't defined by default on Windows. * New public API files need to be defined in a different file for Windows. llvm-svn: 217624
* driver: handle write error betterSaleem Abdulrasool2014-09-081-2/+18
| | | | | | | | | | | | | | | We would previously simply assume that the write would always succeed. However, write(2) may return -1 for error as well as fail to perform a complete write (in which case the returned number of bytes will be less than the requested bytes). Explicitly check if an error condition is encountered. This would previously not be caught as we default initialized success to true. Add an assertion that we always perform a complete write (a continuous retry could be added to ensure that we finish writing completely). This was caught by GCC's signed comparison warning and manual inspection. llvm-svn: 217355
* Restore the handling of the --arch argument passed to the Driver that was ↵Jim Ingham2014-08-071-1/+6
| | | | | | | | | | inadvertently removed in r214319. <rdar://problem/17948431> llvm-svn: 215165
* Convert over to using pipes for the initial LLDB commands in the Driver.Greg Clayton2014-08-011-35/+77
| | | | | | This will avoid having to use a temp file and adding temp file related calls to the public API. llvm-svn: 214536
* Fix build: remove bogus ./ at end of lineEd Maste2014-07-301-1/+1
| | | | llvm-svn: 214326
* (no commit message)Greg Clayton2014-07-302-106/+91
| | | | llvm-svn: 214319
* Remove unused defines from lldb driver.Todd Fiala2014-06-051-3/+0
| | | | | | | | See http://reviews.llvm.org/D3965 for details. Change by Thiago Farina. llvm-svn: 210268
* Use correct readline header on NetBSD.Joerg Sonnenberger2014-05-021-1/+1
| | | | llvm-svn: 207861
* Fixing MSVC windows build. Please respect code order when ifdefing out MSVC ↵Colin Riley2014-03-311-15/+18
| | | | | | specifics :) llvm-svn: 205211
* Hide some declarations from mingw.Hafiz Abid Qadeer2014-03-132-12/+15
| | | | llvm-svn: 203781
* Add Driver to the build for mingw.Hafiz Abid Qadeer2014-03-121-2/+7
| | | | llvm-svn: 203653
* Replace some _MSC_VER with _WIN32.Hafiz Abid Qadeer2014-03-122-2/+2
| | | | | | | 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
* Build liblldb.dll in WindowsDeepak Panickal2014-03-031-0/+4
| | | | llvm-svn: 202724
* Fix Windows build using portable types for formatting the log outputsDeepak Panickal2014-03-033-13/+17
| | | | llvm-svn: 202723
* The "-n" and "-p" options to the lldb driver no longer worked after recent ↵Greg Clayton2014-02-061-0/+17
| | | | | | | | IOHandler changes, this is now fixed. <rdar://problem/15962763> llvm-svn: 200930
* Fix the --source-quietly option to the driver so that it actually works. ↵Jim Ingham2014-02-051-16/+20
| | | | | | | | Clean up the help output a bit. llvm-svn: 200878
* Fixing the Windows build for the changes brought in from the iohandler merge.Deepak Panickal2014-01-316-633/+1
| | | | llvm-svn: 200565
* Merging the iohandler branch back into main. Greg Clayton2014-01-275-1738/+84
| | | | | | | | | | | | 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
* Fixes to get LLDB building on Windows again.Deepak Panickal2013-10-222-10/+3
| | | | llvm-svn: 193159
* Fix FreeBSD build after r192714 (Windows command line driver)Ed Maste2013-10-161-7/+7
| | | | llvm-svn: 192789
* Patch enabling lldb command line driver to run on windows.Deepak Panickal2013-10-1511-113/+931
| | | | | | | | | | | | | | | CHANGES: - Thread locking switched from pthreads to C++11 standard library. - Abstracted platform specific header includes into 'platform.h'. - Create editline emulator for windows. - Emulated various platform dependant functions on windows. TODO: - User input currently handled by gets_s(), work started on better handler: see _WIP_INPUT_METHOD define blocks in 'ELWrapper.cpp'. Aim is to handle 'tab' auto completion on windows. - Tidy up 'getopt.inc' from lldbHostCommon to serve as LLDB Drivers getopt windows implementation. llvm-svn: 192714
* Fixed a race condition where the prompt would randomly go missing.Richard Mitton2013-09-252-2/+43
| | | | | | | | | | el_gets was using fflush to output it's string, but because we have our own filter running on the piped pty output, fflush only causes the prompt to be written into the pipe, and does not cause the filter code to run immediately. The simplest fix is to manually block and wait for all editline output to be processed. This fixes PR 14637. llvm-svn: 191392
* editline headers are under readline/ for NetBSD.Joerg Sonnenberger2013-09-251-1/+1
| | | | llvm-svn: 191389
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-251-18/+18
| | | | llvm-svn: 191367
* Make the docs for the -s -o -S and -O options clearer.Jim Ingham2013-09-171-4/+13
| | | | llvm-svn: 190838
* This changes how the --source driver argument works. I split this into four ↵Jim Ingham2013-09-142-68/+127
| | | | | | | | | | | | | | | | | arguments: -S : Specifies a command file which will get sourced after the ~/.lldbinit but before file arguments are processed -O : Specifies a single (one-line) command that will get ditto and -s : Specifies a command file which will get sourced after `pwd`/.lldbinit -o : Specifies a command file which ditto I also changed it so that by default these sourced commands will print their command result, but there's a -q option to change that if you wish. llvm-svn: 190734
* Revert part of my previous patch, we should be using libedit underEric Christopher2013-09-031-1/+1
| | | | | | linux for command line editing. llvm-svn: 189820
* Fix a bunch of compile time warnings and a build failure on ubuntu.Eric Christopher2013-08-301-1/+1
| | | | llvm-svn: 189683
* Following the modification introduced in llvm by commit 185311Sylvestre Ledru2013-07-011-1/+1
| | | | | | | | | | | | | | | | | | 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
* Add ${ansi.XX} parsing to lldb prompt, use-color setting, and -no-use-colors ↵Michael Sartain2013-05-231-1/+7
| | | | | | | | | | command line options. settings set use-color [false|true] settings set prompt "${ansi.bold}${ansi.fg.green}(lldb)${ansi.normal} " also "--no-use-colors" on the command prompt llvm-svn: 182609
* Fix shutdown to correctly close stdout and stop showing garbage characters ↵Michael Sartain2013-05-221-1/+7
| | | | | | | | on exit. Patch by Matthew Sorrels llvm-svn: 182539
* Append missing version number to lldb binary built by cmakeDaniel Malea2013-05-171-0/+2
| | | | | | | | - now, the output binary is called 'lldb-3.4' instead of 'lldb' - a symlink 'lldb' -> 'lldb-3.4' is also created - this fixes one of the problems preventing CMake from building Debian packages llvm-svn: 182148
* <rdar://problem/13764135>Greg Clayton2013-05-142-5/+19
| | | | | | | | The "lldb" driver was interfering with STDOUT and STDERR if the output was over 1024 charcters long. The output was grabbing 1024 characters at a time, before it output the characters, it was writing characters to the screen to clear the current line. This has been fixed. I also fixed the command interpreter from mixing the "(lldb) " prompt in with program output by always manually checking for program output. This was done by having the command interpreter know when it is in the middle of executing a command by setting a bool. This was needed since sometimes when a command would run the target, like with a command like 'expression (int)printf("hello\n")', the process would push a new input reader, and then pop it when it was done. This popping of the input reader would cause the command interpreter to get sent a reactivated message (from the private process state thread) and cause it to ask for another command, even though we were still in the middle of the command ('expression (int)printf("hello\n")'). Now we set a bool to true, run the command and set the bool to false. If we get reactivated while we are in the middle of a command, we don't say we are ready for a new command. This coupled with emitting the STDOUT/STDERR first after each command, followed by the command results, followed by then saying we are ready for a new command, should help cleanup the command line output on all platforms. llvm-svn: 181807
* <rdar://problem/13063912>Enrico Granata2013-05-062-6/+30
| | | | | | | If the user pressed ^D, that would bypass the exit confirmation mechanism This checkin remedies that by making sure that users get prompted on exit when appropriate even if they use CTRL+D instead of typing quit at the prompt llvm-svn: 181257
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-181-1/+1
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-181-1/+1
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* <rdar://problem/13457391>Greg Clayton2013-04-041-5/+5
| | | | | | LLDB now can use a single dash for all long options for all commands form the command line and from the command interpreter. This involved just switching all calls from getopt_long() to getopt_long_only(). llvm-svn: 178789
* Finish up CMake support for LLDB (tested on Linux)Daniel Malea2013-02-281-0/+16
| | | | | | | | | - add missing scripts (driver, tests, etc...) - enable running of tests from cmake with "make check-lldb" target - fix up problem with clang dependencies (this enables parallel builds) - implement platform-specific FIXMEs in source/CMakeLists.txt llvm-svn: 176306
* Call el_resize when the window size changes.Jim Ingham2013-02-224-1/+22
| | | | | | <rdar://problem/13270100> llvm-svn: 175926
* Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction ↵Jim Ingham2013-02-091-3/+24
| | | | | | | | | | | interoperate to fix problems where hitting auto-continue signals while running a thread plan would cause us to lose control of the debug session. <rdar://problem/12993641> llvm-svn: 174793
OpenPOWER on IntegriCloud