170
Chapter 20. Configuration-Specific Information
COM2: 9600, n, 8, 1, p
Warning:
We have noticed a bug in PC-NFS that conflicts with
asynctsr
. If you also run PC-NFS on your
DOS host, you may need to disable it, or even boot without it, to use
asynctsr
to control your development
board.
Now that serial communications are set up, and the development board is connected, you can start
up gdb. Call
gdb
with the name of your program as the argument.
gdb
prompts you, as usual, with
the prompt
(gdb)
. Use two special commands to begin your debugging session:
target hms
to
specify cross-debugging to the Hitachi board, and the
load
command to download your program to
the board.
load
displays the names of the program’s sections, and a
*
for each 2K of data downloaded.
(If you want to refresh gdb data on symbols or on the executable file without downloading, use the
gdb commands
file
or
symbol-file
. These commands, and
load
itself, are described in (refer to
Section 17.1
Commands to specify files
.)
(eg-C:\H8300\TEST) gdb t.x
gdb 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 2003-07-22-cvs, Copyright 1992 Free Software Foundation, Inc...
(gdb) target hms
Connected to remote H8/300 HMS system.
(gdb) load t.x
.text
: 0x8000 .. 0xabde ***********
.data
: 0xabde .. 0xad30 *
.stack
: 0xf000 .. 0xf014 *
At this point, you’re ready to run or debug your program. From here on, you can use all the usual gdb
commands. The
break
command sets breakpoints; the
run
command starts your program;
or
x
display data; the
continue
command resumes execution after stopping at a breakpoint. You can
use the
help
command at any time to find out more about gdb commands.
Remember, however, that
operating system
facilities aren’t available on your development board; for
example, if your program hangs, you can’t send an interrupt--but you can press the reset switch!
Use the reset button on the development board
•
to interrupt your program (don’t use
ctl-C
on the DOS host--it has no way to pass an interrupt
signal to the development board); and
•
to return to the gdb command prompt after your program finishes normally. The communications
protocol provides no other way for gdb to detect program completion.
In either case, gdb sees the effect of a reset on the development board as a "normal exit" of your
program.
20.3.2.2. Using the E7000 in-circuit emulator
You can use the E7000 in-circuit emulator to develop code for either the Hitachi SH or the H8/300H.
Use one of these forms of the
target e7000
command to connect gdb to your E7000:
Содержание ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Страница 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Страница 12: ...2 Chapter 1 Debugging with gdb ...
Страница 28: ...18 Chapter 4 Getting In and Out of gdb ...
Страница 34: ...24 Chapter 5 gdb Commands ...
Страница 44: ...34 Chapter 6 Running Programs Under gdb ...
Страница 68: ...58 Chapter 8 Examining the Stack ...
Страница 98: ...88 Chapter 10 Examining Data ...
Страница 112: ...102 Chapter 12 Tracepoints ...
Страница 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Страница 138: ...128 Chapter 14 Using gdb with Different Languages ...
Страница 144: ...134 Chapter 15 Examining the Symbol Table ...
Страница 170: ...160 Chapter 19 Debugging remote programs ...
Страница 198: ...188 Chapter 21 Controlling gdb ...
Страница 204: ...194 Chapter 22 Canned Sequences of Commands ...
Страница 206: ...196 Chapter 23 Command Interpreters ...
Страница 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Страница 296: ...286 Chapter 27 gdb Annotations ...
Страница 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Страница 322: ...312 Chapter 30 Using History Interactively ...
Страница 362: ...352 Appendix D gdb Remote Serial Protocol ...
Страница 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Страница 386: ...376 Appendix G GNU Free Documentation License ...
Страница 410: ......