* gdb.texinfo (How Overlays Work): Shrink the overlay diagram.
This commit is contained in:
parent
78b29b405f
commit
c928edc06b
|
@ -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>
|
2002-02-06 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
* gdb.texinfo (overlays): Mention new magic symbol
|
* gdb.texinfo (overlays): Mention new magic symbol
|
||||||
|
|
|
@ -6362,6 +6362,10 @@ 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
|
for it in the instruction memory, and then jump to its entry point
|
||||||
there.
|
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
|
@example
|
||||||
@group
|
@group
|
||||||
Data Instruction Larger
|
Data Instruction Larger
|
||||||
|
@ -6369,37 +6373,37 @@ Address Space Address Space Address Space
|
||||||
+-----------+ +-----------+ +-----------+
|
+-----------+ +-----------+ +-----------+
|
||||||
| | | | | |
|
| | | | | |
|
||||||
+-----------+ +-----------+ +-----------+<-- overlay 1
|
+-----------+ +-----------+ +-----------+<-- overlay 1
|
||||||
| program | | main | | | load address
|
| program | | main | .----| overlay 1 | load address
|
||||||
| variables | | program | | overlay 1 |
|
| variables | | program | | +-----------+
|
||||||
| and heap | | | ,---| |
|
| and heap | | | | | |
|
||||||
+-----------+ | | | | |
|
+-----------+ | | | +-----------+<-- overlay 2
|
||||||
| | +-----------+ | +-----------+
|
| | +-----------+ | | | load address
|
||||||
+-----------+ | | | | |
|
+-----------+ | | | .-| overlay 2 |
|
||||||
mapped --->+-----------+ / +-----------+<-- overlay 2
|
| | | | | |
|
||||||
address | overlay | <-' | overlay 2 | load address
|
mapped --->+-----------+ | | +-----------+
|
||||||
| area | <-----| |
|
address | | | | | |
|
||||||
| | <---. +-----------+
|
| overlay | <-' | | |
|
||||||
| | | | |
|
| area | <---' +-----------+<-- overlay 3
|
||||||
+-----------+ | | |
|
| | <---. | | load address
|
||||||
| | | +-----------+<-- overlay 3
|
+-----------+ `--| overlay 3 |
|
||||||
+-----------+ `--| | load address
|
| | | |
|
||||||
| overlay 3 |
|
+-----------+ | |
|
||||||
| |
|
|
||||||
+-----------+
|
+-----------+
|
||||||
| |
|
| |
|
||||||
+-----------+
|
+-----------+
|
||||||
|
|
||||||
To map an overlay, copy its code from the larger address space
|
@anchor{A code overlay}A code overlay
|
||||||
to the instruction address space. Since the overlays shown here
|
|
||||||
all use the same mapped address, only one may be mapped at a time.
|
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
This diagram shows a system with separate data and instruction address
|
The diagram (@pxref{A code overlay}) shows a system with separate data
|
||||||
spaces. For a system with a single address space for data and
|
and instruction address spaces. To map an overlay, the program copies
|
||||||
instructions, the diagram would be similar, except that the program
|
its code from the larger address space to the instruction address space.
|
||||||
variables and heap would share an address space with the main program
|
Since the overlays shown here all use the same mapped address, only one
|
||||||
and the overlay area.
|
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
|
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
|
@dfn{mapped} overlay; its @dfn{mapped address} is its address in the
|
||||||
|
|
Loading…
Reference in New Issue