63 changes: 63 additions & 0 deletions lldb/tools/lldb-mi/MICmdArgValConsume.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//===-- MICmdArgValConsume.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdArgValConsume.h
//
// Overview: CMICmdArgValConsume interface.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

#pragma once

// In-house headers:
#include "MICmdArgValBase.h"

// Declarations:
class CMICmdArgContext;

//++ ============================================================================
// Details: MI common code class. Command argument class. Arguments object
// needing specialization derived from the CMICmdArgValBase class.
// An argument knows what type of argument it is and how it is to
// interpret the options (context) string to find and validate a matching
// argument. This type having recognised its argument name just consumes
// that argument or option (ignores it). This is the so the validation
// process can then ask if all arguments or options have been recognised
// other an error will occurred "argument not recognised". For example
// this can be used to consume the "--" text which is not an argument in
// itself. Normally the GetValue() function (in base class) would return
// a value for the argument but is not the case for *this argument type
// object.
// Based on the Interpreter pattern.
// Gotchas: None.
// Authors: Illya Rudkin 20/05/2014.
// Changes: None.
//--
class CMICmdArgValConsume : public CMICmdArgValBaseTemplate< CMIUtilString >
{
// Methods:
public:
/* ctor */ CMICmdArgValConsume( void );
/* ctor */ CMICmdArgValConsume( const CMIUtilString & vrArgName, const bool vbMandatory );
//
bool IsOk( void ) const;

// Overridden:
public:
// From CMICmdArgValBase
/* dtor */ virtual ~CMICmdArgValConsume( void );
// From CMICmdArgSet::IArg
virtual bool Validate( CMICmdArgContext & vwArgContext );
};
25 changes: 25 additions & 0 deletions lldb/tools/lldb-mi/MICmdArgValListBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "MICmdArgValOptionShort.h"
#include "MICmdArgValString.h"
#include "MICmdArgValThreadGrp.h"
#include "MICmdArgValConsume.h"

//++ ------------------------------------------------------------------------------------
// Details: CMICmdArgValListBase constructor.
Expand Down Expand Up @@ -125,6 +126,9 @@ CMICmdArgValBase * CMICmdArgValListBase::CreationObj( const CMIUtilString & vrTx
case eArgValType_File:
pOptionObj = new CMICmdArgValFile();
break;
case eArgValType_Consume:
pOptionObj = new CMICmdArgValConsume();
break;
case eArgValType_Number:
pOptionObj = new CMICmdArgValNumber();
break;
Expand All @@ -137,6 +141,15 @@ CMICmdArgValBase * CMICmdArgValListBase::CreationObj( const CMIUtilString & vrTx
case eArgValType_String:
pOptionObj = new CMICmdArgValString();
break;
case eArgValType_StringQuoted:
pOptionObj = new CMICmdArgValString( true, false, false );
break;
case eArgValType_StringQuotedNumber:
pOptionObj = new CMICmdArgValString( true, true, false );
break;
case eArgValType_StringQuotedNumberPath:
pOptionObj = new CMICmdArgValString( true, true, true );
break;
case eArgValType_ThreadGrp:
pOptionObj = new CMICmdArgValThreadGrp();
break;
Expand Down Expand Up @@ -167,6 +180,9 @@ bool CMICmdArgValListBase::IsExpectedCorrectType( const CMIUtilString & vrTxt, c
case eArgValType_File:
bValid = CMICmdArgValFile().IsFilePath( vrTxt );
break;
case eArgValType_Consume:
bValid = CMICmdArgValConsume().IsOk();
break;
case eArgValType_Number:
bValid = CMICmdArgValNumber().IsArgNumber( vrTxt );
break;
Expand All @@ -179,6 +195,15 @@ bool CMICmdArgValListBase::IsExpectedCorrectType( const CMIUtilString & vrTxt, c
case eArgValType_String:
bValid = CMICmdArgValString().IsStringArg( vrTxt );
break;
case eArgValType_StringQuoted:
bValid = CMICmdArgValString( true, false, false ).IsStringArg( vrTxt );
break;
case eArgValType_StringQuotedNumber:
bValid = CMICmdArgValString( true, true, false ).IsStringArg( vrTxt );
break;
case eArgValType_StringQuotedNumberPath:
bValid = CMICmdArgValString( true, true, true ).IsStringArg( vrTxt );
break;
case eArgValType_ThreadGrp:
bValid = CMICmdArgValThreadGrp().IsArgThreadGrp( vrTxt );
break;
Expand Down
4 changes: 4 additions & 0 deletions lldb/tools/lldb-mi/MICmdArgValListBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ class CMICmdArgValListBase : public CMICmdArgValBaseTemplate< std::vector< CMICm
enum ArgValType_e
{
eArgValType_File = 0,
eArgValType_Consume,
eArgValType_Number,
eArgValType_OptionLong,
eArgValType_OptionShort,
eArgValType_String,
eArgValType_StringQuoted,
eArgValType_StringQuotedNumber,
eArgValType_StringQuotedNumberPath,
eArgValType_ThreadGrp,
eArgValType_count, // Always the last one
eArgValType_invalid
Expand Down
24 changes: 21 additions & 3 deletions lldb/tools/lldb-mi/MICmdArgValListOfN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,17 @@ bool CMICmdArgValListOfN::Validate( CMICmdArgContext & vwArgContext )
bool CMICmdArgValListOfN::CreateList( const CMIUtilString & vrTxt )
{
CMIUtilString::VecString_t vecOptions;
vrTxt.Split( " ", vecOptions );
if( (m_eArgType == eArgValType_StringQuoted) ||
(m_eArgType == eArgValType_StringQuotedNumber) ||
(m_eArgType == eArgValType_StringQuotedNumberPath) )
{
if( vrTxt.SplitConsiderQuotes( " ", vecOptions ) == 0 )
return MIstatus::failure;
}
else
if( vrTxt.Split( " ", vecOptions ) == 0 )
return MIstatus::failure;

CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
while( it != vecOptions.end() )
{
Expand Down Expand Up @@ -137,8 +147,16 @@ bool CMICmdArgValListOfN::CreateList( const CMIUtilString & vrTxt )
bool CMICmdArgValListOfN::IsListOfN( const CMIUtilString & vrTxt ) const
{
CMIUtilString::VecString_t vecOptions;
if( vrTxt.Split( " ", vecOptions ) == 0 )
return false;
if ( m_eArgType == eArgValType_StringQuoted ||
m_eArgType == eArgValType_StringQuotedNumber ||
m_eArgType == eArgValType_StringQuotedNumberPath )
{
if( vrTxt.SplitConsiderQuotes( " ", vecOptions ) == 0 )
return false;
}
else
if( vrTxt.Split( " ", vecOptions ) == 0 )
return false;

CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
while( it != vecOptions.end() )
Expand Down
4 changes: 3 additions & 1 deletion lldb/tools/lldb-mi/MICmdArgValListOfN.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CMICmdArgContext;
// to this container and will be deleted when *this object goes out of
// scope.
// To parse arguments like 'thread-id ...' i.e. 1 10 12 13 ...
// If vbMandatory argument is true it takes on the (...)+ specfication
// If vbMandatory argument is true it takes on the (...)+ specification
// otherwise assumed to be (...)* specification.
// Based on the Interpreter pattern.
// Gotchas: None.
Expand Down Expand Up @@ -76,6 +76,8 @@ class CMICmdArgValListOfN : public CMICmdArgValListBase
// parsed from the command's options string.
// Type: Template method.
// Args: vrwValue - (W) Templated type return value.
// T1 - The argument value's class type of the data hold in the list of options.
// T2 - The type pf the variable which holds the value wanted.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed. List of object was empty.
// Throws: None.
Expand Down
4 changes: 4 additions & 0 deletions lldb/tools/lldb-mi/MICmdArgValNumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ bool CMICmdArgValNumber::Validate( CMICmdArgContext & vwArgContext )
//--
bool CMICmdArgValNumber::IsArgNumber( const CMIUtilString & vrTxt ) const
{
// Look for --someLongOption
if( std::string::npos != vrTxt.find( "--" ) )
return false;

return vrTxt.IsNumber();
}

Expand Down
53 changes: 34 additions & 19 deletions lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ bool CMICmdArgValOptionLong::Validate( CMICmdArgContext & vwArgContext )
}

// More than one option...
MIuint nArgIndex = 0;
const CMIUtilString::VecString_t vecOptions( vwArgContext.GetArgs() );
CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
while( it != vecOptions.end() )
Expand All @@ -157,7 +158,7 @@ bool CMICmdArgValOptionLong::Validate( CMICmdArgContext & vwArgContext )

if( m_nExpectingNOptions != 0 )
{
if( ExtractExpectedOptions( vwArgContext ) )
if( ExtractExpectedOptions( vwArgContext, nArgIndex ) )
{
m_bValid = true;
return MIstatus::success;
Expand All @@ -175,6 +176,7 @@ bool CMICmdArgValOptionLong::Validate( CMICmdArgContext & vwArgContext )

// Next
++it;
++nArgIndex;
}

return MIstatus::failure;
Expand All @@ -185,43 +187,56 @@ bool CMICmdArgValOptionLong::Validate( CMICmdArgContext & vwArgContext )
// CMICmdArgValListBase::m_eArgType forming argument objects for each of those
// options extracted.
// Type: Method.
// Args: vrwTxt - (RW) The command's argument options string.
// Args: vrwTxt - (RW) The command's argument options string.
// nArgIndex - (R) The Nth arg position in argument context from the left.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdArgValOptionLong::ExtractExpectedOptions( CMICmdArgContext & vrwTxt )
bool CMICmdArgValOptionLong::ExtractExpectedOptions( CMICmdArgContext & vrwTxt, const MIuint nArgIndex )
{
CMIUtilString::VecString_t vecOptions;
const MIuint nOptionsPresent = vrwTxt.GetArgsLeftToParse().Split( " ", vecOptions );
MIuint nOptionsPresent = 0;
if( (m_eExpectingOptionType != eArgValType_StringQuoted) &&
(m_eExpectingOptionType != eArgValType_StringQuotedNumber) &&
(m_eExpectingOptionType != eArgValType_StringQuotedNumberPath) )
nOptionsPresent = vrwTxt.GetArgsLeftToParse().Split( " ", vecOptions );
else
nOptionsPresent = vrwTxt.GetArgsLeftToParse().SplitConsiderQuotes( " ", vecOptions );
if( nOptionsPresent == 0 )
return MIstatus::failure;

MIuint nArgIndexCnt = 0;
MIuint nTypeCnt = 0;
MIuint nTypeCnt2 = 0;
MIuint nFoundNOptionsCnt = 0;
CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
while( it != vecOptions.end() )
{
nTypeCnt++;
const CMIUtilString & rOption( *it );
if( IsExpectedCorrectType( rOption, m_eExpectingOptionType ) )
// Move to the Nth argument position from left before do validation/checking
if( nArgIndexCnt++ == nArgIndex )
{
nTypeCnt2++;
CMICmdArgValBase * pOptionObj = CreationObj( rOption, m_eExpectingOptionType );
if( (pOptionObj != nullptr) && vrwTxt.RemoveArg( rOption ) )
nTypeCnt++;
const CMIUtilString & rOption( *it );
if( IsExpectedCorrectType( rOption, m_eExpectingOptionType ) )
{
nFoundNOptionsCnt++;
m_vecArgsExpected.push_back( pOptionObj );
nTypeCnt2++;
CMICmdArgValBase * pOptionObj = CreationObj( rOption, m_eExpectingOptionType );
if( (pOptionObj != nullptr) && vrwTxt.RemoveArgAtPos( rOption, nArgIndex ) )
{
nFoundNOptionsCnt++;
m_vecArgsExpected.push_back( pOptionObj );
}
}
}
// Is the sequence 'options' of same type broken. Expecting the same type until the
// next argument.
if( nTypeCnt != nTypeCnt2 )
return MIstatus::failure;

if( nFoundNOptionsCnt == m_nExpectingNOptions )
return MIstatus::success;
// Is the sequence 'options' of same type broken. Expecting the same type until the
// next argument.
if( nTypeCnt != nTypeCnt2 )
return MIstatus::failure;

if( nFoundNOptionsCnt == m_nExpectingNOptions )
return MIstatus::success;
}

// Next
++it;
Expand Down
4 changes: 3 additions & 1 deletion lldb/tools/lldb-mi/MICmdArgValOptionLong.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CMICmdArgValOptionLong : public CMICmdArgValListBase

// Methods:
protected:
bool ExtractExpectedOptions( CMICmdArgContext & vrwTxt );
bool ExtractExpectedOptions( CMICmdArgContext & vrwTxt, const MIuint nArgIndex );

// Overrideable:
protected:
Expand All @@ -87,6 +87,8 @@ class CMICmdArgValOptionLong : public CMICmdArgValListBase
// parsed from the command's options string.
// Type: Template method.
// Args: vrwValue - (W) Templated type return value.
// T1 - The argument value's class type of the data hold in the list of options.
// T2 - The type pf the variable which holds the value wanted.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed. List of object was empty.
// Throws: None.
Expand Down
118 changes: 93 additions & 25 deletions lldb/tools/lldb-mi/MICmdArgValString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@
// Throws: None.
//--
CMICmdArgValString::CMICmdArgValString( void )
: m_bHandleQuotedString( false )
, m_bAcceptNumbers( false )
, m_bHandleDirPaths( false )
{
}

//++ ------------------------------------------------------------------------------------
// Details: CMICmdArgValString constructor.
// Type: Method.
// Args: vbHandleQuotes - (R) True = Parse a string surrounded by quotes spaces are not delimitors, false = only text up to next delimiting space character.
// vbAcceptNumbers - (R) True = Parse a string and accept as a number if number, false = numbers not recognised as string types.
// vbHandleDirPaths - (R) True = Parse a string and accept as a file path if a path, false = file paths are not recognised as string types.
// Return: None.
// Throws: None.
//--
CMICmdArgValString::CMICmdArgValString( const bool vbHandleQuotes, const bool vbAcceptNumbers, const bool vbHandleDirPaths )
: m_bHandleQuotedString( vbHandleQuotes )
, m_bAcceptNumbers( vbAcceptNumbers )
, m_bHandleDirPaths( vbHandleDirPaths )
{
}

Expand All @@ -41,12 +60,15 @@ CMICmdArgValString::CMICmdArgValString( void )
// vbMandatory - (R) True = Yes must be present, false = optional argument.
// vbHandleByCmd - (R) True = Command processes *this option, false = not handled.
// vbHandleQuotes - (R) True = Parse a string surrounded by quotes spaces are not delimitors, false = only text up to next delimiting space character. (Dflt = false)
// vbAcceptNumbers - (R) True = Parse a string and accept as a number if number, false = numbers not recognised as string types. (Dflt = false)
// Return: None.
// Throws: None.
//--
CMICmdArgValString::CMICmdArgValString( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd, const bool vbHandleQuotes /* = false */ )
CMICmdArgValString::CMICmdArgValString( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd, const bool vbHandleQuotes /* = false */, const bool vbAcceptNumbers /* = false */ )
: CMICmdArgValBaseTemplate( vrArgName, vbMandatory, vbHandleByCmd )
, m_bHandleQuotedString( vbHandleQuotes )
, m_bAcceptNumbers( vbAcceptNumbers )
, m_bHandleDirPaths( false )
{
}

Expand Down Expand Up @@ -145,8 +167,10 @@ bool CMICmdArgValString::ValidateSingleText( CMICmdArgContext & vrwArgContext )
//--
bool CMICmdArgValString::ValidateQuotedText( CMICmdArgContext & vrwArgContext )
{
// CODETAG_QUOTEDTEXT_SIMILAR_CODE
const CMIUtilString strOptions = vrwArgContext.GetArgsLeftToParse();
const MIint nPos = strOptions.find( '"' );
const MIchar cQuote = '"';
const MIint nPos = strOptions.find( cQuote );
if( nPos == (MIint) std::string::npos )
return ValidateSingleText( vrwArgContext );

Expand All @@ -159,7 +183,7 @@ bool CMICmdArgValString::ValidateQuotedText( CMICmdArgContext & vrwArgContext )
return MIstatus::failure;

// Need to find the other quote
const MIint nPos2 = strOptions.find( '"', nPos + 1 );
const MIint nPos2 = strOptions.find( cQuote, nPos + 1 );
if( nPos2 == (MIint) std::string::npos )
return MIstatus::failure;

Expand All @@ -185,34 +209,78 @@ bool CMICmdArgValString::ValidateQuotedText( CMICmdArgContext & vrwArgContext )
//--
bool CMICmdArgValString::IsStringArg( const CMIUtilString & vrTxt ) const
{
const bool bHavePosSlash = (vrTxt.find_first_of( "/" ) != std::string::npos);
const bool bHaveBckSlash = (vrTxt.find_first_of( "\\" ) != std::string::npos);
if( bHavePosSlash || bHaveBckSlash )
return false;

// Look for --someLongOption
if( std::string::npos != vrTxt.find( "--" ) )
return false;
if( m_bHandleQuotedString )
return IsStringArgQuotedText( vrTxt );

// Look for -f type short parameters
const MIint nPos2 = vrTxt.find( "-" );
if( (MIint) std::string::npos != nPos2 )
return IsStringArgSingleText( vrTxt );
}

//++ ------------------------------------------------------------------------------------
// Details: Examine the string and determine if it is a valid string type argument or
// option value. If the string looks like a long option, short option, a thread
// group ID or just a number it is rejected as a string type value. There is an
// option to allow the string to accept a number as a string type.
// Type: Method.
// Args: vrTxt - (R) Some text.
// Return: bool - True = yes valid argument value, false = something else.
// Throws: None.
//--
bool CMICmdArgValString::IsStringArgSingleText( const CMIUtilString & vrTxt ) const
{
if( !m_bHandleDirPaths )
{
if( (MIint) vrTxt.length() > (nPos2 + 1) )
{
const CMIUtilString s = vrTxt.substr( 1 ).c_str();
if( s.IsNumber() )
return false;
}
// Look for directory file paths, if found reject
const bool bHavePosSlash = (vrTxt.find_first_of( "/" ) != std::string::npos);
const bool bHaveBckSlash = (vrTxt.find_first_of( "\\" ) != std::string::npos);
if( bHavePosSlash || bHaveBckSlash )
return false;
}

// Look for --someLongOption, if found reject
if( 0 == vrTxt.find( "--" ) )
return false;

// Look for i1 i2 i3....
const MIint nPos = vrTxt.find_first_of( "i" );
const bool bFoundI1 = ((nPos == 0) && (::isdigit( vrTxt[ 1 ] )) );
if( bFoundI1 )
// Look for -f type short options, if found reject
if( (0 == vrTxt.find( "-" )) && (vrTxt.length() == 2 ) )
return false;

// Look for thread group i1 i2 i3...., if found reject
if( (vrTxt.find( "i" ) == 0) && (::isdigit( vrTxt[ 1 ] )) )
return false;

if( vrTxt.IsNumber() )
// Look for numbers, if found reject
if( !m_bAcceptNumbers && vrTxt.IsNumber() )
return false;

return true;
}

//++ ------------------------------------------------------------------------------------
// Details: Examine the string and determine if it is a valid string type argument.
// Type: Method.
// Args: vrTxt - (R) Some text.
// Return: bool - True = yes valid arg, false = no.
// Throws: None.
//--
bool CMICmdArgValString::IsStringArgQuotedText( const CMIUtilString & vrTxt ) const
{
// CODETAG_QUOTEDTEXT_SIMILAR_CODE
const MIchar cQuote = '"';
const MIint nPos = vrTxt.find( cQuote );
if( nPos == (MIint) std::string::npos )
return IsStringArgSingleText( vrTxt );

// Is one and only quote at end of the string
if( nPos == (MIint)(vrTxt.length() - 1) )
return false;

// Quote must be the first character in the string or be preceeded by a space
if( (nPos > 0) && (vrTxt[ nPos - 1 ] != ' ' ) )
return false;

// Need to find the other quote
const MIint nPos2 = vrTxt.find( cQuote, nPos + 1 );
if( nPos2 == (MIint) std::string::npos )
return false;

return true;
Expand Down
7 changes: 6 additions & 1 deletion lldb/tools/lldb-mi/MICmdArgValString.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class CMICmdArgValString : public CMICmdArgValBaseTemplate< CMIUtilString >
// Methods:
public:
/* ctor */ CMICmdArgValString( void );
/* ctor */ CMICmdArgValString( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd, const bool vbHandleQuotes = false );
/* ctor */ CMICmdArgValString( const bool vbHandleQuotes, const bool vbAcceptNumbers, const bool vbHandleDirPaths );
/* ctor */ CMICmdArgValString( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd, const bool vbHandleQuotes = false, const bool vbAcceptNumbers = false );
//
bool IsStringArg( const CMIUtilString & vrTxt ) const;

Expand All @@ -58,8 +59,12 @@ class CMICmdArgValString : public CMICmdArgValBaseTemplate< CMIUtilString >
private:
bool ValidateSingleText( CMICmdArgContext & vrwArgContext );
bool ValidateQuotedText( CMICmdArgContext & vrwArgContext );
bool IsStringArgSingleText( const CMIUtilString & vrTxt ) const;
bool IsStringArgQuotedText( const CMIUtilString & vrTxt ) const;

// Attribute:
private:
bool m_bHandleQuotedString; // True = Parse a string surrounded by quotes spaces are not delimitors, false = only text up to next delimiting space character
bool m_bAcceptNumbers; // True = Parse a string and accept as a number if number, false = numbers not recognised as string types
bool m_bHandleDirPaths; // True = Parse a string and accept directory file style string if present, false = directory file path not accepted
};
3 changes: 1 addition & 2 deletions lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,4 @@ bool CMICmdArgValThreadGrp::ExtractNumber( const CMIUtilString & vrTxt )
MIuint CMICmdArgValThreadGrp::GetNumber( void ) const
{
return m_nThreadGrp;
}

}
4 changes: 2 additions & 2 deletions lldb/tools/lldb-mi/MICmdBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void CMICmdBase::SetError( const CMIUtilString & rErrMsg )
m_cmdData.bCmdExecutedSuccessfully = false;

const CMICmnMIValueResult valueResult( "msg", CMICmnMIValueConst( rErrMsg ) );
const CMICmnMIResultRecord miResultRecord( m_cmdData.nMiCmdNumber, CMICmnMIResultRecord::eResultClass_Error, valueResult );
const CMICmnMIResultRecord miResultRecord( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, valueResult );
m_miResultRecord = miResultRecord;
m_cmdData.strMiCmdResultRecord = miResultRecord.GetString();
}
Expand Down Expand Up @@ -223,4 +223,4 @@ bool CMICmdBase::ParseArgs( void )

return MIstatus::success;
}


4 changes: 2 additions & 2 deletions lldb/tools/lldb-mi/MICmdBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CMICmnLLDBDebugSessionInfo;
// does some work then wakes up again when called back, does more work
// perhaps, ends, then the Invoker calls the command's Acknowledge
// function. The other type of command is one that just does some work,
// ends, then the Invoker calls the commmand's Acknowledge function. No
// ends, then the Invoker calls the command's Acknowledge function. No
// events set up.
// A command's Execute(), Acknowledge() and event callback functions are
// carried out in the main thread.
Expand Down Expand Up @@ -100,7 +100,7 @@ class CMICmdBase
CMIUtilString m_strCurrentErrDescription; // Reason for Execute or Acknowledge function failure
SMICmdData m_cmdData; // Holds information/status of *this command. Used by other MI code to report or determine state of a command.
bool m_bWaitForEventFromSBDebugger; // True = yes event type command wait, false = command calls Acknowledge() straight after Execute() no waiting
CMIUtilString m_strMiCmd; // The MI text identifying *this commmand i.e. 'break-insert'
CMIUtilString m_strMiCmd; // The MI text identifying *this command i.e. 'break-insert'
CMICmnMIResultRecord m_miResultRecord; // This is completed in the Acknowledge() function and returned to the Command Invoker to proceed stdout output. Each command forms 1 response to its input.
CMIUtilString m_miResultRecordExtra; // This is completed in the Acknowledge() function and returned to the Command Invoker to proceed stdout output. Hack command produce more response text to help the client because of using LLDB
CMICmnLLDBDebugSessionInfo & m_rLLDBDebugSessionInfo; // Access to command sharing information or data across any and all command based derived classes.
Expand Down
14 changes: 7 additions & 7 deletions lldb/tools/lldb-mi/MICmdCmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CMICmdCmdEnablePrettyPrinting::CMICmdCmdEnablePrettyPrinting( void )
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "enable-pretty-printing";

// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdEnablePrettyPrinting::CreateSelf;
}

Expand Down Expand Up @@ -106,14 +106,14 @@ bool CMICmdCmdEnablePrettyPrinting::Acknowledge( void )
{
const CMICmnMIValueConst miValueConst( "0" );
const CMICmnMIValueResult miValueResult( "supported", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.nMiCmdNumber, CMICmnMIResultRecord::eResultClass_Done, miValueResult );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done, miValueResult );
m_miResultRecord = miRecordResult;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this commmand. The factory
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
Expand Down Expand Up @@ -141,7 +141,7 @@ CMICmdCmdSource::CMICmdCmdSource( void )
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "source";

// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdSource::CreateSelf;
}

Expand Down Expand Up @@ -182,14 +182,14 @@ bool CMICmdCmdSource::Execute( void )
//--
bool CMICmdCmdSource::Acknowledge( void )
{
const CMICmnMIResultRecord miRecordResult( m_cmdData.nMiCmdNumber, CMICmnMIResultRecord::eResultClass_Done );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done );
m_miResultRecord = miRecordResult;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this commmand. The factory
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
Expand All @@ -199,4 +199,4 @@ bool CMICmdCmdSource::Acknowledge( void )
CMICmdBase * CMICmdCmdSource::CreateSelf( void )
{
return new CMICmdCmdSource();
}
}
10 changes: 2 additions & 8 deletions lldb/tools/lldb-mi/MICmdCmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CMICmdCmdEnablePrettyPrinting : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -71,9 +71,6 @@ class CMICmdCmdEnablePrettyPrinting : public CMICmdBase
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdEnablePrettyPrinting( void );
};
Expand All @@ -90,7 +87,7 @@ class CMICmdCmdSource
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -102,9 +99,6 @@ class CMICmdCmdSource
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdSource( void );
};
774 changes: 705 additions & 69 deletions lldb/tools/lldb-mi/MICmdCmdBreak.cpp

Large diffs are not rendered by default.

174 changes: 163 additions & 11 deletions lldb/tools/lldb-mi/MICmdCmdBreak.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
//
// Overview: CMICmdCmdBreakInsert interface.
// CMICmdCmdBreakDelete interface.
// CMICmdCmdBreakDisable interface.
// CMICmdCmdBreakEnable interface.
// CMICmdCmdBreakAfter interface.
// CMICmdCmdBreakCondition interface.
//
// 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
Expand Down Expand Up @@ -49,7 +53,7 @@ class CMICmdCmdBreakInsert : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -62,9 +66,6 @@ class CMICmdCmdBreakInsert : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdBreakInsert( void );

Expand All @@ -91,14 +92,21 @@ class CMICmdCmdBreakInsert : public CMICmdBase
CMIUtilString m_brkName;
CMIUtilString m_strArgOptionThreadGrp;
lldb::SBBreakpoint m_brkPt;
bool m_bBrkPtIsPending;
MIuint m_nBrkPtIgnoreCount;
bool m_bBrkPtEnabled;
bool m_bBrkPtCondition;
CMIUtilString m_brkPtCondition;
bool m_bBrkPtThreadId;
MIuint m_nBrkPtThreadId;
const CMIUtilString m_constStrArgNamedTempBrkPt;
const CMIUtilString m_constStrArgNamedHWBrkPt; // Not handled by *this command
const CMIUtilString m_constStrArgNamedPendinfBrkPt; // Not handled by *this command
const CMIUtilString m_constStrArgNamedDisableBrkPt; // Not handled by *this command
const CMIUtilString m_constStrArgNamedPendinfBrkPt;
const CMIUtilString m_constStrArgNamedDisableBrkPt;
const CMIUtilString m_constStrArgNamedTracePt; // Not handled by *this command
const CMIUtilString m_constStrArgNamedConditionalBrkPt; // Not handled by *this command
const CMIUtilString m_constStrArgNamedInoreCnt; // Not handled by *this command
const CMIUtilString m_constStrArgNamedRestrictBrkPtToThreadId; // Not handled by *this command
const CMIUtilString m_constStrArgNamedConditionalBrkPt;
const CMIUtilString m_constStrArgNamedInoreCnt;
const CMIUtilString m_constStrArgNamedRestrictBrkPtToThreadId;
const CMIUtilString m_constStrArgNamedLocation;
const CMIUtilString m_constStrArgNamedThreadGroup; // Not specified in MI spec but Eclipse gives this option sometimes
};
Expand All @@ -114,7 +122,7 @@ class CMICmdCmdBreakDelete : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -127,14 +135,158 @@ class CMICmdCmdBreakDelete : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdBreakDelete( void );

// Attributes:
private:
const CMIUtilString m_constStrArgNamedBrkPt;
const CMIUtilString m_constStrArgNamedThreadGrp; // Not specified in MI spec but Eclipse gives this option
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "break-disable".
// Gotchas: None.
// Authors: Illya Rudkin 19/05/2014.
// Changes: None.
//--
class CMICmdCmdBreakDisable : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdBreakDisable( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdBreakDelete( void );
/* dtor */ virtual ~CMICmdCmdBreakDisable( void );

// Attributes:
private:
const CMIUtilString m_constStrArgNamedThreadGrp; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgNamedBrkPt;
bool m_bBrkPtDisabledOk;
MIuint m_nBrkPtId;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "break-enable".
// Gotchas: None.
// Authors: Illya Rudkin 19/05/2014.
// Changes: None.
//--
class CMICmdCmdBreakEnable : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdBreakEnable( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdBreakEnable( void );

// Attributes:
private:
const CMIUtilString m_constStrArgNamedThreadGrp; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgNamedBrkPt;
bool m_bBrkPtEnabledOk;
MIuint m_nBrkPtId;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "break-after".
// Gotchas: None.
// Authors: Illya Rudkin 29/05/2014.
// Changes: None.
//--
class CMICmdCmdBreakAfter : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdBreakAfter( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdBreakAfter( void );

// Attributes:
private:
const CMIUtilString m_constStrArgNamedThreadGrp; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgNamedNumber;
const CMIUtilString m_constStrArgNamedCount;
MIuint m_nBrkPtId;
MIuint m_nBrkPtCount;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "break-condition".
// Gotchas: None.
// Authors: Illya Rudkin 29/05/2014.
// Changes: None.
//--
class CMICmdCmdBreakCondition : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdBreakCondition( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdBreakCondition( void );

// Methods:
private:
CMIUtilString GetRestOfExpressionNotSurroundedInQuotes( void );

// Attributes:
private:
const CMIUtilString m_constStrArgNamedThreadGrp; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgNamedNumber;
const CMIUtilString m_constStrArgNamedExpr;
const CMIUtilString m_constStrArgNamedExprNoQuotes; // Not specified in MI spec, we need to handle expressions not surrounded by quotes
MIuint m_nBrkPtId;
CMIUtilString m_strBrkPtExpr;
};
1,167 changes: 1,154 additions & 13 deletions lldb/tools/lldb-mi/MICmdCmdData.cpp

Large diffs are not rendered by default.

300 changes: 295 additions & 5 deletions lldb/tools/lldb-mi/MICmdCmdData.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
//++
// File: MICmdCmdData.h
//
// Overview: CMICmdCmdDataEvaluateExpression interface.
// Overview: CMICmdCmdDataEvaluateExpression interface.
// CMICmdCmdDataDisassemble interface.
// CMICmdCmdDataReadMemoryBytes interface.
// CMICmdCmdDataReadMemory interface.
// CMICmdCmdDataListRegisterNames interface.
// CMICmdCmdDataListRegisterValues interface.
// CMICmdCmdDataListRegisterChanged interface.
// CMICmdCmdDataWriteMemoryBytes interface.
// CMICmdCmdDataWriteMemory interface.
//
// 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
Expand All @@ -33,6 +41,7 @@
// In-house headers:
#include "MICmdBase.h"
#include "MICmnMIValueTuple.h"
#include "MICmnMIValueList.h"

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
Expand All @@ -45,7 +54,7 @@ class CMICmdCmdDataEvaluateExpression : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -58,9 +67,6 @@ class CMICmdCmdDataEvaluateExpression : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataEvaluateExpression( void );

Expand All @@ -76,3 +82,287 @@ class CMICmdCmdDataEvaluateExpression : public CMICmdBase
const CMIUtilString m_constStrArgExpr;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-disassemble".
// Gotchas: None.
// Authors: Illya Rudkin 19/05/2014.
// Changes: None.
//--
class CMICmdCmdDataDisassemble : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataDisassemble( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataDisassemble( void );

// Attributes:
private:
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option. Not handled by command.
const CMIUtilString m_constStrArgAddrStart; // MI spec non mandatory, *this command mandatory
const CMIUtilString m_constStrArgAddrEnd; // MI spec non mandatory, *this command mandatory
const CMIUtilString m_constStrArgConsume;
const CMIUtilString m_constStrArgMode;
CMICmnMIValueList m_miValueList;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-read-memory-bytes".
// Gotchas: None.
// Authors: Illya Rudkin 20/05/2014.
// Changes: None.
//--
class CMICmdCmdDataReadMemoryBytes : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataReadMemoryBytes( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataReadMemoryBytes( void );

// Attributes:
private:
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option. Not handled by command.
const CMIUtilString m_constStrArgByteOffset;
const CMIUtilString m_constStrArgAddrStart;
const CMIUtilString m_constStrArgNumBytes;
MIuchar * m_pBufferMemory;
MIuint64 m_nAddrStart;
MIuint64 m_nAddrNumBytesToRead;
MIuint64 m_nAddrOffset;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-read-memory".
// Gotchas: None.
// Authors: Illya Rudkin 21/05/2014.
// Changes: None.
//--
class CMICmdCmdDataReadMemory : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataReadMemory( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataReadMemory( void );
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-list-register-names".
// Gotchas: None.
// Authors: Illya Rudkin 21/05/2014.
// Changes: None.
//--
class CMICmdCmdDataListRegisterNames : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataListRegisterNames( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataListRegisterNames( void );

// Attributes:
private:
const CMIUtilString m_constStrArgThreadGroup; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgRegNo; // Not handled by *this command
CMICmnMIValueList m_miValueList;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-list-register-values".
// Gotchas: None.
// Authors: Illya Rudkin 21/05/2014.
// Changes: None.
//--
class CMICmdCmdDataListRegisterValues : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataListRegisterValues( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataListRegisterValues( void );

// Methods:
private:
lldb::SBValue GetRegister( const MIuint vRegisterIndex ) const;

// Attributes:
private:
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgSkip; // Not handled by *this command
const CMIUtilString m_constStrArgFormat;
const CMIUtilString m_constStrArgRegNo;
CMICmnMIValueList m_miValueList;
lldb::SBProcess * m_pProcess;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-list-changed-registers".
// Gotchas: None.
// Authors: Illya Rudkin 22/05/2014.
// Changes: None.
//--
class CMICmdCmdDataListRegisterChanged : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataListRegisterChanged( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataListRegisterChanged( void );
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-read-memory-bytes".
// Gotchas: None.
// Authors: Illya Rudkin 30/05/2014.
// Changes: None.
//--
class CMICmdCmdDataWriteMemoryBytes : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataWriteMemoryBytes( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataWriteMemoryBytes( void );

// Attributes:
private:
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option. Not handled by command.
const CMIUtilString m_constStrArgAddr;
const CMIUtilString m_constStrArgContents;
const CMIUtilString m_constStrArgCount;
MIuint64 m_nAddr;
CMIUtilString m_strContents;
MIuint64 m_nCount;
};

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "data-read-memory".
// Not specified in MI spec but Eclipse gives *this command.
// Gotchas: None.
// Authors: Illya Rudkin 02/05/2014.
// Changes: None.
//--
class CMICmdCmdDataWriteMemory : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdDataWriteMemory( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdDataWriteMemory( void );

// Attributes:
private:
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option. Not handled by command.
const CMIUtilString m_constStrArgOffset; // Not specified in MI spec but Eclipse gives this option.
const CMIUtilString m_constStrArgAddr; // Not specified in MI spec but Eclipse gives this option.
const CMIUtilString m_constStrArgD; // Not specified in MI spec but Eclipse gives this option.
const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option.
const CMIUtilString m_constStrArgContents; // Not specified in MI spec but Eclipse gives this option.
MIuint64 m_nAddr;
CMIUtilString m_strContents;
MIuint64 m_nCount;
MIuchar * m_pBufferMemory;
};
12 changes: 6 additions & 6 deletions lldb/tools/lldb-mi/MICmdCmdEnviro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CMICmdCmdEnvironmentCd::CMICmdCmdEnvironmentCd( void )
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "environment-cd";

// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdEnvironmentCd::CreateSelf;
}

Expand Down Expand Up @@ -109,7 +109,7 @@ bool CMICmdCmdEnvironmentCd::Execute( void )
if( bOk )
{
const CMIUtilString & rStrKeyWkDir( m_rLLDBDebugSessionInfo.m_constStrSharedDataKeyWkDir );
if( !m_rLLDBDebugSessionInfo.SharedDataAdd( rStrKeyWkDir, strWkDir ) )
if( !m_rLLDBDebugSessionInfo.SharedDataAdd< CMIUtilString >( rStrKeyWkDir, strWkDir ) )
{
SetError( CMIUtilString::Format( MIRSRC( IDS_DBGSESSION_ERR_SHARED_DATA_ADD ), m_cmdData.strMiCmd.c_str(), rStrKeyWkDir.c_str() ) );
bOk = MIstatus::failure;
Expand All @@ -134,12 +134,12 @@ bool CMICmdCmdEnvironmentCd::Acknowledge( void )
{
const CMIUtilString & rStrKeyWkDir( m_rLLDBDebugSessionInfo.m_constStrSharedDataKeyWkDir );
CMIUtilString strWkDir;
const bool bOk = m_rLLDBDebugSessionInfo.SharedDataRetrieve( rStrKeyWkDir, strWkDir );
const bool bOk = m_rLLDBDebugSessionInfo.SharedDataRetrieve< CMIUtilString >( rStrKeyWkDir, strWkDir );
if( bOk )
{
const CMICmnMIValueConst miValueConst( strWkDir );
const CMICmnMIValueResult miValueResult( "path", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.nMiCmdNumber, CMICmnMIResultRecord::eResultClass_Done, miValueResult );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done, miValueResult );
m_miResultRecord = miRecordResult;
return MIstatus::success;
}
Expand All @@ -149,7 +149,7 @@ bool CMICmdCmdEnvironmentCd::Acknowledge( void )
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this commmand. The factory
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
Expand All @@ -159,4 +159,4 @@ bool CMICmdCmdEnvironmentCd::Acknowledge( void )
CMICmdBase * CMICmdCmdEnvironmentCd::CreateSelf( void )
{
return new CMICmdCmdEnvironmentCd();
}
}
5 changes: 1 addition & 4 deletions lldb/tools/lldb-mi/MICmdCmdEnviro.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CMICmdCmdEnvironmentCd : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -59,9 +59,6 @@ class CMICmdCmdEnvironmentCd : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdEnvironmentCd( void );

Expand Down
240 changes: 190 additions & 50 deletions lldb/tools/lldb-mi/MICmdCmdExec.cpp

Large diffs are not rendered by default.

75 changes: 47 additions & 28 deletions lldb/tools/lldb-mi/MICmdCmdExec.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// CMICmdCmdExecNextInstruction interface.
// CMICmdCmdExecStepInstruction interface.
// CMICmdCmdExecFinish interface.
// CMICmdCmdExecInterupt interface.
//
// 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
Expand Down Expand Up @@ -53,7 +54,7 @@ class CMICmdCmdExecRun : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -65,11 +66,12 @@ class CMICmdCmdExecRun : public CMICmdBase
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecRun( void );

// Attributes:
private:
lldb::SBCommandReturnObject m_lldbResult;
};

//++ ============================================================================
Expand All @@ -83,7 +85,7 @@ class CMICmdCmdExecContinue : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -95,9 +97,6 @@ class CMICmdCmdExecContinue : public CMICmdBase
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecContinue( void );

Expand All @@ -117,7 +116,7 @@ class CMICmdCmdExecNext : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -130,9 +129,6 @@ class CMICmdCmdExecNext : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecNext( void );

Expand All @@ -154,7 +150,7 @@ class CMICmdCmdExecStep : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -167,9 +163,6 @@ class CMICmdCmdExecStep : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecStep( void );

Expand All @@ -191,7 +184,7 @@ class CMICmdCmdExecNextInstruction : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -204,16 +197,14 @@ class CMICmdCmdExecNextInstruction : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecNextInstruction( void );

// Attributes:
private:
lldb::SBCommandReturnObject m_lldbResult;
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option
};

//++ ============================================================================
Expand All @@ -227,7 +218,7 @@ class CMICmdCmdExecStepInstruction : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -240,16 +231,14 @@ class CMICmdCmdExecStepInstruction : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecStepInstruction( void );

// Attributes:
private:
lldb::SBCommandReturnObject m_lldbResult;
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option
};

//++ ============================================================================
Expand All @@ -263,7 +252,7 @@ class CMICmdCmdExecFinish : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -276,9 +265,6 @@ class CMICmdCmdExecFinish : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecFinish( void );

Expand All @@ -289,3 +275,36 @@ class CMICmdCmdExecFinish : public CMICmdBase
const CMIUtilString m_constStrArgFrame; // Not specified in MI spec but Eclipse gives this option
};

// CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "exec-interrupt".
// Gotchas: Using Eclipse this command is injected into the command system when a
// SIGINT signal is received while running an inferior program.
// Authors: Illya Rudkin 03/06/2014.
// Changes: None.
//--
class CMICmdCmdExecInterrupt : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdExecInterrupt( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdExecInterrupt( void );

// Attributes:
private:
lldb::SBCommandReturnObject m_lldbResult;
};

20 changes: 11 additions & 9 deletions lldb/tools/lldb-mi/MICmdCmdFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CMICmdCmdFileExecAndSymbols::CMICmdCmdFileExecAndSymbols( void )
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "file-exec-and-symbols";

// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdFileExecAndSymbols::CreateSelf;
}

Expand Down Expand Up @@ -109,17 +109,17 @@ bool CMICmdCmdFileExecAndSymbols::Execute( void )
const CMIUtilString & strExeFilePath( pArgFile->GetValue() );
CMICmnLLDBDebugSessionInfo & rSessionInfo( CMICmnLLDBDebugSessionInfo::Instance() );
lldb::SBDebugger & rDbgr = rSessionInfo.m_rLldbDebugger;
lldb::SBError error;
const char * pTargetTriple = nullptr; // Let LLDB discover the triple required
const char * pTargetPlatformName = "";
lldb::SBError error;
const MIchar * pTargetTriple = nullptr; // Let LLDB discover the triple required
const MIchar * pTargetPlatformName = "";
const bool bAddDepModules = false;
lldb::SBTarget target = rDbgr.CreateTarget( strExeFilePath.c_str(), pTargetTriple, pTargetPlatformName, bAddDepModules, error );
CMIUtilString strWkDir;
const CMIUtilString & rStrKeyWkDir( rSessionInfo.m_constStrSharedDataKeyWkDir );
if( !rSessionInfo.SharedDataRetrieve( rStrKeyWkDir, strWkDir ) )
if( !rSessionInfo.SharedDataRetrieve< CMIUtilString >( rStrKeyWkDir, strWkDir ) )
{
strWkDir = CMIUtilFileStd().StripOffFileName( strExeFilePath );
if( !rSessionInfo.SharedDataAdd( rStrKeyWkDir, strWkDir ) )
if( !rSessionInfo.SharedDataAdd< CMIUtilString >( rStrKeyWkDir, strWkDir ) )
{
SetError( CMIUtilString::Format( MIRSRC( IDS_DBGSESSION_ERR_SHARED_DATA_ADD ), m_cmdData.strMiCmd.c_str(), rStrKeyWkDir.c_str() ) );
return MIstatus::failure;
Expand All @@ -133,7 +133,9 @@ bool CMICmdCmdFileExecAndSymbols::Execute( void )
}
lldb::SBStream err;
if( error.Fail() )
const bool bOk = error.GetDescription( err );
{
const bool bOk = error.GetDescription( err ); MIunused( bOk );
}
if( !target.IsValid() )
{
SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_INVALID_TARGET ), m_cmdData.strMiCmd.c_str(), strExeFilePath.c_str(), err.GetData() ) );
Expand Down Expand Up @@ -161,14 +163,14 @@ bool CMICmdCmdFileExecAndSymbols::Execute( void )
//--
bool CMICmdCmdFileExecAndSymbols::Acknowledge( void )
{
const CMICmnMIResultRecord miRecordResult( m_cmdData.nMiCmdNumber, CMICmnMIResultRecord::eResultClass_Done );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done );
m_miResultRecord = miRecordResult;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this commmand. The factory
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
Expand Down
7 changes: 2 additions & 5 deletions lldb/tools/lldb-mi/MICmdCmdFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CMICmdCmdFileExecAndSymbols : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this commmand
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
Expand All @@ -60,14 +60,11 @@ class CMICmdCmdFileExecAndSymbols : public CMICmdBase
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );

// Overridden:
public:
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdFileExecAndSymbols( void );

// Attributes:
private:
const CMIUtilString m_constStrArgNameFile;
const CMIUtilString m_constStrArgThreadGrp; // Not handled by *this command. Not specified in MI spec but Eclipse gives this option sometimes
};
};
240 changes: 240 additions & 0 deletions lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
//===-- MICmdCmdGdbInfo.cpp ------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdCmdGdbInfo.cpp
//
// Overview: CMICmdCmdGdbInfo implementation.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

// Third party headers:
#include <lldb/API/SBCommandReturnObject.h>

// In-house headers:
#include "MICmdCmdGdbInfo.h"
#include "MICmnMIResultRecord.h"
#include "MICmnMIValueConst.h"
#include "MICmdArgContext.h"
#include "MICmdArgValString.h"
#include "MICmnStreamStdout.h"
#include "MICmnLLDBDebugSessionInfo.h"

// Instantiations:
const CMICmdCmdGdbInfo::MapPrintFnNameToPrintFn_t CMICmdCmdGdbInfo::ms_mapPrintFnNameToPrintFn =
{
{ "sharedlibrary", &CMICmdCmdGdbInfo::PrintFnSharedLibrary }
};

//++ ------------------------------------------------------------------------------------
// Details: CMICmdCmdGdbInfo constructor.
// Type: Method.
// Args: None.
// Return: None.
// Throws: None.
//--
CMICmdCmdGdbInfo::CMICmdCmdGdbInfo( void )
: m_constStrArgNamedPrint( "print" )
, m_bPrintFnRecognised( true )
, m_bPrintFnSuccessful( false )
, m_strPrintFnError( MIRSRC( IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS ) )
{
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "info";

// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdGdbInfo::CreateSelf;
}

//++ ------------------------------------------------------------------------------------
// Details: CMICmdCmdGdbInfo destructor.
// Type: Overrideable.
// Args: None.
// Return: None.
// Throws: None.
//--
CMICmdCmdGdbInfo::~CMICmdCmdGdbInfo( void )
{
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line options
// arguments to extract values for each of those arguments.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbInfo::ParseArgs( void )
{
bool bOk = m_setCmdArgs.Add( *(new CMICmdArgValString( m_constStrArgNamedPrint, true, true ) ) );
CMICmdArgContext argCntxt( m_cmdData.strMiCmdOption );
if( bOk && !m_setCmdArgs.Validate( m_cmdData.strMiCmd, argCntxt ) )
{
SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_ARGS ), m_cmdData.strMiCmd.c_str(), m_setCmdArgs.GetErrorDescription().c_str() ) );
return MIstatus::failure;
}

return bOk;
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this function.
// The command is likely to communicate with the LLDB SBDebugger in here.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbInfo::Execute( void )
{
CMICMDBASE_GETOPTION( pArgPrint, String, m_constStrArgNamedPrint );
const CMIUtilString & rPrintRequest( pArgPrint->GetValue() );

FnPrintPtr pPrintRequestFn = nullptr;
if( !GetPrintFn( rPrintRequest, pPrintRequestFn ) )
{
m_strPrintFnName = rPrintRequest;
m_bPrintFnRecognised = false;
return MIstatus::success;
}

m_bPrintFnSuccessful = (this->*(pPrintRequestFn))();

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record Result
// for the work carried out in the Execute().
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbInfo::Acknowledge( void )
{
if( !m_bPrintFnRecognised )
{
const CMICmnMIValueConst miValueConst( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND ), m_strPrintFnName.c_str() ) );
const CMICmnMIValueResult miValueResult( "msg", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult );
m_miResultRecord = miRecordResult;
return MIstatus::success;
}

if( m_bPrintFnSuccessful )
{
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done );
m_miResultRecord = miRecordResult;
return MIstatus::success;
}

const CMICmnMIValueConst miValueConst( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_INFO_PRINTFN_FAILED ), m_strPrintFnError.c_str() ) );
const CMICmnMIValueResult miValueResult( "msg", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult );
m_miResultRecord = miRecordResult;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
// Return: CMICmdBase * - Pointer to a new command.
// Throws: None.
//--
CMICmdBase * CMICmdCmdGdbInfo::CreateSelf( void )
{
return new CMICmdCmdGdbInfo();
}

//++ ------------------------------------------------------------------------------------
// Details: Retrieve the print function's pointer for the matching print request.
// Type: Method.
// Args: vrPrintFnName - (R) The info requested.
// vrwpFn - (W) The print function's pointer of the function to carry out
// Return: bool - True = Print request is implemented, false = not found.
// Throws: None.
//--
bool CMICmdCmdGdbInfo::GetPrintFn( const CMIUtilString & vrPrintFnName, FnPrintPtr & vrwpFn ) const
{
vrwpFn = nullptr;

const MapPrintFnNameToPrintFn_t::const_iterator it = ms_mapPrintFnNameToPrintFn.find( vrPrintFnName );
if( it != ms_mapPrintFnNameToPrintFn.end() )
{
vrwpFn = (*it).second;
return true;
}

return false;
}

//++ ------------------------------------------------------------------------------------
// Details: Carry out work to complete the request to prepare and send back information
// asked for.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbInfo::PrintFnSharedLibrary( void )
{
CMICmnStreamStdout & rStdout = CMICmnStreamStdout::Instance();
bool bOk = rStdout.TextToStdout( "~\"From To Syms Read Shared Object Library\"" );

CMICmnLLDBDebugSessionInfo & rSessionInfo( CMICmnLLDBDebugSessionInfo::Instance() );
lldb::SBTarget & rTarget = rSessionInfo.m_lldbTarget;
const MIuint nModules = rTarget.GetNumModules();
for( MIuint i = 0; bOk && (i < nModules); i++ )
{
lldb::SBModule module = rTarget.GetModuleAtIndex( i );
if( module.IsValid() )
{
const CMIUtilString strModuleFilePath( module.GetFileSpec().GetDirectory() );
const CMIUtilString strModuleFileName( module.GetFileSpec().GetFilename() );
const CMIUtilString strModuleFullPath( CMIUtilString::Format( "%s/%s", strModuleFilePath.c_str(), strModuleFileName.c_str() ) );
const CMIUtilString strHasSymbols = (module.GetNumSymbols() > 0) ? "Yes" : "No";
lldb::addr_t addrLoadS = 0xffffffff;
lldb::addr_t addrLoadSize = 0;
bool bHaveAddrLoad = false;
const MIuint nSections = module.GetNumSections();
for( MIuint j = 0; j < nSections; j++ )
{
lldb::SBSection section = module.GetSectionAtIndex( j );
lldb::addr_t addrLoad = section.GetLoadAddress( rTarget );
if( addrLoad != (lldb::addr_t) -1 )
{
if( !bHaveAddrLoad )
{
bHaveAddrLoad = true;
addrLoadS = addrLoad;
}

addrLoadSize += section.GetByteSize();
}
}
bOk = bOk && rStdout.TextToStdout( CMIUtilString::Format( "~\"0x%08x\t0x%08x\t%s\t\t%s\"", addrLoadS, addrLoadS + addrLoadSize, strHasSymbols.c_str(), strModuleFullPath.c_str() ) );
}
}

return bOk;
}
93 changes: 93 additions & 0 deletions lldb/tools/lldb-mi/MICmdCmdGdbInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//===-- MICmdCmdGdbInfo.h --------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdCmdGdbInfo.h
//
// Overview: CMICmdCmdGdbInfo interface.
//
// 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.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

#pragma once

// Third party headers:
#include <map>

// In-house headers:
#include "MICmdBase.h"

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements GDB command "info".
// The design of matching the info request to a request action (or
// command) is very simple. The request function which carries out
// the task of information gathering and printing to stdout is part of
// *this class. Should the request function become more complicated then
// that request should really reside in a command type class. Then this
// class instantiates a request info command for a matching request. The
// design/code of *this class then does not then become bloated. Use a
// lightweight version of the current MI command system.
// Gotchas: None.
// Authors: Illya Rudkin 05/06/2014.
// Changes: None.
//--
class CMICmdCmdGdbInfo : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdGdbInfo( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdGdbInfo( void );

// Typedefs:
private:
typedef bool (CMICmdCmdGdbInfo::*FnPrintPtr)();
typedef std::map< CMIUtilString, FnPrintPtr > MapPrintFnNameToPrintFn_t;

// Methods:
private:
bool GetPrintFn( const CMIUtilString & vrPrintFnName, FnPrintPtr & vrwpFn ) const;
bool PrintFnSharedLibrary( void );

// Attributes:
private:
const static MapPrintFnNameToPrintFn_t ms_mapPrintFnNameToPrintFn;
//
const CMIUtilString m_constStrArgNamedPrint;
bool m_bPrintFnRecognised; // True = This command has a function with a name that matches the Print argument, false = not found
bool m_bPrintFnSuccessful; // True = The print function completed its task ok, false = function failed for some reason
CMIUtilString m_strPrintFnName;
CMIUtilString m_strPrintFnError;
};
265 changes: 265 additions & 0 deletions lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
//===-- MICmdCmdGdbSet.cpp ------- -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdCmdGdbSet.cpp
//
// Overview: CMICmdCmdGdbSet implementation.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

// In-house headers:
#include "MICmdCmdGdbSet.h"
#include "MICmnMIResultRecord.h"
#include "MICmnMIValueConst.h"
#include "MICmdArgContext.h"
#include "MICmdArgValString.h"
#include "MICmdArgValListOfN.h"
#include "MICmnLLDBDebugSessionInfo.h"

// Instantiations:
const CMICmdCmdGdbSet::MapGdbOptionNameToFnGdbOptionPtr_t CMICmdCmdGdbSet::ms_mapGdbOptionNameToFnGdbOptionPtr =
{
// { "target-async", &CMICmdCmdGdbSet::OptionFnTargetAsync }, // Example code if need to implement GDB set other options
// { "auto-solib-add", &CMICmdCmdGdbSet::OptionFnAutoSolibAdd }, // Example code if need to implement GDB set other options
{ "solib-search-path", &CMICmdCmdGdbSet::OptionFnSolibSearchPath },
{ "fallback", &CMICmdCmdGdbSet::OptionFnFallback }
};

//++ ------------------------------------------------------------------------------------
// Details: CMICmdCmdGdbSet constructor.
// Type: Method.
// Args: None.
// Return: None.
// Throws: None.
//--
CMICmdCmdGdbSet::CMICmdCmdGdbSet( void )
: m_constStrArgNamedGdbOption( "option" )
, m_bGdbOptionRecognised( true )
, m_bGdbOptionFnSuccessful( false )
, m_bGbbOptionFnHasError( false )
, m_strGdbOptionFnError( MIRSRC( IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS ) )
{
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "gdb-set";

// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdGdbSet::CreateSelf;
}

//++ ------------------------------------------------------------------------------------
// Details: CMICmdCmdGdbSet destructor.
// Type: Overrideable.
// Args: None.
// Return: None.
// Throws: None.
//--
CMICmdCmdGdbSet::~CMICmdCmdGdbSet( void )
{
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The parses the command line options
// arguments to extract values for each of those arguments.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbSet::ParseArgs( void )
{
bool bOk = m_setCmdArgs.Add( *(new CMICmdArgValListOfN( m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumberPath ) ) );
CMICmdArgContext argCntxt( m_cmdData.strMiCmdOption );
if( bOk && !m_setCmdArgs.Validate( m_cmdData.strMiCmd, argCntxt ) )
{
SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_ARGS ), m_cmdData.strMiCmd.c_str(), m_setCmdArgs.GetErrorDescription().c_str() ) );
return MIstatus::failure;
}

return bOk;
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this function.
// The command is likely to communicate with the LLDB SBDebugger in here.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbSet::Execute( void )
{
CMICMDBASE_GETOPTION( pArgGdbOption, ListOfN, m_constStrArgNamedGdbOption );
const CMICmdArgValListBase::VecArgObjPtr_t & rVecWords( pArgGdbOption->GetExpectedOptions() );

// Get the gdb-set option to carry out
CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it = rVecWords.begin();
const CMICmdArgValString * pOption = static_cast< const CMICmdArgValString * >( *it );
const CMIUtilString strOption( pOption->GetValue() );
++it;

// Retrieve the parameter(s) for the option
CMIUtilString::VecString_t vecWords;
while( it != rVecWords.end() )
{
const CMICmdArgValString * pWord = static_cast< const CMICmdArgValString * >( *it );
vecWords.push_back( pWord->GetValue() );

// Next
++it;
}

FnGdbOptionPtr pPrintRequestFn = nullptr;
if( !GetOptionFn( strOption, pPrintRequestFn ) )
{
// For unimplemented option handlers, fallback on a generic handler
// ToDo: Remove this when ALL options have been implemented
if( !GetOptionFn( "fallback", pPrintRequestFn ) )
{
m_bGdbOptionRecognised = false;
m_strGdbOptionName = "fallback"; // This would be the strOption name
return MIstatus::success;
}
}

m_bGdbOptionFnSuccessful = (this->*(pPrintRequestFn))( vecWords );
if( !m_bGdbOptionFnSuccessful && !m_bGbbOptionFnHasError )
return MIstatus::failure;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record Result
// for the work carried out in the Execute().
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbSet::Acknowledge( void )
{
if( !m_bGdbOptionRecognised )
{
const CMICmnMIValueConst miValueConst( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND ), m_strGdbOptionName.c_str() ) );
const CMICmnMIValueResult miValueResult( "msg", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult );
m_miResultRecord = miRecordResult;
return MIstatus::success;
}

if( m_bGdbOptionFnSuccessful )
{
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done );
m_miResultRecord = miRecordResult;
return MIstatus::success;
}

const CMICmnMIValueConst miValueConst( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_INFO_PRINTFN_FAILED ), m_strGdbOptionFnError.c_str() ) );
const CMICmnMIValueResult miValueResult( "msg", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult );
m_miResultRecord = miRecordResult;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
// Return: CMICmdBase * - Pointer to a new command.
// Throws: None.
//--
CMICmdBase * CMICmdCmdGdbSet::CreateSelf( void )
{
return new CMICmdCmdGdbSet();
}

//++ ------------------------------------------------------------------------------------
// Details: Retrieve the print function's pointer for the matching print request.
// Type: Method.
// Args: vrPrintFnName - (R) The info requested.
// vrwpFn - (W) The print function's pointer of the function to carry out
// Return: bool - True = Print request is implemented, false = not found.
// Throws: None.
//--
bool CMICmdCmdGdbSet::GetOptionFn( const CMIUtilString & vrPrintFnName, FnGdbOptionPtr & vrwpFn ) const
{
vrwpFn = nullptr;

const MapGdbOptionNameToFnGdbOptionPtr_t::const_iterator it = ms_mapGdbOptionNameToFnGdbOptionPtr.find( vrPrintFnName );
if( it != ms_mapGdbOptionNameToFnGdbOptionPtr.end() )
{
vrwpFn = (*it).second;
return true;
}

return false;
}

//++ ------------------------------------------------------------------------------------
// Details: Carry out work to complete the GDB set option 'solib-search-path' to prepare
// and send back information asked for.
// Type: Method.
// Args: vrWords - (R) List of additional parameters used by this option.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbSet::OptionFnSolibSearchPath( const CMIUtilString::VecString_t & vrWords )
{
// Check we have at least one argument
if( vrWords.size() < 1 )
{
m_bGbbOptionFnHasError = true;
m_strGdbOptionFnError = MIRSRC( IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH );
return MIstatus::failure;
}
const CMIUtilString & rStrValSolibPath( vrWords[ 0 ] );

// Add 'solib-search-path' to the shared data list
const CMIUtilString & rStrKeySolibPath( m_rLLDBDebugSessionInfo.m_constStrSharedDataSolibPath );
if( !m_rLLDBDebugSessionInfo.SharedDataAdd< CMIUtilString >( rStrKeySolibPath, rStrValSolibPath ) )
{
m_bGbbOptionFnHasError = false;
SetError( CMIUtilString::Format( MIRSRC( IDS_DBGSESSION_ERR_SHARED_DATA_ADD ), m_cmdData.strMiCmd.c_str(), rStrKeySolibPath.c_str() ) );
return MIstatus::failure;
}

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Carry out work to complete the GDB set option to prepare and send back information
// asked for.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbSet::OptionFnFallback( const CMIUtilString::VecString_t & vrWords )
{
MIunused( vrWords );

// Do nothing - intentional. This is a fallback temporary action function to do nothing.
// This allows the search for gdb-set options to always suceed when the option is not
// found (implemented).

return MIstatus::success;
}
95 changes: 95 additions & 0 deletions lldb/tools/lldb-mi/MICmdCmdGdbSet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
//===-- MICmdCmdGdbSet.h ------------- ---------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdCmdGdbSet.h
//
// Overview: CMICmdCmdGdbSet interface.
//
// 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.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

#pragma once

// In-house headers:
#include "MICmdBase.h"

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements MI command "gdb-set".
// This command does not follow the MI documentation exactly. While *this
// command is implemented it does not do anything with the gdb-set
// variable past in.
// The design of matching the info request to a request action (or
// command) is very simple. The request function which carries out
// the task of information gathering and printing to stdout is part of
// *this class. Should the request function become more complicated then
// that request should really reside in a command type class. Then this
// class instantiates a request info command for a matching request. The
// design/code of *this class then does not then become bloated. Use a
// lightweight version of the current MI command system.
// Gotchas: None.
// Authors: Illya Rudkin 03/03/2014.
// Changes: None.
//--
class CMICmdCmdGdbSet : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdGdbSet( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
virtual bool ParseArgs( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdGdbSet( void );

// Typedefs:
private:
typedef bool (CMICmdCmdGdbSet::*FnGdbOptionPtr)( const CMIUtilString::VecString_t & vrWords );
typedef std::map< CMIUtilString, FnGdbOptionPtr > MapGdbOptionNameToFnGdbOptionPtr_t;

// Methods:
private:
bool GetOptionFn( const CMIUtilString & vrGdbOptionName, FnGdbOptionPtr & vrwpFn ) const;
bool OptionFnSolibSearchPath( const CMIUtilString::VecString_t & vrWords );
bool OptionFnFallback( const CMIUtilString::VecString_t & vrWords );

// Attributes:
private:
const static MapGdbOptionNameToFnGdbOptionPtr_t ms_mapGdbOptionNameToFnGdbOptionPtr;
//
const CMIUtilString m_constStrArgNamedGdbOption;
bool m_bGdbOptionRecognised; // True = This command has a function with a name that matches the Print argument, false = not found
bool m_bGdbOptionFnSuccessful; // True = The print function completed its task ok, false = function failed for some reason
bool m_bGbbOptionFnHasError; // True = The option function has an error condition (not the command!), false = option function ok.
CMIUtilString m_strGdbOptionName;
CMIUtilString m_strGdbOptionFnError;
};
100 changes: 100 additions & 0 deletions lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
//===-- MICmdCmdGdbThread.cpp -----------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdCmdGdbThread.cpp
//
// Overview: CMICmdCmdGdbThread implementation.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

// In-house headers:
#include "MICmdCmdGdbThread.h"
#include "MICmnMIResultRecord.h"
#include "MICmnMIValueConst.h"

//++ ------------------------------------------------------------------------------------
// Details: CMICmdCmdGdbThread constructor.
// Type: Method.
// Args: None.
// Return: None.
// Throws: None.
//--
CMICmdCmdGdbThread::CMICmdCmdGdbThread( void )
{
// Command factory matches this name with that received from the stdin stream
m_strMiCmd = "thread";

// Required by the CMICmdFactory when registering *this command
m_pSelfCreatorFn = &CMICmdCmdGdbThread::CreateSelf;
}

//++ ------------------------------------------------------------------------------------
// Details: CMICmdCmdThread destructor.
// Type: Overrideable.
// Args: None.
// Return: None.
// Throws: None.
//--
CMICmdCmdGdbThread::~CMICmdCmdGdbThread( void )
{
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command does work in this function.
// The command is likely to communicate with the LLDB SBDebugger in here.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbThread::Execute( void )
{
// Do nothing

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI Record Result
// for the work carried out in the Execute().
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMICmdCmdGdbThread::Acknowledge( void )
{
const CMICmnMIValueConst miValueConst( MIRSRC( IDS_WORD_NOT_IMPLEMENTED ) );
const CMICmnMIValueResult miValueResult( "msg", miValueConst );
const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult );
m_miResultRecord = miRecordResult;

return MIstatus::success;
}

//++ ------------------------------------------------------------------------------------
// Details: Required by the CMICmdFactory when registering *this command. The factory
// calls this function to create an instance of *this command.
// Type: Static method.
// Args: None.
// Return: CMICmdBase * - Pointer to a new command.
// Throws: None.
//--
CMICmdBase * CMICmdCmdGdbThread::CreateSelf( void )
{
return new CMICmdCmdGdbThread();
}
61 changes: 61 additions & 0 deletions lldb/tools/lldb-mi/MICmdCmdGdbThread.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//===-- MICmdCmdGdbThread.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//++
// File: MICmdCmdGdbThread.h
//
// Overview: CMICmdCmdGdbThread interface.
//
// 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.
//
// Environment: Compilers: Visual C++ 12.
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
// Libraries: See MIReadmetxt.
//
// Copyright: None.
//--

#pragma once

// In-house headers:
#include "MICmdBase.h"

//++ ============================================================================
// Details: MI command class. MI commands derived from the command base class.
// *this class implements GDB command "thread".
// Gotchas: None.
// Authors: Illya Rudkin 25/02/2014.
// Changes: None.
//--
class CMICmdCmdGdbThread : public CMICmdBase
{
// Statics:
public:
// Required by the CMICmdFactory when registering *this command
static CMICmdBase * CreateSelf( void );

// Methods:
public:
/* ctor */ CMICmdCmdGdbThread( void );

// Overridden:
public:
// From CMICmdInvoker::ICmd
virtual bool Execute( void );
virtual bool Acknowledge( void );
// From CMICmnBase
/* dtor */ virtual ~CMICmdCmdGdbThread( void );
};
Loading