2011-09-23 02:04:58 +08:00
|
|
|
//===-- CommandObjectWatchpoint.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_CommandObjectWatchpoint_h_
|
|
|
|
#define liblldb_CommandObjectWatchpoint_h_
|
|
|
|
|
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
|
|
|
|
// Other libraries and framework includes
|
|
|
|
// Project includes
|
|
|
|
#include "lldb/Interpreter/CommandObjectMultiword.h"
|
|
|
|
#include "lldb/Interpreter/Options.h"
|
2012-01-31 05:46:17 +08:00
|
|
|
#include "lldb/Interpreter/OptionGroupWatchpoint.h"
|
2011-09-23 02:04:58 +08:00
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectMultiwordWatchpoint
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectMultiwordWatchpoint : public CommandObjectMultiword
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandObjectMultiwordWatchpoint (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectMultiwordWatchpoint ();
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointList
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectWatchpointList : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandObjectWatchpointList (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointList ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
|
|
|
|
|
|
|
void
|
|
|
|
OptionParsingStarting ();
|
|
|
|
|
|
|
|
const OptionDefinition *
|
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
|
|
|
static OptionDefinition g_option_table[];
|
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
lldb::DescriptionLevel m_level;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointEnable
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectWatchpointEnable : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandObjectWatchpointEnable (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointEnable ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointDisable
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectWatchpointDisable : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandObjectWatchpointDisable (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointDisable ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointDelete
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectWatchpointDelete : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandObjectWatchpointDelete (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointDelete ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
2011-10-06 05:35:46 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointIgnore
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectWatchpointIgnore : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandObjectWatchpointIgnore (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointIgnore ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
|
|
|
|
|
|
|
void
|
|
|
|
OptionParsingStarting ();
|
|
|
|
|
|
|
|
const OptionDefinition *
|
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
|
|
|
static OptionDefinition g_option_table[];
|
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
uint32_t m_ignore_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
2011-10-18 02:58:00 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointModify
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectWatchpointModify : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandObjectWatchpointModify (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointModify ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
|
|
|
|
|
|
|
void
|
|
|
|
OptionParsingStarting ();
|
|
|
|
|
|
|
|
const OptionDefinition*
|
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
|
|
|
static OptionDefinition g_option_table[];
|
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
std::string m_condition;
|
|
|
|
bool m_condition_passed;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
2012-01-31 05:46:17 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectWatchpointSet
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
2012-02-09 06:37:48 +08:00
|
|
|
class CommandObjectWatchpointSet : public CommandObjectMultiword
|
2012-01-31 05:46:17 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-02-09 06:37:48 +08:00
|
|
|
CommandObjectWatchpointSet (CommandInterpreter &interpreter);
|
2012-02-08 09:13:31 +08:00
|
|
|
|
2012-02-09 06:37:48 +08:00
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointSet ();
|
2012-02-08 09:13:31 +08:00
|
|
|
|
|
|
|
|
2012-02-09 06:37:48 +08:00
|
|
|
};
|
2012-02-08 09:13:31 +08:00
|
|
|
|
2012-02-09 06:37:48 +08:00
|
|
|
class CommandObjectWatchpointSetVariable : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2012-02-08 09:13:31 +08:00
|
|
|
|
2012-02-09 06:37:48 +08:00
|
|
|
CommandObjectWatchpointSetVariable (CommandInterpreter &interpreter);
|
2012-01-31 05:46:17 +08:00
|
|
|
|
|
|
|
virtual
|
2012-02-09 06:37:48 +08:00
|
|
|
~CommandObjectWatchpointSetVariable ();
|
2012-01-31 05:46:17 +08:00
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
OptionGroupOptions m_option_group;
|
|
|
|
OptionGroupWatchpoint m_option_watchpoint;
|
2012-02-09 06:37:48 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class CommandObjectWatchpointSetExpression : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CommandObjectWatchpointSetExpression (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectWatchpointSetExpression ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result)
|
|
|
|
{ return false; }
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
WantsRawCommandString() { return true; }
|
|
|
|
|
|
|
|
// Overrides base class's behavior where WantsCompletion = !WantsRawCommandString.
|
|
|
|
virtual bool
|
|
|
|
WantsCompletion() { return true; }
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
ExecuteRawCommandString (const char *raw_command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
OptionGroupOptions m_option_group;
|
|
|
|
OptionGroupWatchpoint m_option_watchpoint;
|
2012-01-31 05:46:17 +08:00
|
|
|
};
|
|
|
|
|
2011-09-23 02:04:58 +08:00
|
|
|
} // namespace lldb_private
|
|
|
|
|
|
|
|
#endif // liblldb_CommandObjectWatchpoint_h_
|