diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-02-07 23:58:41 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-02-07 23:58:41 +0000 |
commit | c928edc06bbc532ca5267e86e80e24e10ad9297f (patch) | |
tree | 06719b8526652fe9887b634c8e5ac7ea70f9b582 /gdb/doc | |
parent | 78b29b405f3dc1907cb7fbb81c16563e3b1754ba (diff) | |
download | binutils-c928edc06bbc532ca5267e86e80e24e10ad9297f.tar.gz binutils-c928edc06bbc532ca5267e86e80e24e10ad9297f.tar.bz2 binutils-c928edc06bbc532ca5267e86e80e24e10ad9297f.zip |
* gdb.texinfo (How Overlays Work): Shrink the overlay diagram.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 70 |
2 files changed, 41 insertions, 33 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 891851c0796..f648cc293e4 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2002-02-07 Andrew Cagney <ac131313@redhat.com> + + * gdb.texinfo (How Overlays Work): Shrink the overlay diagram. + 2002-02-06 Michael Snyder <msnyder@redhat.com> * gdb.texinfo (overlays): Mention new magic symbol diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 902d7653caf..1f6634c11d7 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -6362,44 +6362,48 @@ overlay's machine code from the large memory into the space set aside for it in the instruction memory, and then jump to its entry point there. +@c NB: In the below the mapped area's size is greater or equal to the +@c size of all overlays. This is intentional to remind the developer +@c that overlays don't necessarily need to be the same size. + @example @group - Data Instruction Larger -Address Space Address Space Address Space -+-----------+ +-----------+ +-----------+ -| | | | | | -+-----------+ +-----------+ +-----------+<-- overlay 1 -| program | | main | | | load address -| variables | | program | | overlay 1 | -| and heap | | | ,---| | -+-----------+ | | | | | -| | +-----------+ | +-----------+ -+-----------+ | | | | | - mapped --->+-----------+ / +-----------+<-- overlay 2 - address | overlay | <-' | overlay 2 | load address - | area | <-----| | - | | <---. +-----------+ - | | | | | - +-----------+ | | | - | | | +-----------+<-- overlay 3 - +-----------+ `--| | load address - | overlay 3 | - | | - +-----------+ - | | - +-----------+ - - To map an overlay, copy its code from the larger address space - to the instruction address space. Since the overlays shown here - all use the same mapped address, only one may be mapped at a time. + Data Instruction Larger +Address Space Address Space Address Space ++-----------+ +-----------+ +-----------+ +| | | | | | ++-----------+ +-----------+ +-----------+<-- overlay 1 +| program | | main | .----| overlay 1 | load address +| variables | | program | | +-----------+ +| and heap | | | | | | ++-----------+ | | | +-----------+<-- overlay 2 +| | +-----------+ | | | load address ++-----------+ | | | .-| overlay 2 | + | | | | | | + mapped --->+-----------+ | | +-----------+ + address | | | | | | + | overlay | <-' | | | + | area | <---' +-----------+<-- overlay 3 + | | <---. | | load address + +-----------+ `--| overlay 3 | + | | | | + +-----------+ | | + +-----------+ + | | + +-----------+ + + @anchor{A code overlay}A code overlay @end group @end example -This diagram shows a system with separate data and instruction address -spaces. For a system with a single address space for data and -instructions, the diagram would be similar, except that the program -variables and heap would share an address space with the main program -and the overlay area. +The diagram (@pxref{A code overlay}) shows a system with separate data +and instruction address spaces. To map an overlay, the program copies +its code from the larger address space to the instruction address space. +Since the overlays shown here all use the same mapped address, only one +may be mapped at a time. For a system with a single address space for +data and instructions, the diagram would be similar, except that the +program variables and heap would share an address space with the main +program and the overlay area. An overlay loaded into instruction memory and ready for use is called a @dfn{mapped} overlay; its @dfn{mapped address} is its address in the |