Set the line speed (baud rate or bits per second) of any serial
interface used by @value{GDBN} for remote debugging.
+@item -l @var{timeout}
+@cindex @code{-l}
+Set the timeout (in seconds) of any communication used by @value{GDBN}
+for remote debugging.
+
@item -tty @var{device}
@itemx -t @var{device}
@cindex @code{--tty}
@kindex show backtrace
Display the current user entry point backtrace policy.
+@item set backtrace past-entry
+@itemx set backtrace past-entry on
+Backtraces will continue past the internal entry point of an application.
+This entry point is encoded by the linker when the application is built,
+and is likely before the user entry point @code{main} (or equivalent) is called.
+
+@item set backtrace past-entry off
+Backtraces will stop when they encouter the internal entry point of an
+application. This is the default.
+
+@item show backtrace past-entry
+Display the current internal entry point backtrace policy.
+
@item set backtrace limit @var{n}
@itemx set backtrace limit 0
@cindex backtrace limit
* Auxiliary Vector:: Auxiliary data provided by operating system
* Memory Region Attributes:: Memory region attributes
* Dump/Restore Files:: Copy between memory and a file
+* Core File Generation:: Cause a program dump its core
* Character Sets:: Debugging programs that use a different
character set than GDB does
@end menu
@end table
+@node Core File Generation
+@section How to Produce a Core File from Your Program
+@cindex dump core from inferior
+
+A @dfn{core file} or @dfn{core dump} is a file that records the memory
+image of a running process and its process status (register values
+etc.). Its primary use is post-mortem debugging of a program that
+crashed while it ran outside a debugger. A program that crashes
+automatically produces a core file, unless this feature is disabled by
+the user. @xref{Files}, for information on invoking @value{GDBN} in
+the post-mortem debugging mode.
+
+Occasionally, you may wish to produce a core file of the program you
+are debugging in order to preserve a snapshot of its state.
+@value{GDBN} has a special command for that.
+
+@table @code
+@kindex gcore
+@kindex generate-core-file
+@item generate-core-file [@var{file}]
+@itemx gcore [@var{file}]
+Produce a core dump of the inferior process. The optional argument
+@var{file} specifies the file name where to put the core dump. If not
+specified, the file name defaults to @file{core.@var{pid}}, where
+@var{pid} is the inferior process ID.
+
+Note that this command is implemented only for some systems (as of
+this writing, @sc{gnu}/Linux, FreeBSD, Solaris, Unixware, and S390).
+@end table
+
@node Character Sets
@section Character Sets
@cindex character sets
This command takes no arguments. It ends the trace experiment, and
stops collecting data.
-@strong{Note:} a trace experiment and data collection may stop
+@strong{Note}: a trace experiment and data collection may stop
automatically if any tracepoint's passcount is reached
(@pxref{Tracepoint Passcounts}), or if the trace buffer becomes full.
@var{filename}. If so, @value{GDBN} maps in the symbol table from
@file{@var{filename}.syms}, starting up more quickly. See the
descriptions of the file options @samp{-mapped} and @samp{-readnow}
-(available on the command line, and with the commands @code{file},
-@code{symbol-file}, or @code{add-symbol-file}, described below),
-for more information.
+(available on the command line, see @ref{File Options, , -readnow},
+and with the commands @code{file}, @code{symbol-file}, or
+@code{add-symbol-file}, described below), for more information.
@item file
@code{file} with no argument makes @value{GDBN} discard any information it
@item show debug frame
Displays the current state of displaying @value{GDBN} frame debugging
info.
+@item set debug infrun
+@cindex inferior debugging info
+Turns on or off display of @value{GDBN} debugging info for running the inferior.
+The default is off. @file{infrun.c} contains GDB's runtime state machine used
+for implementing operations such as single-stepping the inferior.
+@item show debug infrun
+Displays the current state of @value{GDBN} inferior debugging.
@item set debug observer
@cindex observer debugging info
Turns on or off display of @value{GDBN} observer debugging. This
pre-execution hooks, for the same command.
It is valid for a hook to call the command which it hooks. If this
-occurs, the hook is not re-executed, thereby avoiding infinte recursion.
+occurs, the hook is not re-executed, thereby avoiding infinite recursion.
@c It would be nice if hookpost could be passed a parameter indicating
@c if the command it hooks executed properly or not. FIXME!
@var{addr} is address, @var{length} is number of bytes, @var{XX@dots{}}
is binary data. The characters @code{$}, @code{#}, and @code{0x7d} are
-escaped using @code{0x7d}.
+escaped using @code{0x7d}, and then XORed with @code{0x20}.
+For example, @code{0x7d} would be transmitted as @code{0x7d 0x5d}.
Reply:
@table @samp
Reply:
@table @samp
@item @code{QC}@var{pid}
-Where @var{pid} is a HEX encoded 16 bit process id.
+Where @var{pid} is an unsigned hexidecimal process id.
@item *
Any other reply implies the old pid.
@end table
@end table
In response to each query, the target will reply with a list of one or
-more thread ids, in big-endian hex, separated by commas. @value{GDBN}
-will respond to each reply with a request for more thread ids (using the
-@code{qs} form of the query), until the target responds with @code{l}
-(lower-case el, for @code{'last'}).
+more thread ids, in big-endian unsigned hex, separated by commas.
+@value{GDBN} will respond to each reply with a request for more thread
+ids (using the @code{qs} form of the query), until the target responds
+with @code{l} (lower-case el, for @code{'last'}).
@item @code{q}@code{ThreadExtraInfo}@code{,}@var{id} --- extra thread info
not recognize the @var{object} keyword, or its support for
@var{object} does not recognize the @var{operation} keyword,
the stub must respond with an empty packet.
+
+@item @code{qGetTLSAddr}:@var{thread-id},@var{offset},@var{lm} --- get thread local storage address
+
+Fetch the address associated with thread local storage specified
+by @var{thread-id}, @var{offset}, and @var{lm}.
+
+@var{thread-id} is the (big endian, hex encoded) thread id associated with the
+thread for which to fetch the TLS address.
+
+@var{offset} is the (big endian, hex encoded) offset associated with the
+thread local variable. (This offset is obtained from the debug
+information associated with the variable.)
+
+@var{lm} is the (big endian, hex encoded) OS/ABI specific encoding of the
+the load module associated with the thread local storage. For example,
+a @sc{gnu}/Linux system will pass the link map address of the shared
+object associated with the thread local storage under consideration.
+Other operating environments may choose to represent the load module
+differently, so the precise meaning of this parameter will vary.
+
+Reply:
+@table @asis
+@item @var{XX@dots{}}
+Hex encoded (big endian) bytes representing the address of the thread
+local storage requested.
+
+@item @code{E}@var{nn} (where @var{nn} are hex digits)
+An error occurred.
+
+@item @code{""} (empty)
+An empty reply indicates that @code{qGetTLSAddr} is not supported by the stub.
+@end table
+
@end table
@node Register Packet Format