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:
Содержание 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: ......