2014-05-16 18:51:01 +08:00
|
|
|
//===-- MICmdCmdStack.h -----------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-11-18 02:06:21 +08:00
|
|
|
// Overview: CMICmdCmdStackInfoDepth interface.
|
2015-02-19 23:14:17 +08:00
|
|
|
// CMICmdCmdStackInfoFrame interface.
|
2014-11-18 02:06:21 +08:00
|
|
|
// CMICmdCmdStackListFrames interface.
|
|
|
|
// CMICmdCmdStackListArguments interface.
|
|
|
|
// CMICmdCmdStackListLocals interface.
|
2015-02-20 03:26:52 +08:00
|
|
|
// CMICmdCmdStackSelectFrame interface.
|
2014-05-16 18:51:01 +08:00
|
|
|
//
|
2014-11-18 02:06:21 +08:00
|
|
|
// To implement new MI commands derive a new command class from the command base
|
|
|
|
// class. To enable the new command for interpretation add the new command class
|
|
|
|
// to the command factory. The files of relevance are:
|
|
|
|
// MICmdCommands.cpp
|
|
|
|
// MICmdBase.h / .cpp
|
|
|
|
// MICmdCmd.h / .cpp
|
|
|
|
// For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
|
|
|
|
// command class as an example.
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// In-house headers:
|
|
|
|
#include "MICmdBase.h"
|
|
|
|
#include "MICmnMIValueList.h"
|
2015-02-19 23:14:17 +08:00
|
|
|
#include "MICmnMIValueTuple.h"
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
//++ ============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
|
|
|
// *this class implements MI command "stack-info-depth".
|
2014-05-16 18:51:01 +08:00
|
|
|
//--
|
|
|
|
class CMICmdCmdStackInfoDepth : public CMICmdBase
|
|
|
|
{
|
2014-11-18 02:06:21 +08:00
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackInfoDepth();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackInfoDepth() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Attributes:
|
|
|
|
private:
|
|
|
|
MIuint m_nThreadFrames;
|
|
|
|
const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|
|
|
|
|
2015-02-19 23:14:17 +08:00
|
|
|
//++ ============================================================================
|
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
|
|
|
// *this class implements MI command "stack-info-frame".
|
|
|
|
//--
|
|
|
|
class CMICmdCmdStackInfoFrame : public CMICmdBase
|
|
|
|
{
|
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2015-02-19 23:14:17 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackInfoFrame();
|
2015-02-19 23:14:17 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2015-02-19 23:14:17 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackInfoFrame() override;
|
2015-02-19 23:14:17 +08:00
|
|
|
|
|
|
|
// Attributes:
|
|
|
|
private:
|
|
|
|
CMICmnMIValueTuple m_miValueTuple;
|
|
|
|
};
|
|
|
|
|
2014-05-16 18:51:01 +08:00
|
|
|
//++ ============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
|
|
|
// *this class implements MI command "stack-list-frames".
|
2014-05-16 18:51:01 +08:00
|
|
|
//--
|
|
|
|
class CMICmdCmdStackListFrames : public CMICmdBase
|
|
|
|
{
|
2014-11-18 02:06:21 +08:00
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackListFrames();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackListFrames() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Typedefs:
|
|
|
|
private:
|
|
|
|
typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
|
|
|
|
|
|
|
|
// Attributes:
|
|
|
|
private:
|
|
|
|
MIuint m_nThreadFrames;
|
|
|
|
VecMIValueResult_t m_vecMIValueResult;
|
|
|
|
const CMIUtilString m_constStrArgFrameLow;
|
|
|
|
const CMIUtilString m_constStrArgFrameHigh;
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
//++ ============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
|
|
|
// *this class implements MI command "stack-list-arguments".
|
2014-05-16 18:51:01 +08:00
|
|
|
//--
|
|
|
|
class CMICmdCmdStackListArguments : public CMICmdBase
|
|
|
|
{
|
2014-11-18 02:06:21 +08:00
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackListArguments();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackListArguments() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Attributes:
|
|
|
|
private:
|
|
|
|
bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
|
|
|
|
CMICmnMIValueList m_miValueList;
|
2015-02-07 02:08:24 +08:00
|
|
|
const CMIUtilString m_constStrArgPrintValues;
|
2015-03-12 23:35:58 +08:00
|
|
|
const CMIUtilString m_constStrArgFrameLow;
|
|
|
|
const CMIUtilString m_constStrArgFrameHigh;
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|
|
|
|
|
2015-02-20 03:26:52 +08:00
|
|
|
//++ ============================================================================
|
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
2015-02-21 01:56:05 +08:00
|
|
|
// *this class implements MI command "stack-list-locals".
|
2015-02-20 03:26:52 +08:00
|
|
|
//--
|
2015-02-21 01:56:05 +08:00
|
|
|
class CMICmdCmdStackListLocals : public CMICmdBase
|
2015-02-20 03:26:52 +08:00
|
|
|
{
|
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2015-02-20 03:26:52 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackListLocals();
|
2015-02-20 03:26:52 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2015-02-20 03:26:52 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackListLocals() override;
|
2015-02-20 03:26:52 +08:00
|
|
|
|
|
|
|
// Attributes:
|
|
|
|
private:
|
2015-02-21 01:56:05 +08:00
|
|
|
bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
|
|
|
|
CMICmnMIValueList m_miValueList;
|
|
|
|
const CMIUtilString m_constStrArgPrintValues;
|
2015-04-29 16:18:41 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
//++ ============================================================================
|
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
|
|
|
// *this class implements MI command "stack-list-variables".
|
|
|
|
//--
|
|
|
|
class CMICmdCmdStackListVariables : public CMICmdBase
|
|
|
|
{
|
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2015-04-29 16:18:41 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackListVariables();
|
2015-04-29 16:18:41 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2015-04-29 16:18:41 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackListVariables() override;
|
2015-04-29 16:18:41 +08:00
|
|
|
|
|
|
|
// Attributes
|
|
|
|
private:
|
|
|
|
bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
|
|
|
|
CMICmnMIValueList m_miValueList;
|
|
|
|
const CMIUtilString m_constStrArgPrintValues;
|
2015-02-20 03:26:52 +08:00
|
|
|
};
|
|
|
|
|
2014-05-16 18:51:01 +08:00
|
|
|
//++ ============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: MI command class. MI commands derived from the command base class.
|
2015-02-21 01:56:05 +08:00
|
|
|
// *this class implements MI command "stack-select-frame".
|
2014-05-16 18:51:01 +08:00
|
|
|
//--
|
2015-02-21 01:56:05 +08:00
|
|
|
class CMICmdCmdStackSelectFrame : public CMICmdBase
|
2014-05-16 18:51:01 +08:00
|
|
|
{
|
2014-11-18 02:06:21 +08:00
|
|
|
// Statics:
|
|
|
|
public:
|
|
|
|
// Required by the CMICmdFactory when registering *this command
|
2015-08-04 18:24:20 +08:00
|
|
|
static CMICmdBase *CreateSelf();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Methods:
|
|
|
|
public:
|
2015-08-04 18:24:20 +08:00
|
|
|
/* ctor */ CMICmdCmdStackSelectFrame();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Overridden:
|
|
|
|
public:
|
|
|
|
// From CMICmdInvoker::ICmd
|
2015-08-04 18:24:20 +08:00
|
|
|
bool Execute() override;
|
|
|
|
bool Acknowledge() override;
|
|
|
|
bool ParseArgs() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
// From CMICmnBase
|
2015-08-04 18:24:20 +08:00
|
|
|
/* dtor */ ~CMICmdCmdStackSelectFrame() override;
|
2014-11-18 02:06:21 +08:00
|
|
|
|
|
|
|
// Attributes:
|
|
|
|
private:
|
2015-02-21 01:56:05 +08:00
|
|
|
bool m_bFrameInvalid; // True = yes invalid frame, false = ok
|
2015-10-30 00:30:47 +08:00
|
|
|
const CMIUtilString m_constStrArgFrameId;
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|