History log of /external/lldb/tools/driver/Driver.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
17d5a0358d60922707fdab6ec9c3251ca44dd614 23-May-2013 Michael Sartain <mikesart@valvesoftware.com> Add ${ansi.XX} parsing to lldb prompt, use-color setting, and -no-use-colors 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



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
3cc1b9c78b84a3796ecb7ba1f57335e952a4b746 23-May-2013 Michael Sartain <mikesart@valvesoftware.com> Fix shutdown to correctly close stdout and stop showing garbage characters on exit.
Patch by Matthew Sorrels


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
3f2f741bb533b78e2fac5332c4698338ea2fd3ac 04-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13457391>

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().



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
89e248f04ecb87d0df4a4b96158c3fac0a3e43c7 09-Feb-2013 Jim Ingham <jingham@apple.com> Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction 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>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
278f16e1dd4097bf3dd12b0f63f1fac0f11c4006 21-Dec-2012 Andrew Kaylor <andrew.kaylor@intel.com> Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
09eb052b6340c2e0b7062cbba72f71db960c61ca 17-Dec-2012 Daniel Malea <daniel.malea@intel.com> Initialize m_done to false in Driver constructor to avoid premature exit bug (spotted on Linux)

Patch by Chia-Hung Duan!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
c8aa9c9b5b9c584daa94cba7592bebea6ce6dfab 14-Dec-2012 Enrico Granata <egranata@apple.com> Trigger the display of error and output in sourced commands from the result object's status instead of the presence of text in the error stream
This should be more consistent with the notion of command success/failure and avoids spewing warnings that the user might not care about
There will need to be an option to specify the level of verbosity desired (never show anything, only show failures, errors and warning, everything)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
1581d7d8a976cc63ce44789c07b1b35a80786dfb 13-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12700464>

Fixing an issue where errors in command files sourced as arguments to command-line lldb (e.g. ./lldb -s foo.cmd) would not be shown to the user



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
2e2812388b75d3c62c9518cc1a6550ce29325aa6 11-Dec-2012 Jim Ingham <jingham@apple.com> Broadcast an event when the selected thread is changed.

<rdar://problem/10976636>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
d35b7b3bfd21f4fd6b048693563eef1b772ae197 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> More Linux warnings fixes (remove default labels as needed):
- as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
0bce9a22354df3f00e68ffd912119a0741753b7f 05-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12649160>

Added the ability to debug through your process exec'ing itself to the same architecture.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
6475c42148a8ea1ca86e5db465db7eca742d897d 04-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12798131>

Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.

This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
b1087a27f7babc43f332c9d49ac4554892133a41 30-Nov-2012 Jim Ingham <jingham@apple.com> Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
7b771d2bc07469dfad2828cfb0bbd21713304810 24-Oct-2012 Jason Molenda <jmolenda@apple.com> eArgTypePath was removed in r166533; change -c to
expect eArgTypeFilename.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
b8fda50a3e97699af76a406f03d139ee1bd94d01 16-Oct-2012 Enrico Granata <egranata@apple.com> Removing the two extra GetXSize(bool) calls since we do not desire to support them long-term

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
c2bc7944f7c2f10114426f447259a35acb0b1e18 16-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12446320> Fixing an issue with our Driver where setting an immediate output would not cause suppression of the final printout. This allows effective output redirection for Python commands

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
31f175eacd5b7bd82694726c22464d6e4a84d1d5 28-Sep-2012 Jason Molenda <jmolenda@apple.com> Fix the extra space char being emitted in this message when breakpoints resolve -

1 location added to breakpoint 2



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
f99355834bee84e48e2b6205ed13d307faa74405 11-Sep-2012 Filipe Cabecinhas <me@filcab.net> Some more typing-related fixes.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
5d90ade8e8e0d776fe8e1b9e88fc1c86d02e8e4e 28-Jul-2012 Jim Ingham <jingham@apple.com> Added an lldb_private & equivalent SB API to send an AsyncInterrupt to the event loop.
Convert from calling Halt in the lldb Driver.cpp's input reader's sigint handler to sending this AsyncInterrupt so it can be handled in the
event loop.
If you are attaching and get an async interrupt, abort the attach attempt.
Also remember to destroy the process if get interrupted while attaching.
Getting this to work also required handing the eBroadcastBitInterrupt in a few more places in Process WaitForEvent & friends.

<rdar://problem/10792425>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
4a379b1194f3e6b308cd6e80b45d6ca5dd0aafd7 17-Jul-2012 Greg Clayton <gclayton@apple.com> Ran the static analyzer on the codebase and found a few things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
d1e0829de2ab90cb34d13b2776d3be3977355e5a 19-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11649610
lldb confused by single quote in executable path

Also add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
0d99969ff26d108ec04f8830913e41e7f151db56 01-Jun-2012 Jim Ingham <jingham@apple.com> If the Driver's input reader gets an Interrupt and the current command line is empty, then treat that interrupt as an instruction to Stop the process of the currently selected target.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
5d44dcc0f5558db037d13ebf4e772c9a8fb673cf 17-May-2012 Johnny Chen <johnny.chen@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
5a4e5afa5acc36a0b8ff90fe4c704cd4c1e49d1b 11-May-2012 Greg Clayton <gclayton@apple.com> Don't intercept the quit command and override what is was doing. This was causing the "lldb" command line to deadlock when the quit command was executed sometimes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
8ab2c22f22bd5ff09c98441f148406e0a890084e 09-May-2012 Johnny Chen <johnny.chen@apple.com> Make ctrl-c terminate the current input line and start an empty line, instead of the previous content.

rdar://problem/11412821


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
f92ddcc2fda5ca564acc37d2fecd4b577dfc2bde 09-May-2012 Jim Ingham <jingham@apple.com> Print out a notification when the process of a target other than the currently selected target stops.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
c76486cc024511ab8e96baea752e98f49c2b1da4 26-Apr-2012 Jim Ingham <jingham@apple.com> Don't call SBDebugger::SetInternalVariable in the sigwinch_handler, since that takes locks and potentially does allocations.
Just call SBDebugger::SetTerminalWidth on the driver's SBDebugger, which does the same job, but no locks.
Also add the value checking to SetTerminalWidth you get with SetInternalVariable(..., "term-width", ...).

rdar://problem/11310563


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
4722b10307668368bf0f12fa6b8691e4f4cb5488 06-Mar-2012 Jim Ingham <jingham@apple.com> Add a command and an SB API to create exception breakpoints. Make the break output prettier for Exception breakpoints.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
5a15e6927b5b3234fb3e688717297ba6b5dd6ad7 16-Feb-2012 Jim Ingham <jingham@apple.com> Add a general mechanism to wait on the debugger for Broadcasters of a given class/event bit set.
Use this to allow the lldb Driver to emit notifications for breakpoint modifications.
<rdar://problem/10619974>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
7cd8cd51421be28c7c615e141e87cf53bf2e21a0 02-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed terminal settings not being properly restored when "quit" was run.
This affected bash users.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
db9d6f47ab38e25c3efcbfa05780bf9a127fd259 31-Jan-2012 Greg Clayton <gclayton@apple.com> Cleaned up the Communication class when it tears down ConnectionFileDescriptor
instances to not pthread_cancel the read threads and wreak havoc on the mutex
in our ConnectionFileDescriptor class.

Also cleaned up some shutdown delays.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
d9919d3f46c5069eef065a27f96abc021330d5f3 02-Dec-2011 Greg Clayton <gclayton@apple.com> Process IDs (lldb::pid_t) and thread IDs (lldb::tid_t) are now 64 bit. This
will allow us to represent a process/thread ID using a pointer for the OS
plug-ins where they might want to represent the process or thread ID using
the address of the process or thread structure.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
abb3302051246273eb92cca203c9a1b9d9736e05 08-Nov-2011 Greg Clayton <gclayton@apple.com> Moved many of the "settings" that used to be in "target.process.*" to just
be in the target. All of the environment, args, stdin/out/err files, etc have
all been moved. Also re-enabled the ability to launch a process in a separate
terminal on MacOSX.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
97c8957257a3e0b3ce6f46f8e5a28c965e30f357 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fix a bunch of -Wreorder problems.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
dbcf98c194742f911c963854084c66aa49a5e513 15-Sep-2011 Jim Ingham <jingham@apple.com> Track whether a process was Launched or Attached to. If Attached, the detach when the debugger is destroyed, rather than killing the process. Also added a Debugger::Clear, which gets called in Debugger::Destroy to deal with all the targets in the Debugger. Also made the Driver's main loop call Destroy on the debugger, rather than just Destroying the currently selected Target's process.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
cc637461f6c59851302836c64e0cb002de4f4571 13-Sep-2011 Jim Ingham <jingham@apple.com> SBSourceManager now gets the real source manager either from the Debugger or Target. Also, move the SourceManager file cache into the debugger
so it can be shared amongst the targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
cf0de2677d7c01d9117c782f67b85fa29d115c2a 17-Aug-2011 Jim Ingham <jingham@apple.com> Better help string for "lldb -- file arg1 arg2..."

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
6ae254432fed5ba37a8114e8a51702accaae5bb9 17-Aug-2011 Jim Ingham <jingham@apple.com> Document how to pass program args to lldb command-line.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
558dd5bc8b25722fa5b5106586b97ecf99e0026e 13-Aug-2011 Jim Ingham <jingham@apple.com> Add a version of SBDebugger::Create which allows us to specify whether to source
in the init files or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
ee6e790171b9a04023d0ea22603f0ac0ecb9a2c6 11-Aug-2011 Johnny Chen <johnny.chen@apple.com> Incremental fixes of issues found by Xcode static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
0eeaa9846d816181372d6ebee34de37c8bd21efb 09-Aug-2011 Jim Ingham <jingham@apple.com> Remove some commented out code that doesn't connect to anything yet...

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
421ca5014ea0e163998b9a8e0d777d3adb5c872e 29-May-2011 Greg Clayton <gclayton@apple.com> Don't have the debugger default to ignoring EOF. This is only what the driver
(or anything running in a terminal) wants. Not what a UI (Xcode) would want
where it creates a debugger per debug window. The current code had an infinite
loop after a debug session ended.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
845d6dac85acc72334aeef730f088168fe0eaf36 16-May-2011 Caroline Tice <ctice@apple.com> Fix places that were writing directly to the debugger's output
handles to go through the appropriate channels instead.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
388ca8fef002edf49d66126efa8f4dff7176edc1 03-May-2011 Caroline Tice <ctice@apple.com> Make the driver listen for asynchronous output, rather than
the IOChannel, so that it can be written out even while the
IOChannel is collecting user input.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
abe0fed36d83e1c37af9dae90c2d25db742b4515 18-Apr-2011 Greg Clayton <gclayton@apple.com> Centralized a lot of the status information for processes,
threads, and stack frame down in the lldb_private::Process,
lldb_private::Thread, lldb_private::StackFrameList and the
lldb_private::StackFrame classes. We had some command line
commands that had duplicate versions of the process status
output ("thread list" and "process status" for example).

Removed the "file" command and placed it where it should
have been: "target create". Made an alias for "file" to
"target create" so we stay compatible with GDB commands.

We can now have multple usable targets in lldb at the
same time. This is nice for comparing two runs of a program
or debugging more than one binary at the same time. The
new command is "target select <target-idx>" and also to see
a list of the current targets you can use the new "target list"
command. The flow in a debug session can be:

(lldb) target create /path/to/exe/a.out
(lldb) breakpoint set --name main
(lldb) run
... hit breakpoint
(lldb) target create /bin/ls
(lldb) run /tmp
Process 36001 exited with status = 0 (0x00000000)
(lldb) target list
Current targets:
target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped )
* target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited )
(lldb) target select 0
Current targets:
* target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped )
target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited )
(lldb) bt
* thread #1: tid = 0x2d03, 0x0000000100000b9a a.out`main + 42 at main.c:16, stop reason = breakpoint 1.1
frame #0: 0x0000000100000b9a a.out`main + 42 at main.c:16
frame #1: 0x0000000100000b64 a.out`start + 52

Above we created a target for "a.out" and ran and hit a
breakpoint at "main". Then we created a new target for /bin/ls
and ran it. Then we listed the targest and selected our original
"a.out" program, so we showed two concurent debug sessions
going on at the same time.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
5e342f50b42b265d8568e1c926328858e74b2c0a 14-Apr-2011 Greg Clayton <gclayton@apple.com> Added auto completion for architecture names and for platforms.

Modified the OptionGroupOptions to be able to specify only some of the options
that should be appended by using the usage_mask in the group defintions and
also provided a way to remap them to a new usage mask after the copy. This
allows options to be re-used and also targetted for specific option groups.

Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration.
Taught the option parser to be able to automatically use the appropriate
auto completion for a given options if nothing is explicitly specified
in the option definition. So you don't have to specify it in the option
definition tables.

Renamed the default host platform name to "host", and the default platform
hostname to be "localhost".

Modified the "file" and "platform select" commands to make sure all options
and args are good prior to creating a new platform. Also defer the computation
of the architecture in the file command until all options are parsed and the
platform has either not been specified or reset to a new value to avoid
computing the arch more than once.

Switch the PluginManager code over to using llvm::StringRef for string
comparisons and got rid of all the AccessorXXX functions in lieu of the newer
mutex + collection singleton accessors.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
dbeb3e1e038a75f00fd565203839020e1d00a7c6 11-Apr-2011 Stephen Wilson <wilsons@start.ca> Order of initialization lists.

This patch fixes all of the warnings due to unordered initialization lists.

Patch by Marco Minutoli.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
e4b9c1fb338ee1ada72e6a3c198afb342d68c5c1 08-Mar-2011 Greg Clayton <gclayton@apple.com> LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provide
an interface to a local or remote debugging platform. By default each host OS
that supports LLDB should be registering a "default" platform that will be
used unless a new platform is selected. Platforms are responsible for things
such as:
- getting process information by name or by processs ID
- finding platform files. This is useful for remote debugging where there is
an SDK with files that might already or need to be cached for debug access.
- getting a list of platform supported architectures in the exact order they
should be selected. This helps the native x86 platform on MacOSX select the
correct x86_64/i386 slice from universal binaries.
- Connect to remote platforms for remote debugging
- Resolving an executable including finding an executable inside platform
specific bundles (macosx uses .app bundles that contain files) and also
selecting the appropriate slice of universal files for a given platform.

So by default there is always a local platform, but remote platforms can be
connected to. I will soon be adding a new "platform" command that will support
the following commands:
(lldb) platform connect --name machine1 macosx connect://host:port
Connected to "machine1" platform.
(lldb) platform disconnect macosx

This allows LLDB to be well setup to do remote debugging and also once
connected process listing and finding for things like:
(lldb) process attach --name x<TAB>

The currently selected platform plug-in can now auto complete any available
processes that start with "x". The responsibilities for the platform plug-in
will soon grow and expand.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
aa378b1f53f8b557ceab403e31e6c9ef9a20b77d 20-Feb-2011 Greg Clayton <gclayton@apple.com> Don't limit StreamTee to just two streams. It now can contain
N streams by making the stream a vector of stream shared pointers
that is protected by a mutex. Streams can be get/set by index which
allows indexes to be defined as stream indentifiers. If a stream is
set at index 3 and there are now streams in the collection, then
empty stream objects are inserted to ensure that stream at index 3
has a valid stream. There is also an append method that allows a stream
to be pushed onto the stack. This will allow our streams to be very
flexible in where the output goes.

Modified the CommandReturnObject to use the new StreamTee functionality.
This class now defines two StreamTee indexes: 0 for the stream string
stream, and 1 for the immediate stream. This is used both on the output
and error streams.

Added the ability to get argument types as strings or as descriptions.
This is exported through the SBCommandInterpreter API to allow external
access.

Modified the Driver class to use the newly exported argument names from
SBCommandInterpreter::GetArgumentTypeAsCString().



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
2e8cb8a7342a2ea672792067d712a794e215a3a7 19-Feb-2011 Jim Ingham <jingham@apple.com> - Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
0467c78e9a75eff9ec33d3c1f39fa83e1c5d9241 04-Feb-2011 Greg Clayton <gclayton@apple.com> Applied a fix to qualify "UUID" with the lldb_private namespace to fix
build issues on MinGW.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
e71e258286a1713dbb2d366d8b81ff2f28e0216f 04-Feb-2011 Greg Clayton <gclayton@apple.com> Added support for attaching to a remote debug server with the new command:
(lldb) process connect <remote-url>

Currently when you specify a file with the file command it helps us to find
a process plug-in that is suitable for debugging. If you specify a file you
can rely upon this to find the correct debugger plug-in:

% lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) process connect connect://localhost:2345
...

If you don't specify a file, you will need to specify the plug-in name that
you wish to use:

% lldb
(lldb) process connect --plugin process.gdb-remote connect://localhost:2345

Other connection URL examples:

(lldb) process connect connect://localhost:2345
(lldb) process connect tcp://127.0.0.1
(lldb) process connect file:///dev/ttyS1

We are currently treating the "connect://host:port" as a way to do raw socket
connections. If there is a URL for this already, please let me know and we
will adopt it.

So now you can connect to a remote debug server with the ProcessGDBRemote
plug-in. After connection, it will ask for the pid info using the "qC" packet
and if it responds with a valid process ID, it will be equivalent to attaching.
If it response with an error or invalid process ID, the LLDB process will be
in a new state: eStateConnected. This allows us to then download a program or
specify the program to run (using the 'A' packet), or specify a process to
attach to (using the "vAttach" packets), or query info about the processes
that might be available.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
b2b604f51ef03beb85d3c8d997ec25d85dea26fa 27-Jan-2011 Jim Ingham <jingham@apple.com> Adding a Xcode workspace for lldb.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
eecb0f3b5021e37311f9588f14bcab38a35b8e9a 04-Dec-2010 Greg Clayton <gclayton@apple.com> More reverting of the EOF stuff as the API was changed which we don't want to
do. Closing on EOF is an option that can be set on the
lldb_private::Communication or the lldb::SBCommunication objects after they
are created. Of course the EOF support isn't hooked up, so they don't do
anything at the moment, but they are left in so when the code is fixed, it
will be easy to get working again.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
9ac497bc11512d221b3962e4f883eeac07db188a 02-Dec-2010 Caroline Tice <ctice@apple.com> Add proper EOF handling to Communication & Connection classes:

Add bool member to Communication class indicating whether the
Connection should be closed on receiving an EOF or not. Update the
Connection read to return an EOF status when appropriate. Modify the
Communication class to pass the EOF along or not, and to close the
Connection or not, as appropriate.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
c4f55fee15b66ea53da092ca50400ac5d8b0692d 19-Nov-2010 Caroline Tice <ctice@apple.com> Add the ability to catch and do the right thing with Interrupts (often control-c)
and end-of-file (often control-d).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
95e33b7b4b832ff5a8dfd0720fe6a100be894df6 07-Nov-2010 Greg Clayton <gclayton@apple.com> Modified the DWARF parser for both the single DWARF file and for the case
where the DWARF is in the .o files so they can track down the actual type for
a forward declaration. This was working before for just DWARF files, but not
for DWARF in .o files where the actual definition was in another .o file.

Modified the main thread name in the driver to be more consistent with the
other LLDB thread names.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
36f63a92bae332929e1a047b59ed6df651d8537f 19-Oct-2010 Greg Clayton <gclayton@apple.com> Stop the driver from handling SIGPIPE in case we communicate with stale
sockets so the driver doesn't just crash.

Added support for connecting to named sockets (unix IPC sockets) in
ConnectionFileDescriptor.

Modified the Host::LaunchInNewTerminal() for MacOSX to return the process
ID of the inferior process instead of the process ID of the Terminal.app. This
was done by modifying the "darwin-debug" executable to connect to lldb through
a named unix socket which is passed down as an argument. This allows a quick
handshake between "lldb" and "darwin-debug" so we can get the process ID
of the inferior and then attach by process ID and avoid attaching to the
inferior by process name since there could be more than one process with
that name. This still has possible race conditions, those will be fixed
in the near future. This fixes the SIGPIPE issues that were sometimes being
seen when task_for_pid was failing.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
bd5c63ef58a9ebed5b458ddbb77eb334b84787bd 12-Oct-2010 Caroline Tice <ctice@apple.com> Fix some memory leaks.

Add call to lldb.SBDebugger.Initialize() to lldb.py, so it automatically gets called when
the lldb Python module gets loaded.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
9caa94672c3a70e76316edfd29fa52d4a1ff6729 11-Oct-2010 Greg Clayton <gclayton@apple.com> Exit if the command line is started with "--help".

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
887aa2898314218406275a34cbec30c11cd00acd 11-Oct-2010 Greg Clayton <gclayton@apple.com> Added a "--no-lldbinit" option (-n for short (which magically matches
what gdb uses)) so we can tell our "lldb" driver program to not automatically
parse any .lldbinit files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
4d6675c8e1cab6360f59865229835ae137d6f68a 01-Oct-2010 Caroline Tice <ctice@apple.com> Modify command options to use the new arguments mechanism. Now all command option
arguments are specified in a standardized way, will have a standardized name, and
have functioning help.

The next step is to start writing useful help for all the argument types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
238c0a1e7b733cee539258faa656159c63f9e893 18-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed the way set/show variables were being accessed to being natively
accessed by the objects that own the settings. The previous approach wasn't
very usable and made for a lot of unnecessary code just to access variables
that were already owned by the objects.

While I fixed those things, I saw that CommandObject objects should really
have a reference to their command interpreter so they can access the terminal
with if they want to output usaage. Fixed up all CommandObjects to take
an interpreter and cleaned up the API to not need the interpreter to be
passed in.

Fixed the disassemble command to output the usage if no options are passed
down and arguments are passed (all disassebmle variants take options, there
are no "args only").



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
eddffe93d2c9ebb575e7b03fe1c5e71f9ecaf9f1 10-Sep-2010 Caroline Tice <ctice@apple.com> If the file the user specifies can't be found in the current directory,
and the user didn't specify a particular directory, search for the file
using the $PATH environment variable.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
b8314fe67960cfcc5d9e9232be4c1914c9ef0ce3 09-Sep-2010 Caroline Tice <ctice@apple.com> Make API calls for setting/getting user settable variables static.
Modify Driver to handle SIGWINCH signals and automatically re-set the
term-width variable.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
e40e76403faaf8f3c26eb95a8ee2b397987cd488 07-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed a buffer overrun error that could occur every time the program was run due to a "sprintf" with a destination string that was too short.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
72f8a3c26c70393c49cdcfe9ecbbd0e44ab90e4c 07-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed an error where a random string would get executed after a recent fix that checked if the window column size was zero was added on the lldb driver startup.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
6e4c5ce0f697eb9899a54854a2a9004e961b0de2 04-Sep-2010 Caroline Tice <ctice@apple.com> This is a very large commit that completely re-does the way lldb
handles user settable internal variables (the equivalent of set/show
variables in gdb). In addition to the basic infrastructure (most of
which is defined in UserSettingsController.{h,cpp}, there are examples
of two classes that have been set up to contain user settable
variables (the Debugger and Process classes). The 'settings' command
has been modified to be a command-subcommand structure, and the 'set',
'show' and 'append' commands have been moved into this sub-commabnd
structure. The old StateVariable class has been completely replaced
by this, and the state variable dictionary has been removed from the
Command Interpreter. Places that formerly accessed the state variable
mechanism have been modified to access the variables in this new
structure instead (checking the term-width; getting/checking the
prompt; etc.)

Variables are attached to classes; there are two basic "flavors" of
variables that can be set: "global" variables (static/class-wide), and
"instance" variables (one per instance of the class). The whole thing
has been set up so that any global or instance variable can be set at
any time (e.g. on start up, in your .lldbinit file), whether or not
any instances actually exist (there's a whole pending and default
values mechanism to help deal with that).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
537926c76e5bc7b92ce9a74c864f1d2e2a346596 02-Sep-2010 Jim Ingham <jingham@apple.com> Move "variable list" to "frame variable"



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
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.cpp
7c9842487cd2a61f12669624f4ba38bb5c8617ea 28-Jul-2010 Johnny Chen <johnny.chen@apple.com> The unix "source" command maps to "command source" in lldb. :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
bef1583b89e73de77c8b0897fcf42b5b1fcabe4c 14-Jul-2010 Greg Clayton <gclayton@apple.com> I enabled some extra warnings for hidden local variables and for hidden
virtual functions and caught some things and did some general code cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
54e7afa84d945f9137f9372ecde432f9e1a702fc 09-Jul-2010 Greg Clayton <gclayton@apple.com> Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
12bec71b323dc520f0e985a86e09c4712559e115 28-Jun-2010 Greg Clayton <gclayton@apple.com> Added function name types to allow us to set breakpoints by name more
intelligently. The four name types we currently have are:

eFunctionNameTypeFull = (1 << 1), // The function name.
// For C this is the same as just the name of the function
// For C++ this is the demangled version of the mangled name.
// For ObjC this is the full function signature with the + or
// - and the square brackets and the class and selector
eFunctionNameTypeBase = (1 << 2), // The function name only, no namespaces or arguments and no class
// methods or selectors will be searched.
eFunctionNameTypeMethod = (1 << 3), // Find function by method name (C++) with no namespace or arguments
eFunctionNameTypeSelector = (1 << 4) // Find function by selector name (ObjC) names


this allows much more flexibility when setting breakoints:

(lldb) breakpoint set --name main --basename
(lldb) breakpoint set --name main --fullname
(lldb) breakpoint set --name main --method
(lldb) breakpoint set --name main --selector

The default:

(lldb) breakpoint set --name main

will inspect the name "main" and look for any parens, or if the name starts
with "-[" or "+[" and if any are found then a full name search will happen.
Else a basename search will be the default.

Fixed some command option structures so not all options are required when they
shouldn't be.

Cleaned up the breakpoint output summary.

Made the "image lookup --address <addr>" output much more verbose so it shows
all the important symbol context results. Added a GetDescription method to
many of the SymbolContext objects for the more verbose output.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
41313fcfe1dac69ea33cc835c5eff28262e5cc04 18-Jun-2010 Jim Ingham <jingham@apple.com> Move the "status" command to "process status" since that's where it belongs. Also make it print "running" if invoked
when the current process is running.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
34e9a98dcff785b0693594b6d6753f560abf8be2 15-Jun-2010 Jim Ingham <jingham@apple.com> Change the Options parser over to use a mask rather than an ordinal for option sets.
Fixed the Disassemble arguments so you can't specify start address or name in multiple ways.
Fixed the command line input so you can specify the filename without "-f" even if you use other options.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
ef2bc8787c6b12bd69dc45dd38ab2f1eb2673778 13-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Make getopt() use portable to Linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
d6e167d0fe8666347554226424bb39e36686e0d6 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Add a few more missing includes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/driver/Driver.cpp
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.cpp
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.cpp