History log of /external/lldb/source/Interpreter/CommandInterpreter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3e11c7ec050648ba865f1d451f8cb46fd39072a8 19-Jun-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Sort out a number of mismatched integer types in order to cut down the number of compiler warnings.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c86ae088be2439a2eed608add5603b7a94db1032 18-Jun-2013 Enrico Granata <egranata@apple.com> This patch fixes the issue where our command-line tab completer would sometimes replicate commands
e.g.

(lldb) pl<TAB>
Available completions:
platform
plugin
platform
plugin

Thanks to Matthew Sorrels for doing work and testing on this issue

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b1fb72761226817e7f687eca21cbe9c0a3ec4cf6 18-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14134716>

This is a rewrite of the command history facility of LLDB

It takes the history management out of the CommandInterpreter into its own CommandHistory class
It reimplements the command history command to allow more combinations of options to work correctly (e.g. com hist -c 1 -s 5)
It adds a new --wipe (-w) option to command history to allow clearing the history on demand
It extends the lldbtest runCmd: and expect: methods to allow adding commands to history if need be
It adds a test case for the reimplemented facility



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c8b6859869e128bad1607fb12b20b43f4a09a2bd 12-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13299214>

Make the error message here more interesting for the user

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
6fefc3a3915bcaf899b9179c43b1b7b2f693b3ad 11-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12876503>

Adding a new setting interpreter.stop-command-source-on-error that dictates a default behavior for whether command source should stop upon hitting an error
You can still override the setting for each individual invocation with the usual -e setting



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
589d3618411e8a757992482e4d0cb3cb79480f2e 17-May-2013 Jim Ingham <jingham@apple.com> Apropos should search user commands as well as built-in commands.

rdar://problem/13916722


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
2f6a4ed0dd1b2046a5193a1432af7462e32c620d 15-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13892319>

The command "po" by itself yields odd errors. I fixed the alias.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
a153f63ec971339431c945499bd540515270267a 03-May-2013 Jim Ingham <jingham@apple.com> If HandleCommands is called with add_to_history set to false, turn on the m_command_source_depth so that when we forget the value for regex & alias commands it still stays off.

<rdar://problem/13795202>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
11ac3162a6b54579d28cfe3968f2a3536a951c5b 23-Apr-2013 Matt Kopec <Matt.Kopec@intel.com> Look for an inexact match in just the commands before searching the alias commands as well.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
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/source/Interpreter/CommandInterpreter.cpp
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/source/Interpreter/CommandInterpreter.cpp
71c5d60c65c7e73a55adfc220501fe7085fd0eb7 17-Apr-2013 Sean Callanan <scallanan@apple.com> Removed the "expr" alias for "expression," which
is entirely unnecessary and confuses the command
interpreter when the user types "exp".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
1d4812cbb71af9e05250a4ffbcda4236275c82b4 03-Apr-2013 Jim Ingham <jingham@apple.com> Allow partial matching for alias commands as well as regular commands.

<rdar://problem/13552724>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d47cda9928716f4d050fb3c6c3469d59aa1325fd 02-Apr-2013 Sean Callanan <scallanan@apple.com> Added "rb" and "rbr" aliases to fix regressions
when we changed "rb" to "rbreak".

<rdar://problem/13552724>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
f3c65b85caf3e097654f6b59c9a709507adfc254 29-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12022060>

Enable tab completion for regular expression commands.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
952e9dc874944fcdbbb224f3ec4fc2c859376f64 28-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b1f44b340f31ec747a7b6dcd299b8a6151470817 13-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13404189>

Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command:

(lldb) l -10

Which gets turned into:

(lldb) source list --reverse --count 10

Also simplified the code that is used to track showing more source from the last file and line.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
a7cb6633a9fbea316ae3c4c442df0bdf81fab534 23-Feb-2013 Jim Ingham <jingham@apple.com> Correct the logic in DumpCommandHistory when the end index is UINT32_MAX.

<rdar://problem/13270229>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
e9a5a50885c68f0bbd5f87c610be0aea639a8d9e 22-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13265017>

The notion of Crossref command has long been forgotten, and there is nothing using CommandObjectCrossref in the current LLDB codebase
However, this was causing a conflict with process plugins and command aliases ending up in an infinite loop under situations such as:
(lldb) command alias monitor process plugin packet monitor
(lldb) process att -n Calendar
Process 28709 stopped
Executable module set to "/Applications/Calendar.app/Contents/MacOS/Calendar".
Architecture set to: x86_64-apple-macosx.
(lldb) command alias monitor process plugin packet monitor

This fixes the loop (and consequent crash) by disposing of Crossref commands and related code



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c06adf1bd6b9b051f74804047c0627a49fac2bf6 12-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13178743>

Added a new "env" regular expression alias. If "env" is typed on its own "settings show target.env-vars" will be run. Otherwise it can be used to set and environment variable: "env FOO=BAR".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c98abf51778fe9b4a992ab0111d5912b2b3420e8 12-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13184389>

_regexp-list needs to treat "list -" as "source list -r"



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
f2bf27413cdcbd730aa2ed05ec5cdb6222b130e9 08-Feb-2013 Greg Clayton <gclayton@apple.com> Added the ability to specify a breakpoint using the GDB '*ADDRESS' format:

(lldb) b *0x1234

You can still of course just specify an address:

(lldb) b 0x1234

Also now we accept the '&' before function names to indicate to not to skip the function prologue like GDB supports. To see how this works:

(lldb) settings set interpreter.expand-regex-aliases 1
(lldb) b &main
breakpoint set --name 'main' --skip-prologue=0
Breakpoint 1: where = a.out`main at main.c:20, address = 0x0000000100000b60
(lldb) b main
breakpoint set --name 'main'
Breakpoint 2: where = a.out`main + 54 at main.c:21, address = 0x0000000100000b96




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
8f805c29a68c326788278e21308f1a700dc58635 02-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13050227>

Added a regular expression command called "_regexp-list" which mimics the GDB "line" command in the following forms:

LINENUM, to list around that line in current file,
FILE:LINENUM, to list around that line in that file,
FUNCTION, to list around beginning of that function,
*ADDRESS, to list around the line containing that address.
ADDRESS, same as above, but don't require a '*' as long as ADDRESS is hex



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
f892c42725ed36c97e8ce10e758170cf6f1aff83 30-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/9141269>

Cleaned up the objective C name parsing code to use a class.

Now breakpoints that are set by name that are objective C methods without the leading '+' or '-' will resolve. We do this by expanding all the objective C names for a given string. For example:

(lldb) b [MyString cStringUsingEncoding:]

Will set a breakpoint with multiple possible names:
-[MyString cStringUsingEncoding:]
+[MyString cStringUsingEncoding:]

Also if you have a category, it will strip the category and set a breakpoint in all variants:

(lldb) [MyString(my_category) cStringUsingEncoding:]

Will resolve to the following names:

-[MyString(my_category) cStringUsingEncoding:]
+[MyString(my_category) cStringUsingEncoding:]
-[MyString cStringUsingEncoding:]
+[MyString cStringUsingEncoding:]

Likewise when we have:

(lldb) b -[MyString(my_category) cStringUsingEncoding:]

It will resolve to two names:
-[MyString(my_category) cStringUsingEncoding:]
-[MyString cStringUsingEncoding:]





git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
dcb36c76090fdbf52f020bdd3fada62e0cffcc8d 17-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12786725>

If there is any alive process being debugged, the user is asked for confirmation before quitting LLDB
This should prevent situations where the user mistakenly types "q" and LLDB slaughters their process without any mercy whatsoever
Since it can quickly get tedious, there is a new setting on the command interpreter to disable this and replicate the previous behavior



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b794020ffbd6473c59a6e98be044df50abf7fc30 15-Jan-2013 Jim Ingham <jingham@apple.com> Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called
function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes
more sense.
Also make both these behaviors globally settable through "settings set".
Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing
and crashing. Now we just stop without calling the second command.

<rdar://problem/12986644>
<rdar://problem/9119325>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b1484f7c5b38bf5fbd73622b033ac4343d21624e 15-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12582041>

_regexp_attach doesn't handle the case where no arguments are provided. It now also handles the case you were you pass options.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
992d227ab9ef1a8ffabc138fd515fb667556ae10 12-Dec-2012 Enrico Granata <egranata@apple.com> Option changes:
the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command.

All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o)

This is a breaking change:
frame variable used --objc as the long option name
expression used -o as a shortcut
memory read uses --objd as the long option name

Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works

The test suite has been tweaked accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
d891f9b872103235cfd2ed452c6f14a4394d9b3a 05-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
db05491da80820047dc218542c88ba0d9f08fc71 29-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup
Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
de1edceb2474399ab9bdbb919a05b536a4d64d49 23-Oct-2012 Jason Molenda <jmolenda@apple.com> Clean up help/usage messages for kdp-remote / gdb-remote a little bit.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
2657b6bcfdde42ae97cbaac56e8f7ed3857b4605 19-Oct-2012 Jim Ingham <jingham@apple.com> Change the "rb" alias to "rbreak" since some people are used to typing more than "rb" and so weren't
finding the alias.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
47beabb1386be44e3f90dbc30a0b22c23b93a4dc 16-Oct-2012 Jim Ingham <jingham@apple.com> Add the ability to set timeout & "run all threads" options both from the "expr" command and from
the SB API's that evaluate expressions.

<rdar://problem/12457211>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
13193d5ae15f194102c14a5ccdc46e8db5c3d95f 13-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12491387>

I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override:

virtual CommandObject *
GetPluginCommandObject();

This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
f190a41a2e9a77499709e68ed0822f1498afef4c 10-Oct-2012 Jim Ingham <jingham@apple.com> Don't make regexp commands as regular commands - they are "short cuts" and users should be able to override them with "unalias" but you can't unalias normal commands.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
7f6503285fb5e71b89c63abce98dbbb2a8fa898b 06-Oct-2012 Jason Molenda <jmolenda@apple.com> Remove "k" as an alias for "kill". It doesn't ask for confirmation and
it's too easy to type by mistake when typing "l" (read: I did this once).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
2e9d527c0def58b2cef74d71f9a55672933fa7e6 05-Oct-2012 Jim Ingham <jingham@apple.com> Remove the bt alias I inadvertently added back in in my last checkin.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
2753a024a5a314232baa579c0ada87551aa86988 05-Oct-2012 Jim Ingham <jingham@apple.com> Add one-shot breakpoints (-o option to "break set") and a tbreak alias for our gdb friends.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
1a48cb7c84595e5fb0634c4758a84bb0dda012d2 05-Oct-2012 Jason Molenda <jmolenda@apple.com> Change the "bt" command alias defined in CommandInterpreter::LoadCommandDictionary.
It is now a regex command alias that more faithfully emulates gdb's
behavior, most importantly, "bt 5" will backtrace 5 frames of the
currently selected thread. "bt all" still backtraces all threads
(unlike gdb) and for users who have learned to use "bt -c 5", that
form is still accepted.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
2f1014bdef1dba6163afec1eb5a3076d7117bd9d 01-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12406088> Fixing a crasher with adding a regex command, due to accessing a shared pointer without first checking for NULL


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
6d101887bb427b3c879c0c06775ab4dcb1cd265b 29-Sep-2012 Enrico Granata <egranata@apple.com> Implementing plugins that provide commands.
This checkin adds the capability for LLDB to load plugins from external dylibs that can provide new commands
It exports an SBCommand class from the public API layer, and a new SBCommandPluginInterface

There is a minimal load-only plugin manager built into the debugger, which can be accessed via Debugger::LoadPlugin.

Plugins are loaded from two locations at debugger startup (LLDB.framework/Resources/PlugIns and ~/Library/Application Support/LLDB/PlugIns) and more can be (re)loaded via the "plugin load" command

For an example of how to make a plugin, refer to the fooplugin.cpp file in examples/plugins/commands

Caveats:
Currently, the new API objects and features are not exposed via Python.
The new commands can only be "parsed" (i.e. not raw) and get their command line via a char** parameter (we do not expose our internal Args object)
There is no unloading feature, which can potentially lead to leaks if you overwrite the commands by reloading the same or different plugins
There is no API exposed for option parsing, which means you may need to use getopt or roll-your-own


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
73feea495a1ed9850f8ff46092f4c3ff935242a8 27-Sep-2012 Jason Molenda <jmolenda@apple.com> Change the kdp-remote alias to require a hostname (instead of allowing a zero-length hostname to be specified).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
f2e53a53d931692a76f0f8b73a8c38f1bf2cffe9 27-Sep-2012 Greg Clayton <gclayton@apple.com> Added "k" as an alias to "process kill" since the new "kdb-remote" will now conflict with it.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c3750435abd083cc11fa7614007a7a5c38a84f38 27-Sep-2012 Greg Clayton <gclayton@apple.com> Add convenience aliases to allow easy attaching to a remote gdb server or kdp (darwin kernel) server with the new "gdb-remote" regex alias and "kdp-remote" regex alias commands.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d27026e46d8430fb451d85ac161a8492e1930245 05-Sep-2012 Enrico Granata <egranata@apple.com> Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
a47e44b447750f33bff81995f41c4051fc699409 24-Aug-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11811338

Add 'attach <pid>|<process-name>' command to lldb, as well as 'detach' which is an alias of 'process detach'.
Add two completion test cases for "attach" and "detach".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
58edac307c3c3c60db52a491c101b6565b9b234f 23-Aug-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/12022371

Make it so that "b 245" should set a breakpoint at line 245 of the current file.
Also add a simple test file.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
9f282851b07ff6daee37cd3b1a3fbc43ef11da29 23-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12022079>

Added a new "interpreter" properties to encapsulate any properties for the command interpreter. Right now this contains only "expand-regex-aliases", so you can now enable (disabled by default) the echoing of the command that a regular expression alias expands to:

(lldb) b main
Breakpoint created: 1: name = 'main', locations = 1

Note that the expanded regular expression command wasn't shown by default. You can enable it if you want to:

(lldb) settings set interpreter.expand-regex-aliases true
(lldb) b main
breakpoint set --name 'main'
Breakpoint created: 1: name = 'main', locations = 1

Also enabled auto completion for enumeration option values (OptionValueEnumeration) and for boolean option values (OptionValueBoolean).

Fixed auto completion for settings names when nothing has been type (it should show all settings).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
73844aa19a7360b662e2be710fc3c969d6c86606 22-Aug-2012 Greg Clayton <gclayton@apple.com> Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation:
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads

Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
3908bb19f5f7956dcb58d6cfca3958103af776a6 10-Aug-2012 Johnny Chen <johnny.chen@apple.com> Added back member initialization for m_batch_command_mode, which was most likely removed accidentally a while back.
The consequence occurred recently probably due to our swicth to build with c++11.
This fixed 3 test failures.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b386d82334b65fb984348f2027b1cb7714de993f 09-Aug-2012 Sean Callanan <scallanan@apple.com> Removed explicit NULL checks for shared pointers
and instead made us use implicit casts to bool.
This generated a warning in C++11.

<rdar://problem/11930775>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
59959ebd87b269b0a690cf88f103a370e973de73 08-Aug-2012 Sean Callanan <scallanan@apple.com> Made "call" another alias for "expression --",
for people used to the GDB command.

<rdar://problem/12052072>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
6cca9695637b27bd583eaae310d5c09dede7cc49 17-Jul-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11672978> Fixing an issue where an ObjC object might come out without a description because the expression used to obtain it would timeout before running to completion

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
bcaf99a74367d464dd38011e26b9b4be56b503ba 12-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11791234>

Fixed a case where the python interpreter could end up holding onto a previous lldb::SBProcess (probably in lldb.process) when run under Xcode. Prior to this fix, the lldb::SBProcess held onto a shared pointer to a lldb_private::Process. This in turn could cause the process to still have a thread list with stack frames. The stack frames would have module shared pointers in the lldb_private::SymbolContext objects.

We also had issues with things staying in the shared module list too long when we found things by UUID (we didn't remove the out of date ModuleSP from the global module cache).

Now all of this is fixed and everything goes away between runs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b88c0a917d30af9d6f767171d180bb75501848c1 10-Jul-2012 Enrico Granata <egranata@apple.com> Turning the interpreter mutex into a static global to avoid a potential leak. Might need to be turned back into a pointer if it causes issues with the destructor chain.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c5c10a47fd8ee2d6b6a55647a59ad429b02ef296 10-Jul-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11751427> Fixing an issue where multiple threads could concurrently try and initialize Python and cause crashes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
36eb7c00064891bd013938be1edc77738cf1a53f 06-Jul-2012 Jason Molenda <jmolenda@apple.com> Change the "run" / "r" command alias to not use --shell for lldb
running natively on arm - on iOS we have to do some extra work to
track the inferior process if we launch with a shell intermediary.
<rdar://problem/11719396>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
da26bd203cbb104291b39891febf7481794f205f 08-Jun-2012 Jim Ingham <jingham@apple.com> Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an
Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how
to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs.

Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for
the overall command and moved them into the .cpp file.

Made the CommandObject flags work for raw as well as parsed commands.

Made "expr" use the flags so that it requires you to be paused to run "expr".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
ee301fa37c161f85f8d3df49453bf905227d0283 02-Jun-2012 Sean Callanan <scallanan@apple.com> Added "kill" as an alias for "process kill".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
01bc2d493b48e4904e3241a7768e18fdd9bb6835 31-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11328896> Fixing a bug where regex commands were saved in the history even if they came from a 'command sourced' file - this fix introduces a command sourcing depth and disables history for all levels of depth > 0, which means no commands go into history when being sourced from a file. we need an integer depth because command files might themselves source other command files, ...

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
7b71b172c516740a3d9db3b5959f4e20a816b741 21-May-2012 Sean Callanan <scallanan@apple.com> Added an "rb" alias that sets breakpoints by
regular expression.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
86c50d733f7195867fb8240e1696a8001f5423a0 18-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11405850>

The "run" and "r" aliases were for gdb compatability, so make then do what GDB does by default: launch in a shell.

For those that don't want launching with a shell by default, add the following to your ~/.lldbinit file:

command unalias run
command unalias r
command alias r process launch --
command alias run process launch --



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
4bc8d16c0aeb8645a5ac70908639ca1e55018aab 17-May-2012 Filipe Cabecinhas <me@filcab.net> Warn the user when several commands match the input given.
Added a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
fc58af2513c7c9883df515686a5906d95a19ecf0 05-May-2012 Sean Callanan <scallanan@apple.com> Added an "attach" alias as promised on the web page.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
862fd5cdbaae4fab78d897be3e28aa3d7290aeb8 24-Apr-2012 Jim Ingham <jingham@apple.com> Report the command error when we are in "stop on error mode."

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c84623f95ddc04c800f5ef96c840eb1afc45563b 29-Mar-2012 Greg Clayton <gclayton@apple.com> Added a "add-dsym" alias to "target symbols add" to keep gdb converts happy.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
13d24fb1817faa7ccc4cfd799113ba1a2b8968eb 29-Jan-2012 Greg Clayton <gclayton@apple.com> Switching back to using std::tr1::shared_ptr. We originally switched away
due to RTTI worries since llvm and clang don't use RTTI, but I was able to
switch back with no issues as far as I can tell. Once the RTTI issue wasn't
an issue, we were looking for a way to properly track weak pointers to objects
to solve some of the threading issues we have been running into which naturally
led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared
pointer from just a pointer, which is also easily solved using the
std::tr1::enable_shared_from_this class.

The main reason for this move back is so we can start properly having weak
references to objects. Currently a lldb_private::Thread class has a refrence
to its parent lldb_private::Process. This doesn't work well when we now hand
out a SBThread object that contains a shared pointer to a lldb_private::Thread
as this SBThread can be held onto by external clients and if they end up
using one of these objects we can easily crash.

So the next task is to start adopting std::tr1::weak_ptr where ever it makes
sense which we can do with lldb_private::Debugger, lldb_private::Target,
lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
many more objects now that they are no longer using intrusive ref counted
pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
pointers).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
daa6efe771f5f068e29328a774fa5bf2358ce14a 21-Dec-2011 Sean Callanan <scallanan@apple.com> The "desired result type" code in the expression
parser has hitherto been an implementation waiting
for a use. I have now tied the '-o' option for
the expression command -- which indicates that the
result is an Objective-C object and needs to be
printed -- to the ExpressionParser, which
communicates the desired type to Clang.

Now, if the result of an expression is determined
by an Objective-C method call for which there is
no type information, that result is implicitly
cast to id if and only if the -o option is passed
to the expression command. (Otherwise if there
is no explicit cast Clang will issue an error.
This behavior is identical to what happened before
r146756.)

Also added a testcase for -o enabled and disabled.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
59355253c2bae819c040892add4d4575c59b4cf7 02-Dec-2011 Jim Ingham <jingham@apple.com> "f" should be an alias for "frame select" not "finish" to match the gdb usage.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
2618380b9a53dbc47a2b0c837ae09438bba72462 17-Nov-2011 Jim Ingham <jingham@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
36fe99155b969cfef8538e026394defabf5f4c23 14-Nov-2011 Jim Ingham <jingham@apple.com> Confirm should accept both "Y" and "y" in case somebody confuses the "default answer" indicator for a
directive to enter a capital letter.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
0731d2cb370d4550071221bce2fbe6011dda15ce 10-Nov-2011 Greg Clayton <gclayton@apple.com> Removed debug printf statements.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
3840cd75026758963e340ea3db65281759936a7a 10-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10374840>

Fixed an issue with the gdb format stuff for any aliases that expand to
contain a "--".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
6010acef0cee54e044d4e7e472ef3d99e13c5045 07-Nov-2011 Enrico Granata <granata.enrico@gmail.com> this patch addresses several issues with "command script" subcommands:
a) adds a new --synchronicity (-s) setting for "command script add" that allows the user to decide if scripted commands should run synchronously or asynchronously (which can make a difference in how events are handled)
b) clears up several error messages
c) adds a new --allow-reload (-r) setting for "command script import" that allows the user to reload a module even if it has already been imported before
d) allows filename completion for "command script import" (much like what happens for "target create")
e) prevents "command script add" from replacing built-in commands with scripted commands
f) changes AddUserCommand() to take an std::string instead of a const char* (for performance reasons)
plus, it fixes an issue in "type summary add" command handling which caused several test suite errors


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
3e4238d47a6d1a3106f357d2e7b495870721c7ae 04-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed the Xcode project building of LLVM to be a bit more user friendly:

- If you download and build the sources in the Xcode project, x86_64 builds
by default using the "llvm.zip" checkpointed LLVM.
- If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
Xcode project will download the right LLVM sources and build them from
scratch
- If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
directory, we will use the sources you have placed in the LLDB directory.

Python can now be disabled for platforms that don't support it.

Changed the way the libllvmclang.a files get used. They now all get built into
arch specific directories and never get merged into universal binaries as this
was causing issues where you would have to go and delete the file if you wanted
to build an extra architecture slice.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
8ca450b8718d326a93a53a8a3808f8bba0a2aa7e 31-Oct-2011 Johnny Chen <johnny.chen@apple.com> Revert 143359 and modify the test case to not include non-valid c identifier character.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
bec418056ec25c2fd75a361e0e98fa5534e13aae 31-Oct-2011 Johnny Chen <johnny.chen@apple.com> Fix the r143266 check-in which broke TestCommandRegex.py.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d8a218d998d0dd805a8e4ec7bbaa9aeb229590cc 29-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed the "expression" command when it comes to using it with the new GDB format
command suffix:

(lldb) expression/x 3+3

Since "expression" is a raw command that has options, we need to make sure the
command gets its options properly terminated with a "--".

Also fixed an issue where if you try to use the GDB command suffix on a
command that doesn't support the "--gdb-format" command, it will report an
appropriate error.

For the fix above, you can query an lldb_private::Options object to see if it
supports a long option by name.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b09f8479229d034c63ba8670f0507466141d61b8 29-Oct-2011 Johnny Chen <johnny.chen@apple.com> Get a dummy target to allow for calculator mode while processing backticks.
This also helps break the infinite loop caused when target is null.

So that we can have:

$ /Volumes/data/lldb/svn/trunk/build/Debug/lldb
(lldb) itob `0x123 - 0x321` 32 v
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0]
(lldb)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
7268b4c8a444a59d42f4d765bd7292e62f41a651 28-Oct-2011 Greg Clayton <gclayton@apple.com> Added the ability to have GDB formats appended to any command so you can do
things like:

(lldb) x/32xb 0x1000

"x" is an alias to "memory read", so this will actually turn into:

(lldb) memory read --gdb-format=32xb 0x1000

This applies to all commands, so the GDB formats will work with "register read",
"frame variable", "target variable" and others. All commands that can accept
formats, counts and sizes have been modified to support the "--gdb-format"
option.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
3f2ec9b8ff3a7bfa8ece0b23334c1ed3b9d9ad08 25-Oct-2011 Jason Molenda <jmolenda@apple.com> Prefix display/undisplay regexp command alises with "_regexp" as per the
style of the other regexp command aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
9d855c667f8006ffcfd20dc8858fea6a0308b411 25-Oct-2011 Greg Clayton <gclayton@apple.com> Simplified the CommandInterpreter::StripFirstWord logic by making it a static
function and having it not require both a bool and a quote char to fill in.
We intend to get rid of this functionality when we rewrite the command
interpreter for streams eventually, but not for now.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
9d1acc179e28cf2625e66c411fb164303b6e4e4e 24-Oct-2011 Jim Ingham <jingham@apple.com> Add "di" and "dis" aliases to "disassemble" so they will win over "display".


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
730cae073aef3b44b9d6f420ea3bb0a6e0b1f020 22-Oct-2011 Jason Molenda <jmolenda@apple.com> Add "display" and "undisplay" aliases for target stop-hook add/delete.
A patina of gdb's "display" command, intended mostly for simply monitoring
a variable as you step through source code. Formatters do not work, e.g.
display/x $pc does not work.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
47eb00e8fe39de83a04178c7d798b9ce7e0804e7 22-Oct-2011 Jason Molenda <jmolenda@apple.com> Add "stepi" as an alias for thread step-inst in addition to "si".
Add "nexti" an "ni" as aliases for thread step-inst-over.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
f5c0c72346eb8137107dbee95b12efb700117c13 14-Oct-2011 Greg Clayton <gclayton@apple.com> Added the ability to run expressions in any command. Expressions can be
inserted in commands by using backticks:

(lldb) memory read `$rsp-16` `$rsp+16`
(lldb) memory read -c `(int)strlen(argv[0])` `argv[0]`

The result of the expression will be inserted into the command as a sort of
preprocess stage where this gets done first. We might need to tweak where this
preprocess stage goes, but it is very functional already.

Added ansi color support to the Debugger::FormatPrompt() so you can use things
like "${ansi.fg.blue}" and "${ansi.bold}" many more. This helps in adding
colors to your prompts without needing to know the ANSI color code strings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
8bdf57cfc246358ab65b2d36ec2b8462e8d36e54 05-Oct-2011 Johnny Chen <johnny.chen@apple.com> Fix a problem where the stop-hook command 'frame variable g_val' produces nothing
when newly created threads were subsequently stopped due to breakpoint hit.
The stop-hook mechanism delegates to CommandInterpreter::HandleCommands() to
execuet the commands. Make sure the execution context is switched only once
at the beginning of HandleCommands() only and don't update the context while looping
on each individual command to be executed.

rdar://problem/10228156


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
01acfa76010b8db2e77016c144963c4dd70f1392 22-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add initial implementation of watchpoint commands for list, enable, disable, and delete.
Test cases to be added later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
567e7f3ba16eb48cb9fd6a2f26f2f7269eb6983c 22-Sep-2011 Greg Clayton <gclayton@apple.com> Converted the lldb_private::Process over to use the intrusive
shared pointers.

Changed the ExecutionContext over to use shared pointers for
the target, process, thread and frame since these objects can
easily go away at any time and any object that was holding onto
an ExecutionContext was running the risk of using a bad object.

Now that the shared pointers for target, process, thread and
frame are just a single pointer (they all use the instrusive
shared pointers) the execution context is much safer and still
the same size.

Made the shared pointers in the the ExecutionContext class protected
and made accessors for all of the various ways to get at the pointers,
references, and shared pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d6edcb5e331a05462340993dd425ba1152edc1fe 11-Sep-2011 Greg Clayton <gclayton@apple.com> Don't skip the application specific ~/.lldbinit file when the program
name is "lldb". So currently when you startup any application and you
have not specified that you would like to skip loading init files through
the API or from "lldb" options, then LLDB will try and load:

"~/.lldbinit-%s" where %s the basename of your program
"~/.lldbinit"

Then LLDB will load any program specified on the command line and then
source the "./.llbinit" file for any temporary debug session specific
commands.

I want this feature because I have thread and frame formats that do
ANSI color codes that I only want to load when running in a terminal
which is when I am running the "lldb" command line program.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
1ac6d1f9200a875cc4f761e278d29658599431c0 09-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Adding two new options to the 'help' command:
--show-aliases (-a) shows aliases for commands, as well as built-in commands
--hide-user-defined (-u) hides user defined commands
by default 'help' without arguments does not show aliases anymore. to see them, add --show-aliases
to have only built-in commands appear, use 'help --hide-user-defined' ; there is currently no way to hide
built-in commands from the help output
'help command' is not changed by this commit, and help is shown even if command is an alias and -a is not specified

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
23967773eda67ca32904b15cc80e556dd38266a8 25-Aug-2011 Johnny Chen <johnny.chen@apple.com> Make ThreadList::GetSelectedThread() select and return the 0th thread if there's no
currently selected thread. And update the call sites accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
24c991cab6651b0f87809b033d971e6e5ca19c39 25-Aug-2011 Jason Molenda <jmolenda@apple.com> Include lldb/commands as a valid logging type in the
'log list' output.

Remove an extraneous \n from one of the lldb/commands
log line.

Add an lldb/commands log indicating whether the command
was successful or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
6b1596d81c34c6efb10ed51a3572d6b145b73f5b 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Changes to Python commands:
- They now have an SBCommandReturnObject instead of an SBStream as third argument
- The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp
- The command to manage them is now:
command script with subcommands add, list, delete, clear
command alias is returned to its previous functionality
- Python commands are now part of an user dictionary, instead of being seen as aliases



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
293a7b335833a009fc8bdcf3ee20e0ed4ae17406 15-Aug-2011 Enrico Granata <granata.enrico@gmail.com> One-line fix for a possible spurious truncation warning

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
574c3d63822cc7fd52bf6f6a94b6882fec4c8ce9 13-Aug-2011 Jim Ingham <jingham@apple.com> Make ValueObject::SetValueFromCString work correctly.
Also change the SourceInitFile to look for .lldb-<APPNAME> and source that
preferentially if it exists.
Also made the breakpoint site report its address as well as its breakpoint number
when it gets hit and can't find any the associated locations (usually because the
breakpoint got disabled or deleted programmatically between the time it was hit
and reported.)
Changed ThreadPlanCallFunction to initialize the ivar m_func in the initializers of the
constructor, rather than waiting to initialize till later on in the function.
Fixed a bug where if you make an SBError and the ask it Success, it returns false.
Fixed ValueObject::ResolveValue so that it resolves a temporary value, rather than
overwriting the one in the value object.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
6247dbee41ec51e9a082df7e86269c0f47f28160 12-Jul-2011 Jim Ingham <jingham@apple.com> Added "command history" command to dump the command history.
Also made:
(lldb) !<NUM>
(lldb) !-<NUM>
(lldb) !!

work with the history. For added benefit:

(lldb) !<NUM><TAB>

will insert the command at position <NUM> in the history into the command line to be edited.

This is only partial, I still need to sync up editline's history list with the one kept by the interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
1a102087f54079c25c8827afac6153a44ca535da 12-Jul-2011 Enrico Granata <granata.enrico@gmail.com> named summaries:
- a new --name option for "type summary add" lets you give a name to a summary
- a new --summary option for "frame variable" lets you bind a named summary to one or more variables
${var%s} now works for printing the value of 0-terminated CStrings
type format test case now tests for cascading
- this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
new design for the FormatNavigator class
new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
1bba6e50d400090eb81efd7ab51957dfcbef06c0 07-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new detailed descriptions for type summary add and type format add
some changes to the help system code for better display of long help text
-p and -r flags now also work for type format add


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
921fac021ef9f7e5d32de359e67d5ad28fcccc65 23-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Fix header paths

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5c28dd1daf8de701ce1eeb8f9b8d3e3b5e39ad50 23-Jun-2011 Greg Clayton <gclayton@apple.com> Committing type format code for Enrico Granata.

This commit adds a new top level command named "type". Currently this command
implements three commands:

type format add <format> <typename1> [<typename2> ...]
type format delete <typename1> [<typename2> ...]
type format list [<typename1> [<typename2>] ...]

This allows you to specify the default format that will be used to display
types when you use "frame variable" or "expression", or the SBValue classes.

Examples:

// Format uint*_t as hex
type format add x uint16_t uint32_t uint64_t

// Format intptr_t as a pointer
type format add p intptr_t

The format characters are the same as "printf" for the most part with many
additions. These format character specifiers are also used in many other
commands ("frame variable" for one). The current list of format characters
include:

a - char buffer
b - binary
B - boolean
c - char
C - printable char
d - signed decimal
e - float
f - float
g - float
i - signed decimal
I - complex integer
o - octal
O - OSType
p - pointer
s - c-string
u - unsigned decimal
x - hex
X - complex float
y - bytes
Y - bytes with ASCII




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
892fadd1f1001d1082cd2edcf282fee0cba8ac87 16-Jun-2011 Caroline Tice <ctice@apple.com> Add 'batch_mode' to CommandInterpreter. Modify InputReaders to
not write output (prompts, instructions,etc.) if the CommandInterpreter
is in batch_mode.

Also, finish updating InputReaders to write to the asynchronous stream,
rather than using the Debugger's output file directly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
649116c40a40319fd627f3543cbe7eaf47869f8d 11-May-2011 Caroline Tice <ctice@apple.com> Add ability to recognize/handle quotes around commands
(e.g. '"target" create' works as well as 'target create').



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5ddbe214153f60f8ab62ba98dea089a21f1779f3 06-May-2011 Caroline Tice <ctice@apple.com> Replace calls to HandleCommand in lldb core with more appropriate
direct function calls. As part of this, collect code that processes
arguments & options for aliases into a single function.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
e1f50b9df1299f6b9181b5ac2699ed4a3ad38a59 04-May-2011 Greg Clayton <gclayton@apple.com> Added new OptionGroup classes for UInt64, UUID, File and Boolean values.

Removed the "image" command and moved it to "target modules". Added an alias
for "image" to "target modules".

Added some new target commands to be able to add and load modules to a target:
(lldb) target modules add <path>
(lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...]

So you can load individual sections without running a target:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000

Or you can rigidly slide an entire shared library:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000

This should improve bare board debugging when symbol files need to be slid around manually.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
91c9dcfd3ff3c3b13276d4ce8ac0488e49721105 22-Apr-2011 Greg Clayton <gclayton@apple.com> Erase from a string instead of using substr when you don't really need to.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
9e4c3d7e23766be3d65b6637a2a52e455b5fed0a 21-Apr-2011 Johnny Chen <johnny.chen@apple.com> Fixed some more 'commands' to 'command' change.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d12aeab33bab559e138307f599077da3918a3238 20-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability for users to create new regex commands.
To do this currently, it must be done in multi-line mode:

(lldb) commands regex --help "Help text for command" --syntax "syntax for command" <cmd-name>

Any example that would use "f" for "finish" when there are no arguments,
and "f <num>" to do a "frame select <num>" would be:
(lldb) commands regex f
Enter multiple regular expressions in the form s/find/replace/ then terminate with an empty line:
s/^$/finish/
s/([0-9]+)/frame select %1/

(lldb) f 11
frame select 12
...
(lldb) f
finish
...

Also added the string version of the OptionValue as OptionValueString.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
b72d0f098e45936fa72e26b1a026c603e17e2d6c 12-Apr-2011 Greg Clayton <gclayton@apple.com> Moved the execution context that was in the Debugger into
the CommandInterpreter where it was always being used.

Make sure that Modules can track their object file offsets correctly to
allow opening of sub object files (like the "__commpage" on darwin).

Modified the Platforms to be able to launch processes. The first part of this
move is the platform soon will become the entity that launches your program
and when it does, it uses a new ProcessLaunchInfo class which encapsulates
all process launching settings. This simplifies the internal APIs needed for
launching. I want to slowly phase out process launching from the process
classes, so for now we can still launch just as we used to, but eventually
the platform is the object that should do the launching.

Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able
to launch processes with all of the new eLaunchFlag settings. Modified any
code that was manually launching processes to use the Host::LaunchProcess
functions.

Fixed an issue where lldb_private::Args had implicitly defined copy
constructors that could do the wrong thing. This has now been fixed by adding
an appropriate copy constructor and assignment operator.

Make sure we don't add empty ModuleSP entries to a module list.

Fixed the commpage module creation on MacOSX, but we still need to train
the MacOSX dynamic loader to not get rid of it when it doesn't have an entry
in the all image infos.

Abstracted many more calls from in ProcessGDBRemote down into the
GDBRemoteCommunicationClient subclass to make the classes cleaner and more
efficient.

Fixed the default iOS ARM register context to be correct and also added support
for targets that don't support the qThreadStopInfo packet by selecting the
current thread (only if needed) and then sending a stop reply packet.

Debugserver can now start up with a --unix-socket (-u for short) and can
then bind to port zero and send the port it bound to to a listening process
on the other end. This allows the GDB remote platform to spawn new GDB server
instances (debugserver) to allow platform debugging.







git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
15f2d43c4b5c236562f08acddaeb03390e6844cc 24-Mar-2011 Jim Ingham <jingham@apple.com> Switch the "print" alias to "expression --".

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
e56493f430ba2956e4e8965fd4e573cbf1a48811 22-Mar-2011 Jim Ingham <jingham@apple.com> Add "up" and "down" aliases.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b1888f24fa181489840b9acf193e224d125d0776 19-Mar-2011 Greg Clayton <gclayton@apple.com> Added more platform support. There are now some new commands:

platform status -- gets status information for the selected platform
platform create <platform-name> -- creates a new instance of a remote platform
platform list -- list all available platforms
platform select -- select a platform instance as the current platform (not working yet)

When using "platform create" it will create a remote platform and make it the
selected platform. For instances for iPhone OS debugging on Mac OS X one can
do:

(lldb) platform create remote-ios --sdk-version=4.0
Remote platform: iOS platform
SDK version: 4.0
SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0"
Not connected to a remote device.
(lldb) file ~/Documents/a.out
Current executable set to '~/Documents/a.out' (armv6).
(lldb) image list
[ 0] /Volumes/work/gclayton/Documents/devb/attach/a.out
[ 1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld
[ 2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib


Note that this is all happening prior to running _or_ connecting to a remote
platform. Once connected to a remote platform the OS version might change which
means we will need to update our dependecies. Also once we run, we will need
to match up the actualy binaries with the actualy UUID's to files in the
SDK, or download and cache them locally.

This is just the start of the remote platforms, but this modification is the
first iteration in getting the platforms really doing something.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
a4fede31869663e889d67ace3d07dc5d3e4ea2b8 11-Mar-2011 Jim Ingham <jingham@apple.com> CommandInterpreter::HandleCommands should take its commands as a "const StringList &" since it doesn't modify it...

Also, don't turn on the immediate output in the temporary result, or you'll get doubled output.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
d284b663aa7d08b4f767de5ffa6289f33fcbcce7 18-Feb-2011 Greg Clayton <gclayton@apple.com> Added new target instance settings for execution settings:

Targets can now specify some additional parameters for when we debug
executables that can help with plug-in selection:

target.execution-level = auto | user | kernel
target.execution-mode = auto | dynamic | static
target.execution-os-type = auto | none | halted | live

On some systems, the binaries that are created are the same wether you use
them to debug a kernel, or a user space program. Many times inspecting an
object file can reveal what an executable should be. For these cases we can
now be a little more complete by specifying wether to detect all of these
things automatically (inspect the main executable file and select a plug-in
accordingly), or manually to force the selection of certain plug-ins.

To do this we now allow the specficifation of wether one is debugging a user
space program (target.execution-level = user) or a kernel program
(target.execution-level = kernel).

We can also specify if we want to debug a program where shared libraries
are dynamically loaded using a DynamicLoader plug-in
(target.execution-mode = dynamic), or wether we will treat all symbol files
as already linked at the correct address (target.execution-mode = static).

We can also specify if the inferior we are debugging is being debugged on
a bare board (target.execution-os-type = none), or debugging an OS where
we have a JTAG or other direct connection to the inferior stops the entire
OS (target.execution-os-type = halted), or if we are debugging a program on
something that has live debug services (target.execution-os-type = live).

For the "target.execution-os-type = halted" mode, we will need to create
ProcessHelper plug-ins that allow us to extract the process/thread and other
OS information by reading/writing memory.

This should allow LLDB to be used for a wide variety of debugging tasks and
handle them all correctly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
949d5acde6684b5824a26034457410cdf3823dfe 18-Feb-2011 Jim Ingham <jingham@apple.com> Factor all the code that does "Execute a list of lldb command interpreter commands" into a single function in the Interpreter, and then use that in all the places that used to do this by hand.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5892856b0cd6591194c669afab5bf9ac19c5b3a0 09-Feb-2011 Greg Clayton <gclayton@apple.com> Use Host::File in lldb_private::StreamFile and other places to cleanup host
layer a bit more.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
22a60097d0d8bc92f11224f71ce0954287ceab60 02-Feb-2011 Caroline Tice <ctice@apple.com> Make sure the confirmation input reader calls fflush after writing its output.
(<rdar://problem/8946573>)



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
cd548034fa23113e995b8463d14f910ba2f7298c 01-Feb-2011 Greg Clayton <gclayton@apple.com> Endian patch from Kirk Beitz that allows better cross platform building.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b01000fd063629facd45044f137446fb748ee179 17-Jan-2011 Greg Clayton <gclayton@apple.com> A few of the issue I have been trying to track down and fix have been due to
the way LLDB lazily gets complete definitions for types within the debug info.
When we run across a class/struct/union definition in the DWARF, we will only
parse the full definition if we need to. This works fine for top level types
that are assigned directly to variables and arguments, but when we have a
variable with a class, lets say "A" for this example, that has a member:
"B *m_b". Initially we don't need to hunt down a definition for this class
unless we are ever asked to do something with it ("expr m_b->getDecl()" for
example). With my previous approach to lazy type completion, we would be able
to take a "A *a" and get a complete type for it, but we wouldn't be able to
then do an "a->m_b->getDecl()" unless we always expanded all types within a
class prior to handing out the type. Expanding everything is very costly and
it would be great if there were a better way.

A few months ago I worked with the llvm/clang folks to have the
ExternalASTSource class be able to complete classes if there weren't completed
yet:

class ExternalASTSource {
....

virtual void
CompleteType (clang::TagDecl *Tag);

virtual void
CompleteType (clang::ObjCInterfaceDecl *Class);
};

This was great, because we can now have the class that is producing the AST
(SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources
and the object that creates the forward declaration types can now also
complete them anywhere within the clang type system.

This patch makes a few major changes:
- lldb_private::Module classes now own the AST context. Previously the TypeList
objects did.
- The DWARF parsers now sign up as an external AST sources so they can complete
types.
- All of the pure clang type system wrapper code we have in LLDB (ClangASTContext,
ClangASTType, and more) can now be iterating through children of any type,
and if a class/union/struct type (clang::RecordType or ObjC interface)
is found that is incomplete, we can ask the AST to get the definition.
- The SymbolFileDWARFDebugMap class now will create and use a single AST that
all child SymbolFileDWARF classes will share (much like what happens when
we have a complete linked DWARF for an executable).

We will need to modify some of the ClangUserExpression code to take more
advantage of this completion ability in the near future. Meanwhile we should
be better off now that we can be accessing any children of variables through
pointers and always be able to resolve the clang type if needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
0aa2e55f0e9422405ad33675adc1e35044537adb 14-Jan-2011 Caroline Tice <ctice@apple.com> Split up the Python script interpreter code to allow multiple script interpreter objects to
exist within the same process (one script interpreter object per debugger object). The
python script interpreter objects are all using the same global Python script interpreter;
they use separate dictionaries to keep their data separate, and mutex's to prevent any object
attempting to use the global Python interpreter when another object is already using it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5d187e5495ee17f6763337a6ae28c2a7b07e4945 08-Jan-2011 Greg Clayton <gclayton@apple.com> Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.

Thanks Bruce!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
902e018b7b7b16609099c656c97ec2c0cb115c00 23-Dec-2010 Johnny Chen <johnny.chen@apple.com> Add a simple command: 'version' to the command interpreter, and an accompanying
test case test_help_version().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
cf03765e00f712f3421eee1d0d3c623b29fa188f 14-Dec-2010 Jim Ingham <jingham@apple.com> Fix the completion of "fr " and the like.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
56d2fc45b9461d50054af20c33b836eb8ebd93f5 14-Dec-2010 Caroline Tice <ctice@apple.com> Fix small bugs:

- Make sure cmd_obj & cmd_obj_sp contain a valid objects before attempting to
dereference, in CommandObjectCommandsAlias::Execute and
CommandInterpreter::HandleCommand.

- Modify CommandInterpreter::GetCommandSPExact to properly handle
multi-word command inputs.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
ea6e3dfa37366e49d192280579da67607a7eb226 11-Dec-2010 Caroline Tice <ctice@apple.com> Fix bug where using incomplete strings for command names causes
lldb to crash (because of attempt to look for full names when full
names were not used).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
e0da7a5ba288669df3a4d51059aa0f78f729c6b1 09-Dec-2010 Caroline Tice <ctice@apple.com> Modify HandleCommand to not do any argument processing until it has determined whether or
not the command should take raw input, then handle & dispatch the arguments appropriately.

Also change the 'alias' command to be a command that takes raw input. This is necessary to
allow aliases to be created for other commands that take raw input and might want to include
raw input in the alias itself.

Fix a bug in the aliasing mechanism when creating aliases for commands with 3-or-more words.

Raw input should now be properly handled by all the command and alias mechanisms.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
44c841d68a439da13e3f170427675bff8c7f2731 07-Dec-2010 Caroline Tice <ctice@apple.com> - Fix alias-building & resolving to properly handle optional arguments for command options.
- Add logging for command resolution ('log enable lldb commands')
- Fix alias resolution to properly handle commands that take raw input (resolve the alias, but
don't muck up the raw arguments).

Net result: Among other things, 'expr' command can now take strings with escaped characters and
not have the command handling & alias resolution code muck up the escaped characters. E.g.
'expr printf ("\n\n\tHello there!")' should now work properly.


Not working yet: Creating aliases with raw input for commands that take raw input. Working on that.
e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
e98ac25604b3d967158917f6fdd5289b3096fd80 10-Nov-2010 Greg Clayton <gclayton@apple.com> Modified lldb_private::SymboleFile to be able to override where its TypeList
comes from by using a virtual function to provide it from the Module's
SymbolVendor by default. This allows the DWARF parser, when being used to
parse DWARF in .o files with a parent DWARF + debug map parser, to get its
type list from the DWARF + debug map parser so when we go and find full
definitions for types (that might come from other .o files), we can use the
type list from the debug map parser. Otherwise we ended up mixing clang types
from one .o file (say a const pointer to a forward declaration "class A") with
the a full type from another .o file. This causes expression parsing, when
copying the clang types from those parsed by the DWARF parser into the
expression AST, to fail -- for good reason. Now all types are created in the
same list.

Also added host support for crash description strings that can be set before
doing a piece of work. On MacOSX, this ties in with CrashReporter support
that allows a string to be dispalyed when the app crashes and allows
LLDB.framework to print a description string in the crash log. Right now this
is hookup up the the CommandInterpreter::HandleCommand() where each command
notes that it is about to be executed, so if we crash while trying to do this
command, we should be able to see the command that caused LLDB to exit. For
all other platforms, this is a nop.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
abab14b9b6021781a8a6aef258ebfb7e617ba3e2 05-Nov-2010 Jim Ingham <jingham@apple.com> Added a top level Timer to the interpreter execute command. Also added an option to pass the depth to "log timer enable". That allows you to time just command execution with:

log timer enable 1
<command>
log timer dump


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
49ce682dfa7993d31206cea19ce7006cd3f3077e 31-Oct-2010 Greg Clayton <gclayton@apple.com> Cleaned up the API logging a lot more to reduce redundant information and
keep the file size a bit smaller.

Exposed SBValue::GetExpressionPath() so SBValue users can get an expression
path for their values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
e3663e8cd1fce64f73dd3740d65132a76ac97709 22-Oct-2010 Jim Ingham <jingham@apple.com> Changed "run" to alias "process launch --".
Added "po" alias for "expression -o --"

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
537a7a86687683fd403ce652d178fbc89e06ef9f 20-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where we were resolving paths when we should have been.

So the issue here was that we have lldb_private::FileSpec that by default was
always resolving a path when using the:

FileSpec::FileSpec (const char *path);

and in the:

void FileSpec::SetFile(const char *pathname, bool resolve = true);

This isn't what we want in many many cases. One example is you have "/tmp" on
your file system which is really "/private/tmp". You compile code in that
directory and end up with debug info that mentions "/tmp/file.c". Then you
type:

(lldb) breakpoint set --file file.c --line 5

If your current working directory is "/tmp", then "file.c" would be turned
into "/private/tmp/file.c" which won't match anything in the debug info.
Also, it should have been just a FileSpec with no directory and a filename
of "file.c" which could (and should) potentially match any instances of "file.c"
in the debug info.

So I removed the constructor that just takes a path:

FileSpec::FileSpec (const char *path); // REMOVED

You must now use the other constructor that has a "bool resolve" parameter that you must always supply:

FileSpec::FileSpec (const char *path, bool resolve);

I also removed the default parameter to SetFile():

void FileSpec::SetFile(const char *pathname, bool resolve);

And fixed all of the code to use the right settings.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
8b5a077f92e230f0a9dfecd8760b551d0ef680d4 19-Oct-2010 Caroline Tice <ctice@apple.com> Fix small mistake in previous commit (fixing aliases for commands that
take raw input).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
0fb069d4799d1119f9984cd4a8aec9e53381a46b 18-Oct-2010 Caroline Tice <ctice@apple.com> Fix bug where aliases for commands that take raw input were not
executing properly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d7a4eb073d08bf632154b74189e36a28726cefaa 14-Oct-2010 Johnny Chen <johnny.chen@apple.com> Add an initial version of test that exercise the lldb commands: 'process signal'
and 'process handle'. The test suite would like to control the asynch/sync
execution of the interpreter during the middle of the test method, so the
CommandInterpreter::SetSynchronous(bool value) is modified to allow the mode to
be changed more than once.

In practice, it would be advisable to control the process and to set the
async/sync mode from a single thread, too.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
9305747659465e27c87a5bc5ff60c7a36fc8fefc 05-Oct-2010 Jim Ingham <jingham@apple.com> Add an "auto-confirm" setting to the debugger so you can turn off the confirmations if you want to.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
43b014aa33e20e61790e16ed69a2c57aae2fbc6e 05-Oct-2010 Caroline Tice <ctice@apple.com> Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5e16ef58a8bc2788be0ba03d8b2d0e9f3650fa5d 04-Oct-2010 Jim Ingham <jingham@apple.com> Add a "Confirm" function to the CommandInterpreter so you can confirm potentially dangerous operations in a generic way.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5bc8c97d62b2e399bd90fb7e00c903d7887412ab 20-Sep-2010 Caroline Tice <ctice@apple.com> Add UserSettings to Target class, making Target settings
the parent of Process settings; add 'default-arch' as a
class-wide setting for Target. Replace lldb::GetDefaultArchitecture
with Target::GetDefaultArchitecture & Target::SetDefaultArchitecture.

Add 'use-external-editor' as user setting to Debugger class & update
code appropriately.

Add Error parameter to methods that get user settings, for easier
reporting of bad requests.

Fix various other minor related bugs.

Fix test cases to work with new changes.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
0f3a8ebf8cd0cb27165a5aba45b33f1cd46e4b80 16-Sep-2010 Greg Clayton <gclayton@apple.com> Added default more aliases to ease gdb converts:

"b" is now aliased to "regexp-break"
"p" is now aliased to "frame variable"
"print" is now aliased to "frame variable"

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
00edd3a1f83d400cfe0ccaba438276a22c13c3f6 13-Sep-2010 Caroline Tice <ctice@apple.com> Clean up help text.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
1d2aefd474c9893407ef4deacefd08dd2ca2e806 09-Sep-2010 Caroline Tice <ctice@apple.com> Make all debugger-level user settable variables into instance variables.
Make get/set variable at the debugger level always set the particular debugger's instance variables rather than
the default variables.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
c1ad82eb979ee856b86aec6e2acb7bddf75f7c4f 08-Sep-2010 Caroline Tice <ctice@apple.com> Small help text fixes, to make it more consistent and accurate.

Temporarily remove -l option from 'expr' command (at Sean's request).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
439ab61a936c11a9f101ce28190f67cc61011256 03-Sep-2010 Jim Ingham <jingham@apple.com> Delete the vestigal "select", "info" and "delete" commands.

Also move "Carbon.framework" to the right place.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
452bf613496c7290c6b7a1a1eb28efbce63fd3b9 31-Aug-2010 Greg Clayton <gclayton@apple.com> Added the ability to disable ASLR (Address Space Layout Randomization). ASLR
is disabled by default, and can be enabled using:

(lldb) set disable-aslr 0



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
65dafa8344c8c018e346dd331a7782081a896239 27-Aug-2010 Sean Callanan <scallanan@apple.com> This is a major refactoring of the expression parser.
The goal is to separate the parser's data from the data
belonging to the parser's clients. This allows clients
to use the parser to obtain (for example) a JIT compiled
function or some DWARF code, and then discard the parser
state.

Previously, parser state was held in ClangExpression and
used liberally by ClangFunction, which inherited from
ClangExpression. The main effects of this refactoring
are:

- reducing ClangExpression to an abstract class that
declares methods that any client must expose to the
expression parser,

- moving the code specific to implementing the "expr"
command from ClangExpression and
CommandObjectExpression into ClangUserExpression,
a new class,

- moving the common parser interaction code from
ClangExpression into ClangExpressionParser, a new
class, and

- making ClangFunction rely only on
ClangExpressionParser and not depend on the
internal implementation of ClangExpression.

Side effects include:

- the compiler interaction code has been factored
out of ClangFunction and is now in an AST pass
(ASTStructExtractor),

- the header file for ClangFunction is now fully
documented,

- several bugs that only popped up when Clang was
deallocated (which never happened, since the
lifetime of the compiler was essentially infinite)
are now fixed, and

- the developer-only "call" command has been
disabled.

I have tested the expr command and the Objective-C
step-into code, which use ClangUserExpression and
ClangFunction, respectively, and verified that they
work. Please let me know if you encounter bugs or
poor documentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
65124eac53b7a214906e8931be314e429bbbeb30 27-Aug-2010 Greg Clayton <gclayton@apple.com> Changed the StackID to store its start PC address as a load address instead of
a section offset address.

Fixed up some very inefficient STL code.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
a3aff73b5151c97b3adb1cea3022df967e33db45 09-Aug-2010 Sean Callanan <scallanan@apple.com> Updated help text to refer to "commands alias"
instead of "alias." Also fixed a bunch of
indentation in the help for "commands alias."


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
eb43f5977b8ba2ffdb1d9b60d09015b88740ba3d 07-Jul-2010 Jim Ingham <jingham@apple.com> Remove includes for removed files...


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
767af88aa617288e584afcfed055f7755e408542 07-Jul-2010 Jim Ingham <jingham@apple.com> Fix GetRepeatCommand so it works with multi-word commands.
Move the "source", "alias", and "unalias" commands to "commands *".
Move "source-file" to "source list".
Added a "source info" command but it isn't implemented yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
5d9cbd4d92831b9f255b4e5b5304bfd0cdff29c7 07-Jul-2010 Jim Ingham <jingham@apple.com> Added a "GetRepeatCommand" to the command object. The Interpreter uses this
instead of the last history item to provide a command for the "empty" command.
Use this in the source-file command to make <RETURN> continue the listing rather
than relist the first listing...


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
d40f8a68b49a43264ff41a0f0ef51bef6372e8b3 07-Jul-2010 Jim Ingham <jingham@apple.com> Hide the logic for command resolution for commands, aliases & user commands behind a single
interface so everybody does it the same way. Add an "exact" lookup for internal uses.

Fix up a few little cases where we weren't reporting command lookup errors correctly.

Added "b" as an alias for "breakpoint" so it doesn't collide with "bt".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
802f8b0e11525a61f6becfd3562222b2cfaea965 30-Jun-2010 Jim Ingham <jingham@apple.com> Add a source file completer to the CommandCompleters.
Add a way for the completers to say whether the completed argument should have a space inserted after is
or not.
Added the file name completer to the "file" command.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
9a57417fd3e1a4a9fe5044fc431f9836bade906d 24-Jun-2010 Jim Ingham <jingham@apple.com> Fix a bug in handling command resolution for non-exact matches. Now we will correctly give help options when there are both aliases & real commands matching the current input string.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
285c23e0701202f4012a62654c261222cfa1a725 18-Jun-2010 Jim Ingham <jingham@apple.com> Remove an include of the deleted CommandObjectStatus.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp
84cdc15005983e5244d665fa779e33c2b6fac95f 15-Jun-2010 Jim Ingham <jingham@apple.com> Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
ccdb9ec8adf5b2899ac118e0cda4bf60fad5b2aa 13-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix include paths; please check that this works on Mac.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.cpp
b34d2a2558390235a90ddadb9c698107d85ddfff 10-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix include path.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Interpreter/CommandInterpreter.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/source/Interpreter/CommandInterpreter.cpp