|
2 | 2 | title: "IDiaFrameData | Microsoft Docs"
|
3 | 3 | ms.date: "11/04/2016"
|
4 | 4 | ms.topic: "conceptual"
|
5 |
| -dev_langs: |
| 5 | +dev_langs: |
6 | 6 | - "C++"
|
7 |
| -helpviewer_keywords: |
| 7 | +helpviewer_keywords: |
8 | 8 | - "IDiaFrameData interface"
|
9 | 9 | ms.assetid: 2f1b4986-341b-4641-89a4-226e261e9d93
|
10 | 10 | author: "mikejo5000"
|
11 | 11 | ms.author: "mikejo"
|
12 | 12 | manager: jillfra
|
13 |
| -ms.workload: |
| 13 | +ms.workload: |
14 | 14 | - "multiple"
|
15 | 15 | ---
|
16 | 16 | # IDiaFrameData
|
17 |
| -Exposes the details of a stack frame. |
18 |
| - |
19 |
| -## Syntax |
20 |
| - |
21 |
| -``` |
22 |
| -IDiaFrameData : IUnknown |
23 |
| -``` |
24 |
| - |
25 |
| -## Methods in Vtable Order |
26 |
| - The following table shows the methods of `IDiaFrameData`. |
27 |
| - |
28 |
| -|Method|Description| |
29 |
| -|------------|-----------------| |
30 |
| -|[IDiaFrameData::get_addressSection](../../debugger/debug-interface-access/idiaframedata-get-addresssection.md)|Retrieves the section part of the code address for the frame.| |
31 |
| -|[IDiaFrameData::get_addressOffset](../../debugger/debug-interface-access/idiaframedata-get-addressoffset.md)|Retrieves the offset part of the code address for the frame.| |
32 |
| -|[IDiaFrameData::get_relativeVirtualAddress](../../debugger/debug-interface-access/idiaframedata-get-relativevirtualaddress.md)|Retrieves the image relative virtual address (RVA) of the code for the frame.| |
33 |
| -|[IDiaFrameData::get_virtualAddress](../../debugger/debug-interface-access/idiaframedata-get-virtualaddress.md)|Retrieves the virtual address (VA) of the code for the frame.| |
34 |
| -|[IDiaFrameData::get_lengthBlock](../../debugger/debug-interface-access/idiaframedata-get-lengthblock.md)|Retrieves the length, in bytes, of the block of code described by the frame.| |
35 |
| -|[IDiaFrameData::get_lengthLocals](../../debugger/debug-interface-access/idiaframedata-get-lengthlocals.md)|Retrieves the number of bytes of local variables pushed on the stack.| |
36 |
| -|[IDiaFrameData::get_lengthParams](../../debugger/debug-interface-access/idiaframedata-get-lengthparams.md)|Retrieves the number of bytes of parameters pushed on the stack.| |
37 |
| -|[IDiaFrameData::get_maxStack](../../debugger/debug-interface-access/idiaframedata-get-maxstack.md)|Retrieves the maximum number of bytes pushed on the stack in the frame.| |
38 |
| -|[IDiaFrameData::get_lengthProlog](../../debugger/debug-interface-access/idiaframedata-get-lengthprolog.md)|Retrieves the number of bytes of prologue code in the block.| |
39 |
| -|[IDiaFrameData::get_lengthSavedRegisters](../../debugger/debug-interface-access/idiaframedata-get-lengthsavedregisters.md)|Retrieves the number of bytes of saved registers pushed on the stack.| |
40 |
| -|[IDiaFrameData::get_program](../../debugger/debug-interface-access/idiaframedata-get-program.md)|Retrieves the program string that is used to compute the register set before the call to the current function.| |
41 |
| -|[IDiaFrameData::get_systemExceptionHandling](../../debugger/debug-interface-access/idiaframedata-get-systemexceptionhandling.md)|Retrieves a flag that indicates that system exception handling is in effect.| |
42 |
| -|[IDiaFrameData::get_cplusplusExceptionHandling](../../debugger/debug-interface-access/idiaframedata-get-cplusplusexceptionhandling.md)|Retrieves a flag that indicates that C++ exception handling is in effect.| |
43 |
| -|[IDiaFrameData::get_functionStart](../../debugger/debug-interface-access/idiaframedata-get-functionstart.md)|Retrieves a flag that indicates that the block contains the entry point of a function.| |
44 |
| -|[IDiaFrameData::get_allocatesBasePointer](../../debugger/debug-interface-access/idiaframedata-get-allocatesbasepointer.md)|Retrieves a flag that indicates that the base pointer is allocated for code in this address range. This method is deprecated.| |
45 |
| -|[IDiaFrameData::get_type](../../debugger/debug-interface-access/idiaframedata-get-type.md)|Retrieves the compiler-specific frame type.| |
46 |
| -|[IDiaFrameData::get_functionParent](../../debugger/debug-interface-access/idiaframedata-get-functionparent.md)|Retrieves frame data interface for enclosing function.| |
47 |
| -|[IDiaFrameData::execute](../../debugger/debug-interface-access/idiaframedata-execute.md)|Performs stack unwinding and returns the current state of registers in a stack walk frame interface.| |
48 |
| - |
49 |
| -## Remarks |
50 |
| - The details available for a frame are for execution points within the address range indicated by the address and block length. |
51 |
| - |
52 |
| -## Notes for Callers |
53 |
| - Obtain this interface by calling the [IDiaEnumFrameData::Next](../../debugger/debug-interface-access/idiaenumframedata-next.md) or [IDiaEnumFrameData::Item](../../debugger/debug-interface-access/idiaenumframedata-item.md) methods. See the [IDiaEnumFrameData](../../debugger/debug-interface-access/idiaenumframedata.md) interface for details. |
54 |
| - |
55 |
| -## Example |
56 |
| - This example prints out the properties of an `IDiaFrameData` object. See the [IDiaEnumFrameData](../../debugger/debug-interface-access/idiaenumframedata.md) interface for an example of how the `IDiaFrameData` interface is obtained. |
57 |
| - |
58 |
| -```C++ |
59 |
| -void PrintFrameData(IDiaFrameData* pFrameData){ |
60 |
| - DWORD dwSect; |
61 |
| - DWORD dwOffset; |
62 |
| - DWORD cbBlock; |
63 |
| - DWORD cbLocals; // Number of bytes reserved for the function locals |
64 |
| - DWORD cbParams; // Number of bytes reserved for the function arguments |
65 |
| - DWORD cbMaxStack; |
66 |
| - DWORD cbProlog; |
67 |
| - DWORD cbSavedRegs; |
68 |
| - BOOL bSEH; |
69 |
| - BOOL bEH; |
70 |
| - BOOL bStart; |
71 |
| - BSTR wszProgram; |
72 |
| - |
73 |
| - if(pFrameData->get_addressSection(&dwSect) == S_OK && |
74 |
| - pFrameData->get_addressOffset(&dwOffset) == S_OK && |
75 |
| - pFrameData->get_lengthBlock(&cbBlock) == S_OK && |
76 |
| - pFrameData->get_lengthLocals(&cbLocals) == S_OK && |
77 |
| - pFrameData->get_lengthParams(&cbParams) == S_OK && |
78 |
| - pFrameData->get_maxStack(&cbMaxStack) == S_OK && |
79 |
| - pFrameData->get_lengthProlog(&cbProlog) == S_OK && |
80 |
| - pFrameData->get_lengthSavedRegisters(&cbSavedRegs) == S_OK && |
81 |
| - pFrameData->get_systemExceptionHandling(&bSEH) == S_OK && |
82 |
| - pFrameData->get_cplusplusExceptionHandling(&bEH) == S_OK && |
83 |
| - pFrameData->get_functionStart(&bStart) == S_OK ) |
84 |
| - { |
85 |
| - wprintf(L"Frame address : %04X:%08X\n", dwSect, dwOffset); |
86 |
| - wprintf(L"Block size : 0x%8X\n", cbBlock); |
87 |
| - wprintf(L"Locals size : 0x%8X\n", cbLocals); |
88 |
| - wprintf(L"Parms size : 0x%8X\n", cbParams); |
89 |
| - wprintf(L"Max stack used : 0x%8X\n", cbMaxStack); |
90 |
| - wprintf(L"Prolog size : 0x%8X\n", cbProlog); |
91 |
| - wprintf(L"Saved regs size: 0x%8X\n", cbSavedRegs); |
92 |
| - wprintf(L"System Exception Handling: %c\n", bSEH ? L'Y' : L'N'); |
93 |
| - wprintf(L"C++ Exception Handling : %c\n", bEH ? L'Y' : L'N'); |
94 |
| - wprintf(L"Function starts in block : %c\n", bStart ? L'Y' : L'N'); |
95 |
| - |
96 |
| - if (pFrameData->get_program(&wszProgram) == S_OK) |
97 |
| - { |
98 |
| - wprintf(L"Program used for register set: %s\n", wszProgram); |
99 |
| - SysFreeString(wszProgram); |
100 |
| - } |
101 |
| - else |
102 |
| - { |
103 |
| - wprintf(L"\n"); |
104 |
| - } |
105 |
| - } |
106 |
| -} |
107 |
| -``` |
108 |
| - |
109 |
| -## Requirements |
110 |
| - Header: Dia2.h |
111 |
| - |
112 |
| - Library: diaguids.lib |
113 |
| - |
114 |
| - DLL: msdia80.dll |
115 |
| - |
116 |
| -## See Also |
117 |
| - [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
118 |
| - [IDiaEnumFrameData](../../debugger/debug-interface-access/idiaenumframedata.md) |
119 |
| - [IDiaEnumFrameData::Item](../../debugger/debug-interface-access/idiaenumframedata-item.md) |
120 |
| - [IDiaEnumFrameData::Next](../../debugger/debug-interface-access/idiaenumframedata-next.md) |
| 17 | +Exposes the details of a stack frame. |
| 18 | + |
| 19 | +## Syntax |
| 20 | + |
| 21 | +``` |
| 22 | +IDiaFrameData : IUnknown |
| 23 | +``` |
| 24 | + |
| 25 | +## Methods in Vtable Order |
| 26 | +The following table shows the methods of `IDiaFrameData`. |
| 27 | + |
| 28 | +|Method|Description| |
| 29 | +|------------|-----------------| |
| 30 | +|[IDiaFrameData::get_addressSection](../../debugger/debug-interface-access/idiaframedata-get-addresssection.md)|Retrieves the section part of the code address for the frame.| |
| 31 | +|[IDiaFrameData::get_addressOffset](../../debugger/debug-interface-access/idiaframedata-get-addressoffset.md)|Retrieves the offset part of the code address for the frame.| |
| 32 | +|[IDiaFrameData::get_relativeVirtualAddress](../../debugger/debug-interface-access/idiaframedata-get-relativevirtualaddress.md)|Retrieves the image relative virtual address (RVA) of the code for the frame.| |
| 33 | +|[IDiaFrameData::get_virtualAddress](../../debugger/debug-interface-access/idiaframedata-get-virtualaddress.md)|Retrieves the virtual address (VA) of the code for the frame.| |
| 34 | +|[IDiaFrameData::get_lengthBlock](../../debugger/debug-interface-access/idiaframedata-get-lengthblock.md)|Retrieves the length, in bytes, of the block of code described by the frame.| |
| 35 | +|[IDiaFrameData::get_lengthLocals](../../debugger/debug-interface-access/idiaframedata-get-lengthlocals.md)|Retrieves the number of bytes of local variables pushed on the stack.| |
| 36 | +|[IDiaFrameData::get_lengthParams](../../debugger/debug-interface-access/idiaframedata-get-lengthparams.md)|Retrieves the number of bytes of parameters pushed on the stack.| |
| 37 | +|[IDiaFrameData::get_maxStack](../../debugger/debug-interface-access/idiaframedata-get-maxstack.md)|Retrieves the maximum number of bytes pushed on the stack in the frame.| |
| 38 | +|[IDiaFrameData::get_lengthProlog](../../debugger/debug-interface-access/idiaframedata-get-lengthprolog.md)|Retrieves the number of bytes of prologue code in the block.| |
| 39 | +|[IDiaFrameData::get_lengthSavedRegisters](../../debugger/debug-interface-access/idiaframedata-get-lengthsavedregisters.md)|Retrieves the number of bytes of saved registers pushed on the stack.| |
| 40 | +|[IDiaFrameData::get_program](../../debugger/debug-interface-access/idiaframedata-get-program.md)|Retrieves the program string that is used to compute the register set before the call to the current function.| |
| 41 | +|[IDiaFrameData::get_systemExceptionHandling](../../debugger/debug-interface-access/idiaframedata-get-systemexceptionhandling.md)|Retrieves a flag that indicates that system exception handling is in effect.| |
| 42 | +|[IDiaFrameData::get_cplusplusExceptionHandling](../../debugger/debug-interface-access/idiaframedata-get-cplusplusexceptionhandling.md)|Retrieves a flag that indicates that C++ exception handling is in effect.| |
| 43 | +|[IDiaFrameData::get_functionStart](../../debugger/debug-interface-access/idiaframedata-get-functionstart.md)|Retrieves a flag that indicates that the block contains the entry point of a function.| |
| 44 | +|[IDiaFrameData::get_allocatesBasePointer](../../debugger/debug-interface-access/idiaframedata-get-allocatesbasepointer.md)|Retrieves a flag that indicates that the base pointer is allocated for code in this address range. This method is deprecated.| |
| 45 | +|[IDiaFrameData::get_type](../../debugger/debug-interface-access/idiaframedata-get-type.md)|Retrieves the compiler-specific frame type.| |
| 46 | +|[IDiaFrameData::get_functionParent](../../debugger/debug-interface-access/idiaframedata-get-functionparent.md)|Retrieves frame data interface for enclosing function.| |
| 47 | +|[IDiaFrameData::execute](../../debugger/debug-interface-access/idiaframedata-execute.md)|Performs stack unwinding and returns the current state of registers in a stack walk frame interface.| |
| 48 | + |
| 49 | +## Remarks |
| 50 | + The details available for a frame are for execution points within the address range indicated by the address and block length. |
| 51 | + |
| 52 | +## Notes for Callers |
| 53 | + Obtain this interface by calling the [IDiaEnumFrameData::Next](../../debugger/debug-interface-access/idiaenumframedata-next.md) or [IDiaEnumFrameData::Item](../../debugger/debug-interface-access/idiaenumframedata-item.md) methods. See the [IDiaEnumFrameData](../../debugger/debug-interface-access/idiaenumframedata.md) interface for details. |
| 54 | + |
| 55 | +## Example |
| 56 | + This example prints out the properties of an `IDiaFrameData` object. See the [IDiaEnumFrameData](../../debugger/debug-interface-access/idiaenumframedata.md) interface for an example of how the `IDiaFrameData` interface is obtained. |
| 57 | + |
| 58 | +```C++ |
| 59 | +void PrintFrameData(IDiaFrameData* pFrameData){ |
| 60 | + DWORD dwSect; |
| 61 | + DWORD dwOffset; |
| 62 | + DWORD cbBlock; |
| 63 | + DWORD cbLocals; // Number of bytes reserved for the function locals |
| 64 | + DWORD cbParams; // Number of bytes reserved for the function arguments |
| 65 | + DWORD cbMaxStack; |
| 66 | + DWORD cbProlog; |
| 67 | + DWORD cbSavedRegs; |
| 68 | + BOOL bSEH; |
| 69 | + BOOL bEH; |
| 70 | + BOOL bStart; |
| 71 | + BSTR wszProgram; |
| 72 | + |
| 73 | + if(pFrameData->get_addressSection(&dwSect) == S_OK && |
| 74 | + pFrameData->get_addressOffset(&dwOffset) == S_OK && |
| 75 | + pFrameData->get_lengthBlock(&cbBlock) == S_OK && |
| 76 | + pFrameData->get_lengthLocals(&cbLocals) == S_OK && |
| 77 | + pFrameData->get_lengthParams(&cbParams) == S_OK && |
| 78 | + pFrameData->get_maxStack(&cbMaxStack) == S_OK && |
| 79 | + pFrameData->get_lengthProlog(&cbProlog) == S_OK && |
| 80 | + pFrameData->get_lengthSavedRegisters(&cbSavedRegs) == S_OK && |
| 81 | + pFrameData->get_systemExceptionHandling(&bSEH) == S_OK && |
| 82 | + pFrameData->get_cplusplusExceptionHandling(&bEH) == S_OK && |
| 83 | + pFrameData->get_functionStart(&bStart) == S_OK ) |
| 84 | + { |
| 85 | + wprintf(L"Frame address : %04X:%08X\n", dwSect, dwOffset); |
| 86 | + wprintf(L"Block size : 0x%8X\n", cbBlock); |
| 87 | + wprintf(L"Locals size : 0x%8X\n", cbLocals); |
| 88 | + wprintf(L"Parms size : 0x%8X\n", cbParams); |
| 89 | + wprintf(L"Max stack used : 0x%8X\n", cbMaxStack); |
| 90 | + wprintf(L"Prolog size : 0x%8X\n", cbProlog); |
| 91 | + wprintf(L"Saved regs size: 0x%8X\n", cbSavedRegs); |
| 92 | + wprintf(L"System Exception Handling: %c\n", bSEH ? L'Y' : L'N'); |
| 93 | + wprintf(L"C++ Exception Handling : %c\n", bEH ? L'Y' : L'N'); |
| 94 | + wprintf(L"Function starts in block : %c\n", bStart ? L'Y' : L'N'); |
| 95 | + |
| 96 | + if (pFrameData->get_program(&wszProgram) == S_OK) |
| 97 | + { |
| 98 | + wprintf(L"Program used for register set: %s\n", wszProgram); |
| 99 | + SysFreeString(wszProgram); |
| 100 | + } |
| 101 | + else |
| 102 | + { |
| 103 | + wprintf(L"\n"); |
| 104 | + } |
| 105 | + } |
| 106 | +} |
| 107 | +``` |
| 108 | +
|
| 109 | +## Requirements |
| 110 | +Header: Dia2.h |
| 111 | +
|
| 112 | +Library: diaguids.lib |
| 113 | +
|
| 114 | +DLL: msdia80.dll |
| 115 | +
|
| 116 | +## See Also |
| 117 | +[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
| 118 | +[IDiaEnumFrameData](../../debugger/debug-interface-access/idiaenumframedata.md) |
| 119 | +[IDiaEnumFrameData::Item](../../debugger/debug-interface-access/idiaenumframedata-item.md) |
| 120 | +[IDiaEnumFrameData::Next](../../debugger/debug-interface-access/idiaenumframedata-next.md) |
0 commit comments