windows-nt/Source/XPSP1/NT/sdktools/debuggers/exdi/exdi.idl
2020-09-26 16:20:57 +08:00

3671 lines
141 KiB
Plaintext

/*++
Copyright (c) 1999 / 2000 Microsoft Corporation
Module Name:
eXdi.idl : IDL source for eXdi interface
Abstract:
This file will be processed by the MIDL tool to
produce the type library (eXdiTest.tlb) and marshalling code.
eXDI: extended debug interface.
The interfaces described here are meant to be used for communication between an external debug driver
(like driver for Hardware Debug probe).
Author:
Greg Hogdal (ghogdal) 11-Nov-1999
Environment:
Win32 NT
Revision History:
November 1999 ghogdal
Creation.
11-21-1999 ghogdal
Change hrSingleStep into hrStep in HALT_REASON_TYPE type declaration
11-23-1999 ghogdal
Add fDebugRegs to _CONTEXT_PPC.RegGroupSelection
11-24-1999 ghogdal
Fix bug in buffer size calculation (size_is) of ReadVirtualMemory (), WriteVirtualMemory (), ReadPhysicalMemoryOrPeriphIO () and ReadPhysicalMemoryOrPeriphIO ()
12-01-1999 ghogdal
Modify NotifyRunStateChange(): parameters are not outputs but inputs
Change comment description of dwConnectionCookie in StopNotifyingRunChg() and StopNotifyingMemChg()
Rename all bDataWidth by bAccessWidth
Add meaning for bAccessWidth parameter of IeXdiServer::AddDataBreakpoint: -1 (255) means that the width should be ignored as a BP trigger filter.
Breakpoint interface cleanup:
-Add function HRESULT IeXdiServer::DelCodeBreakpoint ([in] IeXdiCodeBreakpoint *pieXdiCodeBreakpoint);
-Add function HRESULT IeXdiServer::DelDataBreakpoint ([in] IeXdiDataBreakpoint *pieXdiDataBreakpoint);
-Remove function HRESULT IeXdiCodeBreakpoint::ChangeAttributes ([in] ADDRESS_TYPE Address, [in] CBP_KIND cbpk, [in] DWORD dwExecMode, [in] DWORD dwTotalBypassCount, [in] BOOL fResetBypassedOccurences, [in] BOOL fEnabled);
-Remove function HRESULT IeXdiDataBreakpoint::ChangeAttributes ([in] ADDRESS_TYPE Address, [in] ADDRESS_TYPE AddressMask, [in] DWORD dwData, [in] DWORD dwDataMask, [in] BYTE bAccessWidth, [in] DATA_ACCESS_TYPE da, [in] DWORD dwTotalBypassCount, [in] BOOL fResetBypassedOccurences, [in] BOOL fEnabled);
-Add parameter fResetBypassedOccurences in function HRESULT IeXdiCodeBreakpoint::SetState ([in] BOOL fEnabled, [in] BOOL fResetBypassedOccurences);
-Add parameter fResetBypassedOccurences in function HRESULT IeXdiDataBreakpoint::SetState ([in] BOOL fEnabled, [in] BOOL fResetBypassedOccurences);
-IeXdiEnumCodeBreakpoint::Next()'s appieXdiCodeBreakpoint parameter was missing one level of indirection
-IeXdiEnumDataBreakpoint::Next()'s appieXdiDataBreakpoint parameter was missing one level of indirection
-Add mt and bAddressSpace parameters to IeXdiServer::AddDataBreakpoint()
-Add pmt and pbAddressSpace parameters to IeXdiDataBreakpoint::GetDataBpAttributes()
12-07-1999 ghogdal
Rename IeXdiDataBreakpoint::GetDataBpAttributes() into IeXdiDataBreakpoint::GetAttributes()
Add mt parameter to IeXdiServer::AddCodeBreakpoint()
Add pmt parameter to IeXdiCodeBreakpoint::GetAttributes()
Change daBoth from -1 to 2 (COM does not like negative enum val apparently)
12-13-1999 ghogdal
Add notes on memory "sanitization" and mem change notification purpose
01-03-2000 ghogdal
Add 2 parameters to NotifyRunStateChange () for conveniency: CurrentExecAddress and dwExceptionCode
01-05-2000 ghogdal
Add GetExceptionDescriptionList () in IeXdiServer and EXCEPTION_DESCRIPTION_TYPE type
01-06-2000 ghogdal
Change EXCEPTION_DESCRIPTION type name by EXCEPTION_DESCRIPTION_TYPE
Change EXCEPTION_FILTER_DEFAULT type name by EXCEPTION_DEFAULT_ACTION_TYPE
01-12-2000 ghogdal
Add 2 params to GetRunStatus(), to make life easier: pCurrentExecAddress and pdwExceptionCode.
01-17-2000 ghogdal
Backup from previous change (12-01-1999):
-IeXdiEnumCodeBreakpoint::Next()'s apieXdiCodeBreakpoint parameter has one more level of indirection than it should (was not following enumerator convention).
-IeXdiEnumDataBreakpoint::Next()'s apieXdiDataBreakpoint parameter has one more level of indirection than it should (was not following enumerator convention).
01-30-2000 ghogdal
fDataBpDataMatchSupported added to BREAKPOINT_SUPPORT_TYPE
PROCESSOR_FAMILY_UNK constant added (plus associated comments)
API frozen
--*/
import "oaidl.idl";
import "ocidl.idl";
//
// Summary of interfaces
//
// Standard interfaces
interface IeXdiServer;
// HRESULT GetTargetInfo ([out] PGLOBAL_TARGET_INFO_STRUCT pgti);
// HRESULT SetDebugMode ([in] DWORD dwModeBitField);
// HRESULT GetErrorDescription ([in] HRESULT ErrorCode, [out] LPOLESTR *pszErrorDesc);
// HRESULT GetExceptionDescriptionList ([in] DWORD dwNbElementToReturn, [out, size_is(dwNbElementToReturn)] EXCEPTION_DESCRIPTION_TYPE* pedTable, [out] DWORD *pdwNbTotalExceptionInList);
// HRESULT SetWaitOnConcurentUse ([in] BOOL fNewWaitOnConcurentUseFlag);
// HRESULT GetRunStatus ([out] PRUN_STATUS_TYPE persCurrent, [out] PHALT_REASON_TYPE pehrCurrent, [out] ADDRESS_TYPE *pCurrentExecAddress, [out] DWORD *pdwExceptionCode);
// HRESULT GetLastException ([out] PEXCEPTION_TYPE pexLast);
// HRESULT Run (void);
// HRESULT Halt (void);
// HRESULT DoSingleStep (void);
// HRESULT DoMultipleStep ([in] DWORD dwNbInstructions);
// HRESULT DoRangeStep ([in] ADDRESS_TYPE FirstAddress, [in] ADDRESS_TYPE LastAddress);
// HRESULT Reboot (void);
// HRESULT GetBpSupport ([out] PBREAKPOINT_SUPPORT_TYPE pbps);
// HRESULT GetNbCodeBpAvail ([out] DWORD *pdwNbHwCodeBpAvail, [out] DWORD *pdwNbSwCodeBpAvail);
// HRESULT GetNbDataBpAvail ([out] DWORD *pdwNbDataBpAvail);
// HRESULT AddCodeBreakpoint ([in] ADDRESS_TYPE Address, [in] CBP_KIND cbpk, [in] MEM_TYPE mt, [in] DWORD dwExecMode, [in] DWORD dwTotalBypassCount, [out] IeXdiCodeBreakpoint **ppieXdiCodeBreakpoint);
// HRESULT DelCodeBreakpoint ([in] IeXdiCodeBreakpoint *pieXdiCodeBreakpoint);
// HRESULT AddDataBreakpoint ([in] ADDRESS_TYPE Address, [in] ADDRESS_TYPE AddressMask, [in] DWORD dwData, [in] DWORD dwDataMask, [in] BYTE bAccessWidth, [in] MEM_TYPE mt, [in] BYTE bAddressSpace, [in] DATA_ACCESS_TYPE da, [in] DWORD dwTotalBypassCount, [out] IeXdiDataBreakpoint **ppieXdiDataBreakpoint);
// HRESULT DelDataBreakpoint ([in] IeXdiDataBreakpoint *pieXdiDataBreakpoint);
// HRESULT EnumAllCodeBreakpoints ([out] IeXdiEnumCodeBreakpoint **ppieXdiEnumCodeBreakpoint);
// HRESULT EnumAllDataBreakpoints ([out] IeXdiEnumDataBreakpoint **ppieXdiEnumDataBreakpoint);
// HRESULT EnumCodeBreakpointsInAddrRange ([in] ADDRESS_TYPE FirstAddress, [in] ADDRESS_TYPE LastAddress, [out] IeXdiEnumCodeBreakpoint **ppieXdiEnumCodeBreakpoint);
// HRESULT EnumDataBreakpointsInAddrRange ([in] ADDRESS_TYPE FirstAddress, [in] ADDRESS_TYPE LastAddress, [out] IeXdiEnumDataBreakpoint **ppieXdiEnumDataBreakpoint);
// HRESULT StartNotifyingRunChg ([in] IeXdiClientNotifyRunChg *pieXdiClientNotifyRunChg, [out] DWORD *pdwConnectionCookie);
// HRESULT StopNotifyingRunChg ([in] DWORD dwConnectionCookie);
// HRESULT ReadVirtualMemory ([in] ADDRESS_TYPE Address, [in] DWORD dwNbElemToRead, [in] BYTE bAccessWidth, [out, size_is(dwNbElemToRead * (((bAccessWidth - 1) >> 3) + 1))] BYTE *pbReadBuffer, [out] DWORD *pdwNbElementEffectRead);
// HRESULT WriteVirtualMemory ([in] ADDRESS_TYPE Address, [in] DWORD dwNbElemToWrite, [in] BYTE bAccessWidth, [in, size_is(dwNbElemToWrite * (((bAccessWidth - 1) >> 3) + 1))] const BYTE *pbWriteBuffer, [out] DWORD *pdwNbElementEffectWritten);
// HRESULT ReadPhysicalMemoryOrPeriphIO ([in] ADDRESS_TYPE Address, [in] BYTE bAddressSpace, [in] DWORD dwNbElemToRead, [in] BYTE bAccessWidth, [out, size_is(dwNbElemToRead * (((bAccessWidth - 1) >> 3) + 1))] BYTE *pbReadBuffer);
// HRESULT WritePhysicalMemoryOrPeriphIO ([in] ADDRESS_TYPE Address, [in] BYTE bAddressSpace, [in] DWORD dwNbElemToWrite, [in] BYTE bAccessWidth, [in, size_is(dwNbElemToWrite * (((bAccessWidth - 1) >> 3) + 1))] const BYTE *pbWriteBuffer);
// HRESULT StartNotifyingMemChg ([in] IeXdiClientNotifyMemChg *pieXdiClientNotifyMemChg, [out] DWORD *pdwConnectionCookie);
// HRESULT StopNotifyingMemChg ([in] DWORD dwConnectionCookie);
// HRESULT Ioctl ([in] DWORD dwBuffInSize, [in, size_is(dwBuffInSize)] const BYTE *pbBufferIn, [in] DWORD dwBuffOutSize, [out] DWORD *pdwEffectBuffOutSize, [out, size_is(dwBuffOutSize), length_is(*pdwEffectBuffOutSize)] BYTE *pbBufferOut);
interface IeXdiClientNotifyMemChg;
// HRESULT NotifyMemoryChange ([in] MEM_TYPE mtChanged, [in] ADDRESS_TYPE Address, [in] BYTE bAddressSpace, [in] DWORD dwNbElemChanged, [in] BYTE bAccessWidth);
interface IeXdiClientNotifyRunChg;
// HRESULT NotifyRunStateChange ([in] RUN_STATUS_TYPE ersCurrent, [in] HALT_REASON_TYPE ehrCurrent, [in] ADDRESS_TYPE CurrentExecAddress, [in] DWORD dwExceptionCode);
// QI'ed interfaces (from IeXdiServer)
interface IeXdiX86Context;
// HRESULT GetContext ([in, out] PCONTEXT_X86 pContext);
// HRESULT SetContext ([in] CONTEXT_X86 Context);
interface IeXdiSHXContext;
// HRESULT GetContext ([in, out] PCONTEXT_SHX pContext);
// HRESULT SetContext ([in] CONTEXT_SHX Context);
interface IeXdiMIPSContext;
// HRESULT GetContext ([in, out] PCONTEXT_MIPS pContext);
// HRESULT SetContext ([in] CONTEXT_MIPS Context);
interface IeXdiARMContext;
// HRESULT GetContext ([in, out] PCONTEXT_ARM pContext);
// HRESULT SetContext ([in] CONTEXT_ARM Context);
interface IeXdiPPCContext;
// HRESULT GetContext ([in, out] PCONTEXT_PPC pContext);
// HRESULT SetContext ([in] CONTEXT_PPC Context);
// Other interfaces
interface IeXdiCodeBreakpoint;
// HRESULT GetAttributes ([out] PADDRESS_TYPE pAddress, [out] PCBP_KIND pcbpk, [out] PMEM_TYPE pmt, [out] DWORD *pdwExecMode, [out] DWORD *pdwTotalBypassCount, [out] DWORD *pdwBypassedOccurences, [out] BOOL *pfEnabled);
// HRESULT SetState ([in] BOOL fEnabled, [in] BOOL fResetBypassedOccurences);
interface IeXdiDataBreakpoint;
// HRESULT GetAttributes ([out] PADDRESS_TYPE pAddress, [out] PADDRESS_TYPE pAddressMask, [out] DWORD *pdwData, [out] DWORD *pdwDataMask, [out] BYTE *pbAccessWidth, [out] PMEM_TYPE pmt, [out] BYTE *pbAddressSpace, [out] PDATA_ACCESS_TYPE pda, [out] DWORD *pdwTotalBypassCount, [out] DWORD *pdwBypassedOccurences, [out] BOOL *pfEnabled);
// HRESULT SetState ([in] BOOL fEnabled, [in] BOOL fResetBypassedOccurences);
interface IeXdiEnumCodeBreakpoint;
// HRESULT Next ([in] DWORD celt, [out, size_is(celt), length_is(*pceltFetched)] IeXdiCodeBreakpoint *apieXdiCodeBreakpoint[], [out] DWORD *pceltFetched);
// HRESULT Skip ([in] DWORD celt);
// HRESULT Reset (void);
// HRESULT GetCount ([out] DWORD *pcelt);
// HRESULT GetNext ([out] IeXdiCodeBreakpoint **ppieXdiCodeBreakpoint);
// HRESULT DisableAll (void);
// HRESULT EnableAll (void);
interface IeXdiEnumDataBreakpoint;
// HRESULT Next ([in] DWORD celt, [out, size_is(celt), length_is(*pceltFetched)] IeXdiDataBreakpoint *apieXdiDataBreakpoint[], [out] DWORD *pceltFetched);
// HRESULT Skip ([in] DWORD celt);
// HRESULT Reset (void);
// HRESULT GetCount ([out] DWORD *pcelt);
// HRESULT GetNext ([out] IeXdiDataBreakpoint **ppieXdiDataBreakpoint);
// HRESULT DisableAll (void);
// HRESULT EnableAll (void);
//
// error codes
//
cpp_quote("// Common eXDI HRESULT values:")
cpp_quote("//")
cpp_quote("#define FACILITY_EXDI (130)")
cpp_quote("#define CUSTOMER_FLAG (1)")
cpp_quote("//")
cpp_quote("#define SEV_SUCCESS (0)")
cpp_quote("#define SEV_INFORMATIONAL (1)")
cpp_quote("#define SEV_WARNING (2)")
cpp_quote("#define SEV_ERROR (3)")
cpp_quote("//")
cpp_quote("#define MAKE_EXDI_ERROR(ErrorCode,Severity) ((DWORD)(ErrorCode) | (FACILITY_EXDI << 16) | (CUSTOMER_FLAG << 29) | (Severity << 30))")
cpp_quote("//")
cpp_quote("// S_OK (0) // Operation successful")
cpp_quote("#define EXDI_E_NOTIMPL MAKE_EXDI_ERROR (0x4001, SEV_ERROR) // Not implemented (in the specific conditions - could be implement for others - like Kernel Debugger inactive)")
cpp_quote("#define EXDI_E_OUTOFMEMORY MAKE_EXDI_ERROR (0x000E, SEV_ERROR) // Failed to allocate necessary memory")
cpp_quote("#define EXDI_E_INVALIDARG MAKE_EXDI_ERROR (0x0057, SEV_ERROR) // One or more arguments are invalid")
cpp_quote("#define EXDI_E_ABORT MAKE_EXDI_ERROR (0x4004, SEV_ERROR) // Operation aborted")
cpp_quote("#define EXDI_E_FAIL MAKE_EXDI_ERROR (0x4005, SEV_ERROR) // Unspecified failure")
cpp_quote("#define EXDI_E_COMMUNICATION MAKE_EXDI_ERROR (0x0001, SEV_ERROR) // Communication error between host driver and target")
cpp_quote("//")
cpp_quote("#define EXDI_E_NOLASTEXCEPTION MAKE_EXDI_ERROR (0x0002, SEV_ERROR) // No exception occured already, cannot return last")
cpp_quote("#define EXDI_I_TGTALREADYRUNNING MAKE_EXDI_ERROR (0x0003, SEV_INFORMATIONAL) // Indicates that the target was already running")
cpp_quote("#define EXDI_I_TGTALREADYHALTED MAKE_EXDI_ERROR (0x0004, SEV_INFORMATIONAL) // Indicates that the target was already halted")
cpp_quote("#define EXDI_E_TGTWASNOTHALTED MAKE_EXDI_ERROR (0x0005, SEV_ERROR) // The target was not halted (before Single Step command issued)")
cpp_quote("#define EXDI_E_NORESAVAILABLE MAKE_EXDI_ERROR (0x0006, SEV_ERROR) // No resource available, cannot instanciate Breakpoint (in the kind requested)")
cpp_quote("#define EXDI_E_NOREBOOTAVAIL MAKE_EXDI_ERROR (0x0007, SEV_ERROR) // The external reset is not available programatically to the probe")
cpp_quote("#define EXDI_E_ACCESSVIOLATION MAKE_EXDI_ERROR (0x0008, SEV_ERROR) // Access violation on at least one element in address range specificified by the operation")
cpp_quote("#define EXDI_E_CANNOTWHILETGTRUNNING MAKE_EXDI_ERROR (0x0009, SEV_ERROR) // Cannot proceed while target running. Operation not supported on the fly. Must halt the target first")
cpp_quote("#define EXDI_E_USEDBYCONCURENTTHREAD MAKE_EXDI_ERROR (0x000A, SEV_ERROR) // Cannot proceed immediately because resource is already used by concurent thread. Recall later or call SetWaitOnConcurentUse (TRUE) - default")
cpp_quote("#define EXDI_E_ADVISELIMIT MAKE_EXDI_ERROR (0x000D, SEV_ERROR) // The connection point has already reached its limit of connections and cannot accept any more")
// 0x000E is used by EXDI_E_OUTOFMEMORY
// From definition in winerror.h
// Values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
// where
// Sev - is the severity code
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
// C - is the Customer code flag
// R - is a reserved bit
// Facility - is the facility code
// Code - is the facility's status code
// Already define the facility codes
// FACILITY_WINDOWS 8
// FACILITY_STORAGE 3
// FACILITY_SSPI 9
// FACILITY_SETUPAPI 15
// FACILITY_RPC 1
// FACILITY_WIN32 7
// FACILITY_CONTROL 10
// FACILITY_NULL 0
// FACILITY_MSMQ 14
// FACILITY_MEDIASERVER 13
// FACILITY_INTERNET 12
// FACILITY_ITF 4
// FACILITY_DISPATCH 2
// FACILITY_CERT 11
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiServer
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Run Control section of the Interface
/////////////////////////////////////////////////////////////////////////////
typedef __int64 ADDRESS_TYPE, *PADDRESS_TYPE;
typedef unsigned __int64 DWORD64, *PDWORD64;
// Used by field TargetProcessorFamily in GLOBAL_TARGET_INFO_STRUCT. This info is the strict necessary to enable the debugger to identify completely the target.
const DWORD PROCESSOR_FAMILY_X86 = 0;
const DWORD PROCESSOR_FAMILY_SH3 = 1;
const DWORD PROCESSOR_FAMILY_SH4 = 2;
const DWORD PROCESSOR_FAMILY_MIPS = 3;
const DWORD PROCESSOR_FAMILY_ARM = 4;
const DWORD PROCESSOR_FAMILY_PPC = 5;
const DWORD PROCESSOR_FAMILY_UNK = 0xFFFFFFFF; // unknown
// Note: If the driver support multiple CPU families, this field should be PROCESSOR_FAMILY_UNK until the current processor in the target is clearly identified
// For Context interface, the driver that support multiple CPU should return interface to all potentially supported interfaces but the interface should only positively respond to the one corresponding to the current CPU
typedef
struct _DEBUG_ACCESS_CAPABILITIES_STRUCT
{
BOOL fWriteCBPWhileRunning; // if TRUE, can set or clear code breakpoint while running (on the fly, no need to be halted)
BOOL fReadCBPWhileRunning; // if TRUE, can read code breakpoint (list) while running (on the fly, no need to be halted)
BOOL fWriteDBPWhileRunning; // if TRUE, can set or clear data breakpoint while running (on the fly, no need to be halted)
BOOL fReadDBPWhileRunning; // if TRUE, can read data breakpoint (list) while running (on the fly, no need to be halted)
BOOL fWriteVMWhileRunning; // if TRUE, can write virtual memory while running (on the fly, no need to be halted)
BOOL fReadVMWhileRunning; // if TRUE, can read virtual memory while running (on the fly, no need to be halted)
BOOL fWritePMWhileRunning; // if TRUE, can write physical memory or peripherical I/O while running (on the fly, no need to be halted)
BOOL fReadPMWhileRunning; // if TRUE, can read physical memory or peripherical I/O while running (on the fly, no need to be halted)
BOOL fWriteRegWhileRunning; // if TRUE, can write CPU / CP registers while running (on the fly, no need to be halted)
BOOL fReadRegWhileRunning; // if TRUE, can read CPU / CP registers while running (on the fly, no need to be halted)
}
DEBUG_ACCESS_CAPABILITIES_STRUCT, *PDEBUG_ACCESS_CAPABILITIES_STRUCT;
typedef
struct _GLOBAL_TARGET_INFO_STRUCT
{
DWORD TargetProcessorFamily;
DEBUG_ACCESS_CAPABILITIES_STRUCT dbc;
LPOLESTR szTargetName;
LPOLESTR szProbeName;
}
GLOBAL_TARGET_INFO_STRUCT, *PGLOBAL_TARGET_INFO_STRUCT;
typedef
enum _RUN_STATUS_TYPE
{
rsRunning, // The target is currently executing code
rsHalted, // The target is completely stopped
rsError, // The target is in an error state (warning: different than exception)
rsUnknown
}
RUN_STATUS_TYPE, *PRUN_STATUS_TYPE;
typedef
enum _PHALT_REASON_TYPE
{
hrNone, // Status type is not rsHalted
hrUser, // "Manual" asynchronous halt
hrException, // An execption just occured
hrBp, // Breakpoint (code or data)
hrStep, // We just excuted a single / multiple / range step
hrUnknown
}
HALT_REASON_TYPE, *PHALT_REASON_TYPE;
typedef
struct _EXCEPTION_TYPE
{
DWORD dwCode; // indicate type / source of exception (platfrom dependant)
ADDRESS_TYPE Address; // program / instruction pointer where the exception occured
} EXCEPTION_TYPE, *PEXCEPTION_TYPE; // Platform dependant
typedef
enum _CBP_KIND
{
cbptAlgo, // Let the probe driver decide if code breakpoint can be hw or sw based on resources available
cbptHW, // Force the code breakpoint to be a hardware one (address comparator in hardware debug logic)
cbptSW // Force the code breakpoint to be a software one (bp instruction replacing the regulare instruction)
} CBP_KIND, *PCBP_KIND;
typedef
enum _DATA_ACCESS_TYPE
{
daWrite = 0,
daRead = 1,
daBoth = 2 // Don't care
}
DATA_ACCESS_TYPE, *PDATA_ACCESS_TYPE;
typedef
struct _BREAKPOINT_SUPPORT_TYPE
{
BOOL fCodeBpBypassCountSupported; // if TRUE, Bypass counter is supported on Code Breakpoint
BOOL fDataBpBypassCountSupported; // if TRUE, Bypass counter is supported on Data Breakpoint
BOOL fDataBpSupported; // if FALSE, no Data Breakpoint resource are ever available from the target
BOOL fDataBpMaskableAddress; // if TRUE, Data Breakpoint address mask can be defined (implies that fDataBpSupported field is TRUE)
BOOL fDataBpMaskableData; // if TRUE, Data Breakpoint data mask can be defined (implies that fDataBpSupported field is TRUE)
BOOL fDataBpDataWidthSpecifiable; // if TRUE, Data Breakpoint specific data width can be defined (implies that fDataBpSupported field is TRUE)
BOOL fDataBpReadWriteSpecifiable; // if TRUE, Data Breakpoint specific data access type can be defined (implies that fDataBpSupported field is TRUE)
BOOL fDataBpDataMatchSupported; // if FALSE, data Breakpoint data field is always don't care, triggers only on address compare (data mask should always be 0 - fDataBpMaskableData is Don't care)
} BREAKPOINT_SUPPORT_TYPE, *PBREAKPOINT_SUPPORT_TYPE;
typedef
enum _MEM_TYPE
{
mtVirtual,
mtPhysicalOrPeriIO,
mtContext
} MEM_TYPE, *PMEM_TYPE;
// Exception information
// These are the actions which the debugger may take in response to an exception raised in the debuggee.
typedef
enum _EXCEPTION_DEFAULT_ACTION_TYPE
{
edaIgnore,
edaNotify,
edaStop
} EXCEPTION_DEFAULT_ACTION_TYPE;
typedef
struct _EXCEPTION_DESCRIPTION_TYPE
{
DWORD dwExceptionCode;
EXCEPTION_DEFAULT_ACTION_TYPE efd;
wchar_t szDescription [60];
} EXCEPTION_DESCRIPTION_TYPE;
[
object,
uuid(47486F67-6461-6C65-5844-495352435201),
helpstring("IeXdiServer interface - eXdi Server Run Control and Ressource Access 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiServer : IUnknown
{
/*++
Routine Name:
GetTargetInfo
Routine Description:
Return Global information on Target (and Probe / emulator)
Argument(s):
pgti - Returns Global Target Info structure
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetTargetInfo
(
[out] PGLOBAL_TARGET_INFO_STRUCT pgti
);
// Used in parameter dwModeBitField of function SetDebugMode
cpp_quote("#define DBGMODE_BFMASK_KERNEL (0x0001) // If TRUE indicates that Kernel Debugger is active (can use KDAPI), so HW on-chip debug functions (eXDI)")
cpp_quote(" // may be optionaly handled (can return EXDI_E_NOTIMPL)")
cpp_quote(" // If FALSE indicates that Kernel Debugger is not active so HW on-chip debug capabilities are the only ")
cpp_quote(" // one available and should be implemented.")
/*++
Routine Name:
SetDebugMode
Routine Description:
Indicates that the debugger can control the target via KDAPI (kernel debug capabilities)
Argument(s):
dwModeBitField - Bit field defining the new debug mode.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetDebugMode
(
[in] DWORD dwModeBitField
);
/*++
Routine Name:
GetExceptionDescriptionList
Routine Description:
Return the supported Exception Description Table
Argument(s):
dwNbElementToReturn - number of EXCEPTION_DESCRIPTION_TYPE elements to be provided in pedTable
pedTable - Table of EXCEPTION_DESCRIPTION_TYPE elements (association between exception number / name / debugger action)
pdwNbTotalExceptionInList - Returns the total number of EXCEPTION_DESCRIPTION_TYPE elements available
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetExceptionDescriptionList
(
[in] DWORD dwNbElementToReturn,
[out, size_is(dwNbElementToReturn)] EXCEPTION_DESCRIPTION_TYPE* pedTable,
[out] DWORD *pdwNbTotalExceptionInList
);
/*++
Routine Name:
GetErrorDescription
Routine Description:
Return text description of an Error code returned by the eXDI driver
Argument(s):
pszLastErrorDesc - Returns the description of an error seen with the probe or target. This should mainly be used for debugging purposes.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetErrorDescription
(
[in] HRESULT ErrorCode,
[out] LPOLESTR *pszErrorDesc
);
/*++
Routine Name:
SetWaitOnConcurentUse
Routine Description:
Set Wait on Concurent Use flag - if TRUE, if a driver function needs to access the a resource already used, the driver function should
wait for availibility of resource before returning.
- if FALSE, if a driver function needs to access the a resource already used, the driver function should
return immediately with the EXDI_E_USEDBYCONCURENTTHREAD error code.
Note: the default value for the flag (at initialization of the probe driver) is TRUE.
Argument(s):
fNewWaitOnConcurentUseFlag - New value to set the Wait on Concurent Use flag.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT SetWaitOnConcurentUse
(
[in] BOOL fNewWaitOnConcurentUseFlag
);
/*++
Routine Name:
GetRunStatus
Routine Description:
Return the current Run Status (Running, Stopped due to Breakpoint ...).
Argument(s):
persCurrent - Returns the current Run Status Type
pehrCurrent - Returns the current Halt Reason Type (hrNone if Run Status is not Halted)
pCurrentExecAddress - Returns the current program / instruction pointer if Run Status is Halted, undefined otherwise.
pdwExceptionCode - Returns the type / source of exception (Code is platform dependant) if Halted due to exception ((rsHalted == *persCurrent) && (hrException == *pehrCurrent)), undefined otherwise.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetRunStatus
(
[out] PRUN_STATUS_TYPE persCurrent,
[out] PHALT_REASON_TYPE pehrCurrent,
[out] ADDRESS_TYPE *pCurrentExecAddress,
[out] DWORD *pdwExceptionCode
);
/*++
Routine Name:
GetLastException
Routine Description:
Return the last exception that happened.
Argument(s):
pexLast - Returns the last exception that occured (if none return value is EXDI_E_NOLASTEXCEPTION)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOLASTEXCEPTION: No exception occured already, cannot return last
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetLastException
(
[out] PEXCEPTION_TYPE pexLast
);
/*++
Routine Name:
Run
Routine Description:
Command target to Run.
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful (and target was not already running)
EXDI_I_TGTALREADYRUNNING: Indicates that the target was already running
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Run
(
void
);
/*++
Routine Name:
Halt
Routine Description:
Command target to Halt (complete control unit freeze).
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful (and target was not already halted)
EXDI_I_TGTALREADYHALTED: Indicates that the target was already halted
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Halt
(
void
);
/*++
Routine Name:
DoSingleStep
Routine Description:
Command target to execute a single instruction and then halt again.
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_TGTWASNOTHALTED: The target was not halted
EXDI_E_NORESAVAILABLE: No Resource available to do Single Step (not direct on-chip support or no bp resource avail)
If Single Step support not available, return this error code too
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DoSingleStep
(
void
);
/*++
Routine Name:
DoMultipleStep
Routine Description:
Command target to execute a fixed number of instructions and then halt again.
Note that the target may still be running when the call returns.
Argument(s):
dwNbInstructions - Number of instructions to execute.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_TGTWASNOTHALTED: The target was not halted
EXDI_E_NORESAVAILABLE: No Resource available to do Stepping (not direct on-chip support or no bp resource avail)
If Multiple Step support not available, return this error code too
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DoMultipleStep
(
[in] DWORD dwNbInstructions
);
/*++
Routine Name:
DoRangeStep
Routine Description:
Command target to step out of an address range and then halt again (run while in the given range).
Note that the target may still be running when the call returns.
Argument(s):
FirstAddress - First address of the address range to run out of.
LastAddress - Last address of the address range to run out of.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_TGTWASNOTHALTED: The target was not halted
EXDI_E_NORESAVAILABLE: No Resource available to do Range Step (not direct on-chip support or no bp resource avail)
If Range Step support not available, return this error code too
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DoRangeStep
(
[in] ADDRESS_TYPE FirstAddress,
[in] ADDRESS_TYPE LastAddress
);
/*++
Routine Name:
Reboot
Routine Description:
Command target to reboot (external Reset).
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOREBOOTAVAIL: The external reset is not available programatically to the probe
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Reboot
(
void
);
/*++
Routine Name:
GetBpSupport
Routine Description:
Get Breakpoint support
Argument(s):
pbps - Returns a structure that describes the breakpoint setting capabilities
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetBpSupport
(
[out] PBREAKPOINT_SUPPORT_TYPE pbps
);
/*++
Routine Name:
GetNbCodeBpAvail
Routine Description:
Get Code Breakpoint availability
Argument(s):
pdwNbHwCodeBpAvail - Returns the number of Hardware Code Breakpoint still available on the target.
If no limit known, returns -1 (4294967295)
Note: If Code Breakpoint support not available, returns 0 and Error Status S_OK
pdwNbSwCodeBpAvail - Returns the number of Software Code Breakpoint still available on the target.
If no limit known, returns -1 (4294967295)
Note: If code Breakpoint support not available, returns 0 and Error Status S_OK
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetNbCodeBpAvail
(
[out] DWORD *pdwNbHwCodeBpAvail,
[out] DWORD *pdwNbSwCodeBpAvail
);
/*++
Routine Name:
GetNbDataBpAvail
Routine Description:
Get Data Breakpoint availability
Argument(s):
pdwNbDataBpAvail - Returns the number of Data Breakpoint still available on the target.
If no limit known, returns -1 (4294967295)
Note: If Data Breakpoint support not available, returns 0 and Error Status S_OK
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadDBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetNbDataBpAvail
(
[out] DWORD *pdwNbDataBpAvail
);
/*++
Routine Name:
AddCodeBreakpoint
Routine Description:
Add new code Breakpoint. The newly created breakpoint is initially disabled (can be enabled with *ppieXdiCodeBreakpoint->SetState(...))
and so should not use any resources.
Note: Although several client can keep track of the same breakpoint(s), this is not recommended for the fact that there is no bp change notification.
Argument(s):
Address - Address of the instruction to break on
cbpk - Indicates if the code breakpoint must be hardware, software (bp instruction) or
if the probe driver can decide based on its algorithm and resources available.
Note: In the case of sw bp, the probe driver must keep track of instruction being replaced.
mt - Instruction Memory type. Indicates whether this memory address concerns virtual memory or physical
memory (pheripherical IO is not applicable and mtContext value is not accepted)
dwExecMode - In the case of multiple mode processors, give a hint (if necessary) on the process mode at the
time of the execution of the code where to set the breakpoint. For example, in the case of a
software breakpoint, the trap instruction may be different in 16 bit mode than 32 bit mode on
processors having the 2 modes (ARM and MIPS).
Should be 0 for 32 bit mode (default). Should be 1 for 16 bit mode.
dwTotalBypassCount - Total number of bypass before triggering a CPU halt on this breakpoint
Note: Should be 0 if Total Bypass Count is not supported - see BREAKPOINT_SUPPORT_TYPE.fCodeBpBypassCountSupported
ppieXdiCodeBreakpoint - Returns a pointer to the newly created breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NORESAVAILABLE: No (Breakpoint) Resource available, cannot instanciate Breakpoint (in the kind requested)
If Code Breakpoint support not available, also return this error code
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT AddCodeBreakpoint
(
[in] ADDRESS_TYPE Address,
[in] CBP_KIND cbpk,
[in] MEM_TYPE mt,
[in] DWORD dwExecMode,
[in] DWORD dwTotalBypassCount,
[out] IeXdiCodeBreakpoint **ppieXdiCodeBreakpoint
);
/*++
Routine Name:
DelCodeBreakpoint
Routine Description:
Delete existing code Breakpoint from driver internal list. The breakpoint will be automatically disabled (so any triggering resources will be remove).
The breakpoint instance will be removed only when all references to it are released.
Argument(s):
pieXdiCodeBreakpoint - Pointer to breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NORESAVAILABLE: No (Breakpoint) Resource available, cannot instanciate Breakpoint (in the kind requested)
If Code Breakpoint support not available, also return this error code
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DelCodeBreakpoint
(
[in] IeXdiCodeBreakpoint *pieXdiCodeBreakpoint
);
/*++
Routine Name:
AddDataBreakpoint
Routine Description:
Add new data Breakpoint. The newly created breakpoint is initially disabled (can be enabled with *ppieXdiDataBreakpoint->SetState(...))
and so should not use any resources.
Note: Although several client can keep track of the same breakpoint(s), this is not recommended for the fact that there is no bp change notification.
Note: This function does not support definition of multiple access data breakpoints (array of element, an element being a memory object contained in a single access).
Argument(s):
Address - Address of the data to be accessed to break on (only bits set in AddressMask are significant).
AddressMask - Mask to apply on Address comparison on for matching bits (if bit set, do compare, otherwize ignore).
Note: Should be -1 if Address Mask not supported by target, otherwize the probe driver should return EXDI_E_INVALIDARG error.
dwData - Value of the Data to be accessed to break on (only bits set in DataMask are significant).
dwDataMask - Mask to apply on Data comparison on for matching bits (if bit set, do compare, otherwize ignore).
Note: Should be -1 (4294967295) if Data Mask not supported by target, otherwize the probe driver should return EXDI_E_INVALIDARG error.
bAccessWidth - Data Width in bits (byte=8, word=16, dword=32, and other if supported by target - the maximum being 32 bits)
Note: Should be -1 (255) for "DON'T CARE" meaning (to be ignored - any size triggers the BP) or
if Data Width specification not supported by target, otherwize the probe driver should return EXDI_E_INVALIDARG error.
mt - Data memory type. Indicates whether this memory address concerns virtual memory, physical memory or pheripherical IO (mtContext value is not accepted)
bAddressSpace - Address space of the data breakpoint if mt is mtPhysicalOrPeriIO (convention: 0 = Physical Memory, 1 = Peripherical I/O if not memory mapped, 2..255 = free for custom use)
da - Data Access type: Read access, Write access or both (don't care)
Note: Should be 2 (daBoth) if Data Access type specification not supported by target, otherwize the probe driver should return EXDI_E_INVALIDARG error.
dwTotalBypassCount - Total number of bypass before triggering a CPU halt on this breakpoint
Note: Should be 0 if Total Bypass Count is not supported - see BREAKPOINT_SUPPORT_TYPE.fDataBpBypassCountSupported
ppieXdiDataBreakpoint - Returns a pointer to the newly created breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NORESAVAILABLE: No (Breakpoint) Resource available, cannot instanciate Breakpoint
If Data Breakpoint support not available, also return this error code.
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteDBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT AddDataBreakpoint
(
[in] ADDRESS_TYPE Address,
[in] ADDRESS_TYPE AddressMask,
[in] DWORD dwData,
[in] DWORD dwDataMask,
[in] BYTE bAccessWidth,
[in] MEM_TYPE mt,
[in] BYTE bAddressSpace,
[in] DATA_ACCESS_TYPE da,
[in] DWORD dwTotalBypassCount,
[out] IeXdiDataBreakpoint **ppieXdiDataBreakpoint
);
/*++
Routine Name:
DelDataBreakpoint
Routine Description:
Delete existing data Breakpoint from driver internal list. The breakpoint will be automatically disabled (so any triggering resources will be remove).
The breakpoint instance will be removed only when all references to it are released.
Argument(s):
pieXdiDataBreakpoint - Pointer to breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NORESAVAILABLE: No (Breakpoint) Resource available, cannot instanciate Breakpoint (in the kind requested)
If Data Breakpoint support not available, also return this error code
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DelDataBreakpoint
(
[in] IeXdiDataBreakpoint *pieXdiDataBreakpoint
);
/*++
Routine Name:
EnumAllCodeBreakpoints
Routine Description:
Create an enumeration list of all instanciated code breakpoints and return a pointer to its interface.
Argument(s):
ppieXdiEnumCodeBreakpoint - Returns a pointer to the newly created enumation list of breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
If Code Breakpoint support not available, also return this error code
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT EnumAllCodeBreakpoints
(
[out] IeXdiEnumCodeBreakpoint **ppieXdiEnumCodeBreakpoint
);
/*++
Routine Name:
EnumAllDataBreakpoints
Routine Description:
Create an enumeration list of all instanciated data breakpoints and return a pointer to its interface.
Argument(s):
ppieXdiEnumDataBreakpoint - Returns a pointer to the newly created enumation list of breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadDBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
If Data Breakpoint support not available, also return this error data
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT EnumAllDataBreakpoints
(
[out] IeXdiEnumDataBreakpoint **ppieXdiEnumDataBreakpoint
);
/*++
Routine Name:
EnumCodeBreakpointsInAddrRange
Routine Description:
Create an enumeration list of the instanciated code breakpoints which address are whithin given range, and return a pointer to its interface.
Argument(s):
FirstAddress - First address of the filtering address range
LastAddress - Last address of the filtering address range
ppieXdiEnumCodeBreakpoint - Returns a pointer to the newly created enumation list of breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
If Code Breakpoint support not available, also return this error code
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT EnumCodeBreakpointsInAddrRange
(
[in] ADDRESS_TYPE FirstAddress,
[in] ADDRESS_TYPE LastAddress,
[out] IeXdiEnumCodeBreakpoint **ppieXdiEnumCodeBreakpoint
);
/*++
Routine Name:
EnumDataBreakpointsInAddrRange
Routine Description:
Create an enumeration list of the instanciated data breakpoints which address are whithin given range, and return a pointer to its interface.
Argument(s):
FirstAddress - First address of the filtering address range
LastAddress - Last address of the filtering address range
ppieXdiEnumDataBreakpoint - Returns a pointer to the newly created enumation list of breakpoint object's interface.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadDBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
If Data Breakpoint support not available, also return this error data
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT EnumDataBreakpointsInAddrRange
(
[in] ADDRESS_TYPE FirstAddress,
[in] ADDRESS_TYPE LastAddress,
[out] IeXdiEnumDataBreakpoint **ppieXdiEnumDataBreakpoint
);
/*++
Routine Name:
StartNotifyingRunChg
Routine Description:
Add new object in list of one to notify of a Run State change.
The driver will immediately do a AddRef() on the object before returning.
Argument(s):
pieXdiClientNotifyRunChg - advise sink: pointer to the IeXdiClientNotifyRunChg callback interface of the object to be notified by the driver
pdwConnectionCookie - Returns cookie to the callback connection just made. This can be used later by the driver to delete the connection
(using StopNotifyingRunChg). If the connection is not successfully established, this cookie value is not meaningfull.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_ADVISELIMIT The connection point has already reached its limit of connections and cannot accept any more.
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT StartNotifyingRunChg
(
[in] IeXdiClientNotifyRunChg *pieXdiClientNotifyRunChg,
[out] DWORD *pdwConnectionCookie
);
/*++
Routine Name:
StopNotifyingRunChg
Routine Description:
Remove object in list of one to notify of a Run State change.
The driver will immediately do a Release() on the object before returning.
Argument(s):
dwConnectionCookie - Cookie to the callback connection to cancel.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT StopNotifyingRunChg
(
[in] DWORD dwConnectionCookie
);
/////////////////////////////////////////////////////////////////////////////
// Memory, I/O and Register Access section of the Interface
/////////////////////////////////////////////////////////////////////////////
/*++
Routine Name:
ReadVirtualMemory
Routine Description:
Read Virtual Memory block. This is the default memory read.
Note: The memory content returned to this function should be "sanitized" (compensated for the artefacts of
software breakpoints - or of any other modifications of the memory produced by the debugging activity of
the driver, probe or target). In general, the driver internal mechanism should be transparent to the client.
Argument(s):
Address - Starting address of the data buffer to be accessed on the target.
dwNbElemToRead - Number of element(s) (of byDataWidth bits) to be accessed.
bAccessWidth - Data Width in bits (byte=8, word=16, dword=32, ddword=64, and other if supported by target).
pbReadBuffer - Buffer (of bytes) on which result of reading is written. Must be large enough to hold all elements returned (pdwNbElementEffectRead)
Note: Elements must be aligned on byte boundary. Bit padding must be added if byDataWidth is not multiple of 8.
pdwNbElementEffectRead - Returns the number of element effectively read. This is used by the client to speed up in case of access
violation (EXDI_E_ACCESSVIOLATION) in the range: If an entire range is not accessible, this returned value should be 0,
so there is no need to query the range with smaller granularity.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_ACCESSVIOLATION: Access violation on at least one element in address range specificified by the operation
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadVMWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT ReadVirtualMemory
(
[in] ADDRESS_TYPE Address,
[in] DWORD dwNbElemToRead,
[in] BYTE bAccessWidth,
[out, size_is(dwNbElemToRead * (((bAccessWidth - 1) >> 3) + 1))] BYTE *pbReadBuffer,
[out] DWORD *pdwNbElementEffectRead
);
/*++
Routine Name:
WriteVirtualMemory
Routine Description:
Write Virtual Memory block. This is the default memory write.
Note: The memory content provided to this function should be "sanitized" (compensated for the artefacts of
software breakpoints - or of any other modifications of the memory produced by the debugging activity of
the driver, probe or target). In general, the driver internal mechanism should be transparent to the client.
Argument(s):
Address - Starting address of the data buffer to be accessed on the target.
dwNbElemToWrite - Number of element(s) (of byDataWidth bits) to be accessed.
bAccessWidth - Data Width in bits (byte=8, word=16, dword=32, ddword=64, and other if supported by target).
pbWriteBuffer - Buffer (of bytes) on which result of writing is written. Must be large enough to hold all elements (dwNbElemToWrite)
Note: Elements must be aligned on byte boundary. Bit padding must be added if byDataWidth is not multiple of 8.
pdwNbElementEffectWritten - Returns the number of element effectively written. This is used by the client to speed up in case of access
violation (EXDI_E_ACCESSVIOLATION) in the range: If an entire range is not accessible, this returned value should be 0,
so there is no need to query the range with smaller granularity.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_ACCESSVIOLATION: Access violation on at least one element in address range specificified by the operation
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteVMWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT WriteVirtualMemory
(
[in] ADDRESS_TYPE Address,
[in] DWORD dwNbElemToWrite,
[in] BYTE bAccessWidth,
[in, size_is(dwNbElemToWrite * (((bAccessWidth - 1) >> 3) + 1))] const BYTE *pbWriteBuffer,
[out] DWORD *pdwNbElementEffectWritten
);
/*++
Routine Name:
ReadPhysicalMemoryOrPeriphIO
Routine Description:
Read block of data to Physical Memory or peripherical I/O.
Note: The memory content returned to this function should be "sanitized" (compensated for the artefacts of
software breakpoints - or of any other modifications of the memory produced by the debugging activity of
the driver, probe or target). In general, the driver internal mechanism should be transparent to the client.
Argument(s):
Address - Starting address of the data buffer to be accessed on the target.
bAddressSpace - Address space to be accessed (convention: 0 = Physical Memory, 1 = Peripherical I/O if not memory mapped, 2..255 = free for custom use)
dwNbElemToRead - Number of element(s) (of byDataWidth bits) to be accessed.
bAccessWidth - Data Width in bits (byte=8, word=16, dword=32, ddword=64, and other if supported by target).
pbReadBuffer - Buffer (of bytes) on which result of reading is written. Must be large enough to hold all elements (dwNbElemToRead)
Note: Elements must be aligned on byte boundary. Bit padding must be added if byDataWidth is not multiple of 8.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadPMWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT ReadPhysicalMemoryOrPeriphIO
(
[in] ADDRESS_TYPE Address,
[in] BYTE bAddressSpace,
[in] DWORD dwNbElemToRead,
[in] BYTE bAccessWidth,
[out, size_is(dwNbElemToRead * (((bAccessWidth - 1) >> 3) + 1))] BYTE *pbReadBuffer
);
/*++
Routine Name:
WritePhysicalMemoryOrPeriphIO
Routine Description:
Write block of data to Physical Memory or peripherical I/O.
Note: The memory content provided to this function should be "sanitized" (compensated for the artefacts of
software breakpoints - or of any other modifications of the memory produced by the debugging activity of
the driver, probe or target). In general, the driver internal mechanism should be transparent to the client.
Argument(s):
Address - Starting address of the data buffer to be accessed on the target.
bAddressSpace - Address space to be accessed (convention: 0 = Physical Memory, 1 = Peripherical I/O if not memory mapped, 2..255 = free for custom use)
dwNbElemToWrite - Number of element(s) (of byDataWidth bits) to be accessed.
bAccessWidth - Data Width in bits (byte=8, word=16, dword=32, ddword=64, and other if supported by target).
pbWriteBuffer - Buffer (of bytes) on which result of writing is written. Must be large enough to hold all elements (dwNbElemToWrite)
Note: Elements must be aligned on byte boundary. Bit padding must be added if byDataWidth is not multiple of 8.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWritePMWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT WritePhysicalMemoryOrPeriphIO
(
[in] ADDRESS_TYPE Address,
[in] BYTE bAddressSpace,
[in] DWORD dwNbElemToWrite,
[in] BYTE bAccessWidth,
[in, size_is(dwNbElemToWrite * (((bAccessWidth - 1) >> 3) + 1))] const BYTE *pbWriteBuffer
);
/*++
Routine Name:
StartNotifyingMemChg
Routine Description:
Add new object in list of one to notify of a Memory, I/O and Register Access.
The driver will immediately do a AddRef() on the object before returning.
Note: This call back method is used to notify of memory changes due to other debugger instances
but not due to target code execution. It is meant to give the debugger the possibility to invalidate
its cache of the target memory content. Consequently, no mem change notification should normally
be sent while the target is running and the debugger should also invalidate its cache of the target
based on the run status change notification.
Argument(s):
pieXdiClientNotifyMemChg - advise sink: pointer to the IeXdiClientNotifyMemChg callback interface of the object to be notified by the driver
pdwConnectionCookie - Returns cookie to the callback connection just made. This can be used later by the driver to delete the connection
(using StopNotifyingMemChg). If the connection is not successfully established, this cookie value is not meaningfull.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_ADVISELIMIT The connection point has already reached its limit of connections and cannot accept any more.
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT StartNotifyingMemChg
(
[in] IeXdiClientNotifyMemChg *pieXdiClientNotifyMemChg,
[out] DWORD *pdwConnectionCookie
);
/*++
Routine Name:
StopNotifyingMemChg
Routine Description:
Remove object in list of one to notify of a Memory, I/O and Register Access.
The driver will immediately do a Release() on the object before returning.
Argument(s):
dwConnectionCookie - Cookie to the callback connection to cancel.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT StopNotifyingMemChg
(
[in] DWORD dwConnectionCookie
);
/////////////////////////////////////////////////////////////////////////////
// IoCtl (back door - non formated api) section of the Interface
/////////////////////////////////////////////////////////////////////////////
/*++
Routine Name:
Ioctl
Routine Description:
Back door / non formated interface.
Argument(s):
dwBuffInSize - Size in byte of *pbyBufferIn
pbBufferIn - Raw byte buffer to hold input parameter(s)
dwBuffOutSize - Size in byte of *pbyBufferOut
pdwEffectBuffOutSize - Returns effective size in byte of *pbyBufferOut (must be smaller than dwBuffOutSize)
pbBufferOut - Raw byte buffer to hold output parameter(s)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed requested operation while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT (flag depends on operation requested)
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT Ioctl
(
[in] DWORD dwBuffInSize,
[in, size_is(dwBuffInSize)] const BYTE *pbBufferIn,
[in] DWORD dwBuffOutSize,
[out] DWORD *pdwEffectBuffOutSize,
[out, size_is(dwBuffOutSize), length_is(*pdwEffectBuffOutSize)] BYTE *pbBufferOut
);
}; // interface IeXdiServer
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiCodeBreakpoint
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Code Breakpoint Interface
/////////////////////////////////////////////////////////////////////////////
[
object,
uuid(47486F67-6461-6C65-5844-495342507401),
helpstring("IeXdiCodeBreakpoint interface - eXdi Server Code Breakpoint 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiCodeBreakpoint : IUnknown
{
// Note: Release() automatically Disable BP (and free resources)
/*++
Routine Name:
GetAttributes
Routine Description:
Get Code Breakpoint current characteristics.
Argument(s):
pAddress - Returns address of the instruction to be accessed to break on.
pcbpk - Returns the kind of code breakpoint (hardware, software (bp instruction) or if the probe driver
can decide based on its algorithm and resources available).
Note: In the case of sw bp, the probe driver must keep track of instruction being replaced.
pmt - Returns Instruction memory type. Indicates whether this memory address concerns virtual memory or physical
memory (pheripherical IO not applicable and mtContext value is not accepted)
pdwExecMode - Returns processor execution mode. In the case of multiple mode processors, this gives a hint
(if necessary) on the process mode at the time of the execution of the code where the breakpoint is set.
For example, in the case of a software breakpoint, the trap instruction may be different in 16 bit mode
than 32 bit mode on processors having the 2 modes (ARM and MIPS).
Should be 0 for 32 bit mode (default). Should be 1 for 16 bit mode.
pdwTotalBypassCount - Returns the number of time the trigger of a CPU halt should be bypassed if the breakpoint condition is met.
pdwBypassedOccurences - Returns the number of occurences of bypass related to this breakpoint already seen. Note: initial value (always if not supported) is 0
Note: this value is reset to 0 everytime the CPU is halted due to this breakpoint.
pfEnabled - Returns TRUE if Breakpoint is enabled. Note: default value at creation is FALSE
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetAttributes
(
[out] PADDRESS_TYPE pAddress,
[out] PCBP_KIND pcbpk,
[out] PMEM_TYPE pmt,
[out] DWORD *pdwExecMode,
[out] DWORD *pdwTotalBypassCount,
[out] DWORD *pdwBypassedOccurences,
[out] BOOL *pfEnabled
);
/*++
Routine Name:
SetState
Routine Description:
Enable or Disable Breakpoint.
Note: this function should free (in case of disable) or (re)allocate (in case of enable) breakpoint triggering resource if applicable
Argument(s):
fEnabled - TRUE if Breakpoint is enabled.
fResetBypassedOccurences - Reset the number of occurences of bypass related to this breakpoint already seen.
Note: this action is equivalent to the reset implicitely done everytime the CPU is halted due to this breakpoint.
Note: if this bypass counting feature is not supported, the value of this parameter is don't care
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetState
(
[in] BOOL fEnabled,
[in] BOOL fResetBypassedOccurences
);
}; // IeXdiCodeBreakpoint
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiDataBreakpoint
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Data Breakpoint Interface
/////////////////////////////////////////////////////////////////////////////
[
object,
uuid(47486F67-6461-6C65-5844-495357507400),
helpstring("IeXdiDataBreakpoint interface - eXdi Server Data Breakpoint 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiDataBreakpoint : IUnknown
{
// Note: Release() automatically Disable BP (and free resources)
/*++
Routine Name:
GetAttributes
Routine Description:
Get Data Breakpoint current characteristics.
Argument(s):
pAddress - Returns address of the data to be accessed to break on (only bits set in AddressMask are significant).
pAddressMask - Returns mask to apply on Address comparison on for matching bits (if bit set, do compare, otherwize ignore).
Note: Returns -1 if Address Mask not supported by target.
pdwData - Returns value of the Data to be accessed to break on (only bits set in DataMask are significant).
pdwDataMask - Returns mask to apply on Data comparison on for matching bits (if bit set, do compare, otherwize ignore).
Note: Returns -1 (4294967295) if Data Mask not supported by target.
pbAccessWidth - Returns Data Width in bits (byte=8, word=16, dword=32, and other if supported by target - the maximum being 32 bits)
Note: Returns -1 (255) if Data Width specification not supported by target.
pmt - Returns Data memory type. Indicates whether this memory address concerns virtual memory, physical memory or pheripherical IO
(mtContext value is not accepted)
pbAddressSpace - Returns Address space of the data breakpoint if mt is mtPhysicalOrPeriIO (convention: 0 = Physical Memory, 1 = Peripherical I/O
if not memory mapped, 2..255 = free for custom use)
pda - Returns Data Access type: Read access, Write access or both (don't care)
Note: Returns 2 (daBoth) if Data Access type specification not supported by target.
pdwTotalBypassCount - Returns the number of time the trigger of a CPU halt should be bypassed if the breakpoint condition is met.
pdwBypassedOccurences - Returns the number of occurences of bypass related to this breakpoint already seen. Note: initial value (always if not supported) is 0
Note: this value is reset to 0 everytime the CPU is halted due to this breakpoint.
pfEnabled - Returns TRUE if Breakpoint is enabled. Note: default value at creation is FALSE
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadDBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetAttributes
(
[out] PADDRESS_TYPE pAddress,
[out] PADDRESS_TYPE pAddressMask,
[out] DWORD *pdwData,
[out] DWORD *pdwDataMask,
[out] BYTE *pbAccessWidth,
[out] PMEM_TYPE pmt,
[out] BYTE *pbAddressSpace,
[out] PDATA_ACCESS_TYPE pda,
[out] DWORD *pdwTotalBypassCount,
[out] DWORD *pdwBypassedOccurences,
[out] BOOL *pfEnabled
);
/*++
Routine Name:
SetState
Routine Description:
Enable or Disable Breakpoint.
Note: this function should free (in case of disable) or (re)allocate (in case of enable) breakpoint triggering resource if applicable
Argument(s):
fEnabled - TRUE if Breakpoint is enabled.
fResetBypassedOccurences - Reset the number of occurences of bypass related to this breakpoint already seen.
Note: this action is equivalent to the reset implicitely done everytime the CPU is halted due to this breakpoint.
Note: if this bypass counting feature is not supported, the value of this parameter is don't care
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetState
(
[in] BOOL fEnabled,
[in] BOOL fResetBypassedOccurences
);
}; // IeXdiDataBreakpoint
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiEnumCodeBreakpoint
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Code Breakpoint Enumeration List interface
[
object,
uuid(47486F67-6461-6C65-5844-495345425074),
helpstring("IeXdiEnumCodeBreakpoint interface - eXdi Server Enumerate Code Breakpoint 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiEnumCodeBreakpoint : IUnknown
{
/*++
Routine Name:
Next
Routine Description:
Get an array of a given number (celt requested - *pceltFetched actual) of pointers
to the next (from current position) Code Breakpoint objects in the enumerated list
Argument(s):
celt - Requested number of Code Breakpoint object pointers to be returned.
apieXdiCodeBreakpoint - Returns array of Code Breakpoint objects' interface pointers.
pceltFetched - Returns the actual number of pointers returned in rgelt
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Next
(
[in] DWORD celt,
[out, size_is(celt), length_is(*pceltFetched)] IeXdiCodeBreakpoint *apieXdiCodeBreakpoint[],
[out] DWORD *pceltFetched
);
/*++
Routine Name:
Skip
Routine Description:
Skip a given number (celt) of Code Breakpoint objects next (from current position) in the enumerated list
Argument(s):
celt - Requested number of Code Breakpoint objects to be skipped.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Skip
(
[in] DWORD celt
);
/*++
Routine Name:
Reset
Routine Description:
Reset the current position in the enumerated list to first Code Breakpoint object
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Reset
(
void
);
/*++
Routine Name:
GetCount
Routine Description:
Gives the total number of Code Breakpoint objects in the enumerated list
Argument(s):
pcelt - Returns total number of Code Breakpoint objects in the enumerated list.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetCount
(
[out] DWORD *pcelt
);
/*++
Routine Name:
GetNext
Routine Description:
Get a pointer to the next (from current position) Code Breakpoint object in the enumerated list
Argument(s):
ppieXdiCodeBreakpoint - Returns Code Breakpoint object's interface pointer.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetNext
(
[out] IeXdiCodeBreakpoint **ppieXdiCodeBreakpoint
);
/*++
Routine Name:
DisableAll
Routine Description:
Disable all Code Breakpoints which objects are in the enumerated list
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DisableAll
(
void
);
/*++
Routine Name:
EnableAll
Routine Description:
Enable all Code Breakpoints which objects are in the enumerated list
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT EnableAll
(
void
);
}; // IeXdiEnumCodeBreakpoint
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiEnumDataBreakpoint
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Data Breakpoint Enumeration List interface
[
object,
uuid(47486F67-6461-6C65-5844-495345575074),
helpstring("IeXdiEnumDataBreakpoint interface - eXdi Server Enumerate Data Breakpoint 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiEnumDataBreakpoint : IUnknown
{
/*++
Routine Name:
Next
Routine Description:
Get an array of a given number (celt requested - *pceltFetched actual) of pointers
to the next (from current position) Data Breakpoint objects in the enumerated list
Argument(s):
celt - Requested number of Data Breakpoint object pointers to be returned.
apieXdiDataBreakpoint - Returns array of Data Breakpoint objects interface pointers.
pceltFetched - Returns the actual number of pointers returned in rgelt
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Next
(
[in] DWORD celt,
[out, size_is(celt), length_is(*pceltFetched)] IeXdiDataBreakpoint *apieXdiDataBreakpoint[],
[out] DWORD *pceltFetched
);
/*++
Routine Name:
Skip
Routine Description:
Skip a given number (celt) of Data Breakpoint objects next (from current position) in the enumerated list
Argument(s):
celt - Requested number of Data Breakpoint objects to be skipped.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Skip
(
[in] DWORD celt
);
/*++
Routine Name:
Reset
Routine Description:
Reset the current position in the enumerated list to first Data Breakpoint object
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT Reset
(
void
);
/*++
Routine Name:
GetCount
Routine Description:
Gives the total number of Data Breakpoint objects in the enumerated list
Argument(s):
pcelt - Returns total number of Data Breakpoint objects in the enumerated list.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetCount
(
[out] DWORD *pcelt
);
/*++
Routine Name:
GetNext
Routine Description:
Get a pointer to the next (from current position) Data Breakpoint object in the enumerated list
Argument(s):
ppieXdiDataBreakpoint - Returns Data Breakpoint object's interface pointer.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT GetNext
(
[out] IeXdiDataBreakpoint **ppieXdiDataBreakpoint
);
/*++
Routine Name:
DisableAll
Routine Description:
Disable all Data Breakpoints which objects are in the enumerated list
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT DisableAll
(
void
);
/*++
Routine Name:
EnableAll
Routine Description:
Enable all Data Breakpoints which objects are in the enumerated list
Argument(s):
none
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING: Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteCBPWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
--*/
HRESULT EnableAll
(
void
);
}; // IeXdiEnumDataBreakpoint
const DWORD SIZE_OF_80387_REGISTERS_IN_BYTES = 80;
typedef
struct _CONTEXT_X86
{
struct
{
BOOL fSegmentRegs;
BOOL fControlRegs;
BOOL fIntegerRegs;
BOOL fFloatingPointRegs;
BOOL fDebugRegs;
} RegGroupSelection; // These flags are used to select groups of registers only
// (instead of the totality) for reading or writing.
// both Segment & Control registers (used if either RegGroupSelection.fSegmentRegs or
// RegGroupSelection.fControlRegs is TRUE).
DWORD SegCs;
DWORD SegSs;
// Segment registers (used if RegGroupSelection.fSegmentRegs is TRUE).
// except CS and SS which are in "Segment and Control" - see above
DWORD SegGs;
DWORD SegFs;
DWORD SegEs;
DWORD SegDs;
// Control registers (used if RegGroupSelection.fControlRegs is TRUE).
// except CS and SS which are in "Segment and Control" - see above
DWORD EFlags;
DWORD Ebp;
DWORD Eip;
DWORD Esp;
// Integer registers (used if RegGroupSelection.fIntegerRegs is TRUE).
DWORD Eax;
DWORD Ebx;
DWORD Ecx;
DWORD Edx;
DWORD Esi;
DWORD Edi;
// Floating point registers (used if RegGroupSelection.fFloatingPointRegs is TRUE).
DWORD ControlWord;
DWORD StatusWord;
DWORD TagWord;
DWORD ErrorOffset;
DWORD ErrorSelector;
DWORD DataOffset;
DWORD DataSelector;
BYTE RegisterArea [SIZE_OF_80387_REGISTERS_IN_BYTES];
DWORD Cr0NpxState;
// Debug registers (used if RegGroupSelection.fDebugRegs is TRUE)
DWORD Dr0;
DWORD Dr1;
DWORD Dr2;
DWORD Dr3;
DWORD Dr6;
DWORD Dr7;
} CONTEXT_X86, *PCONTEXT_X86;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiX86Context
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// X86 context access interface
[
object,
uuid(47486F67-6461-6C65-5844-495358383643),
helpstring("IeXdiX86Context interface - eXdi Context access for X86 processors 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiX86Context : IUnknown
{
/*++
Routine Name:
GetContext
Routine Description:
Read Context - Read a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be read only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetContext
(
[in, out] PCONTEXT_X86 pContext
);
/*++
Routine Name:
SetContext
Routine Description:
Write Context - Write a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be written only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetContext
(
[in] CONTEXT_X86 Context
);
}; // interface IeXdiX86Context
typedef
struct _CONTEXT_SHX
{
struct
{
BOOL fControlRegs; // control and system registers
BOOL fIntegerRegs;
BOOL fFloatingPointRegs; // Only available for SH4
BOOL fDebugRegs;
} RegGroupSelection; // These flags are used to select groups of registers only
// (instead of the totality) for reading or writing.
// Control registers (used if RegGroupSelection.fControlRegs is TRUE)
// except R14 (Fp) and R15 (Sp) which are in "Integer and Control" - see further
DWORD Pr; // Procedure Register (Return Address)
DWORD Mach; // Multiply and accumulate High
DWORD Macl; // Multiply and accumulate Low
DWORD Gbr; // Global base register
DWORD Pc; // Program Counter
DWORD Sr; // Status register
// Integer registers (used if RegGroupSelection.fIntegerRegs is TRUE).
// except R14 and R15 which are in "Integer and Control" - see further
DWORD R0; // Return val - Temp
DWORD R1; // Temp
DWORD R2; // Temp
DWORD R3; // Temp
DWORD R4; // Arg - Temp
DWORD R5; // Arg - Temp
DWORD R6; // Arg - Temp
DWORD R7; // Arg - Temp
DWORD R8; // Permanent
DWORD R9; // Permanent
DWORD R10; // Permanent
DWORD R11; // Permanent
DWORD R12; // Permanent
DWORD R13; // Permanent
// both Integer & Control registers (used if either RegGroupSelection.fIntegerRegs or
// RegGroupSelection.fControlRegs is TRUE).
DWORD R14; // Frame pointer (recommended)
DWORD R15; // Stack pointer
// Floating point registers (used if RegGroupSelection.fFloatingPointRegs is TRUE).
// NOTE: this group is only used for SH4. On SH3, the data are just ignored
DWORD Fpscr; // Floating point status/control register
DWORD Fpul; // Floating point communication register
DWORD FR_B0 [16]; // Floating point regs bank 0
DWORD FR_B1 [16]; // Floating point regs bank 1
// Debug registers (used if RegGroupSelection.fDebugRegs is TRUE)
DWORD BarA;
BYTE BasrA;
BYTE BamrA;
WORD BbrA;
DWORD BarB;
BYTE BasrB;
BYTE BamrB;
WORD BbrB;
DWORD BdrB;
DWORD BdmrB;
WORD Brcr;
WORD Align;
} CONTEXT_SHX, *PCONTEXT_SHX;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiSHXContext
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// SHX context access interface
[
object,
uuid(47486F67-6461-6C65-5844-495353475843),
helpstring("IeXdiSHXContext interface - eXdi Context access for SHX processors 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiSHXContext : IUnknown
{
/*++
Routine Name:
GetContext
Routine Description:
Read Context - Read a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be read only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetContext
(
[in, out] PCONTEXT_SHX pContext
);
/*++
Routine Name:
SetContext
Routine Description:
Write Context - Write a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be written only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetContext
(
[in] CONTEXT_SHX Context
);
}; // interface IeXdiSHXContext
typedef
struct _CONTEXT_MIPS
{
struct
{
BOOL fMode64bits;
BOOL fControlRegs;
BOOL fIntegerRegs;
BOOL fFloatingPointRegs;
BOOL fExceptRegs; // Exception processing regs
BOOL fMemoryMgmRegs; // Memory Management regs
} RegGroupSelection; // These flags are used to select groups of registers only
// (instead of the totality) for reading or writing.
// Integer registers (used if RegGroupSelection.fIntegerRegs is TRUE).
// Note: The registers gp, sp, and ra are both part of Integer register and Control register
// (used if either RegGroupSelection.fIntegerRegs or RegGroupSelection.fControlRegs is TRUE).
// Note: Register zero ($0) is not stored in the frame.
// 32 bit mode - 64 bit mode
DWORD IntAt; DWORD Hi32_IntAt; // $1
DWORD IntV0; DWORD Hi32_IntV0; // $2
DWORD IntV1; DWORD Hi32_IntV1; // $3
DWORD IntA0; DWORD Hi32_IntA0; // $4
DWORD IntA1; DWORD Hi32_IntA1; // $5
DWORD IntA2; DWORD Hi32_IntA2; // $6
DWORD IntA3; DWORD Hi32_IntA3; // $7
DWORD IntT0; DWORD Hi32_IntT0; // $8
DWORD IntT1; DWORD Hi32_IntT1; // $9
DWORD IntT2; DWORD Hi32_IntT2; // $10
DWORD IntT3; DWORD Hi32_IntT3; // $11
DWORD IntT4; DWORD Hi32_IntT4; // $12
DWORD IntT5; DWORD Hi32_IntT5; // $13
DWORD IntT6; DWORD Hi32_IntT6; // $14
DWORD IntT7; DWORD Hi32_IntT7; // $15
DWORD IntS0; DWORD Hi32_IntS0; // $16
DWORD IntS1; DWORD Hi32_IntS1; // $17
DWORD IntS2; DWORD Hi32_IntS2; // $18
DWORD IntS3; DWORD Hi32_IntS3; // $19
DWORD IntS4; DWORD Hi32_IntS4; // $20
DWORD IntS5; DWORD Hi32_IntS5; // $21
DWORD IntS6; DWORD Hi32_IntS6; // $22
DWORD IntS7; DWORD Hi32_IntS7; // $23
DWORD IntT8; DWORD Hi32_IntT8; // $24
DWORD IntT9; DWORD Hi32_IntT9; // $25
DWORD IntK0; DWORD Hi32_IntK0; // $26
DWORD IntK1; DWORD Hi32_IntK1; // $27
DWORD IntGp; DWORD Hi32_IntGp; // $28 - Also part of Control registers (in addition to Integer register)
DWORD IntSp; DWORD Hi32_IntSp; // $29 - Also part of Control registers (in addition to Integer register)
DWORD IntS8; DWORD Hi32_IntS8; // $30
DWORD IntRa; DWORD Hi32_IntRa; // $31 - Also part of Control registers (in addition to Integer register)
DWORD IntLo; DWORD Hi32_IntLo;
DWORD IntHi; DWORD Hi32_IntHi;
// Floating point registers (used if RegGroupSelection.fFloatingPointRegs is TRUE).
// 32 bit mode - 64 bit mode
DWORD FltF0; DWORD Hi32_FltF0;
DWORD FltF1; DWORD Hi32_FltF1;
DWORD FltF2; DWORD Hi32_FltF2;
DWORD FltF3; DWORD Hi32_FltF3;
DWORD FltF4; DWORD Hi32_FltF4;
DWORD FltF5; DWORD Hi32_FltF5;
DWORD FltF6; DWORD Hi32_FltF6;
DWORD FltF7; DWORD Hi32_FltF7;
DWORD FltF8; DWORD Hi32_FltF8;
DWORD FltF9; DWORD Hi32_FltF9;
DWORD FltF10; DWORD Hi32_FltF10;
DWORD FltF11; DWORD Hi32_FltF11;
DWORD FltF12; DWORD Hi32_FltF12;
DWORD FltF13; DWORD Hi32_FltF13;
DWORD FltF14; DWORD Hi32_FltF14;
DWORD FltF15; DWORD Hi32_FltF15;
DWORD FltF16; DWORD Hi32_FltF16;
DWORD FltF17; DWORD Hi32_FltF17;
DWORD FltF18; DWORD Hi32_FltF18;
DWORD FltF19; DWORD Hi32_FltF19;
DWORD FltF20; DWORD Hi32_FltF20;
DWORD FltF21; DWORD Hi32_FltF21;
DWORD FltF22; DWORD Hi32_FltF22;
DWORD FltF23; DWORD Hi32_FltF23;
DWORD FltF24; DWORD Hi32_FltF24;
DWORD FltF25; DWORD Hi32_FltF25;
DWORD FltF26; DWORD Hi32_FltF26;
DWORD FltF27; DWORD Hi32_FltF27;
DWORD FltF28; DWORD Hi32_FltF28;
DWORD FltF29; DWORD Hi32_FltF29;
DWORD FltF30; DWORD Hi32_FltF30;
DWORD FltF31; DWORD Hi32_FltF31;
DWORD FCR0; // floating-point control register: implementation / revision
DWORD FCR31; // floating-point control register: control / status
// Control registers (used if RegGroupSelection.fControlRegs is TRUE).
// Note: The registers gp, sp, and ra defined above are both part of Integer register and Control register
// (used if either RegGroupSelection.fControlRegs or RegGroupSelection.fControlRegs is TRUE).
// Note: The registers Sr defined later are both part of Exception registers and Control registers
// (used if either RegGroupSelection.fExceptRegs or RegGroupSelection.fControlRegs is TRUE).
// 32 bit mode - 64 bit mode
DWORD Pc; DWORD Hi32_Pc; // Program counter
// Exception processing registers (used if RegGroupSelection.fExceptRegs is TRUE).
DWORD Context; DWORD Hi32_Context; // Pointer to kernel virtual page table entry (PTE) in 32-bit addressing mode
DWORD BadVAddr; DWORD Hi32_BadVAddr; // Bad virtual address
DWORD EPC; DWORD Hi32_EPC; // Exception Program Counter
DWORD XContextReg; DWORD Hi32_XContextReg; // Pointer to kernel virtual PTE table in 64-bit addressing mode
DWORD ErrorEPC; DWORD Hi32_ErrorEPC; // Error Exception Program Counter
DWORD Count; // Timer Count
DWORD Compare; // Timer Compare
DWORD Sr; // Status register - Also part of Control registers (in addition to Exception registers)
DWORD Cause; // Cause of last exception
DWORD WatchLo; // Physical Memory Reference trap address low bits
DWORD WatchHi; // Physical Memory Reference trap address high bits
DWORD ECC; // Secondary-cache error checking and correcting (ECC) and Primary parity
DWORD CacheErr; // Cache Error and Status register
// Memory Management registers (used if RegGroupSelection.fMemoryMgmRegs is TRUE).
DWORD Index; // Programmable pointer into TLB array
DWORD Random; // Pseudorandom point into TLB array
DWORD EntryLo0; DWORD Hi32_EntryLo0; // Low half of TLB entry for even virtual address (VPN)
DWORD EntryLo1; DWORD Hi32_EntryLo1; // Low half of TLB entry for odd virtual address (VPN)
DWORD PageMask; // TLB Page Mask
DWORD Wired; // Number of wired TLB entries
DWORD EntryHi; DWORD Hi32_EntryHi; // High half of TLB entry
DWORD PRId; // Processor Revision Identifier
DWORD Config; // Configuration register
DWORD LLAddr; // Load Linked Address
DWORD TagLo; // Cache Tag register
DWORD TagHi; // Cache Tag register
} CONTEXT_MIPS, *PCONTEXT_MIPS;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiMIPSContext
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// MIPS context access interface
[
object,
uuid(47486F67-6461-6C65-5844-49534D495043),
helpstring("IeXdiMIPSContext interface - eXdi Context access for MIPS processors 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiMIPSContext : IUnknown
{
/*++
Routine Name:
GetContext
Routine Description:
Read Context - Read a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be read only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetContext
(
[in, out] PCONTEXT_MIPS pContext
);
/*++
Routine Name:
SetContext
Routine Description:
Write Context - Write a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be written only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetContext
(
[in] CONTEXT_MIPS Context
);
}; // interface IeXdiMIPSContext
typedef
struct _CONTEXT_ARM
{
struct
{
BOOL fControlRegs;
BOOL fIntegerRegs;
BOOL fDebugRegs;
} RegGroupSelection; // These flags are used to select groups of registers only
// (instead of the totality) for reading or writing.
// Control registers (used if RegGroupSelection.fControlRegs is TRUE).
DWORD Sp;
DWORD Lr;
DWORD Pc;
DWORD Psr;
// Integer registers (used if RegGroupSelection.fIntegerRegs is TRUE).
DWORD R0;
DWORD R1;
DWORD R2;
DWORD R3;
DWORD R4;
DWORD R5;
DWORD R6;
DWORD R7;
DWORD R8;
DWORD R9;
DWORD R10;
DWORD R11;
DWORD R12;
} CONTEXT_ARM, *PCONTEXT_ARM;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiARMContext
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// ARM context access interface
[
object,
uuid(47486F67-6461-6C65-5844-495341524D43),
helpstring("IeXdiARMContext interface - eXdi Context access for ARM processors 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiARMContext : IUnknown
{
/*++
Routine Name:
GetContext
Routine Description:
Read Context - Read a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be read only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetContext
(
[in, out] PCONTEXT_ARM pContext
);
/*++
Routine Name:
SetContext
Routine Description:
Write Context - Write a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be written only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetContext
(
[in] CONTEXT_ARM Context
);
}; // interface IeXdiARMContext
typedef
struct _CONTEXT_PPC
{
struct
{
BOOL fControlRegs;
BOOL fIntegerRegs;
BOOL fFloatingPointRegs;
BOOL fDebugRegs;
} RegGroupSelection; // These flags are used to select groups of registers only
// (instead of the totality) for reading or writing.
// Floating point registers (used if RegGroupSelection.fFloatingPointRegs is TRUE).
double Fpr0;
double Fpr1;
double Fpr2;
double Fpr3;
double Fpr4;
double Fpr5;
double Fpr6;
double Fpr7;
double Fpr8;
double Fpr9;
double Fpr10;
double Fpr11;
double Fpr12;
double Fpr13;
double Fpr14;
double Fpr15;
double Fpr16;
double Fpr17;
double Fpr18;
double Fpr19;
double Fpr20;
double Fpr21;
double Fpr22;
double Fpr23;
double Fpr24;
double Fpr25;
double Fpr26;
double Fpr27;
double Fpr28;
double Fpr29;
double Fpr30;
double Fpr31;
double Fpscr; // Floating point status/control reg
// Integer registers (used if RegGroupSelection.fIntegerRegs is TRUE).
DWORD Gpr0; // General registers 0..31
DWORD Gpr1;
DWORD Gpr2;
DWORD Gpr3;
DWORD Gpr4;
DWORD Gpr5;
DWORD Gpr6;
DWORD Gpr7;
DWORD Gpr8;
DWORD Gpr9;
DWORD Gpr10;
DWORD Gpr11;
DWORD Gpr12;
DWORD Gpr13;
DWORD Gpr14;
DWORD Gpr15;
DWORD Gpr16;
DWORD Gpr17;
DWORD Gpr18;
DWORD Gpr19;
DWORD Gpr20;
DWORD Gpr21;
DWORD Gpr22;
DWORD Gpr23;
DWORD Gpr24;
DWORD Gpr25;
DWORD Gpr26;
DWORD Gpr27;
DWORD Gpr28;
DWORD Gpr29;
DWORD Gpr30;
DWORD Gpr31;
// Control registers (used if RegGroupSelection.fControlRegs is TRUE).
DWORD Msr; // Machine status register
DWORD Iar; // Instruction address register
DWORD Lr; // Link register
DWORD Ctr; // Count register
DWORD Cr; // Condition register
DWORD Xer; // Fixed point exception register
// Debug registers (used if RegGroupSelection.fDebugRegs is TRUE)
DWORD Dr0; // Breakpoint Register 1
DWORD Dr1; // Breakpoint Register 2
DWORD Dr2; // Breakpoint Register 3
DWORD Dr3; // Breakpoint Register 4
DWORD Dr4; // Breakpoint Register 5
DWORD Dr5; // Breakpoint Register 6
DWORD Dr6; // Debug Status Register
DWORD Dr7; // Debug Control Register
} CONTEXT_PPC, *PCONTEXT_PPC;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiPPCContext
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// PPC context access interface
[
object,
uuid(47486F67-6461-6C65-5844-495350504343),
helpstring("IeXdiPPCContext interface - eXdi Context access for PPC processors 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiPPCContext : IUnknown
{
/*++
Routine Name:
GetContext
Routine Description:
Read Context - Read a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be read only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fReadRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT GetContext
(
[in, out] PCONTEXT_PPC pContext
);
/*++
Routine Name:
SetContext
Routine Description:
Write Context - Write a set of CPU / Co-Proc registers that define the state of the target
The CONTEXT.RegGroupSelection bitfield allow to select which group of register need to be written only
Argument(s):
pContext - Return context (CPU dependant structure).
Note: The context is also passed in to indicate only the RegGroupSelection (which reg groups are read)
Return Value:
Error status:
S_OK: Function successful
EXDI_E_CANNOTWHILETGTRUNNING Cannot proceed while target running. Must halt the target first.
Note: this error is generated only if the probe / target does not support this operation "on the fly".
see DEBUG_ACCESS_CAPABILITIES_STRUCT.fWriteRegWhileRunning
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT SetContext
(
[in] CONTEXT_PPC Context
);
}; // interface IeXdiPPCContext
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiClientNotifyMemChg
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Notify Memory/IO/Reg change
/////////////////////////////////////////////////////////////////////////////
[
object,
uuid(47486F67-6461-6C65-5844-49434E4D4300),
helpstring("IeXdiClientNotifyMemChg interface - eXdi Notify Memory Changes 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiClientNotifyMemChg : IUnknown
{
/*++
Routine Name:
NotifyMemoryChange
Routine Description:
Indicate a change in memory (virtual or physical or peripherical I/O or CPU reg - context) - The debugger can use this function to invalidate its internal cache.
This function should be called by the driver only when the target is halted. When the target is running, all memory cache should be invalidated.
Argument(s):
mtChanged - Memory change type. Indicates whether this memory change notification concerns virtual memory, physical memory or pheripherical IO, or CPU register
Address - Starting address of the data buffer to be accessed on the target.
bAddressSpace - If mtChanged != mtPhysicalOrPeriIO, Address space to be accessed (convention: 0 = Physical Memory, 1 = Peripherical I/O if not memory mapped, 2..255 = free for custom use)
otherwize, don't care.
dwNbElemChanged - Number of element(s) (of byDataWidth bits) to be accessed.
bAccessWidth - Data Width in bits (byte=8, word=16, dword=32, ddword=64, and other if supported by target).
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT NotifyMemoryChange
(
[in] MEM_TYPE mtChanged,
[in] ADDRESS_TYPE Address,
[in] BYTE bAddressSpace,
[in] DWORD dwNbElemChanged,
[in] BYTE bAccessWidth
);
}; // interface IeXdiClientNotifyMemChg
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiClientNotifyRunChg
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Notify Run state change
/////////////////////////////////////////////////////////////////////////////
[
object,
uuid(47486F67-6461-6C65-5844-49434E525343),
helpstring("IeXdiClientNotifyRunChg interface - eXdi Notify Run State Changes 1.0 for Platform Builder 3.0 debugger - Microsoft 1999"),
pointer_default(ref)
]
interface IeXdiClientNotifyRunChg : IUnknown
{
/*++
Routine Name:
NotifyRunStateChange
Routine Description:
Indicate a change in Run state - The debugger can use this function to invalidate its internal cache.
This function should be called by the driver only when the target is halted. When the target is running, all memory cache should be invalidated.
Argument(s):
ersCurrent - Supplies the current Run Status Type
ehrCurrent - Suppliest the current Halt Reason Type (hrNone if Run Status is not Halted)
CurrentExecAddress - Current program / instruction pointer if Run Status is Halted, undefined otherwise.
dwExceptionCode - indicate type / source of exception (Code is platform dependant) if Halted due to exception ((rsHalted == ersCurrent) && (hrException == ehrCurrent)), undefined otherwise.
Return Value:
Error status:
S_OK: Function successful
EXDI_E_NOTIMPL: Not implemented
EXDI_E_OUTOFMEMORY: Failed to allocate necessary memory
EXDI_E_INVALIDARG: One or more arguments are invalid
EXDI_E_ABORT: Operation aborted
EXDI_E_FAIL: Unspecified failure
EXDI_E_COMMUNICATION: Communication error between host driver and target
EXDI_E_USEDBYCONCURENTTHREAD: Cannot proceed immediately because resource is already used by concurent thread.
--*/
HRESULT NotifyRunStateChange
(
[in] RUN_STATUS_TYPE ersCurrent,
[in] HALT_REASON_TYPE ehrCurrent,
[in] ADDRESS_TYPE CurrentExecAddress,
[in] DWORD dwExceptionCode
);
}; // interface IeXdiClientNotifyRunChg
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiClientCfg
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Probe / Emulator Configuration
/////////////////////////////////////////////////////////////////////////////
// This is totally probe vendor specific
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiClientTraceCtrl
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Trace Control
/////////////////////////////////////////////////////////////////////////////
// This can be probe vendor specific because there are so many variation in
// probe support of trigger / event / trace type. The probe vendor will also
// write the data collectors. An example of complex trace control and trace
// notification APIs are described later.
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// IeXdiClientSubstCtrl
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Memory and IO Substitution Control
/////////////////////////////////////////////////////////////////////////////
// This can be probe vendor specific because there are so many variation in
// probe support of IO or Memory substition mechanism (overlay, query by
// port). The probe vendor will also write the data collectors. An example of
// complex trace control and trace notification APIs are described later.