162
Chapter 20. Configuration-Specific Information
info dos sysinfo
This command displays assorted information about the underlying platform: the CPU type and
features, the OS version and flavor, the DPMI version, and the available conventional and DPMI
memory.
info dos gdt
info dos ldt
info dos idt
These 3 commands display entries from, respectively, Global, Local, and Interrupt Descriptor
Tables (GDT, LDT, and IDT). The descriptor tables are data structures which store a descriptor
for each segment that is currently in use. The segment’s selector is an index into a descriptor
table; the table entry for that index holds the descriptor’s base address and limit, and its attributes
and access rights.
A typical djgpp program uses 3 segments: a code segment, a data segment (used for both data
and the stack), and a DOS segment (which allows access to DOS/BIOS data structures and abso-
lute addresses in conventional memory). However, the DPMI host will usually define additional
segments in order to support the DPMI environment.
These commands allow to display entries from the descriptor tables. Without an argument, all
entries from the specified table are displayed. An argument, which should be an integer expres-
sion, means display a single entry whose index is given by the argument. For example, here’s a
convenient way to display information about the debugged program’s data segment:
(gdb) info dos ldt $ds
0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)
This comes in handy when you want to see whether a pointer is outside the data segment’s limit
(that is,
garbled
).
info dos pde
info dos pte
These two commands display entries from, respectively, the Page Directory and the Page Tables.
Page Directories and Page Tables are data structures which control how virtual memory addresses
are mapped into physical addresses. A Page Table includes an entry for every page of memory
that is mapped into the program’s address space; there may be several Page Tables, each one
holding up to 4096 entries. A Page Directory has up to 4096 entries, one each for every Page
Table that is currently in use.
Without an argument,
info dos pde
displays the entire Page Directory, and
info dos
pte
displays all the entries in all of the Page Tables. An argument, an integer expression, given
to the
info dos pde
command means display only that entry from the Page Directory table.
An argument given to the
info dos pte
command means display entries from a single Page
Table, the one pointed to by the specified entry in the Page Directory.
These commands are useful when your program uses
DMA
(Direct Memory Access), which
needs physical addresses to program the DMA controller.
These commands are supported only with some DPMI servers.
info dos address-pte
addr
This command displays the Page Table entry for a specified linear address. The argument linear
address
addr
should already have the appropriate segment’s base address added to it, because
this command accepts addresses which may belong to
any
segment. For example, here’s how to
display the Page Table entry for the page where the variable
i
is stored:
(gdb) info dos address-pte __djgpp_base_a (char *)&i
Page Table entry for address 0x11a00d30:
Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30
Содержание ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Страница 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Страница 12: ...2 Chapter 1 Debugging with gdb ...
Страница 28: ...18 Chapter 4 Getting In and Out of gdb ...
Страница 34: ...24 Chapter 5 gdb Commands ...
Страница 44: ...34 Chapter 6 Running Programs Under gdb ...
Страница 68: ...58 Chapter 8 Examining the Stack ...
Страница 98: ...88 Chapter 10 Examining Data ...
Страница 112: ...102 Chapter 12 Tracepoints ...
Страница 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Страница 138: ...128 Chapter 14 Using gdb with Different Languages ...
Страница 144: ...134 Chapter 15 Examining the Symbol Table ...
Страница 170: ...160 Chapter 19 Debugging remote programs ...
Страница 198: ...188 Chapter 21 Controlling gdb ...
Страница 204: ...194 Chapter 22 Canned Sequences of Commands ...
Страница 206: ...196 Chapter 23 Command Interpreters ...
Страница 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Страница 296: ...286 Chapter 27 gdb Annotations ...
Страница 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Страница 322: ...312 Chapter 30 Using History Interactively ...
Страница 362: ...352 Appendix D gdb Remote Serial Protocol ...
Страница 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Страница 386: ...376 Appendix G GNU Free Documentation License ...
Страница 410: ......