Skip to content

Commit d17e50d

Browse files
authored
Delete unnecessary spaces
1 parent 3ae81cf commit d17e50d

File tree

1 file changed

+87
-87
lines changed

1 file changed

+87
-87
lines changed

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

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2,99 +2,99 @@
22
title: "IDiaSegment | 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
- "IDiaSegment interface"
99
ms.assetid: 384ae0e1-077e-4d4f-98de-ac43c32c882f
1010
author: "mikejo5000"
1111
ms.author: "mikejo"
1212
manager: jillfra
13-
ms.workload:
13+
ms.workload:
1414
- "multiple"
1515
---
1616
# IDiaSegment
17-
Maps data from the section number to segments of address space.
18-
19-
## Syntax
20-
21-
```
22-
IDiaSegment : IUnknown
23-
```
24-
25-
## Methods in Vtable Order
26-
The following table shows the methods of `IDiaSegment`.
27-
28-
|Method|Description|
29-
|------------|-----------------|
30-
|[IDiaSegment::get_frame](../../debugger/debug-interface-access/idiasegment-get-frame.md)|Retrieves the segment number.|
31-
|[IDiaSegment::get_offset](../../debugger/debug-interface-access/idiasegment-get-offset.md)|Retrieves the offset in segments where the section begins.|
32-
|[IDiaSegment::get_length](../../debugger/debug-interface-access/idiasegment-get-length.md)|Retrieves the number of bytes in the segment.|
33-
|[IDiaSegment::get_read](../../debugger/debug-interface-access/idiasegment-get-read.md)|Retrieves a flag that indicates whether the segment can be read.|
34-
|[IDiaSegment::get_write](../../debugger/debug-interface-access/idiasegment-get-write.md)|Retrieves a flag that indicates whether the segment can be modified.|
35-
|[IDiaSegment::get_execute](../../debugger/debug-interface-access/idiasegment-get-execute.md)|Retrieves a flag that indicates whether the segment is executable.|
36-
|[IDiaSegment::get_addressSection](../../debugger/debug-interface-access/idiasegment-get-addresssection.md)|Retrieves the section number that maps to this segment.|
37-
|[IDiaSegment::get_relativeVirtualAddress](../../debugger/debug-interface-access/idiasegment-get-relativevirtualaddress.md)|Retrieves the relative virtual address (RVA) of the beginning of the section.|
38-
|[IDiaSegment::get_virtualAddress](../../debugger/debug-interface-access/idiasegment-get-virtualaddress.md)|Retrieves the virtual address (VA) of the beginning of the section.|
39-
40-
## Remarks
41-
Because the DIA SDK already performs translations from the section offset to relative virtual addresses, most applications will not make use of the information in the segment map.
42-
43-
## Notes for Callers
44-
Obtain this interface by calling the [IDiaEnumSegments::Item](../../debugger/debug-interface-access/idiaenumsegments-item.md) or [IDiaEnumSegments::Next](../../debugger/debug-interface-access/idiaenumsegments-next.md) methods. See the example for details.
45-
46-
## Example
47-
This function displays the address of all segments in a table and the nearest symbol.
48-
49-
```C++
50-
void ShowSegments(IDiaTable *pTable, IDiaSession *pSession)
51-
{
52-
CComPtr<IDiaEnumSegments> pSegments;
53-
if ( SUCCEEDED( pTable->QueryInterface(
54-
_uuidof( IDiaEnumSegments ),
55-
(void**)&pSegments )
56-
)
57-
)
58-
{
59-
CComPtr<IDiaSegment> pSegment;
60-
while ( SUCCEEDED( hr = pSegments->Next( 1, &pSegment, &celt ) ) &&
61-
celt == 1 )
62-
{
63-
DWORD rva;
64-
DWORD seg;
65-
66-
pSegment->get_addressSection( &seg );
67-
if ( pSegment->get_relativeVirtualAddress( &rva ) == S_OK )
68-
{
69-
printf( "Segment %i addr: 0x%.8X\n", seg, rva );
70-
pSegment = NULL;
71-
72-
CComPtr<IDiaSymbol> pSym;
73-
if ( psession->findSymbolByRVA( rva, SymTagNull, &pSym ) == S_OK )
74-
{
75-
CDiaBSTR name;
76-
DWORD tag;
77-
78-
pSym->get_symTag( &tag );
79-
pSym->get_name( &name );
80-
printf( "\tClosest symbol: %ws (%ws)\n",
81-
name != NULL ? name : L"",
82-
szTags[ tag ] );
83-
}
84-
}
85-
}
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-
[IDiaEnumSegments::Item](../../debugger/debug-interface-access/idiaenumsegments-item.md)
100-
[IDiaEnumSegments::Next](../../debugger/debug-interface-access/idiaenumsegments-next.md)
17+
Maps data from the section number to segments of address space.
18+
19+
## Syntax
20+
21+
```
22+
IDiaSegment : IUnknown
23+
```
24+
25+
## Methods in Vtable Order
26+
The following table shows the methods of `IDiaSegment`.
27+
28+
|Method|Description|
29+
|------------|-----------------|
30+
|[IDiaSegment::get_frame](../../debugger/debug-interface-access/idiasegment-get-frame.md)|Retrieves the segment number.|
31+
|[IDiaSegment::get_offset](../../debugger/debug-interface-access/idiasegment-get-offset.md)|Retrieves the offset in segments where the section begins.|
32+
|[IDiaSegment::get_length](../../debugger/debug-interface-access/idiasegment-get-length.md)|Retrieves the number of bytes in the segment.|
33+
|[IDiaSegment::get_read](../../debugger/debug-interface-access/idiasegment-get-read.md)|Retrieves a flag that indicates whether the segment can be read.|
34+
|[IDiaSegment::get_write](../../debugger/debug-interface-access/idiasegment-get-write.md)|Retrieves a flag that indicates whether the segment can be modified.|
35+
|[IDiaSegment::get_execute](../../debugger/debug-interface-access/idiasegment-get-execute.md)|Retrieves a flag that indicates whether the segment is executable.|
36+
|[IDiaSegment::get_addressSection](../../debugger/debug-interface-access/idiasegment-get-addresssection.md)|Retrieves the section number that maps to this segment.|
37+
|[IDiaSegment::get_relativeVirtualAddress](../../debugger/debug-interface-access/idiasegment-get-relativevirtualaddress.md)|Retrieves the relative virtual address (RVA) of the beginning of the section.|
38+
|[IDiaSegment::get_virtualAddress](../../debugger/debug-interface-access/idiasegment-get-virtualaddress.md)|Retrieves the virtual address (VA) of the beginning of the section.|
39+
40+
## Remarks
41+
Because the DIA SDK already performs translations from the section offset to relative virtual addresses, most applications will not make use of the information in the segment map.
42+
43+
## Notes for Callers
44+
Obtain this interface by calling the [IDiaEnumSegments::Item](../../debugger/debug-interface-access/idiaenumsegments-item.md) or [IDiaEnumSegments::Next](../../debugger/debug-interface-access/idiaenumsegments-next.md) methods. See the example for details.
45+
46+
## Example
47+
This function displays the address of all segments in a table and the nearest symbol.
48+
49+
```C++
50+
void ShowSegments(IDiaTable *pTable, IDiaSession *pSession)
51+
{
52+
CComPtr<IDiaEnumSegments> pSegments;
53+
if ( SUCCEEDED( pTable->QueryInterface(
54+
_uuidof( IDiaEnumSegments ),
55+
(void**)&pSegments )
56+
)
57+
)
58+
{
59+
CComPtr<IDiaSegment> pSegment;
60+
while ( SUCCEEDED( hr = pSegments->Next( 1, &pSegment, &celt ) ) &&
61+
celt == 1 )
62+
{
63+
DWORD rva;
64+
DWORD seg;
65+
66+
pSegment->get_addressSection( &seg );
67+
if ( pSegment->get_relativeVirtualAddress( &rva ) == S_OK )
68+
{
69+
printf( "Segment %i addr: 0x%.8X\n", seg, rva );
70+
pSegment = NULL;
71+
72+
CComPtr<IDiaSymbol> pSym;
73+
if ( psession->findSymbolByRVA( rva, SymTagNull, &pSym ) == S_OK )
74+
{
75+
CDiaBSTR name;
76+
DWORD tag;
77+
78+
pSym->get_symTag( &tag );
79+
pSym->get_name( &name );
80+
printf( "\tClosest symbol: %ws (%ws)\n",
81+
name != NULL ? name : L"",
82+
szTags[ tag ] );
83+
}
84+
}
85+
}
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+
[IDiaEnumSegments::Item](../../debugger/debug-interface-access/idiaenumsegments-item.md)
100+
[IDiaEnumSegments::Next](../../debugger/debug-interface-access/idiaenumsegments-next.md)

0 commit comments

Comments
 (0)