2010-06-09 00:52:24 +08:00
|
|
|
//===-- CommandObjectBreakpoint.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_CommandObjectBreakpoint_h_
|
|
|
|
#define liblldb_CommandObjectBreakpoint_h_
|
|
|
|
|
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
// Other libraries and framework includes
|
|
|
|
// Project includes
|
|
|
|
#include "lldb/Core/Address.h"
|
|
|
|
#include "lldb/Interpreter/CommandObjectMultiword.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/STLUtils.h"
|
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectMultiwordBreakpoint
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectMultiwordBreakpoint : public CommandObjectMultiword
|
|
|
|
{
|
|
|
|
public:
|
2010-06-23 09:19:29 +08:00
|
|
|
CommandObjectMultiwordBreakpoint (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectMultiwordBreakpoint ();
|
|
|
|
|
|
|
|
static void
|
|
|
|
VerifyBreakpointIDs (Args &args, Target *target, CommandReturnObject &result, BreakpointIDList *valid_ids);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
2010-10-29 01:27:46 +08:00
|
|
|
// CommandObjectdBreakpointSet
|
2010-06-09 00:52:24 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
class CommandObjectBreakpointSet : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
typedef enum BreakpointSetType
|
|
|
|
{
|
|
|
|
eSetTypeInvalid,
|
|
|
|
eSetTypeFileAndLine,
|
|
|
|
eSetTypeAddress,
|
|
|
|
eSetTypeFunctionName,
|
2010-06-09 15:57:51 +08:00
|
|
|
eSetTypeFunctionRegexp
|
2010-06-09 00:52:24 +08:00
|
|
|
} BreakpointSetType;
|
|
|
|
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointSet (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointSet ();
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-04-08 06:46:35 +08:00
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
2011-04-13 08:18:08 +08:00
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
void
|
2011-04-13 08:18:08 +08:00
|
|
|
OptionParsingStarting ();
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
const OptionDefinition*
|
2010-06-09 00:52:24 +08:00
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static OptionDefinition g_option_table[];
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
std::string m_filename;
|
2010-06-29 05:30:43 +08:00
|
|
|
uint32_t m_line_num;
|
|
|
|
uint32_t m_column;
|
2010-11-02 11:02:38 +08:00
|
|
|
bool m_check_inlines;
|
2010-06-09 00:52:24 +08:00
|
|
|
std::string m_func_name;
|
2010-06-29 05:30:43 +08:00
|
|
|
uint32_t m_func_name_type_mask;
|
2010-06-09 00:52:24 +08:00
|
|
|
std::string m_func_regexp;
|
|
|
|
STLStringArray m_modules;
|
2010-07-10 04:39:50 +08:00
|
|
|
lldb::addr_t m_load_addr;
|
|
|
|
uint32_t m_ignore_count;
|
2010-06-16 10:00:15 +08:00
|
|
|
lldb::tid_t m_thread_id;
|
|
|
|
uint32_t m_thread_index;
|
|
|
|
std::string m_thread_name;
|
|
|
|
std::string m_queue_name;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
2010-06-18 08:58:52 +08:00
|
|
|
// CommandObjectMultiwordBreakpointModify
|
2010-06-16 10:00:15 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
2010-06-18 08:58:52 +08:00
|
|
|
class CommandObjectBreakpointModify : public CommandObject
|
2010-06-16 10:00:15 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointModify (CommandInterpreter &interpreter);
|
2010-06-16 10:00:15 +08:00
|
|
|
|
|
|
|
virtual
|
2010-06-18 08:58:52 +08:00
|
|
|
~CommandObjectBreakpointModify ();
|
2010-06-16 10:00:15 +08:00
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-16 10:00:15 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-04-08 06:46:35 +08:00
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
2010-06-16 10:00:15 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
2011-04-13 08:18:08 +08:00
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
2010-06-16 10:00:15 +08:00
|
|
|
|
|
|
|
void
|
2011-04-13 08:18:08 +08:00
|
|
|
OptionParsingStarting ();
|
2010-06-16 10:00:15 +08:00
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
const OptionDefinition*
|
2010-06-16 10:00:15 +08:00
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static OptionDefinition g_option_table[];
|
2010-06-16 10:00:15 +08:00
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
2010-07-10 04:39:50 +08:00
|
|
|
uint32_t m_ignore_count;
|
2010-06-16 10:00:15 +08:00
|
|
|
lldb::tid_t m_thread_id;
|
2010-12-04 07:04:19 +08:00
|
|
|
bool m_thread_id_passed;
|
2010-06-16 10:00:15 +08:00
|
|
|
uint32_t m_thread_index;
|
2010-12-04 07:04:19 +08:00
|
|
|
bool m_thread_index_passed;
|
2010-06-16 10:00:15 +08:00
|
|
|
std::string m_thread_name;
|
|
|
|
std::string m_queue_name;
|
2010-10-15 07:45:03 +08:00
|
|
|
std::string m_condition;
|
2010-06-18 08:58:52 +08:00
|
|
|
bool m_enable_passed;
|
|
|
|
bool m_enable_value;
|
2010-06-19 12:35:20 +08:00
|
|
|
bool m_name_passed;
|
|
|
|
bool m_queue_passed;
|
2010-10-15 07:45:03 +08:00
|
|
|
bool m_condition_passed;
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointEnable
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointEnable : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointEnable (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointEnable ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointDisable
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointDisable : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointDisable (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointDisable ();
|
|
|
|
|
|
|
|
virtual bool
|
2010-09-18 09:14:36 +08:00
|
|
|
Execute (Args& command,
|
2010-06-09 00:52:24 +08:00
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointList
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointList : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointList (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointList ();
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-04-08 06:46:35 +08:00
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
2011-04-13 08:18:08 +08:00
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
void
|
2011-04-13 08:18:08 +08:00
|
|
|
OptionParsingStarting ();
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
const OptionDefinition *
|
2010-06-09 00:52:24 +08:00
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static OptionDefinition g_option_table[];
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
lldb::DescriptionLevel m_level;
|
|
|
|
|
|
|
|
bool m_internal;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
2010-10-29 01:27:46 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointClear
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
class CommandObjectBreakpointClear : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
typedef enum BreakpointClearType
|
|
|
|
{
|
|
|
|
eClearTypeInvalid,
|
2011-02-05 10:56:16 +08:00
|
|
|
eClearTypeFileAndLine
|
2010-10-29 01:27:46 +08:00
|
|
|
} BreakpointClearType;
|
|
|
|
|
|
|
|
CommandObjectBreakpointClear (CommandInterpreter &interpreter);
|
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointClear ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
Execute (Args& command,
|
|
|
|
CommandReturnObject &result);
|
|
|
|
|
|
|
|
virtual Options *
|
|
|
|
GetOptions ();
|
|
|
|
|
|
|
|
class CommandOptions : public Options
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-04-08 06:46:35 +08:00
|
|
|
CommandOptions (CommandInterpreter &interpreter);
|
2010-10-29 01:27:46 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandOptions ();
|
|
|
|
|
|
|
|
virtual Error
|
2011-04-13 08:18:08 +08:00
|
|
|
SetOptionValue (uint32_t option_idx, const char *option_arg);
|
2010-10-29 01:27:46 +08:00
|
|
|
|
|
|
|
void
|
2011-04-13 08:18:08 +08:00
|
|
|
OptionParsingStarting ();
|
2010-10-29 01:27:46 +08:00
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
const OptionDefinition*
|
2010-10-29 01:27:46 +08:00
|
|
|
GetDefinitions ();
|
|
|
|
|
|
|
|
// Options table: Required for subclasses of Options.
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static OptionDefinition g_option_table[];
|
2010-10-29 01:27:46 +08:00
|
|
|
|
|
|
|
// Instance variables to hold the values for command options.
|
|
|
|
|
|
|
|
std::string m_filename;
|
|
|
|
uint32_t m_line_num;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
CommandOptions m_options;
|
|
|
|
};
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CommandObjectBreakpointDelete
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CommandObjectBreakpointDelete : public CommandObject
|
|
|
|
{
|
|
|
|
public:
|
2010-09-18 09:14:36 +08:00
|
|
|
CommandObjectBreakpointDelete (CommandInterpreter &interpreter);
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
virtual
|
|
|
|
~CommandObjectBreakpointDelete ();
|
|
|
|
|
|
|
|
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_CommandObjectBreakpoint_h_
|