166
Chapter 20. Configuration-Specific Information
(gdb) x/2x &’cygwin1!__argv’
0x610c0aa8
F
cygwin1!__argv
G
:
0x10021608
0x00000000
(gdb) x/x 0x10021608
0x10021608:
0x0022fd98
(gdb) x/s 0x0022fd98
0x22fd98:
"/cygdrive/c/mydirectory/myprogram"
Setting a break point within a DLL is possible even before the program starts execution. However,
under these circumstances, gdb can’t examine the initial instructions of the function in order to skip
the function’s frame set-up code. You can work around this by using "*&" to set the breakpoint at a
raw memory address:
(gdb) break *&’python22!PyOS_Readline’
Breakpoint 1 at 0x1e04eff0
The author of these extensions is not entirely convinced that setting a break point within a shared DLL
like
kernel32.dll
is completely safe.
20.2. Embedded Operating Systems
This section describes configurations involving the debugging of embedded operating systems that
are available for several different architectures.
gdb includes the ability to debug programs running on various real-time operating systems.
20.2.1. Using gdb with VxWorks
target vxworks
machinename
A VxWorks system, attached via TCP/IP. The argument
machinename
is the target system’s
machine name or IP address.
On VxWorks,
load
links
filename
dynamically on the current target system as well as adding its
symbols in gdb.
gdb enables developers to spawn and debug tasks running on networked VxWorks targets from a Unix
host. Already-running tasks spawned from the VxWorks shell can also be debugged. gdb uses code
that runs on both the Unix host and on the VxWorks target. The program
gdb
is installed and executed
on the Unix host. (It may be installed with the name
vxgdb
, to distinguish it from a gdb for debugging
programs on the host itself.)
VxWorks-timeout
args
All VxWorks-based targets now support the option
vxworks-timeout
. This option is set by the
user, and
args
represents the number of seconds gdb waits for responses to rpc’s. You might use
this if your VxWorks target is a slow software simulator or is on the far side of a thin network
line.
The following information on connecting to VxWorks was current when this manual was produced;
newer releases of VxWorks may use revised procedures.
Содержание 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: ......