📄 gdbinv-s.m4.in
字号:
program counter or from @var{addr} if supplied.@item kKill the target program.@item ?Report the most recent signal. To allow you to take advantage of the_GDBN__ signal handling commands, one of the functions of the debuggingstub is to report CPU traps as the corresponding POSIX signal values.@end table@kindex set remotedebug@kindex show remotedebug@cindex packets, reporting on stdout@cindex serial connections, debuggingIf you have trouble with the serial connection, you can use the command@code{set remotedebug}. This makes _GDBN__ report on all packets sentback and forth across the serial line to the remote machine. Thepacket-debugging information is printed on the _GDBN__ standard outputstream. @code{set remotedebug off} turns it off, and @code{showremotedebug} will show you its current state._fi__(_REMOTESTUB__)_if__(_I960__)@node i960-Nindy Remote@subsection _GDBN__ with a Remote i960 (Nindy)@cindex Nindy@cindex i960@dfn{Nindy} is a ROM Monitor program for Intel 960 target systems. When_GDBN__ is configured to control a remote Intel 960 using Nindy, you cantell _GDBN__ how to connect to the 960 in several ways:@itemize @bullet@itemThrough command line options specifying serial port, version of theNindy protocol, and communications speed;@itemBy responding to a prompt on startup;@itemBy using the @code{target} command at any point during your _GDBN__session. @xref{Target Commands, ,Commands for Managing Targets}.@end itemize@menu* Nindy Startup:: Startup with Nindy* Nindy Options:: Options for Nindy* Nindy reset:: Nindy Reset Command@end menu@node Nindy Startup@subsubsection Startup with NindyIf you simply start @code{_GDBP__} without using any command-lineoptions, you are prompted for what serial port to use, @emph{before} youreach the ordinary _GDBN__ prompt:@exampleAttach /dev/ttyNN -- specify NN, or "quit" to quit: @end example@noindentRespond to the prompt with whatever suffix (after @samp{/dev/tty})identifies the serial port you want to use. You can, if you choose,simply start up with no Nindy connection by responding to the promptwith an empty line. If you do this, and later wish to attach to Nindy,use @code{target} (@pxref{Target Commands, ,Commands for Managing Targets}).@node Nindy Options@subsubsection Options for NindyThese are the startup options for beginning your _GDBN__ session with aNindy-960 board attached:@table @code@item -r @var{port}Specify the serial port name of a serial interface to be used to connectto the target system. This option is only available when _GDBN__ isconfigured for the Intel 960 target architecture. You may specify@var{port} as any of: a full pathname (e.g. @samp{-r /dev/ttya}), adevice name in @file{/dev} (e.g. @samp{-r ttya}), or simply the uniquesuffix for a specific @code{tty} (e.g. @samp{-r a}).@item -O(An uppercase letter ``O'', not a zero.) Specify that _GDBN__ should usethe ``old'' Nindy monitor protocol to connect to the target system.This option is only available when _GDBN__ is configured for the Intel 960target architecture.@quotation@emph{Warning:} if you specify @samp{-O}, but are actually trying toconnect to a target system that expects the newer protocol, the connectionwill fail, appearing to be a speed mismatch. _GDBN__ will repeatedlyattempt to reconnect at several different line speeds. You can abortthis process with an interrupt.@end quotation@item -brkSpecify that _GDBN__ should first send a @code{BREAK} signal to the targetsystem, in an attempt to reset it, before connecting to a Nindy target.@quotation@emph{Warning:} Many target systems do not have the hardware that thisrequires; it only works with a few boards.@end quotation@end tableThe standard @samp{-b} option controls the line speed used on the serialport.@c @group@node Nindy reset@subsubsection Nindy Reset Command@table @code@item reset@kindex resetFor a Nindy target, this command sends a ``break'' to the remote targetsystem; this is only useful if the target has been equipped with acircuit to perform a hard reset (or some other interesting action) whena break is detected.@end table@c @end group_fi__(_I960__)_if__(_AMD29K__)@node EB29K Remote@subsection _GDBN__ with a Remote EB29K@cindex EB29K board@cindex running 29K programsTo use _GDBN__ from a Unix system to run programs on AMD's EB29Kboard in a PC, you must first connect a serial cable between the PCand a serial port on the Unix system. In the following, we assumeyou've hooked the cable between the PC's @file{COM1} port and@file{/dev/ttya} on the Unix system.@menu* Comms (EB29K):: Communications Setup* _GDBP__-EB29K:: EB29K cross-debugging* Remote Log:: Remote Log@end menu@node Comms (EB29K)@subsubsection Communications SetupThe next step is to set up the PC's port, by doing something like thefollowing in DOS on the PC:_0__@exampleC:\> MODE com1:9600,n,8,1,none_1__@end example@noindentThis example---run on an MS DOS 4.0 system---sets the PC port to 9600bps, no parity, eight data bits, one stop bit, and no ``retry'' action;you must match the communications parameters when establishing the Unixend of the connection as well.@c FIXME: Who knows what this "no retry action" crud from the DOS manual may@c mean? It's optional; leave it out? ---pesch@cygnus.com, 25feb91 To give control of the PC to the Unix side of the serial line, typethe following at the DOS console:_0__@exampleC:\> CTTY com1_1__@end example@noindent(Later, if you wish to return control to the DOS console, you can usethe command @code{CTTY con}---but you must send it over the device thathad control, in our example over the @file{COM1} serial line).From the Unix host, use a communications program such as @code{tip} or@code{cu} to communicate with the PC; for example,@examplecu -s 9600 -l /dev/ttya@end example@noindentThe @code{cu} options shown specify, respectively, the linespeed and theserial port to use. If you use @code{tip} instead, your command linemay look something like the following:@exampletip -9600 /dev/ttya@end example@noindentYour system may define a different name where our example uses@file{/dev/ttya} as the argument to @code{tip}. The communicationsparameters, including which port to use, are associated with the@code{tip} argument in the ``remote'' descriptions file---normally thesystem table @file{/etc/remote}.@c FIXME: What if anything needs doing to match the "n,8,1,none" part of@c the DOS side's comms setup? cu can support -o (odd@c parity), -e (even parity)---apparently no settings for no parity or@c for character size. Taken from stty maybe...? John points out tip@c can set these as internal variables, eg ~s parity=none; man stty@c suggests that it *might* work to stty these options with stdin or@c stdout redirected... ---pesch@cygnus.com, 25feb91@kindex EBMONUsing the @code{tip} or @code{cu} connection, change the DOS workingdirectory to the directory containing a copy of your 29K program, thenstart the PC program @code{EBMON} (an EB29K control program suppliedwith your board by AMD). You should see an initial display from@code{EBMON} similar to the one that follows, ending with the@code{EBMON} prompt @samp{#}---_0__@exampleC:\> G:G:\> CD \usr\joe\work29kG:\USR\JOE\WORK29K> EBMONAm29000 PC Coprocessor Board Monitor, version 3.0-18Copyright 1990 Advanced Micro Devices, Inc.Written by Gibbons and Associates, Inc.Enter '?' or 'H' for helpPC Coprocessor Type = EB29KI/O Base = 0x208Memory Base = 0xd0000Data Memory Size = 2048KBAvailable I-RAM Range = 0x8000 to 0x1fffffAvailable D-RAM Range = 0x80002000 to 0x801fffffPageSize = 0x400Register Stack Size = 0x800Memory Stack Size = 0x1800CPU PRL = 0x3Am29027 Available = NoByte Write Available = Yes# ~._1__@end exampleThen exit the @code{cu} or @code{tip} program (done in the example bytyping @code{~.} at the @code{EBMON} prompt). @code{EBMON} will keeprunning, ready for _GDBN__ to take over.For this example, we've assumed what is probably the most convenientway to make sure the same 29K program is on both the PC and the Unixsystem: a PC/NFS connection that establishes ``drive @code{G:}'' on thePC as a file system on the Unix host. If you do not have PC/NFS orsomething similar connecting the two systems, you must arrange someother way---perhaps floppy-disk transfer---of getting the 29K programfrom the Unix system to the PC; _GDBN__ will @emph{not} download it over theserial line.@node _GDBP__-EB29K@subsubsection EB29K cross-debuggingFinally, @code{cd} to the directory containing an image of your 29Kprogram on the Unix system, and start _GDBN__---specifying as argument thename of your 29K program:@examplecd /usr/joe/work29k_GDBP__ myfoo@end exampleNow you can use the @code{target} command:@exampletarget amd-eb /dev/ttya 9600 MYFOO@c FIXME: test above 'target amd-eb' as spelled, with caps! caps are meant to@c emphasize that this is the name as seen by DOS (since I think DOS is@c single-minded about case of letters). ---pesch@cygnus.com, 25feb91@end example@noindentIn this example, we've assumed your program is in a file called@file{myfoo}. Note that the filename given as the last argument to@code{target amd-eb} should be the name of the program as it appears to DOS.In our example this is simply @code{MYFOO}, but in general it can includea DOS path, and depending on your transfer mechanism may not resemblethe name on the Unix side.At this point, you can set any breakpoints you wish; when you are readyto see your program run on the 29K board, use the _GDBN__ command@code{run}.To stop debugging the remote program, use the _GDBN__ @code{detach}command.To return control of the PC to its console, use @code{tip} or @code{cu}once again, after your _GDBN__ session has concluded, to attach to@code{EBMON}. You can then type the command @code{q} to shut down@code{EBMON}, returning control to the DOS command-line interpreter.Type @code{CTTY con} to return command input to the main DOS console,and type @kbd{~.} to leave @code{tip} or @code{cu}.@node Remote Log@subsubsection Remote Log@kindex eb.log@cindex log file for EB29KThe @code{target amd-eb} command creates a file @file{eb.log} in thecurrent working directory, to help debug problems with the connection.@file{eb.log} records all the output from @code{EBMON}, including echoesof the commands sent to it. Running @samp{tail -f} on this file inanother window often helps to understand trouble with @code{EBMON}, orunexpected events on the PC side of the connection._fi__(_AMD29K__)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -