summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/IOHandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of Debugger::FormatPrompt() and replace it with the new FormatEntity ↵Greg Clayton2015-02-041-9/+19
| | | | | | | | | | | | | | | | | | | class. Why? Debugger::FormatPrompt() would run through the format prompt every time and parse it and emit it piece by piece. It also did formatting differently depending on which key/value pair it was parsing. The new code improves on this with the following features: 1 - Allow format strings to be parsed into a FormatEntity::Entry which can contain multiple child FormatEntity::Entry objects. This FormatEntity::Entry is a parsed version of what was previously always done in Debugger::FormatPrompt() so it is more efficient to emit formatted strings using the new parsed FormatEntity::Entry. 2 - Allows errors in format strings to be shown immediately when setting the settings (frame-format, thread-format, disassembly-format 3 - Allows auto completion by implementing a new OptionValueFormatEntity and switching frame-format, thread-format, and disassembly-format settings over to using it. 4 - The FormatEntity::Entry for each of the frame-format, thread-format, disassembly-format settings only replaces the old one if the format parses correctly 5 - Combines all consecutive string values together for efficient output. This means all "${ansi.*}" keys and all desensitized characters like "\n" "\t" "\0721" "\x23" will get combined with their previous strings 6 - ${*.script:} (like "${var.script:mymodule.my_var_function}") have all been switched over to use ${script.*:} "${script.var:mymodule.my_var_function}") to make the format easier to parse as I don't believe anyone was using these format string power user features. 7 - All key values pairs are defined in simple C arrays of entries so it is much easier to add new entries. These changes pave the way for subsequent modifications where we can modify formats to do more (like control the width of value strings can do more and add more functionality more easily like string formatting to control the width, printf formats and more). llvm-svn: 228207
* Disable Editline on Windows.Zachary Turner2014-11-171-7/+4
| | | | | | | | | | | | | | | | | | | | Editline does not work correctly on Windows. This goes back at least to r208369, and as a result r210105 was submitted to disable libedit at runtime on Windows. More recently, r222163 was submitted which re-writes editline entirely, but makes the situation even worse on Windows, to the point that it doesn't even compile. While it would be easy to fix the compilation failure, this patch simply stops compiling Editline entirely on Windows, as the simple compilation fix would still result in a broken use of select on Windows, and as such a broken implementation of Editline. Since Editline was already disabled to begin with on Windows, we don't attempt to fix the compilation failure or the underlying issues, and instead just disable it "even more". llvm-svn: 222177
* Complete rewrite of interactive editing support for single- and multi-line ↵Kate Stone2014-11-171-45/+138
| | | | | | | | | | | | | | | | | | | input. Improvements include: * Use of libedit's wide character support, which is imperfect but a distinct improvement over ASCII-only * Fallback for ASCII editing path * Support for a "faint" prompt clearly distinguished from input * Breaking lines and insert new lines in the middle of a batch by simply pressing return * Joining lines with forward and backward character deletion * Detection of paste to suppress automatic formatting and statement completion tests * Correctly reformatting when lines grow or shrink to occupy different numbers of rows * Saving multi-line history, and correctly preserving the "tip" of history during editing * Displaying visible ^C and ^D indications when interrupting input or sending EOF * Fledgling VI support for multi-line editing * General correctness and reliability improvements llvm-svn: 222163
* Enable llgs to build against experimental Android AOSP ↵Todd Fiala2014-09-271-3/+45
| | | | | | | | | | | | lldb/llvm/clang/compiler-rt repos. See http://reviews.llvm.org/D5495 for more details. These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}. llvm-svn: 218568
* Multi-line expressions in Xcode now have a space between the line number and ↵Greg Clayton2014-06-111-1/+1
| | | | | | | | the expression text. <rdar://problem/17238093> llvm-svn: 210718
* Windows fix: Disable editline for MSVC. Since r208369 there have been ↵Colin Riley2014-06-031-1/+2
| | | | | | issues, probably related to the editline wrapper. For now, it's more stable and usable disabled. llvm-svn: 210105
* "process kill" and "process detach" were causing double prompts or prompts ↵Greg Clayton2014-05-081-2/+4
| | | | | | | | that would overwrite each other. Fixed now. <rdar://problem/16547729> llvm-svn: 208369
* Revert bad checkin that use incorrect member field.Greg Clayton2014-05-081-1/+0
| | | | llvm-svn: 208339
* Set the current line to invalid when done getting multiple lines.Greg Clayton2014-05-081-0/+1
| | | | llvm-svn: 208338
* lldb TOT is dropping the last entry for multi-line IOHandlers that use the ↵Greg Clayton2014-05-081-1/+6
| | | | | | | | IOHandlerDelegateMultiline. <rdar://problem/16844164> llvm-svn: 208336
* Fixed CTRL+C related issues:Greg Clayton2014-05-021-16/+39
| | | | | | | | | | | | - CTRL+C wasn't clearing the command in lldb - CTRL+C doesn't work in python macros in lldb - Ctrl+C no longer interrupts the running process that you attach to <rdar://problem/15949205> <rdar://problem/16778652> <rdar://problem/16774411> llvm-svn: 207816
* Fixed a case where if someone added a "bind -v" to their ~/.editrc file, key ↵Greg Clayton2014-04-231-0/+1
| | | | | | | | | | mappings would get messed up. I fixed this by only doing el_set(e, EL_BIND, ...) calls before sourcing the .editrc files. <rdar://problem/16614095> llvm-svn: 207005
* Use the default TID format in curses UIEd Maste2014-04-091-3/+7
| | | | | | | | | | TIDs are conventionally shown as decimal values on FreeBSD and Linux. Thus, use the ${thread.id%tid} format string to display the thread ID, instead of a fixed hex format. llvm.org/pr19380 llvm-svn: 205912
* Fixed a case where we could spin indefinitely if we got an error from fgets ↵Greg Clayton2014-04-071-0/+6
| | | | | | | | that isn't EINTR. <rdar://problem/16535437> llvm-svn: 205740
* Don’t exit the command interpreter if we get interrupted by an EINTR when ↵Greg Clayton2014-04-041-1/+4
| | | | | | calling fgets(). llvm-svn: 205638
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-041-46/+41
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* sanitise sign comparisonsSaleem Abdulrasool2014-04-021-30/+32
| | | | | | | | 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
* Change the backtrace view into a process tree view where you can expand the ↵Greg Clayton2014-03-191-87/+219
| | | | | | process, its threads and see all frames under each thread. llvm-svn: 204251
* This commit reworks how the thread plan's ShouldStopHere mechanism works, so ↵Jim Ingham2014-03-131-3/+2
| | | | | | | | | | | | | | | that it is useful not only for customizing "step-in" behavior (e.g. step-in doesn't step into code with no debug info), but also the behavior of step-in/step-out and step-over when they step out of the frame they started in. I also added as a proof of concept of this reworking a mode for stepping where stepping out of a frame into a frame with no debug information will continue stepping out till it arrives at a frame that does have debug information. This is useful when you are debugging callback based code where the callbacks are separated from the code that initiated them by some library glue you don't care about, among other things. llvm-svn: 203747
* Allow line numbers to be shown in multi-line expressions.Greg Clayton2014-03-071-0/+23
| | | | llvm-svn: 203185
* remove useless declarations found thanks to scan-buildSylvestre Ledru2014-02-271-3/+1
| | | | llvm-svn: 202440
* Fixed the command line LLDB so that "CTRL+C" will interrupt a running ↵Greg Clayton2014-02-241-0/+11
| | | | | | process again. llvm-svn: 202086
* Fixed an issue where "command source" would not do the right thing:Greg Clayton2014-02-051-26/+26
| | | | | | | - 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
* LLDB exits the command interpreter and thus LLDB when using a pty or file as ↵Greg Clayton2014-02-041-0/+5
| | | | | | | | the input handle and a blank line is entered (like when running under emacs). This is now fixed. <rdar://problem/15976187> llvm-svn: 200790
* Fixing the Windows build for the changes brought in from the iohandler merge.Deepak Panickal2014-01-311-2/+15
| | | | llvm-svn: 200565
* Show help dialog the first time the "gui" is run to help users find their way.Greg Clayton2014-01-281-6/+61
| | | | llvm-svn: 200326
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-0/+5221
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
OpenPOWER on IntegriCloud