Line 1... |
Line 1... |
This is gdb.info, produced by makeinfo version 4.8 from ./gdb.texinfo.
|
This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo.
|
|
|
INFO-DIR-SECTION Software development
|
INFO-DIR-SECTION Software development
|
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
* Gdb: (gdb). The GNU debugger.
|
* Gdb: (gdb). The GNU debugger.
|
END-INFO-DIR-ENTRY
|
END-INFO-DIR-ENTRY
|
Line 21... |
Line 21... |
developing GNU and promoting software freedom."
|
developing GNU and promoting software freedom."
|
|
|
This file documents the GNU debugger GDB.
|
This file documents the GNU debugger GDB.
|
|
|
This is the Ninth Edition, of `Debugging with GDB: the GNU
|
This is the Ninth Edition, of `Debugging with GDB: the GNU
|
Source-Level Debugger' for GDB (GDB) Version 7.2.
|
Source-Level Debugger' for GDB (GDB) Version 7.2-or32-1.0rc1.
|
|
|
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
|
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
2010 Free Software Foundation, Inc.
|
2010 Free Software Foundation, Inc.
|
|
|
Line 197... |
Line 197... |
|
|
Example
|
Example
|
.......
|
.......
|
|
|
In the following example, the numbers that precede the commands are the
|
In the following example, the numbers that precede the commands are the
|
"tokens" described in *Note GDB/MI Command Syntax: GDB/MI Command
|
"tokens" described in *note GDB/MI Command Syntax: GDB/MI Command
|
Syntax. Notice how GDB/MI returns the same tokens in its output.
|
Syntax. Notice how GDB/MI returns the same tokens in its output.
|
|
|
211-data-evaluate-expression A
|
211-data-evaluate-expression A
|
211^done,value="1"
|
211^done,value="1"
|
(gdb)
|
(gdb)
|
Line 491... |
Line 491... |
|
|
27.15 GDB/MI Tracepoint Commands
|
27.15 GDB/MI Tracepoint Commands
|
================================
|
================================
|
|
|
The commands defined in this section implement MI support for
|
The commands defined in this section implement MI support for
|
tracepoints. For detailed introduction, see *Note Tracepoints::.
|
tracepoints. For detailed introduction, see *note Tracepoints::.
|
|
|
The `-trace-find' Command
|
The `-trace-find' Command
|
-------------------------
|
-------------------------
|
|
|
Synopsis
|
Synopsis
|
Line 503... |
Line 503... |
|
|
-trace-find MODE [PARAMETERS...]
|
-trace-find MODE [PARAMETERS...]
|
|
|
Find a trace frame using criteria defined by MODE and PARAMETERS.
|
Find a trace frame using criteria defined by MODE and PARAMETERS.
|
The following table lists permissible modes and their parameters. For
|
The following table lists permissible modes and their parameters. For
|
details of operation, see *Note tfind::.
|
details of operation, see *note tfind::.
|
|
|
`none'
|
`none'
|
No parameters are required. Stops examining trace frames.
|
No parameters are required. Stops examining trace frames.
|
|
|
`frame-number'
|
`frame-number'
|
Line 1536... |
Line 1536... |
|
|
Synopsis
|
Synopsis
|
--------
|
--------
|
|
|
-interpreter-exec INTERPRETER COMMAND
|
-interpreter-exec INTERPRETER COMMAND
|
|
|
Execute the specified COMMAND in the given INTERPRETER.
|
Execute the specified COMMAND in the given INTERPRETER.
|
|
|
GDB Command
|
GDB Command
|
-----------
|
-----------
|
|
|
Line 3715... |
Line 3714... |
formatting commands to create the on-line version of the documentation
|
formatting commands to create the on-line version of the documentation
|
and TeX (or `texi2roff') to typeset the printed version.
|
and TeX (or `texi2roff') to typeset the printed version.
|
|
|
GDB includes an already formatted copy of the on-line Info version
|
GDB includes an already formatted copy of the on-line Info version
|
of this manual in the `gdb' subdirectory. The main Info file is
|
of this manual in the `gdb' subdirectory. The main Info file is
|
`gdb-7.2/gdb/gdb.info', and it refers to subordinate files matching
|
`gdb-7.2-or32-1.0rc1/gdb/gdb.info', and it refers to subordinate files
|
`gdb.info*' in the same directory. If necessary, you can print out
|
matching `gdb.info*' in the same directory. If necessary, you can
|
these files, or read them with any editor; but they are easier to read
|
print out these files, or read them with any editor; but they are
|
using the `info' subsystem in GNU Emacs or the standalone `info'
|
easier to read using the `info' subsystem in GNU Emacs or the
|
program, available as part of the GNU Texinfo distribution.
|
standalone `info' program, available as part of the GNU Texinfo
|
|
distribution.
|
|
|
If you want to format these Info files yourself, you need one of the
|
If you want to format these Info files yourself, you need one of the
|
Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
|
Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
|
|
|
If you have `makeinfo' installed, and are in the top level GDB
|
If you have `makeinfo' installed, and are in the top level GDB
|
source directory (`gdb-7.2', in the case of version 7.2), you can make
|
source directory (`gdb-7.2-or32-1.0rc1', in the case of version
|
the Info file by typing:
|
7.2-or32-1.0rc1), you can make the Info file by typing:
|
|
|
cd gdb
|
cd gdb
|
make gdb.info
|
make gdb.info
|
|
|
If you want to typeset and print copies of this manual, you need TeX,
|
If you want to typeset and print copies of this manual, you need TeX,
|
Line 3751... |
Line 3751... |
`texinfo.tex' is distributed with GDB and is located in the
|
`texinfo.tex' is distributed with GDB and is located in the
|
`gdb-VERSION-NUMBER/texinfo' directory.
|
`gdb-VERSION-NUMBER/texinfo' directory.
|
|
|
If you have TeX and a DVI printer program installed, you can typeset
|
If you have TeX and a DVI printer program installed, you can typeset
|
and print this manual. First switch to the `gdb' subdirectory of the
|
and print this manual. First switch to the `gdb' subdirectory of the
|
main source directory (for example, to `gdb-7.2/gdb') and type:
|
main source directory (for example, to `gdb-7.2-or32-1.0rc1/gdb') and
|
|
type:
|
|
|
make gdb.dvi
|
make gdb.dvi
|
|
|
Then give `gdb.dvi' to your DVI printing program.
|
Then give `gdb.dvi' to your DVI printing program.
|
|
|
---------- Footnotes ----------
|
---------- Footnotes ----------
|
|
|
(1) In `gdb-7.2/gdb/refcard.ps' of the version 7.2 release.
|
(1) In `gdb-7.2-or32-1.0rc1/gdb/refcard.ps' of the version
|
|
7.2-or32-1.0rc1 release.
|
|
|
|
|
File: gdb.info, Node: Installing GDB, Next: Maintenance Commands, Prev: Formatting Documentation, Up: Top
|
File: gdb.info, Node: Installing GDB, Next: Maintenance Commands, Prev: Formatting Documentation, Up: Top
|
|
|
Appendix B Installing GDB
|
Appendix B Installing GDB
|
Line 3858... |
Line 3860... |
|
|
The GDB distribution includes all the source code you need for GDB
|
The GDB distribution includes all the source code you need for GDB
|
in a single directory, whose name is usually composed by appending the
|
in a single directory, whose name is usually composed by appending the
|
version number to `gdb'.
|
version number to `gdb'.
|
|
|
For example, the GDB version 7.2 distribution is in the `gdb-7.2'
|
For example, the GDB version 7.2-or32-1.0rc1 distribution is in the
|
directory. That directory contains:
|
`gdb-7.2-or32-1.0rc1' directory. That directory contains:
|
|
|
`gdb-7.2/configure (and supporting files)'
|
`gdb-7.2-or32-1.0rc1/configure (and supporting files)'
|
script for configuring GDB and all its supporting libraries
|
script for configuring GDB and all its supporting libraries
|
|
|
`gdb-7.2/gdb'
|
`gdb-7.2-or32-1.0rc1/gdb'
|
the source specific to GDB itself
|
the source specific to GDB itself
|
|
|
`gdb-7.2/bfd'
|
`gdb-7.2-or32-1.0rc1/bfd'
|
source for the Binary File Descriptor library
|
source for the Binary File Descriptor library
|
|
|
`gdb-7.2/include'
|
`gdb-7.2-or32-1.0rc1/include'
|
GNU include files
|
GNU include files
|
|
|
`gdb-7.2/libiberty'
|
`gdb-7.2-or32-1.0rc1/libiberty'
|
source for the `-liberty' free software library
|
source for the `-liberty' free software library
|
|
|
`gdb-7.2/opcodes'
|
`gdb-7.2-or32-1.0rc1/opcodes'
|
source for the library of opcode tables and disassemblers
|
source for the library of opcode tables and disassemblers
|
|
|
`gdb-7.2/readline'
|
`gdb-7.2-or32-1.0rc1/readline'
|
source for the GNU command-line interface
|
source for the GNU command-line interface
|
|
|
`gdb-7.2/glob'
|
`gdb-7.2-or32-1.0rc1/glob'
|
source for the GNU filename pattern-matching subroutine
|
source for the GNU filename pattern-matching subroutine
|
|
|
`gdb-7.2/mmalloc'
|
`gdb-7.2-or32-1.0rc1/mmalloc'
|
source for the GNU memory-mapped malloc package
|
source for the GNU memory-mapped malloc package
|
|
|
The simplest way to configure and build GDB is to run `configure'
|
The simplest way to configure and build GDB is to run `configure'
|
from the `gdb-VERSION-NUMBER' source directory, which in this example
|
from the `gdb-VERSION-NUMBER' source directory, which in this example
|
is the `gdb-7.2' directory.
|
is the `gdb-7.2-or32-1.0rc1' directory.
|
|
|
First switch to the `gdb-VERSION-NUMBER' source directory if you are
|
First switch to the `gdb-VERSION-NUMBER' source directory if you are
|
not already in it; then run `configure'. Pass the identifier for the
|
not already in it; then run `configure'. Pass the identifier for the
|
platform on which GDB will run as an argument.
|
platform on which GDB will run as an argument.
|
|
|
For example:
|
For example:
|
|
|
cd gdb-7.2
|
cd gdb-7.2-or32-1.0rc1
|
./configure HOST
|
./configure HOST
|
make
|
make
|
|
|
where HOST is an identifier such as `sun4' or `decstation', that
|
where HOST is an identifier such as `sun4' or `decstation', that
|
identifies the platform where GDB will run. (You can often leave off
|
identifies the platform where GDB will run. (You can often leave off
|
Line 3919... |
Line 3921... |
you may need to run `sh' on it explicitly:
|
you may need to run `sh' on it explicitly:
|
|
|
sh configure HOST
|
sh configure HOST
|
|
|
If you run `configure' from a directory that contains source
|
If you run `configure' from a directory that contains source
|
directories for multiple libraries or programs, such as the `gdb-7.2'
|
directories for multiple libraries or programs, such as the
|
source directory for version 7.2, `configure' creates configuration
|
`gdb-7.2-or32-1.0rc1' source directory for version 7.2-or32-1.0rc1,
|
files for every directory level underneath (unless you tell it not to,
|
`configure' creates configuration files for every directory level
|
with the `--norecursion' option).
|
underneath (unless you tell it not to, with the `--norecursion' option).
|
|
|
You should run the `configure' script from the top directory in the
|
You should run the `configure' script from the top directory in the
|
source tree, the `gdb-VERSION-NUMBER' directory. If you run
|
source tree, the `gdb-VERSION-NUMBER' directory. If you run
|
`configure' from one of the subdirectories, you will configure only
|
`configure' from one of the subdirectories, you will configure only
|
that subdirectory. That is usually not what you want. In particular,
|
that subdirectory. That is usually not what you want. In particular,
|
Line 3961... |
Line 3963... |
to specify a path to find `configure' itself from your working
|
to specify a path to find `configure' itself from your working
|
directory. If the path to `configure' would be the same as the
|
directory. If the path to `configure' would be the same as the
|
argument to `--srcdir', you can leave out the `--srcdir' option; it is
|
argument to `--srcdir', you can leave out the `--srcdir' option; it is
|
assumed.)
|
assumed.)
|
|
|
For example, with version 7.2, you can build GDB in a separate
|
For example, with version 7.2-or32-1.0rc1, you can build GDB in a
|
directory for a Sun 4 like this:
|
separate directory for a Sun 4 like this:
|
|
|
cd gdb-7.2
|
cd gdb-7.2-or32-1.0rc1
|
mkdir ../gdb-sun4
|
mkdir ../gdb-sun4
|
cd ../gdb-sun4
|
cd ../gdb-sun4
|
../gdb-7.2/configure sun4
|
../gdb-7.2-or32-1.0rc1/configure sun4
|
make
|
make
|
|
|
When `configure' builds a configuration using a remote source
|
When `configure' builds a configuration using a remote source
|
directory, it creates a tree for the binaries with the same structure
|
directory, it creates a tree for the binaries with the same structure
|
(and using the same names) as the tree under the source directory. In
|
(and using the same names) as the tree under the source directory. In
|
the example, you'd find the Sun 4 library `libiberty.a' in the
|
the example, you'd find the Sun 4 library `libiberty.a' in the
|
directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
|
directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
|
|
|
Make sure that your path to the `configure' script has just one
|
Make sure that your path to the `configure' script has just one
|
instance of `gdb' in it. If your path to `configure' looks like
|
instance of `gdb' in it. If your path to `configure' looks like
|
`../gdb-7.2/gdb/configure', you are configuring only one subdirectory
|
`../gdb-7.2-or32-1.0rc1/gdb/configure', you are configuring only one
|
of GDB, not the whole package. This leads to build errors about
|
subdirectory of GDB, not the whole package. This leads to build errors
|
missing include files such as `bfd/bfd.h'.
|
about missing include files such as `bfd/bfd.h'.
|
|
|
One popular reason to build several GDB configurations in separate
|
One popular reason to build several GDB configurations in separate
|
directories is to configure GDB for cross-compiling (where GDB runs on
|
directories is to configure GDB for cross-compiling (where GDB runs on
|
one machine--the "host"--while debugging programs that run on another
|
one machine--the "host"--while debugging programs that run on another
|
machine--the "target"). You specify a cross-debugging target by giving
|
machine--the "target"). You specify a cross-debugging target by giving
|
Line 3994... |
Line 3996... |
in a configured directory--whatever directory you were in when you
|
in a configured directory--whatever directory you were in when you
|
called `configure' (or one of its subdirectories).
|
called `configure' (or one of its subdirectories).
|
|
|
The `Makefile' that `configure' generates in each source directory
|
The `Makefile' that `configure' generates in each source directory
|
also runs recursively. If you type `make' in a source directory such
|
also runs recursively. If you type `make' in a source directory such
|
as `gdb-7.2' (or in a separate configured directory configured with
|
as `gdb-7.2-or32-1.0rc1' (or in a separate configured directory
|
`--srcdir=DIRNAME/gdb-7.2'), you will build all the required libraries,
|
configured with `--srcdir=DIRNAME/gdb-7.2-or32-1.0rc1'), you will build
|
and then build GDB.
|
all the required libraries, and then build GDB.
|
|
|
When you have multiple hosts or targets configured in separate
|
When you have multiple hosts or targets configured in separate
|
directories, you can run `make' on them in parallel (for example, if
|
directories, you can run `make' on them in parallel (for example, if
|
they are NFS-mounted on each of the hosts); they will not interfere
|
they are NFS-mounted on each of the hosts); they will not interfere
|
with each other.
|
with each other.
|
Line 4040... |
Line 4042... |
m68k-sun-sunos4.1.1
|
m68k-sun-sunos4.1.1
|
% sh config.sub i986v
|
% sh config.sub i986v
|
Invalid configuration `i986v': machine `i986v' not recognized
|
Invalid configuration `i986v': machine `i986v' not recognized
|
|
|
`config.sub' is also distributed in the GDB source directory
|
`config.sub' is also distributed in the GDB source directory
|
(`gdb-7.2', for version 7.2).
|
(`gdb-7.2-or32-1.0rc1', for version 7.2-or32-1.0rc1).
|
|
|
|
|
File: gdb.info, Node: Configure Options, Next: System-wide configuration, Prev: Config Names, Up: Installing GDB
|
File: gdb.info, Node: Configure Options, Next: System-wide configuration, Prev: Config Names, Up: Installing GDB
|
|
|
B.5 `configure' Options
|
B.5 `configure' Options
|
Line 4148... |
Line 4150... |
*******************************
|
*******************************
|
|
|
In addition to commands intended for GDB users, GDB includes a number
|
In addition to commands intended for GDB users, GDB includes a number
|
of commands intended for GDB developers, that are not documented
|
of commands intended for GDB developers, that are not documented
|
elsewhere in this manual. These commands are provided here for
|
elsewhere in this manual. These commands are provided here for
|
reference. (For commands that turn on debugging messages, see *Note
|
reference. (For commands that turn on debugging messages, see *note
|
Debugging Output::.)
|
Debugging Output::.)
|
|
|
`maint agent EXPRESSION'
|
`maint agent EXPRESSION'
|
`maint agent-eval EXPRESSION'
|
`maint agent-eval EXPRESSION'
|
Translate the given EXPRESSION into remote agent bytecodes. This
|
Translate the given EXPRESSION into remote agent bytecodes. This
|
Line 4543... |
Line 4545... |
|
|
In the examples below, `->' and `<-' are used to indicate
|
In the examples below, `->' and `<-' are used to indicate
|
transmitted and received data, respectively.
|
transmitted and received data, respectively.
|
|
|
All GDB commands and responses (other than acknowledgments and
|
All GDB commands and responses (other than acknowledgments and
|
notifications, see *Note Notification Packets::) are sent as a PACKET.
|
notifications, see *note Notification Packets::) are sent as a PACKET.
|
A PACKET is introduced with the character `$', the actual PACKET-DATA,
|
A PACKET is introduced with the character `$', the actual PACKET-DATA,
|
and the terminating character `#' followed by a two-digit CHECKSUM:
|
and the terminating character `#' followed by a two-digit CHECKSUM:
|
|
|
`$'PACKET-DATA`#'CHECKSUM
|
`$'PACKET-DATA`#'CHECKSUM
|
The two-digit CHECKSUM is computed as the modulo 256 sum of all
|
The two-digit CHECKSUM is computed as the modulo 256 sum of all
|
Line 4575... |
Line 4577... |
The host (GDB) sends COMMANDs, and the target (the debugging stub
|
The host (GDB) sends COMMANDs, and the target (the debugging stub
|
incorporated in your program) sends a RESPONSE. In the case of step
|
incorporated in your program) sends a RESPONSE. In the case of step
|
and continue COMMANDs, the response is only sent when the operation has
|
and continue COMMANDs, the response is only sent when the operation has
|
completed, and the target has again stopped all threads in all attached
|
completed, and the target has again stopped all threads in all attached
|
processes. This is the default all-stop mode behavior, but the remote
|
processes. This is the default all-stop mode behavior, but the remote
|
protocol also supports GDB's non-stop execution mode; see *Note Remote
|
protocol also supports GDB's non-stop execution mode; see *note Remote
|
Non-Stop::, for details.
|
Non-Stop::, for details.
|
|
|
PACKET-DATA consists of a sequence of characters with the exception
|
PACKET-DATA consists of a sequence of characters with the exception
|
of `#' and `$' (see `X' packet for additional exceptions).
|
of `#' and `$' (see `X' packet for additional exceptions).
|
|
|
Line 4647... |
Line 4649... |
|
|
Each packet's description has a template showing the packet's overall
|
Each packet's description has a template showing the packet's overall
|
syntax, followed by an explanation of the packet's meaning. We include
|
syntax, followed by an explanation of the packet's meaning. We include
|
spaces in some of the templates for clarity; these are not part of the
|
spaces in some of the templates for clarity; these are not part of the
|
packet's syntax. No GDB packet uses spaces to separate its components.
|
packet's syntax. No GDB packet uses spaces to separate its components.
|
For example, a template like `foo BAR BAZ' describes a packet
|
For example, a template like `foo BAR BAZ' describes a packet beginning
|
beginning with the three ASCII bytes `foo', followed by a BAR, followed
|
with the three ASCII bytes `foo', followed by a BAR, followed directly
|
directly by a BAZ. GDB does not transmit a space character between the
|
by a BAZ. GDB does not transmit a space character between the `foo'
|
`foo' and the BAR, or between the BAR and the BAZ.
|
and the BAR, or between the BAR and the BAZ.
|
|
|
Several packets and replies include a THREAD-ID field to identify a
|
Several packets and replies include a THREAD-ID field to identify a
|
thread. Normally these are positive numbers with a target-specific
|
thread. Normally these are positive numbers with a target-specific
|
interpretation, formatted as big-endian hex strings. A THREAD-ID can
|
interpretation, formatted as big-endian hex strings. A THREAD-ID can
|
also be a literal `-1' to indicate all threads, or `0' to pick any
|
also be a literal `-1' to indicate all threads, or `0' to pick any
|
Line 4692... |
Line 4694... |
The remote target both supports and has enabled extended mode.
|
The remote target both supports and has enabled extended mode.
|
|
|
`?'
|
`?'
|
Indicate the reason the target halted. The reply is the same as
|
Indicate the reason the target halted. The reply is the same as
|
for step and continue. This packet has a special interpretation
|
for step and continue. This packet has a special interpretation
|
when the target is in non-stop mode; see *Note Remote Non-Stop::.
|
when the target is in non-stop mode; see *note Remote Non-Stop::.
|
|
|
Reply: *Note Stop Reply Packets::, for the reply specifications.
|
Reply: *Note Stop Reply Packets::, for the reply specifications.
|
|
|
`A ARGLEN,ARGNUM,ARG,...'
|
`A ARGLEN,ARGNUM,ARG,...'
|
Initialized `argv[]' array passed into program. ARGLEN specifies
|
Initialized `argv[]' array passed into program. ARGLEN specifies
|
Line 4814... |
Line 4816... |
`H C THREAD-ID'
|
`H C THREAD-ID'
|
Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
|
Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
|
C depends on the operation to be performed: it should be `c' for
|
C depends on the operation to be performed: it should be `c' for
|
step and continue operations, `g' for other operations. The
|
step and continue operations, `g' for other operations. The
|
thread designator THREAD-ID has the format and interpretation
|
thread designator THREAD-ID has the format and interpretation
|
described in *Note thread-id syntax::.
|
described in *note thread-id syntax::.
|
|
|
Reply:
|
Reply:
|
`OK'
|
`OK'
|
for success
|
for success
|
|
|
Line 4902... |
Line 4904... |
for an error
|
for an error
|
|
|
`q NAME PARAMS...'
|
`q NAME PARAMS...'
|
`Q NAME PARAMS...'
|
`Q NAME PARAMS...'
|
General query (`q') and set (`Q'). These packets are described
|
General query (`q') and set (`Q'). These packets are described
|
fully in *Note General Query Packets::.
|
fully in *note General Query Packets::.
|
|
|
`r'
|
`r'
|
Reset the entire system.
|
Reset the entire system.
|
|
|
Don't use this packet; use the `R' packet instead.
|
Don't use this packet; use the `R' packet instead.
|
Line 4977... |
Line 4979... |
any threads that don't have a specific action specified; if no
|
any threads that don't have a specific action specified; if no
|
default action is specified then other threads should remain
|
default action is specified then other threads should remain
|
stopped in all-stop mode and in their current state in non-stop
|
stopped in all-stop mode and in their current state in non-stop
|
mode. Specifying multiple default actions is an error; specifying
|
mode. Specifying multiple default actions is an error; specifying
|
no actions is also an error. Thread IDs are specified using the
|
no actions is also an error. Thread IDs are specified using the
|
syntax described in *Note thread-id syntax::.
|
syntax described in *note thread-id syntax::.
|
|
|
Currently supported actions are:
|
Currently supported actions are:
|
|
|
`c'
|
`c'
|
Continue.
|
Continue.
|
Line 5024... |
Line 5026... |
`'
|
`'
|
The `vCont' packet is not supported.
|
The `vCont' packet is not supported.
|
|
|
`vFile:OPERATION:PARAMETER...'
|
`vFile:OPERATION:PARAMETER...'
|
Perform a file operation on the target system. For details, see
|
Perform a file operation on the target system. For details, see
|
*Note Host I/O Packets::.
|
*note Host I/O Packets::.
|
|
|
`vFlashErase:ADDR,LENGTH'
|
`vFlashErase:ADDR,LENGTH'
|
Direct the stub to erase LENGTH bytes of flash starting at ADDR.
|
Direct the stub to erase LENGTH bytes of flash starting at ADDR.
|
The region may enclose any number of flash blocks, but its start
|
The region may enclose any number of flash blocks, but its start
|
and end must fall on block boundaries, as indicated by the flash
|
and end must fall on block boundaries, as indicated by the flash
|
Line 5082... |
Line 5084... |
|
|
`vKill;PID'
|
`vKill;PID'
|
Kill the process with the specified process ID. PID is a
|
Kill the process with the specified process ID. PID is a
|
hexadecimal integer identifying the process. This packet is used
|
hexadecimal integer identifying the process. This packet is used
|
in preference to `k' when multiprocess protocol extensions are
|
in preference to `k' when multiprocess protocol extensions are
|
supported; see *Note multiprocess extensions::.
|
supported; see *note multiprocess extensions::.
|
|
|
Reply:
|
Reply:
|
`E NN'
|
`E NN'
|
for an error
|
for an error
|
|
|
Line 5157... |
Line 5159... |
A memory breakpoint is implemented by replacing the instruction at
|
A memory breakpoint is implemented by replacing the instruction at
|
ADDR with a software breakpoint or trap instruction. The KIND is
|
ADDR with a software breakpoint or trap instruction. The KIND is
|
target-specific and typically indicates the size of the breakpoint
|
target-specific and typically indicates the size of the breakpoint
|
in bytes that should be inserted. E.g., the ARM and MIPS can
|
in bytes that should be inserted. E.g., the ARM and MIPS can
|
insert either a 2 or 4 byte breakpoint. Some architectures have
|
insert either a 2 or 4 byte breakpoint. Some architectures have
|
additional meanings for KIND; see *Note Architecture-Specific
|
additional meanings for KIND; see *note Architecture-Specific
|
Protocol Details::.
|
Protocol Details::.
|
|
|
_Implementation note: It is possible for a target to copy or move
|
_Implementation note: It is possible for a target to copy or move
|
code that contains memory breakpoints (e.g., when implementing
|
code that contains memory breakpoints (e.g., when implementing
|
overlays). The behavior of this packet, in the presence of such a
|
overlays). The behavior of this packet, in the presence of such a
|
Line 5278... |
Line 5280... |
corresponding R gives that register's value. R is a series
|
corresponding R gives that register's value. R is a series
|
of bytes in target byte order, with each byte given by a
|
of bytes in target byte order, with each byte given by a
|
two-digit hex number.
|
two-digit hex number.
|
|
|
* If N is `thread', then R is the THREAD-ID of the stopped
|
* If N is `thread', then R is the THREAD-ID of the stopped
|
thread, as specified in *Note thread-id syntax::.
|
thread, as specified in *note thread-id syntax::.
|
|
|
* If N is `core', then R is the hexadecimal number of the core
|
* If N is `core', then R is the hexadecimal number of the core
|
on which the stop event was detected.
|
on which the stop event was detected.
|
|
|
* If N is a recognized "stop reason", it describes a more
|
* If N is a recognized "stop reason", it describes a more
|
Line 5318... |
Line 5320... |
The process exited, and AA is the exit status. This is only
|
The process exited, and AA is the exit status. This is only
|
applicable to certain targets.
|
applicable to certain targets.
|
|
|
The second form of the response, including the process ID of the
|
The second form of the response, including the process ID of the
|
exited process, can be used only when GDB has reported support for
|
exited process, can be used only when GDB has reported support for
|
multiprocess protocol extensions; see *Note multiprocess
|
multiprocess protocol extensions; see *note multiprocess
|
extensions::. The PID is formatted as a big-endian hex string.
|
extensions::. The PID is formatted as a big-endian hex string.
|
|
|
`X AA'
|
`X AA'
|
`X AA ; process:PID'
|
`X AA ; process:PID'
|
The process terminated with signal AA.
|
The process terminated with signal AA.
|
|
|
The second form of the response, including the process ID of the
|
The second form of the response, including the process ID of the
|
terminated process, can be used only when GDB has reported support
|
terminated process, can be used only when GDB has reported support
|
for multiprocess protocol extensions; see *Note multiprocess
|
for multiprocess protocol extensions; see *note multiprocess
|
extensions::. The PID is formatted as a big-endian hex string.
|
extensions::. The PID is formatted as a big-endian hex string.
|
|
|
`O XX...'
|
`O XX...'
|
`XX...' is hex encoding of ASCII data, to be written as the
|
`XX...' is hex encoding of ASCII data, to be written as the
|
program's console output. This can happen at any time while the
|
program's console output. This can happen at any time while the
|
Line 5410... |
Line 5412... |
`qC'
|
`qC'
|
Return the current thread ID.
|
Return the current thread ID.
|
|
|
Reply:
|
Reply:
|
`QC THREAD-ID'
|
`QC THREAD-ID'
|
Where THREAD-ID is a thread ID as documented in *Note
|
Where THREAD-ID is a thread ID as documented in *note
|
thread-id syntax::.
|
thread-id syntax::.
|
|
|
`(anything else)'
|
`(anything else)'
|
Any other reply implies the old thread ID.
|
Any other reply implies the old thread ID.
|
|
|
Line 5462... |
Line 5464... |
|
|
In response to each query, the target will reply with a list of
|
In response to each query, the target will reply with a list of
|
one or more thread IDs, separated by commas. GDB will respond to
|
one or more thread IDs, separated by commas. GDB will respond to
|
each reply with a request for more thread ids (using the `qs' form
|
each reply with a request for more thread ids (using the `qs' form
|
of the query), until the target responds with `l' (lower-case ell,
|
of the query), until the target responds with `l' (lower-case ell,
|
for "last"). Refer to *Note thread-id syntax::, for the format of
|
for "last"). Refer to *note thread-id syntax::, for the format of
|
the THREAD-ID fields.
|
the THREAD-ID fields.
|
|
|
`qGetTLSAddr:THREAD-ID,OFFSET,LM'
|
`qGetTLSAddr:THREAD-ID,OFFSET,LM'
|
Fetch the address associated with thread local storage specified
|
Fetch the address associated with thread local storage specified
|
by THREAD-ID, OFFSET, and LM.
|
by THREAD-ID, OFFSET, and LM.
|
Line 5962... |
Line 5964... |
`QTFrame'
|
`QTFrame'
|
*Note Tracepoint Packets::.
|
*Note Tracepoint Packets::.
|
|
|
`qThreadExtraInfo,THREAD-ID'
|
`qThreadExtraInfo,THREAD-ID'
|
Obtain a printable string description of a thread's attributes from
|
Obtain a printable string description of a thread's attributes from
|
the target OS. THREAD-ID is a thread ID; see *Note thread-id
|
the target OS. THREAD-ID is a thread ID; see *note thread-id
|
syntax::. This string may contain anything that the target OS
|
syntax::. This string may contain anything that the target OS
|
thinks is interesting for GDB to tell the user about the thread.
|
thinks is interesting for GDB to tell the user about the thread.
|
The string is displayed in GDB's `info threads' display. Some
|
The string is displayed in GDB's `info threads' display. Some
|
examples of possible thread extra info strings are `Runnable', or
|
examples of possible thread extra info strings are `Runnable', or
|
`Blocked on Mutex'.
|
`Blocked on Mutex'.
|
Line 6212... |
Line 6214... |
|
|
D.5 Architecture-Specific Protocol Details
|
D.5 Architecture-Specific Protocol Details
|
==========================================
|
==========================================
|
|
|
This section describes how the remote protocol is applied to specific
|
This section describes how the remote protocol is applied to specific
|
target architectures. Also see *Note Standard Target Features::, for
|
target architectures. Also see *note Standard Target Features::, for
|
details of XML target descriptions for each architecture.
|
details of XML target descriptions for each architecture.
|
|
|
D.5.1 ARM
|
D.5.1 ARM
|
---------
|
---------
|
|
|
Line 6326... |
Line 6328... |
parameters are all unsigned hexadecimal values (the `-1'
|
parameters are all unsigned hexadecimal values (the `-1'
|
value for BASEREG is a special case).
|
value for BASEREG is a special case).
|
|
|
`X LEN,EXPR'
|
`X LEN,EXPR'
|
Evaluate EXPR, whose length is LEN, and collect memory as it
|
Evaluate EXPR, whose length is LEN, and collect memory as it
|
directs. EXPR is an agent expression, as described in *Note
|
directs. EXPR is an agent expression, as described in *note
|
Agent Expressions::. Each byte of the expression is encoded
|
Agent Expressions::. Each byte of the expression is encoded
|
as a two-digit hex number in the packet; LEN is the number of
|
as a two-digit hex number in the packet; LEN is the number of
|
bytes in the expression (and thus one-half the number of hex
|
bytes in the expression (and thus one-half the number of hex
|
digits in the packet).
|
digits in the packet).
|
|
|
|
|
Any number of actions may be packed together in a single `QTDP'
|
Any number of actions may be packed together in a single `QTDP'
|
packet, as long as the packet does not exceed the maximum packet
|
packet, as long as the packet does not exceed the maximum packet
|
length (400 bytes, for many stubs). There may be only one `R'
|
length (400 bytes, for many stubs). There may be only one `R'
|
action per tracepoint, and it must precede any `M' or `X' actions.
|
action per tracepoint, and it must precede any `M' or `X' actions.
|
Any registers referred to by `M' and `X' actions must be
|
Any registers referred to by `M' and `X' actions must be collected
|
collected by a preceding `R' action. (The "while-stepping"
|
by a preceding `R' action. (The "while-stepping" actions are
|
actions are treated as if they were attached to a separate
|
treated as if they were attached to a separate tracepoint, as far
|
tracepoint, as far as these restrictions are concerned.)
|
as these restrictions are concerned.)
|
|
|
Replies:
|
Replies:
|
`OK'
|
`OK'
|
The packet was understood and carried out.
|
The packet was understood and carried out.
|
|
|
Line 6736... |
Line 6738... |
is the number of target bytes read; the binary attachment may be
|
is the number of target bytes read; the binary attachment may be
|
longer if some characters were escaped.
|
longer if some characters were escaped.
|
|
|
`vFile:pwrite: FD, OFFSET, DATA'
|
`vFile:pwrite: FD, OFFSET, DATA'
|
Write DATA (a binary buffer) to the open file corresponding to FD.
|
Write DATA (a binary buffer) to the open file corresponding to FD.
|
Start the write at OFFSET from the start of the file. Unlike
|
Start the write at OFFSET from the start of the file. Unlike many
|
many `write' system calls, there is no separate COUNT argument;
|
`write' system calls, there is no separate COUNT argument; the
|
the length of DATA in the packet is used. `vFile:write' returns
|
length of DATA in the packet is used. `vFile:write' returns the
|
the number of bytes written, which may be shorter than the length
|
number of bytes written, which may be shorter than the length of
|
of DATA, or -1 if an error occurred.
|
DATA, or -1 if an error occurred.
|
|
|
`vFile:unlink: PATHNAME'
|
`vFile:unlink: PATHNAME'
|
Delete the file at PATHNAME on the target. Return 0, or -1 if an
|
Delete the file at PATHNAME on the target. Return 0, or -1 if an
|
error occurs. PATHNAME is a string.
|
error occurs. PATHNAME is a string.
|
|
|
Line 6830... |
Line 6832... |
|
|
The following notification packets from the stub to GDB are defined:
|
The following notification packets from the stub to GDB are defined:
|
|
|
`Stop: REPLY'
|
`Stop: REPLY'
|
Report an asynchronous stop event in non-stop mode. The REPLY has
|
Report an asynchronous stop event in non-stop mode. The REPLY has
|
the form of a stop reply, as described in *Note Stop Reply
|
the form of a stop reply, as described in *note Stop Reply
|
Packets::. Refer to *Note Remote Non-Stop::, for information on
|
Packets::. Refer to *note Remote Non-Stop::, for information on
|
how these notifications are acknowledged by GDB.
|
how these notifications are acknowledged by GDB.
|
|
|
|
|
File: gdb.info, Node: Remote Non-Stop, Next: Packet Acknowledgment, Prev: Notification Packets, Up: Remote Protocol
|
File: gdb.info, Node: Remote Non-Stop, Next: Packet Acknowledgment, Prev: Notification Packets, Up: Remote Protocol
|
|
|
D.10 Remote Protocol Support for Non-Stop Mode
|
D.10 Remote Protocol Support for Non-Stop Mode
|
==============================================
|
==============================================
|
|
|
GDB's remote protocol supports non-stop debugging of multi-threaded
|
GDB's remote protocol supports non-stop debugging of multi-threaded
|
programs, as described in *Note Non-Stop Mode::. If the stub supports
|
programs, as described in *note Non-Stop Mode::. If the stub supports
|
non-stop mode, it should report that to GDB by including `QNonStop+' in
|
non-stop mode, it should report that to GDB by including `QNonStop+' in
|
its `qSupported' response (*note qSupported::).
|
its `qSupported' response (*note qSupported::).
|
|
|
GDB typically sends a `QNonStop' packet only when establishing a new
|
GDB typically sends a `QNonStop' packet only when establishing a new
|
connection with the stub. Entering non-stop mode does not alter the
|
connection with the stub. Entering non-stop mode does not alter the
|
Line 6931... |
Line 6933... |
overhead, or for other reasons. This can be accomplished by means of
|
overhead, or for other reasons. This can be accomplished by means of
|
the `QStartNoAckMode' packet; *note QStartNoAckMode::.
|
the `QStartNoAckMode' packet; *note QStartNoAckMode::.
|
|
|
When in no-acknowledgment mode, neither the stub nor GDB shall send
|
When in no-acknowledgment mode, neither the stub nor GDB shall send
|
or expect `+'/`-' protocol acknowledgments. The packet and response
|
or expect `+'/`-' protocol acknowledgments. The packet and response
|
format still includes the normal checksum, as described in *Note
|
format still includes the normal checksum, as described in *note
|
Overview::, but the checksum may be ignored by the receiver.
|
Overview::, but the checksum may be ignored by the receiver.
|
|
|
If the stub supports `QStartNoAckMode' and prefers to operate in
|
If the stub supports `QStartNoAckMode' and prefers to operate in
|
no-acknowledgment mode, it should report that to GDB by including
|
no-acknowledgment mode, it should report that to GDB by including
|
`QStartNoAckMode+' in its response to `qSupported'; *note qSupported::.
|
`QStartNoAckMode+' in its response to `qSupported'; *note qSupported::.
|
Line 7825... |
Line 7827... |
time_t st_mtime; /* time of last modification */
|
time_t st_mtime; /* time of last modification */
|
time_t st_ctime; /* time of last change */
|
time_t st_ctime; /* time of last change */
|
};
|
};
|
|
|
The integral datatypes conform to the definitions given in the
|
The integral datatypes conform to the definitions given in the
|
appropriate section (see *Note Integral Datatypes::, for details) so
|
appropriate section (see *note Integral Datatypes::, for details) so
|
this structure is of size 64 bytes.
|
this structure is of size 64 bytes.
|
|
|
The values of several fields have a restricted meaning and/or range
|
The values of several fields have a restricted meaning and/or range
|
of values.
|
of values.
|
|
|
Line 7838... |
Line 7840... |
|
|
`st_ino'
|
`st_ino'
|
No valid meaning for the target. Transmitted unchanged.
|
No valid meaning for the target. Transmitted unchanged.
|
|
|
`st_mode'
|
`st_mode'
|
Valid mode bits are described in *Note Constants::. Any other
|
Valid mode bits are described in *note Constants::. Any other
|
bits have currently no meaning for the target.
|
bits have currently no meaning for the target.
|
|
|
`st_uid'
|
`st_uid'
|
`st_gid'
|
`st_gid'
|
`st_rdev'
|
`st_rdev'
|
Line 7876... |
Line 7878... |
time_t tv_sec; /* second */
|
time_t tv_sec; /* second */
|
long tv_usec; /* microsecond */
|
long tv_usec; /* microsecond */
|
};
|
};
|
|
|
The integral datatypes conform to the definitions given in the
|
The integral datatypes conform to the definitions given in the
|
appropriate section (see *Note Integral Datatypes::, for details) so
|
appropriate section (see *note Integral Datatypes::, for details) so
|
this structure is of size 8 bytes.
|
this structure is of size 8 bytes.
|
|
|
|
|
File: gdb.info, Node: Constants, Next: File-I/O Examples, Prev: Protocol-specific Representation of Datatypes, Up: File-I/O Remote Protocol Extension
|
File: gdb.info, Node: Constants, Next: File-I/O Examples, Prev: Protocol-specific Representation of Datatypes, Up: File-I/O Remote Protocol Extension
|
|
|