2010-06-09 00:52:24 +08:00
|
|
|
//===-- CommandObjectBreakpointCommand.h ------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef liblldb_CommandObjectBreakpointCommand_h_
|
|
|
|
#define liblldb_CommandObjectBreakpointCommand_h_
|
|
|
|
|
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
|
|
|
|
|
|
|
|
// Other libraries and framework includes
|
|
|
|
// Project includes
|
|
|
|
|
|
|
|
#include "lldb/lldb-types.h"
|
2010-06-16 03:49:27 +08:00
|
|
|
#include "lldb/Interpreter/Options.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/Core/InputReader.h"
|
|
|
|
#include "lldb/Interpreter/CommandObject.h"
|
|
|
|
#include "lldb/Interpreter/CommandReturnObject.h"
|
|
|
|
#include "lldb/Interpreter/CommandObjectMultiword.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectMultiwordBreakpoint
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointCommand : public CommandObjectMultiword
|
|
|
|
{
|
|
|
|
public:
|
2010-06-23 09:19:29 +08:00
|
|
|
CommandObjectBreakpointCommand (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointCommand ();
|
|
|
|
|
|
|
|
|
|
|
|
static bool
|
|
|
|
BreakpointOptionsCallbackFunction (void *baton,
|
|
|
|
StoppointCallbackContext *context,
|
|
|
|
lldb::user_id_t break_id,
|
|
|
|
lldb::user_id_t break_loc_id);
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointCommandAdd
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
class CommandObjectBreakpointCommandAdd : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointCommandAdd (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointCommandAdd ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
void
|
2010-09-18 09:14:36 +08:00
|
|
|
CollectDataForBreakpointCommandCallback (BreakpointOptions *bp_options,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
2010-09-11 08:23:59 +08:00
|
|
|
/// Set a one-liner as the callback for the breakpoint.
|
2010-09-11 08:18:09 +08:00
|
|
|
void
|
2010-09-18 09:14:36 +08:00
|
|
|
SetBreakpointCommandCallback (BreakpointOptions *bp_options,
|
2010-09-11 08:18:09 +08:00
|
|
|
const char *oneliner);
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
static size_t
|
|
|
|
GenerateBreakpointCommandCallback (void *baton,
|
2010-06-23 09:19:29 +08:00
|
|
|
InputReader &reader,
|
2010-06-09 00:52:24 +08:00
|
|
|
lldb::InputReaderAction notification,
|
|
|
|
const char *bytes,
|
|
|
|
size_t bytes_len);
|
|
|
|
|
|
|
|
static bool
|
|
|
|
BreakpointOptionsCallbackFunction (void *baton,
|
|
|
|
StoppointCallbackContext *context,
|
|
|
|
lldb::user_id_t break_id,
|
|
|
|
lldb::user_id_t break_loc_id);
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
bool m_use_commands;
|
|
|
|
bool m_use_script_language;
|
|
|
|
lldb::ScriptLanguage m_script_language;
|
2010-09-11 08:18:09 +08:00
|
|
|
|
|
|
|
// Instance variables to hold the values for one_liner options.
|
|
|
|
bool m_use_one_liner;
|
|
|
|
std::string m_one_liner;
|
2010-06-09 00:52:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointCommandRemove
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointCommandRemove : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointCommandRemove (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointCommandRemove ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointCommandList
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointCommandList : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointCommandList (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointCommandList ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lldb_private
|
|
|
|
|
|
|
|
#endif // liblldb_CommandObjectBreakpointCommand_h_
|