Chapter 20. Configuration-Specific Information
163
This says that
i
is stored at offset
0xd30
from the page whose physical base address is
0x02698000
, and prints all the attributes of that page.
Note that you must cast the addresses of variables to a
char *
, since otherwise the value of
__djgpp_base_address
, the base address of all variables and functions in a djgpp program,
will be added using the rules of C pointer arithmetics: if
i
is declared an
int
, gdb will add 4
times the value of
__djgpp_base_address
to the address of
i
.
Here’s another example, it displays the Page Table entry for the transfer buffer:
(gdb) info dos address-pte *((unsigned *)&_go32_info 3)
Page Table entry for address 0x29110:
Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110
(The
+ 3
offset is because the transfer buffer’s address is the 3rd member of the
_go32_info_block
structure.) The output of this command clearly shows that addresses in
conventional memory are mapped 1:1, that is, the physical and linear addresses are identical.
This command is supported only with some DPMI servers.
20.1.4. Features for Debugging MS Windows PE executables
gdb supports native debugging of MS Windows programs, including DLLs with and without symbolic
debugging information. There are various additional Cygwin-specific commands, described in this
subsection. The subsubsection (refer to Section 20.1.4.1
Support for DLLs without debugging symbols
describes working with DLLs that have no debugging symbols.
info w32
This is a prefix of MS Windows specific commands which print information about the target
system and important OS structures.
info w32 selector
This command displays information returned by the Win32 API
GetThreadSelectorEntry
function. It takes an optional argument that is evaluated to a long value to give the information
about this given selector. Without argument, this command displays information about the the
six segment registers.
info dll
This is a Cygwin specific alias of info shared.
dll-symbols
This command loads symbols from a dll similarly to add-sym command but without the need to
specify a base address.
set new-console
mode
If
mode
is
on
the debuggee will be started in a new console on next start. If
mode
is
off
i, the
debuggee will be started in the same console as the debugger.
show new-console
Displays whether a new console is used when the debuggee is started.
Summary of Contents for ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Page 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......