History log of /external/lldb/tools/driver/Driver.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4084fe70b71aef8d9d90186f9f54cd8a4d4c6861 14-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13764135>

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
81a96aa6242f7b559770f5dc62316253cb8cb0d4 18-Apr-2013 Greg Clayton <gclayton@apple.com> Since we use C++11, we should switch over to using std::unique_ptr when 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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
2eaca13a907b3c2ce41602b646d073851dc696eb 22-Feb-2013 Jim Ingham <jingham@apple.com> Call el_resize when the window size changes.

<rdar://problem/13270100>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
aa93c931a4c1275b2fecec23ef34f231afda4773 21-Dec-2012 Jim Ingham <jingham@apple.com> Added an SBAPI to get the PythonPath (if the Host knows how to do that). And a -P option to the Driver
to print it out. Changed dotest.py to use that to find the PythonPath it should use given the lldb binary
it was told to run.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
94a5d0de4433dce556db59758f3d6124eb0e1a2a 10-Oct-2012 Jim Ingham <jingham@apple.com> Change the Thread constructor over to take a Process& rather than a ProcessSP. We can't create Threads with a NULL ProcessSP, so it makes no sense to use the SP.
Then make the Thread a Broadcaster, and get it to broadcast when the selected frame is changed (but only from the Command Line) and when Thread::ReturnFromFrame
changes the stack.
Made the Driver use this notification to print the new thread status rather than doing it in the command.
Fixed a few places where people were setting their broadcaster class by hand rather than using the static broadcaster class call.

<rdar://problem/12383087>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
6c061beb3f9b60380b9638a4eacb3bc46ad38fc5 16-Aug-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/12096295

Add an lldb command line option to specify a core file: --core/-c.
For consistency, change the "target create" command to also use --core.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
f125250ba7bcaa2ea5ee95539a309e3fd2f8b5d7 29-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10605072>

Added the ability to override command line commands. In some cases GUI interfaces
might want to intercept commands like "quit" or "process launch" (which might cause
the process to re-run). They can now do so by overriding/intercepting commands
by using functions added to SBCommandInterpreter using a callback function. If the
callback function returns true, the command is assumed to be handled. If false
is returned the command should be evaluated normally.

Adopted this up in the Driver.cpp for intercepting the "quit" command.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
28e23861bedbeb5e46be7d2af4c33bf5132422c6 08-Feb-2012 Jim Ingham <jingham@apple.com> Send Breakpoint Changed events for all the relevant changes to breakpoints.
Also, provide and use accessors for the thread options on breakpoints so we
can control sending the appropriate events.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
83dd2039d86b79e9cd5cf320bdb50c838fcb7b9c 14-Sep-2011 Jim Ingham <jingham@apple.com> Adding "-n", "-p" and "-w" flags to the lldb command-line tool to
allow attaching from the command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
b38df1e945846a5d956974ec157902a6ad748868 10-May-2011 Caroline Tice <ctice@apple.com> Make sure writing asynchronous output only backs up
& overwrites prompt if the IOChannel input reader is the top
input reader.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
4a348081030cdd2af758fddc869518357d9befd3 02-May-2011 Caroline Tice <ctice@apple.com> This patch captures and serializes all output being written by the
command line driver, including the lldb prompt being output by
editline, the asynchronous process output & error messages, and
asynchronous messages written by target stop-hooks.

As part of this it introduces a new Stream class,
StreamAsynchronousIO. A StreamAsynchronousIO object is created with a
broadcaster, who will eventually broadcast the stream's data for a
listener to handle, and an event type indicating what type of event
the broadcaster will broadcast. When the Write method is called on a
StreamAsynchronousIO object, the data is appended to an internal
string. When the Flush method is called on a StreamAsynchronousIO
object, it broadcasts it's data string and clears the string.

Anything in lldb-core that needs to generate asynchronous output for
the end-user should use the StreamAsynchronousIO objects.

I have also added a new notification type for InputReaders, to let
them know that a asynchronous output has been written. This is to
allow the input readers to, for example, refresh their prompts and
lines, if desired. I added the case statements to all the input
readers to catch this notification, but I haven't added any code for
handling them yet (except to the IOChannel input reader).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't needed, and allows us to
abstract our API better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
4dc1892eefc8ccaceec79c09b63fa198b40b4ab9 08-Dec-2010 Greg Clayton <gclayton@apple.com> Any arguments that are not options to the "lldb" command line driver, now get
used as the arguments for the inferior program. So for example you can do

% lldb /bin/ls /tmp ~/Documents

And "lldb" will use "/bin/ls" as the program and send arguments "/tmp" and
"~/Documents" as the launch args.

If you specify a file, then all remaining args after option parsing
will be used for program arguments:

% lldb -f /bin/ls /tmp ~/Documents

If you need to pass option values to your inferior program, just terminate
the "lldb" command line driver options with "--":

% lldb -- /bin/ls -AFl /tmp

The arguments are placed into the "settings" variable named
"target.process.run-args". This allows you to just run the program using
"process launch" and, if no args are specified on that command, the
"target.process.run-args" values will be used:

% lldb -- /bin/ls -AFl /tmp
Current executable set to '/bin/ls' (x86_64).
(lldb) settings show target.process.run-args
target.process.run-args (array):
[0]: '-AFl'
[1]: '/tmp'
(lldb)
(lldb) r
Process 56753 launched: '/bin/ls' (x86_64)
lrwxr-xr-x@ 1 root wheel 11 Nov 19 2009 /tmp@ -> private/tmp



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
757500e29b7856823f2f4aedd30f206ec009147e 29-Sep-2010 Caroline Tice <ctice@apple.com> Fix various timing/threading problems in IOChannel & Driver that
were causing the prompt to be stomped on, mangled or omitted occasionally.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
74989e88af7e04f3fe0bb3a800163113d7e0ca12 30-Aug-2010 Jim Ingham <jingham@apple.com> Added a way to open the current source file & line in an external editor, and you can turn this on with:

lldb -e

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
c833295baeec641086f536e78050388af36784f8 26-Aug-2010 Jim Ingham <jingham@apple.com> Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
63094e0bb161580564954dee512955c1c79d3476 23-Jun-2010 Greg Clayton <gclayton@apple.com> Very large changes that were needed in order to allow multiple connections
to the debugger from GUI windows. Previously there was one global debugger
instance that could be accessed that had its own command interpreter and
current state (current target/process/thread/frame). When a GUI debugger
was attached, if it opened more than one window that each had a console
window, there were issues where the last one to setup the global debugger
object won and got control of the debugger.

To avoid this we now create instances of the lldb_private::Debugger that each
has its own state:
- target list for targets the debugger instance owns
- current process/thread/frame
- its own command interpreter
- its own input, output and error file handles to avoid conflicts
- its own input reader stack

So now clients should call:

SBDebugger::Initialize(); // (static function)

SBDebugger debugger (SBDebugger::Create());
// Use which ever file handles you wish
debugger.SetErrorFileHandle (stderr, false);
debugger.SetOutputFileHandle (stdout, false);
debugger.SetInputFileHandle (stdin, true);

// main loop

SBDebugger::Terminate(); // (static function)

SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to
ensure nothing gets destroyed too early when multiple clients might be
attached.

Cleaned up the command interpreter and the CommandObject and all subclasses
to take more appropriate arguments.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
dea5ea78ef9bf371a0d19590c6b7c6989cba9a89 09-Jun-2010 Jason Molenda <jmolenda@apple.com> Move source/Utility/PseudoTerminal.h into include/lldb/Utility.
The top of the header file seems to indicate that this was
intended to be over at include/lldb/Core but we should be in line
with the .cpp file's location so it's include/lldb/Utility for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
f2f321d826c21c674ca5787b18e8b3e0edaa214b 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Misc minor warning/error fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
fdd10d62bb2c1ccaf348015daae5e72d39fe19a6 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> And part two of two of fixing includes; somehow I thought the problem was more
widespread than it was.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.h