This file documents the GNU debugger @value{GDBN}.
@c !!set edition, date, version
-This is Edition 4.07, January 1993,
+This is Edition 4.09, April 1993,
of @cite{Debugging with @value{GDBN}: the GNU Source-Level Debugger}
for GDB Version @value{GDBVN}.
@title Debugging with @value{GDBN}
@subtitle The GNU Source-Level Debugger
@ifclear GENERIC
-@subtitle on @value{TARGET} Systems
+@subtitle (@value{TARGET})
@end ifclear
@sp 1
@c !!set edition, date, version
-@subtitle Edition 4.07, for @value{GDBN} version @value{GDBVN}
-@subtitle January 1993
+@subtitle Edition 4.09, for @value{GDBN} version @value{GDBVN}
+@subtitle April 1993
@author by Richard M. Stallman and Roland H. Pesch
@page
@tex
This file describes @value{GDBN}, the GNU symbolic debugger.
@c !!set edition, date, version
-This is Edition 4.07, January 1993, for GDB Version @value{GDBVN}.
+This is Edition 4.09, April 1993, for GDB Version @value{GDBVN}.
@menu
* Summary:: Summary of @value{GDBN}
symbols.
@end ifclear
-Hitachi America, Ltd. sponsored the support for the H8/300 and H8/500.
+Hitachi America, Ltd. sponsored the support for Hitachi microprocessors.
@ifset NOVEL
@node New Features
@node Invoking GDB
@section Invoking @value{GDBN}
-@ifset HviiiEXCLUSIVE
+@ifset H8EXCLUSIVE
For details on starting up @value{GDBP} as a
-remote debugger attached to a Hitachi H8/300 or H8/500 board, see @ref{Hitachi
-H8 Remote,,@value{GDBN} and the Hitachi H8/300 and H8/500}.
+remote debugger attached to a Hitachi microprocessor, see @ref{Hitachi
+Remote,,@value{GDBN} and Hitachi Microprocessors}.
@end ifset
Invoke @value{GDBN} by running the program @code{@value{GDBP}}. Once started,
@ifset REMOTESTUB
* Remote Serial:: @value{GDBN} remote serial protocol
@end ifset
-@ifset Icmlx
+@ifset I960
* i960-Nindy Remote:: @value{GDBN} with a remote i960 (Nindy)
@end ifset
-@ifset AMDxxixK
+@ifset AMD29K
* UDI29K Remote:: @value{GDBN} and the UDI protocol for AMD29K
* EB29K Remote:: @value{GDBN} with a remote EB29K
@end ifset
@ifset VXWORKS
* VxWorks Remote:: @value{GDBN} and VxWorks
@end ifset
-@ifset STmm
+@ifset ST2000
* ST2000 Remote:: @value{GDBN} with a Tandem ST2000
@end ifset
-@ifset Hviii
-* Hitachi H8 Remote:: @value{GDBN} and the Hitachi H8/300 and H8/500
+@ifset H8
+* Hitachi Remote:: @value{GDBN} and Hitachi Microprocessors
@end ifset
@ifset SIMS
* Simulator:: Simulated CPU target
inclusive, second exclusive) to dump.
@end table
-@ifclear HviiiEXCLUSIVE
+@ifclear H8EXCLUSIVE
We can use @code{disassemble} to inspect the object code
range shown in the last @code{info line} example (the example
shows SPARC machine instructions):
@end smallexample
@end ifclear
-@ifset HviiiEXCLUSIVE
+@ifset H8EXCLUSIVE
For example, here is the beginning of the output for the
disassembly of a function @code{fact}:
* Value History:: Value history
* Convenience Vars:: Convenience variables
* Registers:: Registers
-@ifclear HviiiEXCLUSIVE
+@ifclear HAVE-FLOAT
* Floating Point Hardware:: Floating point hardware
@end ifclear
@end menu
@value{GDBN} is unable to locate the saved registers, the selected stack
frame will make no difference.
-@ifset AMDxxixK
+@ifset AMD29K
@table @code
@item set rstack_high_address @var{address}
@kindex set rstack_high_address
@end table
@end ifset
-@ifclear HviiiEXCLUSIVE
+@ifclear HAVE-FLOAT
@node Floating Point Hardware
@section Floating point hardware
@cindex floating point
current target system as well as adding its symbols in @value{GDBN}.
@end ifset
-@ifset Icmlx
+@ifset I960
@cindex download to Nindy-960
With the Nindy interface to an Intel 960 board, @code{load} will
download @var{filename} to the 960 as well as adding its symbols in
@value{GDBN}.
@end ifset
-@ifset Hviii
+@ifset H8
@cindex download to H8/300 or H8/500
@cindex H8/300 or H8/500 download
-When you select remote debugging to a Hitachi H8/300 or H8/500 board
-(@pxref{Hitachi H8 Remote,,@value{GDBN} and the Hitachi H8/300 and H8/500}),
+@c start-sanitize-Hitachi-SH
+@cindex download to Hitachi SH
+@cindex Hitachi SH download
+@c end-sanitize-Hitachi-SH
+When you select remote debugging to a Hitachi
+@c start-sanitize-Hitachi-SH
+SH,
+@c end-sanitize-Hitachi-SH
+H8/300, or H8/500 board
+(@pxref{Hitachi Remote,,@value{GDBN} and Hitachi Microprocessors}),
the @code{load} command downloads your program to the Hitachi board and also
opens it as the current executable target for @value{GDBN} on your host
(like the @code{file} command).
CPU simulator. @xref{Simulator,,Simulated CPU Target}.
@end ifset
-@ifset AMDxxixK
+@ifset AMD29K
@item target udi @var{keyword}
@kindex target udi
Remote AMD29K target, using the AMD UDI protocol. The @var{keyword}
@xref{EB29K Remote, ,@value{GDBN} with a remote EB29K}.
@end ifset
-@ifset Hviii
+@ifset H8
@item target hms
@kindex target hms
-A Hitachi H8/300 or H8/500 board, attached via serial line to your host. Use
-special commands @code{device} and @code{speed} to control the serial
-line and the communications speed used. @xref{Hitachi H8
-Remote,,@value{GDBN} and the Hitachi H8/300 and H8/500}.
+A Hitachi
+@c start-sanitize-Hitachi-SH
+SH,
+@c end-sanitize-Hitachi-SH
+H8/300, or H8/500 board, attached via serial line to your host.
+@ifclear H8EXCLUSIVE
+@c Unix only, not currently of interest for H8-only manual
+Use special commands @code{device} and @code{speed} to control the serial
+line and the communications speed used.
+@end ifclear
+@xref{Hitachi Remote,,@value{GDBN} and Hitachi Microprocessors}.
@end ifset
-@ifset Icmlx
+@ifset I960
@item target nindy @var{devicename}
@kindex target nindy
An Intel 960 board controlled by a Nindy Monitor. @var{devicename} is
@file{/dev/ttya}. @xref{i960-Nindy Remote, ,@value{GDBN} with a remote i960 (Nindy)}.
@end ifset
-@ifset STmm
+@ifset ST2000
@item target st2000 @var{dev} @var{speed}
@kindex target st2000
A Tandem ST2000 phone switch, running Tandem's STDBUG protocol. @var{dev}
@ifset REMOTESTUB
* Remote Serial:: @value{GDBN} remote serial protocol
@end ifset
-@ifset Icmlx
+@ifset I960
* i960-Nindy Remote:: @value{GDBN} with a remote i960 (Nindy)
@end ifset
-@ifset AMDxxixK
+@ifset AMD29K
* UDI29K Remote:: @value{GDBN} and the UDI protocol for AMD29K
* EB29K Remote:: @value{GDBN} with a remote EB29K
@end ifset
@ifset VXWORKS
* VxWorks Remote:: @value{GDBN} and VxWorks
@end ifset
-@ifset STmm
+@ifset ST2000
* ST2000 Remote:: @value{GDBN} with a Tandem ST2000
@end ifset
-@ifset Hviii
-* Hitachi H8 Remote:: @value{GDBN} and the Hitachi H8/300 and H8/500
+@ifset H8
+* Hitachi Remote:: @value{GDBN} and Hitachi Microprocessors
@end ifset
@ifset SIMS
* Simulator:: Simulated CPU target
remotedebug} will show you its current state.
@end ifset
-@ifset Icmlx
+@ifset I960
@node i960-Nindy Remote
@subsection @value{GDBN} with a remote i960 (Nindy)
@c @end group
@end ifset
-@ifset AMDxxixK
+@ifset AMD29K
@node UDI29K Remote
@subsection @value{GDBN} and the UDI protocol for AMD29K
@end ifset
-@ifset STmm
+@ifset ST2000
@node ST2000 Remote
@subsection @value{GDBN} with a Tandem ST2000
the time of attachment.
@end ifset
-@ifset Hviii
-@node Hitachi H8 Remote
-@subsection @value{GDBN} and the Hitachi H8/300 and H8/500
-@value{GDBN} needs to know these things to talk to your H8/300 or H8/500:
+@ifset H8
+@node Hitachi Remote
+@subsection @value{GDBN} and Hitachi Microprocessors
+@value{GDBN} needs to know these things to talk to your
+Hitachi SH, H8/300, or H8/500:
@enumerate
@item
-that you want to use @samp{target hms}, the remote debugging
-interface for the H8/300 and H8/500 (this is the default when
-GDB is configured specifically for the H8/300 or H8/500);
+that you want to use @samp{target hms}, the remote debugging interface
+for Hitachi microprocessors (this is the default when GDB is configured
+specifically for the Hitachi SH, H8/300, or H8/500);
@item
what serial device connects your host to your Hitachi board (the first
@end ignore
@end enumerate
-@ignore
+@ifclear H8EXCLUSIVE
@c only for Unix hosts
@kindex device
-@cindex serial device, H8/300 or H8/500
+@cindex serial device, Hitachi micros
Use the special @code{@value{GDBP}} command @samp{device @var{port}} if you
need to explicitly set the serial device. The default @var{port} is the
first available port on your host. This is only necessary on Unix
hosts, where it is typically something like @file{/dev/ttya}.
@kindex speed
-@cindex serial line speed, H8/300 or H8/500
+@cindex serial line speed, Hitachi micros
@code{@value{GDBP}} has another special command to set the communications
speed: @samp{speed @var{bps}}. This command also is only used from Unix
hosts; on DOS hosts, set the line speed as usual from outside GDB with
the DOS @kbd{mode} command (for instance, @w{@samp{mode
com2:9600,n,8,1,p}} for a 9600 bps connection).
-@end ignore
+The @samp{device} and @samp{speed} commands are available only when you
+use a Unix host to debug your Hitachi microprocessor programs. If you
+use a DOS host,
+@end ifclear
@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
called @code{asynctsr} to communicate with the development board
through a PC serial port. You must also use the DOS @code{mode} command
to set up the serial port on the DOS side.
+@ifset DOSHOST
The following sample session illustrates the steps needed to start a
-program under @value{GDBN} control on an H8/300. The example uses a sample
-H8/300 program called @file{t.x}.
+program under @value{GDBN} control on an H8/300. The example uses a
+sample H8/300 program called @file{t.x}. The procedure is the same for
+the Hitachi SH and the H8/500.
First hook up your development board. In this example, we use a
board attached to serial port @code{COM2}; if you use a different serial
In either case, @value{GDBN} will see the effect of a @sc{reset} on the
development board as a ``normal exit'' of your program.
@end ifset
+@end ifset
@ifset SIMS
@node Simulator
@ifset GENERIC
@cindex simulator
@cindex simulator, Z8000
-@cindex simulator, H8/300 or H8/500
@cindex Z8000 simulator
+@cindex simulator, H8/300 or H8/500
@cindex H8/300 or H8/500 simulator
+@cindex simulator, Hitachi SH
+@cindex Hitachi SH simulator
@cindex CPU simulator
For some configurations, @value{GDBN} includes a CPU simulator that you
can use instead of a hardware CPU to debug your programs. Currently,
a simulator is available when @value{GDBN} is configured to debug Zilog
-Z8000 or Hitachi H8/300 or H8/500 targets.
+Z8000 or Hitachi microprocessor targets.
@end ifset
@ifclear GENERIC
-@ifset Hviii
+@ifset H8
@cindex simulator, H8/300 or H8/500
@cindex Hitachi H8/300 or H8/500 simulator
-When configured for debugging Hitachi H8/300 or H8/500 targets,
-@value{GDBN} includes an H8/300 or H8/500 CPU simulator.
+@cindex simulator, Hitachi SH
+@cindex Hitachi SH simulator
+When configured for debugging Hitachi microprocessor targets,
+@value{GDBN} includes a CPU simulator for the target chip (a Hitachi SH,
+H8/300, or H8/500).
@end ifset
-@ifset ZviiiK
+@ifset Z8K
@cindex simulator, Z8000
@cindex Zilog Z8000 simulator
When configured for debugging Zilog Z8000 targets, @value{GDBN} includes
@end ifset
@end ifclear
-@ifset ZviiiK
+@ifset Z8K
For the Z8000 family, @samp{target sim} simulates either the Z8002 (the
unsegmented variant of the Z8000 architecture) or the Z8001 (the
segmented variant). The simulator recognizes which architecture is