Chapter 13. Debugging Programs That Use Overlays
105
overlay manual
Enable
manual
overlay debugging. In this mode, gdb relies on you to tell it which overlays are
mapped, and which are not, using the
overlay map-overlay
and
overlay unmap-overlay
commands described below.
overlay map-overlay
overlay
overlay map
overlay
Tell gdb that
overlay
is now mapped;
overlay
must be the name of the object file section con-
taining the overlay. When an overlay is mapped, gdb assumes it can find the overlay’s functions
and variables at their mapped addresses. gdb assumes that any other overlays whose mapped
ranges overlap that of
overlay
are now unmapped.
overlay unmap-overlay
overlay
overlay unmap
overlay
Tell gdb that
overlay
is no longer mapped;
overlay
must be the name of the object file section
containing the overlay. When an overlay is unmapped, gdb assumes it can find the overlay’s
functions and variables at their load addresses.
overlay auto
Enable
automatic
overlay debugging. In this mode, gdb consults a data structure the overlay
manager maintains in the inferior to see which overlays are mapped. For details, (refer to Section
13.3
Automatic Overlay Debugging
.
overlay load-target
overlay load
Re-read the overlay table from the inferior. Normally, gdb re-reads the table gdb automatically
each time the inferior stops, so this command should only be necessary if you have changed the
overlay mapping yourself using gdb. This command is only useful when using automatic overlay
debugging.
overlay list-overlays
overlay list
Display a list of the overlays currently mapped, along with their mapped addresses, load ad-
dresses, and sizes.
Normally, when gdb prints a code address, it includes the name of the function the address falls in:
(gdb) print main
$3 = {int ()} 0x11a0
,
main
-
When overlay debugging is enabled, gdb recognizes code in unmapped overlays, and prints the names
of unmapped functions with asterisks around them. For example, if
foo
is a function in an unmapped
overlay, gdb prints it this way:
(gdb) overlay list
No sections are mapped.
(gdb) print foo
$5 = {int (int)} 0x100000
,
*foo*
-
When
foo
’s overlay is mapped, gdb prints the function’s name normally:
Summary of Contents for ENTERPRISE LINUX 3 - SECURITY GUIDE
Page 1: ...Red Hat Enterprise Linux 3 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: ......