Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Specifica il tipo di struttura utilizzata per descrivere la posizione del punto di interruzione.
Sintassi
public struct BP_LOCATION {
public uint bpLocationType;
public IntPtr unionmember1;
public IntPtr unionmember2;
public IntPtr unionmember3;
public IntPtr unionmember4;
};
Membri
bpLocationType
Valore dell'enumerazione BP_LOCATION_TYPE utilizzata per interpretare l'unione bpLocation o i unionmemberX membri.
bpLocation.bplocCodeFileLine
[solo C++] Contiene la struttura BP_LOCATION_CODE_FILE_LINE se = bpLocationTypeBPLT_CODE_FILE_LINE .
bpLocation.bplocCodeFuncOffset
[solo C++] Contiene la struttura BP_LOCATION_CODE_FUNC_OFFedizione Standard T se = bpLocationTypeBPLT_CODE_FUNC_OFFSET .
bpLocation.bplocCodeContext
[solo C++] Contiene la struttura BP_LOCATION_CODE_CONTEXT se = bpLocationTypeBPLT_CODE_CONTEXT .
bpLocation.bplocCodeString
[solo C++] Contiene la struttura BP_LOCATION_CODE_STRING se = bpLocationTypeBPLT_CODE_STRING .
bpLocation.bplocCodeAddress
[solo C++] Contiene la struttura BP_LOCATION_CODE_ADDRESS se = bpLocationTypeBPLT_CODE_ADDRESS .
bpLocation.bplocDataString
[solo C++] Contiene la struttura BP_LOCATION_DATA_STRING se = bpLocationTypeBPLT_DATA_STRING .
bpLocation.bplocResolution
[solo C++] Contiene la struttura BP_LOCATION_RESOLUTION se = bpLocationTypeBPLT_RESOLUTION .
unionmember1
[Solo C#] Vedere La sezione Osservazioni su come interpretare.
unionmember2
[Solo C#] Vedere La sezione Osservazioni su come interpretare.
unionmember3
[Solo C#] Vedere La sezione Osservazioni su come interpretare.
unionmember4
[Solo C#] Vedere La sezione Osservazioni su come interpretare.
Osservazioni:
Questa struttura è un membro delle strutture BP_REQUEST_INFO e BP_REQUEST_INFO2 .
[Solo C#] I unionmemberX membri vengono interpretati in base alla tabella seguente. Cercare nella colonna sinistra il bpLocationType valore e quindi esaminare le altre colonne per determinare cosa rappresenta ogni unionmemberX membro e effettuare il marshalling di unionmemberX conseguenza. Vedere l'esempio per un modo per interpretare una parte di questa struttura in C#.
bpLocationType |
unionmember1 |
unionmember2 |
unionmember3 |
unionmember4 |
|---|---|---|---|---|
BPLT_CODE_FILE_LINE |
string (contesto) |
IDebugDocumentPosition2 | - | - |
BPLT_CODE_FUNC_OFFSET |
string (contesto) |
IDebugFunctionPosition2 | - | - |
BPLT_CODE_CONTEXT |
IDebugCodeContext2 | - | - | - |
BPLT_CODE_STRING |
string (contesto) |
string (espressione condizionale) |
- | - |
BPLT_CODE_ADDRESS |
string (contesto) |
string (URL del modulo) |
string (nome della funzione) |
string (indirizzo) |
BPLT_DATA_STRING |
IDebugThread2 | string (contesto) |
string (espressione di dati) |
uint (numero di elementi) |
BPLT_RESOLUTION |
IDebugBreakpointResolution2 | - | - | - |
Esempio
Questo esempio illustra come interpretare la BP_LOCATION struttura in C# per il BPLT_DATA_STRING tipo . Questo particolare tipo mostra come interpretare tutti e quattro unionmemberX i membri in tutti i formati possibili (oggetto, stringa e numero).
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);
}
}
}
}
Requisiti
Intestazione: msdbg.h
Spazio dei nomi: Microsoft.VisualStudio.Debugger.Interop
Assembly: Microsoft.VisualStudio.Debugger.Interop.dll