diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-10-28 17:27:46 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-10-28 17:27:46 +0000 |
commit | b7234e40140cffea4868a0952ef26f102100a3fd (patch) | |
tree | 1ef37bfb6bef10455dbd52d73e64b0e608dc1064 /lldb/source/Commands/CommandObjectBreakpoint.h | |
parent | 8e0073008a29615b1749af4128c49c07cf77c200 (diff) | |
download | bcm5719-llvm-b7234e40140cffea4868a0952ef26f102100a3fd.tar.gz bcm5719-llvm-b7234e40140cffea4868a0952ef26f102100a3fd.zip |
Check in an initial implementation of the "breakpoint clear" command, whose purpose is clear
the breakpoint associated with the (filename, line_number) combo when an arrow is pointing to
a source position using Emacs Grand Unified Debugger library to interact with lldb.
The current implmentation is insufficient in that it only asks the breakpoint whether it is
associated with a breakpoint resolver with FileLine type and whether it matches the (filename, line_number)
combo. There are other breakpoint resolver types whose breakpoint locations can potentially
match the (filename, line_number) combo.
The BreakpointResolver, BreakpointResolverName, BreakpointResolverAddress, and BreakpointResolverFileLine
classes have extra static classof methods to support LLVM style type inquiry through isa, cast, and dyn_cast.
The Breakpoint class has an API method bool GetMatchingFileLine(...) which is invoked from CommandObjectBreak.cpp
to implement the "breakpoint clear" command.
llvm-svn: 117562
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.h')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.h | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.h b/lldb/source/Commands/CommandObjectBreakpoint.h index 45bdb16a255..fb13576479a 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.h +++ b/lldb/source/Commands/CommandObjectBreakpoint.h @@ -43,7 +43,7 @@ public: }; //------------------------------------------------------------------------- -// CommandObjectMultiwordBreakpointSet +// CommandObjectdBreakpointSet //------------------------------------------------------------------------- @@ -271,6 +271,66 @@ private: }; //------------------------------------------------------------------------- +// CommandObjectBreakpointClear +//------------------------------------------------------------------------- + + +class CommandObjectBreakpointClear : public CommandObject +{ +public: + + typedef enum BreakpointClearType + { + eClearTypeInvalid, + eClearTypeFileAndLine, + } BreakpointClearType; + + CommandObjectBreakpointClear (CommandInterpreter &interpreter); + + virtual + ~CommandObjectBreakpointClear (); + + virtual bool + Execute (Args& command, + CommandReturnObject &result); + + virtual Options * + GetOptions (); + + class CommandOptions : public Options + { + public: + + CommandOptions (); + + virtual + ~CommandOptions (); + + virtual Error + SetOptionValue (int option_idx, const char *option_arg); + + void + ResetOptionValues (); + + const lldb::OptionDefinition* + GetDefinitions (); + + // Options table: Required for subclasses of Options. + + static lldb::OptionDefinition g_option_table[]; + + // Instance variables to hold the values for command options. + + std::string m_filename; + uint32_t m_line_num; + + }; + +private: + CommandOptions m_options; +}; + +//------------------------------------------------------------------------- // CommandObjectBreakpointDelete //------------------------------------------------------------------------- |