⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdbinv-s.m4.in

📁 早期freebsd实现
💻 IN
📖 第 1 页 / 共 3 页
字号:
_if__(_ST2000__)@node ST2000 Remote@subsection _GDBN__ with a Tandem ST2000To connect your ST2000 to the host system, see the manufacturer'smanual.  Once the ST2000 is physically attached, you can run@exampletarget st2000 @var{dev} @var{speed}@end example@noindentto establish it as your debugging environment.  The @code{load} and @code{attach} commands are @emph{not} defined forthis target; you must load your program into the ST2000 as you normallywould for standalone operation.  _GDBN__ will read debugging information(such as symbols) from a separate, debugging version of the programavailable on your host computer.@c FIXME!! This is terribly vague; what little content is here is@c basically hearsay.@cindex ST2000 auxiliary commandsThese auxiliary _GDBN__ commands are available to help you with the ST2000environment:@table @code@item st2000 @var{command}@kindex st2000 @var{cmd}@cindex STDBUG commands (ST2000)@cindex commands to STDBUG (ST2000)Send a @var{command} to the STDBUG monitor.  See the manufacturer'smanual for available commands.@item connect@cindex connect (to STDBUG)Connect the controlling terminal to the STDBUG command monitor.  Whenyou are done interacting with STDBUG, typing either of two charactersequences will get you back to the _GDBN__ command prompt:@kbd{@key{RET}~.} (Return, followed by tilde and period) or@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).@end table_fi__(_ST2000__)_if__(_VXWORKS__)@node VxWorks Remote@subsection _GDBN__ and VxWorks@cindex VxWorks_GDBN__ enables developers to spawn and debug tasks running on networkedVxWorks targets from a Unix host.  Already-running tasks spawned fromthe VxWorks shell can also be debugged.  _GDBN__ uses code that runs onboth the UNIX host and on the VxWorks target.  The program@code{_GDBP__} is installed and executed on the UNIX host.The following information on connecting to VxWorks was current whenthis manual was produced; newer releases of VxWorks may use revisedprocedures.The remote debugging interface (RDB) routines are installed and executedon the VxWorks target.  These routines are included in the VxWorks library@file{rdb.a} and are incorporated into the system image when source-leveldebugging is enabled in the VxWorks configuration.@kindex INCLUDE_RDBIf you wish, you can define @code{INCLUDE_RDB} in the VxWorksconfiguration file @file{configAll.h} to include the RDB interfaceroutines and spawn the source debugging task @code{tRdbTask} whenVxWorks is booted.  For more information on configuring and remaking_if__(_FSF__)VxWorks, see the manufacturer's manual._fi__(_FSF__)_if__(!_FSF__)VxWorks, see the @cite{VxWorks Programmer's Guide}._fi__(!_FSF__)Once you have included the RDB interface in your VxWorks system imageand set your Unix execution search path to find _GDBN__, you are readyto run _GDBN__.  From your UNIX host, type:@smallexample% _GDBP__@end smallexample_GDBN__ will come up showing the prompt:@smallexample(_GDBP__)@end smallexample@menu* VxWorks connection::          Connecting to VxWorks* VxWorks download::            VxWorks Download* VxWorks attach::              Running Tasks@end menu@node VxWorks connection@subsubsection Connecting to VxWorksThe _GDBN__ command @code{target} lets you connect to a VxWorks target on thenetwork.  To connect to a target whose host name is ``@code{tt}'', type:@smallexample(_GDBP__) target vxworks tt@end smallexample_GDBN__ will display a message similar to the following:@smallexampleAttaching remote machine across net... Success!@end smallexample_GDBN__ will then attempt to read the symbol tables of any object modulesloaded into the VxWorks target since it was last booted.  _GDBN__ locatesthese files by searching the directories listed in the command searchpath (@pxref{Environment, ,Your Program's Environment}); if it failsto find an object file, it will display a message such as:@smallexampleprog.o: No such file or directory.@end smallexampleThis will cause the @code{target} command to abort.  When this happens,you should add the appropriate directory to the search path, with the_GDBN__ command @code{path}, and execute the @code{target} commandagain.@node VxWorks download@subsubsection VxWorks Download@cindex download to VxWorksIf you have connected to the VxWorks target and you want to debug anobject that has not yet been loaded, you can use the _GDBN__ @code{load}command to download a file from UNIX to VxWorks incrementally.  Theobject file given as an argument to the @code{load} command is actuallyopened twice: first by the VxWorks target in order to download the code,then by _GDBN__ in order to read the symbol table.  This can lead toproblems if the current working directories on the two systems differ.It is simplest to set the working directory on both systems to thedirectory in which the object file resides, and then to reference thefile by its name, without any path.  Thus, to load a program@file{prog.o}, residing in @file{wherever/vw/demo/rdb}, on VxWorks type:@smallexample-> cd "wherever/vw/demo/rdb"@end smallexampleOn _GDBN__ type:@smallexample(_GDBP__) cd wherever/vw/demo/rdb (_GDBP__) load prog.o@end smallexample_GDBN__ will display a response similar to the following:@smallexampleReading symbol data from wherever/vw/demo/rdb/prog.o... done.@end smallexampleYou can also use the @code{load} command to reload an object moduleafter editing and recompiling the corresponding source file.  Note thatthis will cause _GDBN__ to delete all currently-defined breakpoints,auto-displays, and convenience variables, and to clear the valuehistory.  (This is necessary in order to preserve the integrity ofdebugger data structures that reference the target system's symboltable.)@node VxWorks attach@subsubsection Running Tasks@cindex running VxWorks tasksYou can also attach to an existing task using the @code{attach} command asfollows:@smallexample(_GDBP__) attach @var{task}@end smallexample@noindentwhere @var{task} is the VxWorks hexadecimal task ID.  The task can be runningor suspended when you attach to it.  If running, it will be suspended atthe time of attachment._fi__(_VXWORKS__)_if__(_H8__)@node Hitachi H8/300 Remote@subsection _GDBN__ and the Hitachi H8/300_GDBN__ needs to know these things to talk to your H8/300: @enumerate@itemthat you want to use @samp{target hms}, the remote debugginginterface for the H8/300 (this is the default whenGDB is configured specifically for the H8/300);@itemwhat serial device connects your host to your H8/300 (the first serialdevice available on your host is the default);@ignore@c this is only for Unix hosts, not currently of interest.@itemwhat speed to use over the serial device.@end ignore@end enumerate@kindex device@cindex serial device for H8/300@ignore@c only for Unix hostsUse the special @code{gdb83} command @samp{device @var{port}} if youneed to explicitly set the serial device.  The default @var{port} is thefirst available port on your host.  This is only necessary on Unixhosts, where it is typically something like @file{/dev/ttya}.@kindex speed@cindex serial line speed for H8/300@code{gdb83} has another special command to set the communications speedfor the H8/300: @samp{speed @var{bps}}.  This command also is only usedfrom Unix hosts; on DOS hosts, set the line speed as usual from outsideGDB with the DOS @kbd{mode} command (for instance, @w{@samp{modecom2:9600,n,8,1,p}} for a 9600 bps connection).@end ignore_GDBN__ depends on an auxiliary terminate-and-stay-resident programcalled @code{asynctsr} to communicate with the H8/300 development boardthrough a PC serial port.  You must also use the DOS @code{mode} commandto set up the serial port on the DOS side.The following sample session illustrates the steps needed to start aprogram under _GDBN__ control on your H8/300.  The example uses a sampleH8/300 program called @file{t.x}.First hook up your H8/300 development board.  In this example, we use aboard attached to serial port @code{COM2}; if you use a different serialport, substitute its name in the argument of the @code{mode} command.When you call @code{asynctsr}, the auxiliary comms program used by thedegugger, you give it just the numeric part of the serial port's name;for example, @samp{asyncstr 2} below runs @code{asyncstr} on@code{COM2}.@smallexample(eg-C:\H8300\TEST) mode com2:9600,n,8,1,pResident portion of MODE loadedCOM2: 9600, n, 8, 1, p(eg-C:\H8300\TEST) asynctsr 2@end smallexample@quotation@emph{Warning:} We have noticed a bug in PC-NFS that conflicts with@code{asynctsr}.  If you also run PC-NFS on your DOS host, you may need todisable it, or even boot without it, to use @code{asynctsr} to controlyour H8/300 board.@end quotationNow that serial communications are set up, and the H8/300 is connected,you can start up _GDBN__.  Call @code{_GDBP__} with the name of yourprogram as the argument.  @code{_GDBP__} prompts you, as usual, with theprompt @samp{(_GDBP__)}.  Use two special commands to begin your debuggingsession: @samp{target hms} to specify cross-debugging to the Hitachi board,and the @code{load} command to download your program to the board.@code{load} displays the names of theprogram's sections, and a @samp{*} for each 2K of data downloaded.  (Ifyou want to refresh _GDBN__ data on symbols or on the executable filewithout downloading, use the _GDBN__ commands @code{file} or@code{symbol-file}.  These commands, and @code{load} itself, aredescribed in @ref{Files,,Commands to Specify Files}.)@smallexample(eg-C:\H8300\TEST) _GDBP__ t.xGDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see  the conditions.There is absolutely no warranty for GDB; type "show warranty" for details.GDB _GDB_VN__, Copyright 1992 Free Software Foundation, Inc...(gdb) target hmsConnected to remote H8/300 HMS system.(gdb) load t.x.text   : 0x8000 .. 0xabde ***********.data   : 0xabde .. 0xad30 *.stack  : 0xf000 .. 0xf014 *@end smallexampleAt this point, you're ready to run or debug your program.  From here on,you can use all the usual _GDBN__ commands.  The @code{break} commandsets breakpoints; the @code{run} command starts your program;@code{print} or @code{x} display data; the @code{continue} commandresumes execution after stopping at a breakpoint.  You can use the@code{help} command at any time to find out more about _GDBN__ commands.Remember, however, that @emph{operating system} facilities aren'tavailable on your H8/300; for example, if your program hangs, you can'tsend an interrupt---but you can press the @sc{reset} switch!  Use the @sc{reset} button on the H8/300 board@itemize @bullet@itemto interrupt your program (don't use @kbd{ctl-C} on the DOS host---it hasno way to pass an interrupt signal to the H8/300); and@itemto return to the _GDBN__ command prompt after your program finishesnormally.  The communications protocol provides no other way for _GDBN__to detect program completion.@end itemizeIn either case, _GDBN__ will see the effect of a @sc{reset} on theH8/300 board as a ``normal exit'' of your program._fi__(_H8__)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -