Skip to content

Commit 2b0b374

Browse files
authored
Merge pull request #3919 from Jak-MS/public-repo-2408
[PUBLIC_MOVE] Pulling commits from public PR #2408
2 parents 7922543 + b825241 commit 2b0b374

File tree

1 file changed

+87
-87
lines changed

1 file changed

+87
-87
lines changed

docs/debugger/debug-interface-access/idiaenumsymbolsbyaddr.md

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2,99 +2,99 @@
22
title: "IDiaEnumSymbolsByAddr | Microsoft Docs"
33
ms.date: "11/04/2016"
44
ms.topic: "conceptual"
5-
dev_langs:
5+
dev_langs:
66
- "C++"
7-
helpviewer_keywords:
7+
helpviewer_keywords:
88
- "IDiaEnumSymbolsbyAddr interface"
99
ms.assetid: 37d3dcdf-e4fa-4354-b5e1-8843566b52ac
1010
author: "mikejo5000"
1111
ms.author: "mikejo"
1212
manager: jillfra
13-
ms.workload:
13+
ms.workload:
1414
- "multiple"
1515
---
1616
# IDiaEnumSymbolsByAddr
17-
Enumerates by address the various symbols contained in the data source.
18-
19-
## Syntax
20-
21-
```
22-
IDiaEnumSymbolsByAddr : IUnknown
23-
```
24-
25-
## Methods in Vtable Order
26-
The following table shows the methods of `IDiaEnumSymbolsByAddr`.
27-
28-
|Method|Description|
29-
|------------|-----------------|
30-
|[IDiaEnumSymbolsByAddr::symbolByAddr](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-symbolbyaddr.md)|Positions the enumerator by performing a lookup by section and offset.|
31-
|[IDiaEnumSymbolsByAddr::symbolByRVA](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-symbolbyrva.md)|Positions the enumerator by performing a lookup by relative virtual address (RVA).|
32-
|[IDiaEnumSymbolsByAddr::symbolByVA](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-symbolbyva.md)|Positions the enumerator by performing a lookup by virtual address (VA).|
33-
|[IDiaEnumSymbolsByAddr::Next](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-next.md)|Retrieves the next symbols in order by address. Updates the enumerator position by number of elements fetched.|
34-
|[IDiaEnumSymbolsByAddr::Prev](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-prev.md)|Retrieves the previous symbols in order by address. Updates the enumerator position by number of elements fetched.|
35-
|[IDiaEnumSymbolsByAddr::Clone](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-clone.md)|Makes a copy of an object.|
36-
37-
## Remarks
38-
This interface provides symbols grouped by address. To work with symbols grouped by type, for example `SymTagUDT` (user-defined type) or `SymTagBaseClass`, use the [IDiaEnumSymbols](../../debugger/debug-interface-access/idiaenumsymbols.md) interface.
39-
40-
## Notes for Callers
41-
Obtain this interface by calling the [IDiaSession::getSymbolsByAddr](../../debugger/debug-interface-access/idiasession-getsymbolsbyaddr.md) method.
42-
43-
## Example
44-
This function displays the name and address of all symbols ordered by relative virtual address.
45-
46-
```C++
47-
void ShowSymbolsByAddress(IDiaSession *pSession)
48-
{
49-
CComPtr<IDiaEnumSymbolsByAddr> pEnumByAddr;
50-
if ( FAILED( psession->getSymbolsByAddr( &pEnumByAddr ) ) )
51-
{
52-
Fatal( "getSymbolsByAddr" );
53-
}
54-
CComPtr<IDiaSymbol> pSym;
55-
if ( FAILED( pEnumByAddr->symbolByAddr( 1, 0, &pSym ) ) )
56-
{
57-
Fatal( "symbolByAddr" );
58-
}
59-
DWORD rvaLast = 0;
60-
if ( pSym->get_relativeVirtualAddress( &rvaLast ) == S_OK )
61-
{
62-
pSym = 0;
63-
if ( FAILED( pEnumByAddr->symbolByRVA( rvaLast, &pSym ) ) )
64-
{
65-
Fatal( "symbolByAddr" );
66-
}
67-
printf( "Symbols in order\n" );
68-
do
69-
{
70-
CDiaBSTR name;
71-
if ( pSym->get_name( &name ) != S_OK )
72-
{
73-
printf( "\t0x%08X (%ws) <no name>\n", rvaLast );
74-
}
75-
else
76-
{
77-
printf( "\t0x%08X %ws\n", rvaLast, name );
78-
}
79-
pSym = 0;
80-
celt = 0;
81-
if ( FAILED( hr = pEnumByAddr->Next( 1, &pSym, &celt ) ) )
82-
{
83-
break;
84-
}
85-
} while ( celt == 1 );
86-
}
87-
}
88-
```
89-
90-
## Requirements
91-
Header: Dia2.h
92-
93-
Library: diaguids.lib
94-
95-
DLL: msdia80.dll
96-
97-
## See Also
98-
[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
99-
[IDiaSession::getSymbolsByAddr](../../debugger/debug-interface-access/idiasession-getsymbolsbyaddr.md)
100-
[IDiaEnumSymbols](../../debugger/debug-interface-access/idiaenumsymbols.md)
17+
Enumerates by address the various symbols contained in the data source.
18+
19+
## Syntax
20+
21+
```
22+
IDiaEnumSymbolsByAddr : IUnknown
23+
```
24+
25+
## Methods in Vtable Order
26+
The following table shows the methods of `IDiaEnumSymbolsByAddr`.
27+
28+
|Method|Description|
29+
|------------|-----------------|
30+
|[IDiaEnumSymbolsByAddr::symbolByAddr](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-symbolbyaddr.md)|Positions the enumerator by performing a lookup by section and offset.|
31+
|[IDiaEnumSymbolsByAddr::symbolByRVA](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-symbolbyrva.md)|Positions the enumerator by performing a lookup by relative virtual address (RVA).|
32+
|[IDiaEnumSymbolsByAddr::symbolByVA](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-symbolbyva.md)|Positions the enumerator by performing a lookup by virtual address (VA).|
33+
|[IDiaEnumSymbolsByAddr::Next](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-next.md)|Retrieves the next symbols in order by address. Updates the enumerator position by number of elements fetched.|
34+
|[IDiaEnumSymbolsByAddr::Prev](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-prev.md)|Retrieves the previous symbols in order by address. Updates the enumerator position by number of elements fetched.|
35+
|[IDiaEnumSymbolsByAddr::Clone](../../debugger/debug-interface-access/idiaenumsymbolsbyaddr-clone.md)|Makes a copy of an object.|
36+
37+
## Remarks
38+
This interface provides symbols grouped by address. To work with symbols grouped by type, for example `SymTagUDT` (user-defined type) or `SymTagBaseClass`, use the [IDiaEnumSymbols](../../debugger/debug-interface-access/idiaenumsymbols.md) interface.
39+
40+
## Notes for Callers
41+
Obtain this interface by calling the [IDiaSession::getSymbolsByAddr](../../debugger/debug-interface-access/idiasession-getsymbolsbyaddr.md) method.
42+
43+
## Example
44+
This function displays the name and address of all symbols ordered by relative virtual address.
45+
46+
```C++
47+
void ShowSymbolsByAddress(IDiaSession *pSession)
48+
{
49+
CComPtr<IDiaEnumSymbolsByAddr> pEnumByAddr;
50+
if ( FAILED( psession->getSymbolsByAddr( &pEnumByAddr ) ) )
51+
{
52+
Fatal( "getSymbolsByAddr" );
53+
}
54+
CComPtr<IDiaSymbol> pSym;
55+
if ( FAILED( pEnumByAddr->symbolByAddr( 1, 0, &pSym ) ) )
56+
{
57+
Fatal( "symbolByAddr" );
58+
}
59+
DWORD rvaLast = 0;
60+
if ( pSym->get_relativeVirtualAddress( &rvaLast ) == S_OK )
61+
{
62+
pSym = 0;
63+
if ( FAILED( pEnumByAddr->symbolByRVA( rvaLast, &pSym ) ) )
64+
{
65+
Fatal( "symbolByAddr" );
66+
}
67+
printf( "Symbols in order\n" );
68+
do
69+
{
70+
CDiaBSTR name;
71+
if ( pSym->get_name( &name ) != S_OK )
72+
{
73+
printf( "\t0x%08X (%ws) <no name>\n", rvaLast );
74+
}
75+
else
76+
{
77+
printf( "\t0x%08X %ws\n", rvaLast, name );
78+
}
79+
pSym = 0;
80+
celt = 0;
81+
if ( FAILED( hr = pEnumByAddr->Next( 1, &pSym, &celt ) ) )
82+
{
83+
break;
84+
}
85+
} while ( celt == 1 );
86+
}
87+
}
88+
```
89+
90+
## Requirements
91+
Header: Dia2.h
92+
93+
Library: diaguids.lib
94+
95+
DLL: msdia80.dll
96+
97+
## See Also
98+
[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
99+
[IDiaSession::getSymbolsByAddr](../../debugger/debug-interface-access/idiasession-getsymbolsbyaddr.md)
100+
[IDiaEnumSymbols](../../debugger/debug-interface-access/idiaenumsymbols.md)

0 commit comments

Comments
 (0)