BP_LOCATION
중단점의 위치를 설명 하는 구조를 지정 합니다.
typedef struct _BP_LOCATION {
BP_LOCATION_TYPE bpLocationType;
union {
BP_LOCATION_CODE_FILE_LINE bplocCodeFileLine;
BP_LOCATION_CODE_FUNC_OFFSET bplocCodeFuncOffset;
BP_LOCATION_CODE_CONTEXT bplocCodeContext;
BP_LOCATION_CODE_STRING bplocCodeString;
BP_LOCATION_CODE_ADDRESS bplocCodeAddress;
BP_LOCATION_DATA_STRING bplocDataString;
BP_LOCATION_RESOLUTION bplocResolution;
DWORD unused;
} bpLocation;
} BP_LOCATION;
public struct BP_LOCATION {
public uint bpLocationType;
public IntPtr unionmember1;
public IntPtr unionmember2;
public IntPtr unionmember3;
public IntPtr unionmember4;
};
Members
bpLocationType
값에서의 BP_LOCATION_TYPE 해석 하는 데 사용 되는 열거형의 bpLocation union 나는 unionmemberX 멤버.bpLocation.bplocCodeFileLine
[C + +에만] Contains the BP_LOCATION_CODE_FILE_LINE structure if bpLocationType = BPLT_CODE_FILE_LINE.bpLocation.bplocCodeFuncOffset
[C + +에만] Contains the BP_LOCATION_CODE_FUNC_OFFSET structure if bpLocationType = BPLT_CODE_FUNC_OFFSET.bpLocation.bplocCodeContext
[C + +에만] Contains the BP_LOCATION_CODE_CONTEXT structure if bpLocationType = BPLT_CODE_CONTEXT.bpLocation.bplocCodeString
[C + +에만] Contains the BP_LOCATION_CODE_STRING structure if bpLocationType = BPLT_CODE_STRING.bpLocation.bplocCodeAddress
[C + +에만] Contains the BP_LOCATION_CODE_ADDRESS structure if bpLocationType = BPLT_CODE_ADDRESS.bpLocation.bplocDataString
[C + +에만] Contains the BP_LOCATION_DATA_STRING structure if bpLocationType = BPLT_DATA_STRING.bpLocation.bplocResolution
[C + +에만] Contains the BP_LOCATION_RESOLUTION structure if bpLocationType = BPLT_RESOLUTION.unionmember1
[C#만] 해석 하는 방법에 대 한 설명 부분을 참조 하십시오.unionmember2
[C#만] 해석 하는 방법에 대 한 설명 부분을 참조 하십시오.unionmember3
[C#만] 해석 하는 방법에 대 한 설명 부분을 참조 하십시오.unionmember4
[C#만] 해석 하는 방법에 대 한 설명 부분을 참조 하십시오.
설명
이 구조체의 멤버인는 BP_REQUEST_INFO 및 BP_REQUEST_INFO2 구조체입니다.
[C#만] unionmemberX 멤버는 다음 테이블에 따라 해석 됩니다. 아래로 왼쪽된 된 열에 대 한 조회는 bpLocationType 값 다음 무엇 인지 확인 하려면 다른 열에서 확인 unionmemberX 및 marshal 멤버가 나타냅니다의 unionmemberX 적절 하 게. 이 구조에서 C# 부분을 해석 하는 방법에 대 한 예제를 참조 하십시오.
bpLocationType |
unionmember1 |
unionmember2 |
unionmember3 |
unionmember4 |
---|---|---|---|---|
BPLT_CODE_FILE_LINE |
string(컨텍스트) |
- |
- |
|
BPLT_CODE_FUNC_OFFSET |
string(컨텍스트) |
- |
- |
|
BPLT_CODE_CONTEXT |
- |
- |
- |
|
BPLT_CODE_STRING |
string(컨텍스트) |
string(조건부 식) |
- |
- |
BPLT_CODE_ADDRESS |
string(컨텍스트) |
string(모듈 URL) |
string함수 이름 |
string(주소) |
BPLT_DATA_STRING |
string(컨텍스트) |
string(데이터 식) |
uint(요소 수) |
|
BPLT_RESOLUTION |
- |
- |
- |
예제
해석 하는 방법을 보여 주는이 예제는 BP_LOCATION 구조에서 C#를 BPLT_DATA_STRING 형식. 이 특정 형식을 네 해석 하는 방법을 보여 줍니다. unionmemberX 구성원의 모든 가능한 형식 (개체, 문자열 및 숫자).
using System;
using System.Runtime.Interop.Services;
using Microsoft.VisualStudio.Debugger.Interop;
namespace MyPackage
{
public class MyClass
{
public void Interpret(BP_LOCATION bp)
{
if (bp.bpLocationType == (uint)enum_BP_LOCATION_TYPE.BPLT_DATA_STRING)
{
IDebugThread2 pThread = (IDebugThread2)Marshal.GetObjectForIUnknown(bp.unionmember1);
string context = Marshal.PtrToStringBSTR(bp.unionmember2);
string dataExpression = Marshal.PtrToStringBSTR(bp.unionmember3);
uint numElements = (uint)Marshal.ReadInt32(bp.unionmember4);
}
}
}
}
요구 사항
헤더: msdbg.h
네임 스페이스: Microsoft.VisualStudio.Debugger.Interop
어셈블리: Microsoft.VisualStudio.Debugger.Interop.dll