History log of /external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
114b81f9b3e48d40e935982a6622ac70e1f2bf82 17-May-2013 Enrico Granata <egranata@apple.com> Note in the documentation about the fact that Python callbacks can return a value and if that value is False, LLDB won’t stop at the breakpoint

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
d0cd7a045bd6170153d5e7d0735535014a4fa0fe 15-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13883385>

Python breakpoint actions can return False to say that they don't want to stop at the breakpoint to which they are associated
Almost all of the work to support this notion of a breakpoint callback was in place, but two small moving parts were missing:
a) the SWIG wrapper was not checking the return value of the script
b) when passing a Python function by name, the call statement was dropping the return value of the function
This checkin addresses both concerns and makes this work
Care has been taken that you only keep running when an actual value of False has been returned, and that any other value (None included) means Stop!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
97b18f892c7e8ef13d07c938537467736267ef56 28-Feb-2013 Jim Ingham <jingham@apple.com> breakpoint command add currently doesn't support adding commands to more than one breakpoint
at a time. Enforce this for now (we should relax the requirement when we have a little more time.)

<rdar://problem/13314462>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
6475c42148a8ea1ca86e5db465db7eca742d897d 04-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12798131>

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

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



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
b34ca857b4e16f5239c1092ba16b1a493a52d81a 26-Oct-2012 Greg Clayton <gclayton@apple.com> Updated the "breakpoint command add" documentation and fixed the web site docs for the signature of the python breakpoint callback functions.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
560c51483461697b2f78c145d70d0cd285012c4d 11-Sep-2012 Filipe Cabecinhas <me@filcab.net> Change the NULL to a 0 since we need a uint32_t

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
c1ca9dcd0e8a1c7c5a882281afdd2a5145026fd0 08-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11975483> Removing user-visible references to 'dict' as a parameter name for Python summary-generating functions since it is a Python keyword.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
73260dafe670e2ab6c993ef3518fb49caf382108 25-Apr-2012 Jim Ingham <jingham@apple.com> Fix the docs for "breakpoint command add" to specify the arguments passed into the python function.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
8ad21a888d8185b929c68fec52b571d823377b34 04-Apr-2012 Enrico Granata <egranata@apple.com> Adding a new --python-function (-F) option to breakpoint command add. The option allows the user to specify a Python function name instead of a Python oneliner or interactive script input as a breakpoint command

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
400105dd92731a0c8968d6296b0b7279b483ebf0 07-Mar-2012 Enrico Granata <egranata@apple.com> Using the new ScriptInterpreterObject in the implementation of synthetic children to enhance type safety
Several places in the ScriptInterpreter interface used StringList objects where an std::string would suffice - Fixed
Refactoring calls that generated special-purposes functions in the Python interpreter to use helper functions instead of duplicating blobs of code


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
f4124deeb9532044a38c0774ced872f2709347da 21-Feb-2012 Greg Clayton <gclayton@apple.com> Thread hardening part 3. Now lldb_private::Thread objects have std::weak_ptr
objects for the backlink to the lldb_private::Process. The issues we were
running into before was someone was holding onto a shared pointer to a
lldb_private::Thread for too long, and the lldb_private::Process parent object
would get destroyed and the lldb_private::Thread had a "Process &m_process"
member which would just treat whatever memory that used to be a Process as a
valid Process. This was mostly happening for lldb_private::StackFrame objects
that had a member like "Thread &m_thread". So this completes the internal
strong/weak changes.

Documented the ExecutionContext and ExecutionContextRef classes so that our
LLDB developers can understand when and where to use ExecutionContext and
ExecutionContextRef objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
751a8acc56ca22d800106651099e15c9a9b15101 17-Feb-2012 Jim Ingham <jingham@apple.com> Remove unneeded includes.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
9c236733d43e6250c8a5671a438f4a2afeb9c0b2 26-Oct-2011 Greg Clayton <gclayton@apple.com> Cleaned up many error codes. For any who is filling in error strings into
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible

Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
61aca5dd78f07de66e997d41af521ab9d8c16b89 07-Oct-2011 Greg Clayton <gclayton@apple.com> Re-organized the contents of RangeMap.h to be more concise and also allow for a Range, RangeArray, RangeData (range + data), or a RangeDataArray. We have many range implementations in LLDB and I will be converting over to using the classes in RangeMap.h so we can have one set of code that does ranges and searching of ranges.

Fixed up DWARFDebugAranges to use the new range classes.

Fixed the enumeration parsing to take a lldb_private::Error to avoid a lot of duplicated code. Now when an invalid enumeration is supplied, an error will be returned and that error will contain a list of the valid enumeration values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
e5ed8e90471d8f56d054909f06e91b06ce38ff05 03-Jun-2011 Jim Ingham <jingham@apple.com> Added Debugger::GetAsync{Output/Error}Stream, and use it to print parse errors when we go to run a breakpoint condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
b2203889ab9b743f04638cdd9e34aac2ab02e99d 22-May-2011 Caroline Tice <ctice@apple.com> Change the command 'breakpoint command remove' to 'breakpoint command delete',
to be more consistent with other commands.



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



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
143fcc3a15425659b381502ed4e1e50a3e726f36 13-Apr-2011 Greg Clayton <gclayton@apple.com> Added two new classes for command options:

lldb_private::OptionGroup
lldb_private::OptionGroupOptions

OptionGroup lets you define a class that encapsulates settings that you want
to reuse in multiple commands. It contains only the option definitions and the
ability to set the option values, but it doesn't directly interface with the
lldb_private::Options class that is the front end to all of the CommandObject
option parsing. For that the OptionGroupOptions class can be used. It aggregates
one or more OptionGroup objects and directs the option setting to the
appropriate OptionGroup class. For an example of this, take a look at the
CommandObjectFile and how it uses its "m_option_group" object shown below
to be able to set values in both the FileOptionGroup and PlatformOptionGroup
classes. The members used in CommandObjectFile are:

OptionGroupOptions m_option_group;
FileOptionGroup m_file_options;
PlatformOptionGroup m_platform_options;

Then in the constructor for CommandObjectFile you can combine the option
settings. The code below shows a simplified version of the constructor:

CommandObjectFile::CommandObjectFile(CommandInterpreter &interpreter) :
CommandObject (...),
m_option_group (interpreter),
m_file_options (),
m_platform_options(true)
{
m_option_group.Append (&m_file_options);
m_option_group.Append (&m_platform_options);
m_option_group.Finalize();
}

We append the m_file_options and then the m_platform_options and then tell
the option group the finalize the results. This allows the m_option_group to
become the organizer of our prefs and after option parsing we end up with
valid preference settings in both the m_file_options and m_platform_options
objects. This also allows any other commands to use the FileOptionGroup and
PlatformOptionGroup classes to implement options for their commands.

Renamed:
virtual void Options::ResetOptionValues();
to:
virtual void Options::OptionParsingStarting();

And implemented a new callback named:

virtual Error Options::OptionParsingFinished();

This allows Options subclasses to verify that the options all go together
after all of the options have been specified and gives the chance for the
command object to return an error. It also gives a chance to take all of the
option values and produce or initialize objects after all options have
completed parsing.

Modfied:

virtual Error
SetOptionValue (int option_idx, const char *option_arg) = 0;

to be:

virtual Error
SetOptionValue (uint32_t option_idx, const char *option_arg) = 0;

(option_idx is now unsigned).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
f15996eea072cdaa8a092f22d3a1212b3d95f0ec 08-Apr-2011 Greg Clayton <gclayton@apple.com> Modified the ArchSpec to take an optional "Platform *" when setting the triple.
This allows you to have a platform selected, then specify a triple using
"i386" and have the remaining triple items (vendor, os, and environment) set
automatically.

Many interpreter commands take the "--arch" option to specify an architecture
triple, so now the command options needed to be able to get to the current
platform, so the Options class now take a reference to the interpreter on
construction.

Modified the build LLVM building in the Xcode project to use the new
Xcode project level user definitions:

LLVM_BUILD_DIR - a path to the llvm build directory
LLVM_SOURCE_DIR - a path to the llvm sources for the llvm that will be used to build lldb
LLVM_CONFIGURATION - the configuration that lldb is built for (Release,
Release+Asserts, Debug, Debug+Asserts).

I also changed the LLVM build to not check if "lldb/llvm" is a symlink and
then assume it is a real llvm build directory versus the unzipped llvm.zip
package, so now you can actually have a "lldb/llvm" directory in your lldb
sources.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
24bc5d9bfad2a1c562c27e7cf37e1c56d85c45e7 30-Mar-2011 Greg Clayton <gclayton@apple.com> Many improvements to the Platform base class and subclasses. The base Platform
class now implements the Host functionality for a lot of things that make
sense by default so that subclasses can check:

int
PlatformSubclass::Foo ()
{
if (IsHost())
return Platform::Foo (); // Let the platform base class do the host specific stuff

// Platform subclass specific code...
int result = ...
return result;
}

Added new functions to the platform:

virtual const char *Platform::GetUserName (uint32_t uid);
virtual const char *Platform::GetGroupName (uint32_t gid);

The user and group names are cached locally so that remote platforms can avoid
sending packets multiple times to resolve this information.

Added the parent process ID to the ProcessInfo class.

Added a new ProcessInfoMatch class which helps us to match processes up
and changed the Host layer over to using this new class. The new class allows
us to search for processs:
1 - by name (equal to, starts with, ends with, contains, and regex)
2 - by pid
3 - And further check for parent pid == value, uid == value, gid == value,
euid == value, egid == value, arch == value, parent == value.

This is all hookup up to the "platform process list" command which required
adding dumping routines to dump process information. If the Host class
implements the process lookup routines, you can now lists processes on
your local machine:

machine1.foo.com % lldb
(lldb) platform process list
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME
====== ====== ========== ========== ========== ========== ======================== ============================
99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge
94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker
94852 244 username usergroup username usergroup x86_64-apple-darwin Safari
94727 244 username usergroup username usergroup x86_64-apple-darwin Xcode
92742 92710 username usergroup username usergroup i386-apple-darwin debugserver


This of course also works remotely with the lldb-platform:

machine1.foo.com % lldb-platform --listen 1234

machine2.foo.com % lldb
(lldb) platform create remote-macosx
Platform: remote-macosx
Connected: no
(lldb) platform connect connect://localhost:1444
Platform: remote-macosx
Triple: x86_64-apple-darwin
OS Version: 10.6.7 (10J869)
Kernel: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386
Hostname: machine1.foo.com
Connected: yes
(lldb) platform process list
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME
====== ====== ========== ========== ========== ========== ======================== ============================
99556 244 username usergroup username usergroup x86_64-apple-darwin trustevaluation
99548 65539 username usergroup username usergroup x86_64-apple-darwin lldb
99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge
94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker
94852 244 username usergroup username usergroup x86_64-apple-darwin Safari

The lldb-platform implements everything with the Host:: layer, so this should
"just work" for linux. I will probably be adding more stuff to the Host layer
for launching processes and attaching to processes so that this support should
eventually just work as well.

Modified the target to be able to be created with an architecture that differs
from the main executable. This is needed for iOS debugging since we can have
an "armv6" binary which can run on an "armv7" machine, so we want to be able
to do:

% lldb
(lldb) platform create remote-ios
(lldb) file --arch armv7 a.out

Where "a.out" is an armv6 executable. The platform then can correctly decide
to open all "armv7" images for all dependent shared libraries.

Modified the disassembly to show the current PC value. Example output:

(lldb) disassemble --frame
a.out`main:
0x1eb7: pushl %ebp
0x1eb8: movl %esp, %ebp
0x1eba: pushl %ebx
0x1ebb: subl $20, %esp
0x1ebe: calll 0x1ec3 ; main + 12 at test.c:18
0x1ec3: popl %ebx
-> 0x1ec4: calll 0x1f12 ; getpid
0x1ec9: movl %eax, 4(%esp)
0x1ecd: leal 199(%ebx), %eax
0x1ed3: movl %eax, (%esp)
0x1ed6: calll 0x1f18 ; printf
0x1edb: leal 213(%ebx), %eax
0x1ee1: movl %eax, (%esp)
0x1ee4: calll 0x1f1e ; puts
0x1ee9: calll 0x1f0c ; getchar
0x1eee: movl $20, (%esp)
0x1ef5: calll 0x1e6a ; sleep_loop at test.c:6
0x1efa: movl $12, %eax
0x1eff: addl $20, %esp
0x1f02: popl %ebx
0x1f03: leave
0x1f04: ret

This can be handy when dealing with the new --line options that was recently
added:

(lldb) disassemble --line
a.out`main + 13 at test.c:19
18 {
-> 19 printf("Process: %i\n\n", getpid());
20 puts("Press any key to continue..."); getchar();
-> 0x1ec4: calll 0x1f12 ; getpid
0x1ec9: movl %eax, 4(%esp)
0x1ecd: leal 199(%ebx), %eax
0x1ed3: movl %eax, (%esp)
0x1ed6: calll 0x1f18 ; printf

Modified the ModuleList to have a lookup based solely on a UUID. Since the
UUID is typically the MD5 checksum of a binary image, there is no need
to give the path and architecture when searching for a pre-existing
image in an image list.

Now that we support remote debugging a bit better, our lldb_private::Module
needs to be able to track what the original path for file was as the platform
knows it, as well as where the file is locally. The module has the two
following functions to retrieve both paths:

const FileSpec &Module::GetFileSpec () const;
const FileSpec &Module::GetPlatformFileSpec () const;





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
9959b5c1a05a8e1670caf42614ee310b8ce7e3c9 21-Jan-2011 Jim Ingham <jingham@apple.com> The code to check whether the number of arguments was 0 was not necessary, VerifyBreakpointIDs will turn an empty argument into the last specified breakpoint.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
f81b4c5c3f8500aa9be9734f676608464ecb5472 27-Oct-2010 Caroline Tice <ctice@apple.com> Flush the prompts immediately in the breakpoint command input readers, to make
sure they come out at the correct times.



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

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



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
8bb61f099795a3fd98edf655c3e6899cd2668f6c 22-Sep-2010 Caroline Tice <ctice@apple.com> Update help text for breakpoint command one-liners.

Fix minor bug in 'commands alias'; alias commands can now handle command options
and arguments in the same alias. Also fixes problem that disallowed "process launch --" as
an alias.

Fix typo in comment in Python script interpreter.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
b447e84828dda036b599108e0ebdb29fd505571d 21-Sep-2010 Caroline Tice <ctice@apple.com> Re-write/clean up code that generated Python breakpoint commands.
Add a warning if no command was attached to the breakpoint.
Update the help slightly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
fe424a92fc6fd92f810d243912461fe028a2b63c 18-Sep-2010 Greg Clayton <gclayton@apple.com> General command line help cleanup:
- All single character options will now be printed together
- Changed all options that contains underscores to contain '-' instead
- Made the help come out a little flatter by showing the long and short
option on the same line.
- Modified the short character for "--ignore-count" options to "-i"



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
3e0571b6e8fe4cc0946529525e6a29eb0f1a8f70 11-Sep-2010 Johnny Chen <johnny.chen@apple.com> Fixed some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
b81ed0d482fa374fd90e8bb591d0d9c28180559c 11-Sep-2010 Johnny Chen <johnny.chen@apple.com> Added [-o <one-liner>] to the "breakpoint command add" lldb command to be able
to specify a one-liner (either scripting or lldb command) inline.

Refactored CommandObjectBreakpointCommandAdd::Execute() a little bit and added
some comments.

Sn now, we use:

breakpoint command add -p 1 -o "conditional_break.stop_if_called_from_a()"

to specify a Python one-liner as the callback for breakpoint #1.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
c328d212c201f04d3b08f85c43bfb92bdf5b7c6b 10-Sep-2010 Johnny Chen <johnny.chen@apple.com> Fixed the breakage of "breakpoint command add -p 1 2" caused by r113596 as
pointed out by Jim Ingham. The convenient one-liner specification should only
apply when there is only one breakpoint id being specified for the time being.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
4c1b218fa2b7fb340bc91b127fafc5c992c00220 10-Sep-2010 Johnny Chen <johnny.chen@apple.com> Updated help text for "breakpoint command add" to reflect r113596 changeset.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
d1c2dcac1c8509a77e6d9227c1285f96cbfadeb3 10-Sep-2010 Johnny Chen <johnny.chen@apple.com> Added the capability to specify a one-liner Python script as the callback
command for a breakpoint, for example:

(lldb) breakpoint command add -p 1 "conditional_break.stop_if_called_from_a()"

The ScriptInterpreter interface has an extra method:

/// Set a one-liner as the callback for the breakpoint command.
virtual void
SetBreakpointCommandCallback (CommandInterpreter &interpreter,
BreakpointOptions *bp_options,
const char *oneliner);

to accomplish the above.

Also added a test case to demonstrate lldb's use of breakpoint callback command
to stop at function c() only when its immediate caller is function a(). The
following session shows the user entering the following commands:

1) command source .lldb (set up executable, breakpoint, and breakpoint command)
2) run (the callback mechanism will skip two breakpoints where c()'s immeidate caller is not a())
3) bt (to see that indeed c()'s immediate caller is a())
4) c (to continue and finish the program)

test/conditional_break $ ../../build/Debug/lldb
(lldb) command source .lldb
Executing commands in '.lldb'.
(lldb) file a.out
Current executable set to 'a.out' (x86_64).
(lldb) breakpoint set -n c
Breakpoint created: 1: name = 'c', locations = 1
(lldb) script import sys, os
(lldb) script sys.path.append(os.path.join(os.getcwd(), os.pardir))
(lldb) script import conditional_break
(lldb) breakpoint command add -p 1 "conditional_break.stop_if_called_from_a()"
(lldb) run
run
Launching '/Volumes/data/lldb/svn/trunk/test/conditional_break/a.out' (x86_64)
(lldb) Checking call frames...
Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread:
frame #0: a.out`c at main.c:39
frame #1: a.out`b at main.c:34
frame #2: a.out`a at main.c:25
frame #3: a.out`main at main.c:44
frame #4: a.out`start
c called from b
Continuing...
Checking call frames...
Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread:
frame #0: a.out`c at main.c:39
frame #1: a.out`b at main.c:34
frame #2: a.out`main at main.c:47
frame #3: a.out`start
c called from b
Continuing...
Checking call frames...
Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread:
frame #0: a.out`c at main.c:39
frame #1: a.out`a at main.c:27
frame #2: a.out`main at main.c:50
frame #3: a.out`start
c called from a
Stopped at c() with immediate caller as a().
a(1) returns 4
b(2) returns 5
Process 20420 Stopped
* thread #1: tid = 0x2e03, 0x0000000100000de8 a.out`c + 7 at main.c:39, stop reason = breakpoint 1.1, queue = com.apple.main-thread
36
37 int c(int val)
38 {
39 -> return val + 3;
40 }
41
42 int main (int argc, char const *argv[])
(lldb) bt
bt
thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread
frame #0: 0x0000000100000de8 a.out`c + 7 at main.c:39
frame #1: 0x0000000100000dbc a.out`a + 44 at main.c:27
frame #2: 0x0000000100000e4b a.out`main + 91 at main.c:50
frame #3: 0x0000000100000d88 a.out`start + 52
(lldb) c
c
Resuming process 20420
Process 20420 Exited
a(3) returns 6
(lldb)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
abb507ae79e20ab2dd8365049921df73a24c95a5 08-Sep-2010 Caroline Tice <ctice@apple.com> Clean up, clarify and standardize help text, and fix a few help text formatting problems.



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

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



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



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.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/Commands/CommandObjectBreakpointCommand.cpp
9c6898b5686984baa09d0c694169cc935fc99562 22-Jun-2010 Jim Ingham <jingham@apple.com> Make an explicit GetThreadSpecNoCreate accessor so you don't have to get the const-ness right to ensure you are not making a copy of the owning breakpoint's ThreadSpec in a breakpoint location. Also change the name from NoCopy to NoCreate since that's clearer.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
3c7b5b9f83cae58ca366db2bba37dc09485f7dcc 16-Jun-2010 Jim Ingham <jingham@apple.com> Add a "thread specification" class that specifies thread specific breakpoints by name, index, queue or TID.
Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created.
Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a
breakpoint hit event for that thread.
Added a "breakpoint configure" command to allow you to reset any of the thread
specific options (or the ignore count.)


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


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