2000-04-23 08:15:49 +00:00
|
|
|
@c \input texinfo @c -*-texinfo-*-
|
|
|
|
@c @c %**start of header
|
|
|
|
@c @setfilename gdbmi.info
|
|
|
|
@c @settitle GDB/MI Machine Interface
|
|
|
|
@c @setchapternewpage off
|
|
|
|
@c @c %**end of header
|
|
|
|
|
|
|
|
@c @ifinfo
|
|
|
|
@c This file documents GDB/MI, a Machine Interface to GDB.
|
|
|
|
|
2001-03-26 11:51:50 +00:00
|
|
|
@c Copyright 2000, 2001 Free Software Foundation, Inc.
|
2000-04-23 08:15:49 +00:00
|
|
|
@c Contributed by Cygnus Solutions.
|
|
|
|
|
2001-03-26 11:51:50 +00:00
|
|
|
@c Permission is granted to copy, distribute and/or modify this document
|
|
|
|
@c under the terms of the GNU Free Documentation License, Version 1.1 or
|
|
|
|
@c any later version published by the Free Software Foundation; with the
|
|
|
|
@c Invariant Sections being ``The GDB/MI Interface'' and ``GGDB/MI
|
|
|
|
@c Command Syntax'', with the Front-Cover texts being ``A GNU Manual,''
|
|
|
|
@c and with the Back-Cover Texts as in (a) below.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2001-03-26 11:51:50 +00:00
|
|
|
@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
|
|
|
@c this GNU Manual, like GNU software. Copies published by the Free
|
|
|
|
@c Software Foundation raise funds for GNU development.''
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @end ifinfo
|
|
|
|
|
|
|
|
@c @c This title page illustrates only one of the
|
|
|
|
@c @c two methods of forming a title page.
|
|
|
|
|
|
|
|
@c @titlepage
|
|
|
|
@c @title GDB/MI
|
2001-03-26 11:51:50 +00:00
|
|
|
@c @subtitle Version 0.3
|
|
|
|
@c @subtitle Apr 2001
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @author Andrew Cagney, Fernando Nasser and Elena Zannoni
|
|
|
|
|
|
|
|
@c @c The following two commands
|
|
|
|
@c @c start the copyright page.
|
|
|
|
@c @page
|
|
|
|
@c @vskip 0pt plus 1filll
|
|
|
|
|
2001-03-26 11:51:50 +00:00
|
|
|
@c Copyright @copyright{} 2000, 2001 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
@c Permission is granted to copy, distribute and/or modify this document
|
|
|
|
@c under the terms of the GNU Free Documentation License, Version 1.1 or
|
|
|
|
@c any later version published by the Free Software Foundation; with the
|
|
|
|
@c Invariant Sections being ``The GDB/MI Interface'' and ``GGDB/MI
|
|
|
|
@c Command Syntax'', with the Front-Cover texts being ``A GNU Manual,''
|
|
|
|
@c and with the Back-Cover Texts as in (a) below.
|
|
|
|
|
|
|
|
@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
|
|
|
@c this GNU Manual, like GNU software. Copies published by the Free
|
|
|
|
@c Software Foundation raise funds for GNU development.''
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @end titlepage
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% CHAPTER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI
|
|
|
|
@chapter The @sc{gdb/mi} Interface
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@unnumberedsec Function and Purpose
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex @sc{gdb/mi}, its purpose
|
2000-07-24 06:09:49 +00:00
|
|
|
@sc{gdb/mi} is a line based machine oriented text interface to @value{GDBN}. It is
|
2000-04-23 08:15:49 +00:00
|
|
|
specifically intended to support the development of systems which use
|
|
|
|
the debugger as just one small component of a larger system.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
This chapter is a specification of the @sc{gdb/mi} interface. It is written
|
|
|
|
in the form of a reference manual.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Note that @sc{gdb/mi} is still under construction, so some of the
|
|
|
|
features described below are incomplete and subject to change.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@unnumberedsec Notation and Terminology
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex notational conventions, for @sc{gdb/mi}
|
|
|
|
This chapter uses the following notation:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
@code{|} separates two alternatives.
|
|
|
|
|
|
|
|
@item
|
|
|
|
@code{[ @var{something} ]} indicates that @var{something} is optional:
|
|
|
|
it may or may not be given.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item
|
|
|
|
@code{( @var{group} )*} means that @var{group} inside the parentheses
|
|
|
|
may repeat zero or more times.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item
|
|
|
|
@code{( @var{group} )+} means that @var{group} inside the parentheses
|
|
|
|
may repeat one or more times.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item
|
|
|
|
@code{"@var{string}"} means a literal @var{string}.
|
|
|
|
@end itemize
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@ignore
|
2000-02-23 00:25:43 +00:00
|
|
|
@heading Dependencies
|
2000-04-23 08:15:49 +00:00
|
|
|
@end ignore
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@heading Acknowledgments
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
In alphabetic order: Andrew Cagney, Fernando Nasser, Stan Shebs and
|
|
|
|
Elena Zannoni.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* GDB/MI Command Syntax::
|
2000-04-26 23:39:53 +00:00
|
|
|
* GDB/MI Compatibility with CLI::
|
2000-04-23 08:15:49 +00:00
|
|
|
* GDB/MI Output Records::
|
|
|
|
* GDB/MI Command Description Format::
|
|
|
|
* GDB/MI Breakpoint Table Commands::
|
|
|
|
* GDB/MI Data Manipulation::
|
|
|
|
* GDB/MI Program Control::
|
2000-05-07 10:55:24 +00:00
|
|
|
* GDB/MI Miscellaneous Commands::
|
2000-04-23 08:15:49 +00:00
|
|
|
* GDB/MI Stack Manipulation::
|
|
|
|
* GDB/MI Symbol Query::
|
|
|
|
* GDB/MI Target Manipulation::
|
|
|
|
* GDB/MI Thread Commands::
|
|
|
|
* GDB/MI Tracepoint Commands::
|
|
|
|
* GDB/MI Variable Objects::
|
2000-04-26 23:39:53 +00:00
|
|
|
* GDB/MI Draft Changes to Output Syntax::
|
2000-04-23 08:15:49 +00:00
|
|
|
@end menu
|
|
|
|
|
|
|
|
@c When these are implemented, they should be moved to be between Misc and
|
|
|
|
@c Stack Manipulation in the above menu. They are now outside the menu
|
|
|
|
@c because makeinfo 3.12 barfs if it sees @ignore or @comments in the
|
|
|
|
@c middle of a menu.
|
|
|
|
@ignore
|
|
|
|
* GDB/MI Kod Commands::
|
|
|
|
* GDB/MI Memory Overlay Commands::
|
|
|
|
* GDB/MI Signal Handling Commands::
|
|
|
|
@end ignore
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Command Syntax
|
|
|
|
@section @sc{gdb/mi} Command Syntax
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@menu
|
|
|
|
* GDB/MI Input Syntax::
|
|
|
|
* GDB/MI Output Syntax::
|
|
|
|
* GDB/MI Simple Examples::
|
|
|
|
@end menu
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@node GDB/MI Input Syntax
|
|
|
|
@subsection @sc{gdb/mi} Input Syntax
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex input syntax for @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, input syntax
|
|
|
|
@table @code
|
|
|
|
@item @var{command} @expansion{}
|
|
|
|
@code{@var{cli-command} | @var{mi-command}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{cli-command} @expansion{}
|
|
|
|
@code{[ @var{token} ] @var{cli-command} @var{nl}}, where
|
2000-07-24 06:09:49 +00:00
|
|
|
@var{cli-command} is any existing @value{GDBN} CLI command.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{mi-command} @expansion{}
|
|
|
|
@code{[ @var{token} ] "-" @var{operation} ( " " @var{option} )*
|
|
|
|
@code{[} " --" @code{]} ( " " @var{parameter} )* @var{nl}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{token} @expansion{}
|
2000-08-23 09:15:25 +00:00
|
|
|
"any sequence of digits"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{option} @expansion{}
|
|
|
|
@code{"-" @var{parameter} [ " " @var{parameter} ]}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{parameter} @expansion{}
|
|
|
|
@code{@var{non-blank-sequence} | @var{c-string}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{operation} @expansion{}
|
2000-08-23 09:15:25 +00:00
|
|
|
@emph{any of the operations described in this chapter}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{non-blank-sequence} @expansion{}
|
|
|
|
@emph{anything, provided it doesn't contain special characters such as
|
|
|
|
"-", @var{nl}, """ and of course " "}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{c-string} @expansion{}
|
|
|
|
@code{""" @var{seven-bit-iso-c-string-content} """}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{nl} @expansion{}
|
|
|
|
@code{CR | CR-LF}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
@noindent
|
2000-02-23 00:25:43 +00:00
|
|
|
Notes:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
The CLI commands are still handled by the @sc{mi} interpreter; their
|
|
|
|
output is described below.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
The @code{@var{token}}, when present, is passed back when the command
|
2000-02-23 00:25:43 +00:00
|
|
|
finishes.
|
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
Some @sc{mi} commands accept optional arguments as part of the parameter
|
2000-08-23 09:15:25 +00:00
|
|
|
list. Each option is identified by a leading @samp{-} (dash) and may be
|
2000-04-23 08:15:49 +00:00
|
|
|
followed by an optional argument parameter. Options occur first in the
|
|
|
|
parameter list and can be delimited from normal parameters using
|
|
|
|
@samp{--} (this is useful when some parameters begin with a dash).
|
2000-02-23 00:25:43 +00:00
|
|
|
@end itemize
|
|
|
|
|
|
|
|
Pragmatics:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
We want easy access to the existing CLI syntax (for debugging).
|
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
We want it to be easy to spot a @sc{mi} operation.
|
2000-02-23 00:25:43 +00:00
|
|
|
@end itemize
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@node GDB/MI Output Syntax
|
|
|
|
@subsection @sc{gdb/mi} Output Syntax
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex output syntax of @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, output syntax
|
|
|
|
The output from @sc{gdb/mi} consists of zero or more out-of-band records
|
2000-05-07 10:55:24 +00:00
|
|
|
followed, optionally, by a single result record. This result record
|
|
|
|
is for the most recent command. The sequence of output records is
|
2000-08-23 09:15:25 +00:00
|
|
|
terminated by @samp{(@value{GDBP})}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
If an input command was prefixed with a @code{@var{token}} then the
|
2000-02-23 00:25:43 +00:00
|
|
|
corresponding output for that command will also be prefixed by that same
|
2000-04-23 08:15:49 +00:00
|
|
|
@var{token}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @code
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{output} @expansion{}
|
|
|
|
@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{result-record} @expansion{}
|
|
|
|
@code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{out-of-band-record} @expansion{}
|
|
|
|
@code{@var{async-record} | @var{stream-record}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{async-record} @expansion{}
|
|
|
|
@code{@var{exec-async-output} | @var{status-async-output} | @var{notify-async-output}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{exec-async-output} @expansion{}
|
|
|
|
@code{[ @var{token} ] "*" @var{async-output}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{status-async-output} @expansion{}
|
|
|
|
@code{[ @var{token} ] "+" @var{async-output}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{notify-async-output} @expansion{}
|
|
|
|
@code{[ @var{token} ] "=" @var{async-output}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{async-output} @expansion{}
|
|
|
|
@code{@var{async-class} ( "," @var{result} )* @var{nl}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{result-class} @expansion{}
|
|
|
|
@code{"done" | "running" | "connected" | "error" | "exit"}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{async-class} @expansion{}
|
|
|
|
@code{"stopped" | @var{others}} (where @var{others} will be added
|
|
|
|
depending on the needs---this is still in development).
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{result} @expansion{}
|
|
|
|
@code{[ @var{string} "=" ] @var{value}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{value} @expansion{}
|
|
|
|
@code{@var{const} | "@{" @var{result} ( "," @var{result} )* "@}"}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{const} @expansion{}
|
|
|
|
@code{@var{c-string}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{stream-record} @expansion{}
|
|
|
|
@code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{console-stream-output} @expansion{}
|
|
|
|
@code{"~" @var{c-string}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{target-stream-output} @expansion{}
|
|
|
|
@code{"@@" @var{c-string}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{log-stream-output} @expansion{}
|
|
|
|
@code{"&" @var{c-string}}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{nl} @expansion{}
|
|
|
|
@code{CR | CR-LF}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{token} @expansion{}
|
|
|
|
@emph{any sequence of digits}.
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
@noindent
|
2000-04-23 08:15:49 +00:00
|
|
|
In addition, the following are still being developed:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @code
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{query}
|
2000-02-23 00:25:43 +00:00
|
|
|
This action is currently undefined.
|
|
|
|
@end table
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
@noindent
|
2000-02-23 00:25:43 +00:00
|
|
|
Notes:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
All output sequences end in a single line containing a period.
|
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
The @code{@var{token}} is from the corresponding request. If an execution
|
|
|
|
command is interrupted by the @samp{-exec-interrupt} command, the
|
2000-08-23 09:15:25 +00:00
|
|
|
@var{token} associated with the @samp{*stopped} message is the one of the
|
|
|
|
original execution command, not the one of the interrupt command.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex status output in @sc{gdb/mi}
|
|
|
|
@var{status-async-output} contains on-going status information about the
|
|
|
|
progress of a slow operation. It can be discarded. All status output is
|
|
|
|
prefixed by @samp{+}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex async output in @sc{gdb/mi}
|
|
|
|
@var{exec-async-output} contains asynchronous state change on the target
|
|
|
|
(stopped, started, disappeared). All async output is prefixed by
|
|
|
|
@samp{*}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex notify output in @sc{gdb/mi}
|
|
|
|
@var{notify-async-output} contains supplementary information that the
|
|
|
|
client should handle (e.g., a new breakpoint information). All notify
|
|
|
|
output is prefixed by @samp{=}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex console output in @sc{gdb/mi}
|
|
|
|
@var{console-stream-output} is output that should be displayed as is in the
|
|
|
|
console. It is the textual response to a CLI command. All the console
|
|
|
|
output is prefixed by @samp{~}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex target output in @sc{gdb/mi}
|
|
|
|
@var{target-stream-output} is the output produced by the target program.
|
|
|
|
All the target output is prefixed by @samp{@@}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex log output in @sc{gdb/mi}
|
2000-07-24 06:09:49 +00:00
|
|
|
@var{log-stream-output} is output text coming from @value{GDBN}'s internals, for
|
2000-02-23 00:25:43 +00:00
|
|
|
instance messages that should be displayed as part of an error log. All
|
2000-04-23 08:15:49 +00:00
|
|
|
the log output is prefixed by @samp{&}.
|
2000-02-23 00:25:43 +00:00
|
|
|
@end itemize
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more
|
|
|
|
details about the various output records.
|
|
|
|
|
2000-04-26 23:39:53 +00:00
|
|
|
@xref{GDB/MI Draft Changes to Output Syntax, , @sc{gdb/mi} Draft Changes
|
|
|
|
to Output Syntax}, for proposed revisions to the current output syntax.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@node GDB/MI Simple Examples
|
|
|
|
@subsection Simple Examples of @sc{gdb/mi} Interaction
|
|
|
|
@cindex @sc{gdb/mi}, simple examples
|
|
|
|
|
|
|
|
This subsection presents several simple examples of interaction using
|
|
|
|
the @sc{gdb/mi} interface. In these examples, @samp{->} means that the
|
|
|
|
following line is passed to @sc{gdb/mi} as input, while @samp{<-} means
|
|
|
|
the output received from @sc{gdb/mi}.
|
|
|
|
|
|
|
|
@subsubheading Target Stop
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Here's an example of stopping the inferior process:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
|
|
|
-> -stop
|
2000-08-23 09:15:25 +00:00
|
|
|
<- (@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@noindent
|
|
|
|
and later:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
|
|
|
<- *stop,reason="stop",address="0x123",source="a.c:123"
|
2000-08-23 09:15:25 +00:00
|
|
|
<- (@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Simple CLI Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Here's an example of a simple CLI command being passed through
|
|
|
|
@sc{gdb/mi} and on to the CLI.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
|
|
|
-> print 1+2
|
|
|
|
<- ~3\n
|
2000-08-23 09:15:25 +00:00
|
|
|
<- (@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Command With Side Effects
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
|
|
|
-> -symbol-file xyz.exe
|
|
|
|
<- *breakpoint,nr="3",address="0x123",source="a.c:123"
|
2000-08-23 09:15:25 +00:00
|
|
|
<- (@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading A Bad Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Here's what happens if you pass a non-existent command:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
|
|
|
-> -rubbish
|
|
|
|
<- error,"Rubbish not found"
|
2000-08-23 09:15:25 +00:00
|
|
|
<- (@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2000-04-26 23:39:53 +00:00
|
|
|
@node GDB/MI Compatibility with CLI
|
2000-04-23 08:15:49 +00:00
|
|
|
@section @sc{gdb/mi} Compatibility with CLI
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex compatibility, @sc{gdb/mi} and CLI
|
|
|
|
@cindex @sc{gdb/mi}, compatibility with CLI
|
2000-07-24 06:09:49 +00:00
|
|
|
To help users familiar with @value{GDBN}'s existing CLI interface, @sc{gdb/mi}
|
2000-04-23 08:15:49 +00:00
|
|
|
accepts existing CLI commands. As specified by the syntax, such
|
2000-07-24 06:09:49 +00:00
|
|
|
commands can be directly entered into the @sc{gdb/mi} interface and @value{GDBN} will
|
2000-02-23 00:25:43 +00:00
|
|
|
respond.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
This mechanism is provided as an aid to developers of @sc{gdb/mi}
|
|
|
|
clients and not as a reliable interface into the CLI. Since the command
|
|
|
|
is being interpreteted in an environment that assumes @sc{gdb/mi}
|
|
|
|
behaviour, the exact output of such commands is likely to end up being
|
|
|
|
an un-supported hybrid of @sc{gdb/mi} and CLI output.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Output Records
|
|
|
|
@section @sc{gdb/mi} Output Records
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@menu
|
|
|
|
* GDB/MI Result Records::
|
|
|
|
* GDB/MI Stream Records::
|
|
|
|
* GDB/MI Out-of-band Records::
|
|
|
|
@end menu
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@node GDB/MI Result Records
|
|
|
|
@subsection @sc{gdb/mi} Result Records
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex result records in @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, result records
|
|
|
|
In addition to a number of out-of-band notifications, the response to a
|
|
|
|
@sc{gdb/mi} command includes one of the following result indications:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @code
|
2000-04-23 08:15:49 +00:00
|
|
|
@findex ^done
|
|
|
|
@item "^done" [ "," @var{results} ]
|
2000-08-23 09:15:25 +00:00
|
|
|
The synchronous operation was successful, @code{@var{results}} are the return
|
|
|
|
values.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item "^running"
|
|
|
|
@findex ^running
|
|
|
|
@c Is this one correct? Should it be an out-of-band notification?
|
2000-02-23 00:25:43 +00:00
|
|
|
The asynchronous operation was successfully started. The target is
|
2000-04-23 08:15:49 +00:00
|
|
|
running.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item "^error" "," @var{c-string}
|
2000-07-24 06:09:49 +00:00
|
|
|
@findex ^error
|
2000-04-23 08:15:49 +00:00
|
|
|
The operation failed. The @code{@var{c-string}} contains the corresponding
|
2000-02-23 00:25:43 +00:00
|
|
|
error message.
|
|
|
|
@end table
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@node GDB/MI Stream Records
|
|
|
|
@subsection @sc{gdb/mi} Stream Records
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex @sc{gdb/mi}, stream records
|
|
|
|
@cindex stream records in @sc{gdb/mi}
|
2000-07-24 06:09:49 +00:00
|
|
|
@value{GDBN} internally maintains a number of output streams: the console, the
|
2000-02-23 00:25:43 +00:00
|
|
|
target, and the log. The output intended for each of these streams is
|
2000-04-23 08:15:49 +00:00
|
|
|
funneled through the @sc{gdb/mi} interface using @dfn{stream records}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Each stream record begins with a unique @dfn{prefix character} which
|
|
|
|
identifies its stream (@pxref{GDB/MI Output Syntax, , @sc{gdb/mi} Output
|
2000-07-24 06:09:49 +00:00
|
|
|
Syntax}). In addition to the prefix, each stream record contains a
|
2000-04-23 08:15:49 +00:00
|
|
|
@code{@var{string-output}}. This is either raw text (with an implicit new
|
2000-02-23 00:25:43 +00:00
|
|
|
line) or a quoted C string (which does not contain an implicit newline).
|
|
|
|
|
|
|
|
@table @code
|
2000-04-23 08:15:49 +00:00
|
|
|
@item "~" @var{string-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
The console output stream contains text that should be displayed in the
|
|
|
|
CLI console window. It contains the textual responses to CLI commands.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item "@@" @var{string-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
The target output stream contains any textual output from the running
|
|
|
|
target.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item "&" @var{string-output}
|
2000-07-24 06:09:49 +00:00
|
|
|
The log stream contains debugging messages being produced by @value{GDBN}'s
|
2000-02-23 00:25:43 +00:00
|
|
|
internals.
|
|
|
|
@end table
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@node GDB/MI Out-of-band Records
|
|
|
|
@subsection @sc{gdb/mi} Out-of-band Records
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex out-of-band records in @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, out-of-band records
|
|
|
|
@dfn{Out-of-band} records are used to notify the @sc{gdb/mi} client of
|
|
|
|
additional changes that have occurred. Those changes can either be a
|
|
|
|
consequence of @sc{gdb/mi} (e.g., a breakpoint modified) or a result of
|
|
|
|
target activity (e.g., target stopped).
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
The following is a preliminary list of possible out-of-band records.
|
|
|
|
|
|
|
|
@table @code
|
2000-04-23 08:15:49 +00:00
|
|
|
@item "*" "stop"
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Command Description Format
|
|
|
|
@section @sc{gdb/mi} Command Description Format
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The remaining sections describe blocks of commands. Each block of
|
2000-08-23 09:15:25 +00:00
|
|
|
commands is laid out in a fashion similar to this section.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
Note the the line breaks shown in the examples are here only for
|
2000-08-23 09:15:25 +00:00
|
|
|
readability. They don't appear in the real output.
|
2000-04-23 08:15:49 +00:00
|
|
|
Also note that the commands with a non-available example (N.A.@:) are
|
|
|
|
not yet implemented.
|
|
|
|
|
|
|
|
@subheading Motivation
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The motivation for this collection of commands.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading Introduction
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
A brief introduction to this collection of commands as a whole.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading Commands
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
For each command in the block, the following is described:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
2000-07-24 06:09:49 +00:00
|
|
|
-command @var{args}@dots{}
|
2000-04-23 08:15:49 +00:00
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} CLI command.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Result
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Out-of-band
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Notes
|
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Breakpoint Table Commands
|
|
|
|
@section @sc{gdb/mi} Breakpoint table commands
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex breakpoint commands for @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, breakpoint commands
|
|
|
|
This section documents @sc{gdb/mi} commands for manipulating
|
|
|
|
breakpoints.
|
|
|
|
|
|
|
|
@subheading The @code{-break-after} Command
|
|
|
|
@findex -break-after
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-after @var{number} @var{count}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
The breakpoint number @var{number} is not in effect until it has been
|
|
|
|
hit @var{count} times. To see how this is reflected in the output of
|
|
|
|
the @samp{-break-list} command, see the description of the
|
|
|
|
@samp{-break-list} command below.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{ignore}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-insert main
|
|
|
|
^done,bkpt=@{number="1",addr="0x000100d0",file="hello.c",line="5"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-after 1 3
|
|
|
|
~
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
2000-04-23 08:15:49 +00:00
|
|
|
addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
|
|
|
|
ignore="3"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@ignore
|
|
|
|
@subheading The @code{-break-catch} Command
|
|
|
|
@findex -break-catch
|
|
|
|
|
|
|
|
@subheading The @code{-break-commands} Command
|
|
|
|
@findex -break-commands
|
|
|
|
@end ignore
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
@subheading The @code{-break-condition} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
@findex -break-condition
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-condition @var{number} @var{expr}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Breakpoint @var{number} will stop the program only if the condition in
|
|
|
|
@var{expr} is true. The condition becomes part of the
|
|
|
|
@samp{-break-list} output (see the description of the @samp{-break-list}
|
|
|
|
command below).
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{condition}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-condition 1 1
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
2000-04-23 08:15:49 +00:00
|
|
|
addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
|
|
|
|
times="0",ignore="3"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-break-delete} Command
|
|
|
|
@findex -break-delete
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-break-delete ( @var{breakpoint} )+
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Delete the breakpoint(s) whose number(s) are specified in the argument
|
2000-07-24 06:09:49 +00:00
|
|
|
list. This is obviously reflected in the breakpoint list.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{delete}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-delete 1
|
2000-02-23 00:25:43 +00:00
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-break-disable} Command
|
|
|
|
@findex -break-disable
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-disable ( @var{breakpoint} )+
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Disable the named @var{breakpoint}(s). The field @samp{enabled} in the
|
|
|
|
break list is now set to @samp{n} for the named @var{breakpoint}(s).
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{disable}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-disable 2
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
|
|
|
bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
|
|
|
|
addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-break-enable} Command
|
|
|
|
@findex -break-enable
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-enable ( @var{breakpoint} )+
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Enable (previously disabled) @var{breakpoint}(s).
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{enable}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-enable 2
|
2000-02-23 00:25:43 +00:00
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
|
|
|
bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-break-info} Command
|
|
|
|
@findex -break-info
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-break-info @var{breakpoint}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c REDUNDANT???
|
|
|
|
Get information about a single breakpoint.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info break @var{breakpoint}}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-break-insert} Command
|
|
|
|
@findex -break-insert
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-break-insert [ -t ] [ -h ] [ -r ]
|
|
|
|
[ -c @var{condition} ] [ -i @var{ignore-count} ]
|
|
|
|
[ -p @var{thread} ] [ @var{line} | @var{addr} ]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
If specified, @var{line}, can be one of:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item function
|
|
|
|
@c @item +offset
|
|
|
|
@c @item -offset
|
|
|
|
@c @item linenum
|
|
|
|
@item filename:linenum
|
|
|
|
@item filename:function
|
|
|
|
@item *address
|
|
|
|
@end itemize
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The possible optional parameters of this command are:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @samp
|
|
|
|
@item -t
|
|
|
|
Insert a tempoary breakpoint.
|
|
|
|
@item -h
|
|
|
|
Insert a hardware breakpoint.
|
2000-04-23 08:15:49 +00:00
|
|
|
@item -c @var{condition}
|
|
|
|
Make the breakpoint conditional on @var{condition}.
|
|
|
|
@item -i @var{ignore-count}
|
|
|
|
Initialize the @var{ignore-count}.
|
2000-02-23 00:25:43 +00:00
|
|
|
@item -r
|
|
|
|
Insert a regular breakpoint in all the functions whose names match the
|
|
|
|
given regular expression. Other flags are not applicable to regular
|
|
|
|
expresson.
|
|
|
|
@end table
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Result
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
The result is in the form:
|
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
^done,bkptno="@var{number}",func="@var{funcname}",
|
|
|
|
file="@var{filename}",line="@var{lineno}"
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
2000-07-24 06:09:49 +00:00
|
|
|
where @var{number} is the @value{GDBN} number for this breakpoint, @var{funcname}
|
2000-04-23 08:15:49 +00:00
|
|
|
is the name of the function where the breakpoint was inserted,
|
|
|
|
@var{filename} is the name of the source file which contains this
|
|
|
|
function, and @var{lineno} is the source line number within that file.
|
|
|
|
|
|
|
|
Note: this format is open to change.
|
|
|
|
@c An out-of-band breakpoint instead of part of the result?
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak},
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{hbreak}, @samp{thbreak}, and @samp{rbreak}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-insert main
|
|
|
|
^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-insert -t foo
|
|
|
|
^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
2000-04-23 08:15:49 +00:00
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
|
|
|
|
bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
|
|
|
|
addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-insert -r foo.*
|
|
|
|
~int foo(int, int);
|
|
|
|
^done,bkpt=@{number="3",addr="0x00010774",file="recursive2.c",line="11"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-break-list} Command
|
|
|
|
@findex -break-list
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-break-list
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
|
|
|
Displays the list of inserted breakpoints, showing the following fields:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@table @samp
|
|
|
|
@item Number
|
2000-04-23 08:15:49 +00:00
|
|
|
number of the breakpoint
|
2000-02-23 00:25:43 +00:00
|
|
|
@item Type
|
2000-04-23 08:15:49 +00:00
|
|
|
type of the breakpoint: @samp{breakpoint} or @samp{watchpoint}
|
2000-02-23 00:25:43 +00:00
|
|
|
@item Disposition
|
2000-04-23 08:15:49 +00:00
|
|
|
should the breakpoint be deleted or disabled when it is hit: @samp{keep}
|
|
|
|
or @samp{nokeep}
|
2000-02-23 00:25:43 +00:00
|
|
|
@item Enabled
|
2000-04-23 08:15:49 +00:00
|
|
|
is the breakpoint enabled or no: @samp{y} or @samp{n}
|
2000-02-23 00:25:43 +00:00
|
|
|
@item Address
|
2000-04-23 08:15:49 +00:00
|
|
|
memory location at which the breakpoint is set
|
2000-02-23 00:25:43 +00:00
|
|
|
@item What
|
2000-04-23 08:15:49 +00:00
|
|
|
logical location of the breakpoint, expressed by function name, file
|
|
|
|
name, line number
|
2000-07-24 06:09:49 +00:00
|
|
|
@item Times
|
2000-04-23 08:15:49 +00:00
|
|
|
number of times the breakpoint has been hit
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
If there are no breakpoints or watchpoints, the @code{BreakpointTable}
|
|
|
|
field is an empty list.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info break}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
|
|
|
|
bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Here's an example of the result when there are no breakpoints:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-break-watch} Command
|
|
|
|
@findex -break-watch
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-break-watch [ -a | -r ]
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Create a watchpoint. With the @samp{-a} option it will create an
|
2000-05-07 10:55:24 +00:00
|
|
|
@dfn{access} watchpoint, i.e. a watchpoint that triggers either on a
|
2000-04-23 08:15:49 +00:00
|
|
|
read from or on a write to the memory location. With the @samp{-r}
|
|
|
|
option, the watchpoint created is a @dfn{read} watchpoint, i.e. it will
|
|
|
|
trigger only when the memory location is accessed for reading. Without
|
|
|
|
either of the options, the watchpoint created is a regular watchpoint,
|
|
|
|
i.e. it will trigger when the memory location is accessed for writing.
|
|
|
|
@xref{Set Watchpoints, , Setting watchpoints}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Note that @samp{-break-list} will report a single list of watchpoints and
|
2000-02-23 00:25:43 +00:00
|
|
|
breakpoints inserted.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} commands are @samp{watch}, @samp{awatch}, and
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{rwatch}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
Setting a watchpoint on a variable in the @code{main} function:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-watch x
|
|
|
|
^done,wpt=@{number="2",exp="x"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-continue
|
2000-02-23 00:25:43 +00:00
|
|
|
^running
|
|
|
|
^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
|
|
|
|
value=@{old="-268439212",new="55"@},
|
|
|
|
frame=@{func="main",args=@{@},file="recursive2.c",line="5"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Setting a watchpoint on a variable local to a function. @value{GDBN} will stop
|
2000-04-23 08:15:49 +00:00
|
|
|
the program execution twice: first for the variable changing value, then
|
|
|
|
for the watchpoint going out of scope.
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-watch C
|
|
|
|
^done,wpt=@{number="5",exp="C"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-continue
|
|
|
|
^running
|
|
|
|
^done,reason="watchpoint-trigger",
|
|
|
|
wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@},
|
2000-04-23 08:15:49 +00:00
|
|
|
frame=@{func="callee4",args=@{@},
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-continue
|
|
|
|
^running
|
|
|
|
^done,reason="watchpoint-scope",wpnum="5",
|
2000-04-23 08:15:49 +00:00
|
|
|
frame=@{func="callee3",args=@{@{name="strarg",
|
|
|
|
value="0x11940 \"A string argument.\""@}@},
|
2000-02-23 00:25:43 +00:00
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Listing breakpoints and watchpoints, at different points in the program
|
|
|
|
execution. Note that once the watchpoint goes out of scope, it is
|
|
|
|
deleted.
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-watch C
|
|
|
|
^done,wpt=@{number="2",exp="C"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-break-list
|
2000-02-23 00:25:43 +00:00
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
2000-04-23 08:15:49 +00:00
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x00010734",func="callee4",
|
2000-02-23 00:25:43 +00:00
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
|
|
|
|
bkpt=@{number="2",type="watchpoint",disp="keep",
|
|
|
|
enabled="y",addr="",what="C",times="0"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-continue
|
|
|
|
^running
|
|
|
|
^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@},
|
|
|
|
value=@{old="-276895068",new="3"@},
|
|
|
|
frame=@{func="callee4",args=@{@},
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
2000-04-23 08:15:49 +00:00
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x00010734",func="callee4",
|
2000-02-23 00:25:43 +00:00
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
|
|
|
|
bkpt=@{number="2",type="watchpoint",disp="keep",
|
|
|
|
enabled="y",addr="",what="C",times="-5"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-continue
|
|
|
|
^running
|
|
|
|
^done,reason="watchpoint-scope",wpnum="2",
|
2000-04-23 08:15:49 +00:00
|
|
|
frame=@{func="callee3",args=@{@{name="strarg",
|
|
|
|
value="0x11940 \"A string argument.\""@}@},
|
2000-02-23 00:25:43 +00:00
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-list
|
|
|
|
^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
|
2000-04-23 08:15:49 +00:00
|
|
|
bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
|
|
|
|
addr="0x00010734",func="callee4",
|
2000-02-23 00:25:43 +00:00
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Data Manipulation
|
|
|
|
@section @sc{gdb/mi} Data Manipulation
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex data manipulation, in @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, data manipulation
|
|
|
|
This section describes the @sc{gdb/mi} commands that manipulate data:
|
|
|
|
examine memory and registers, evaluate expressions, etc.
|
|
|
|
|
|
|
|
@c REMOVED FROM THE INTERFACE.
|
|
|
|
@c @subheading -data-assign
|
2000-02-23 00:25:43 +00:00
|
|
|
@c Change the value of a program variable. Plenty of side effects.
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subsubheading GDB command
|
2000-02-23 00:25:43 +00:00
|
|
|
@c set variable
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
@c N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-data-disassemble} Command
|
|
|
|
@findex -data-disassemble
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-data-disassemble
|
|
|
|
[ -s @var{start-addr} -e @var{end-addr} ]
|
|
|
|
| [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ]
|
|
|
|
-- @var{mode}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
Where:
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@table @samp
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{start-addr}
|
|
|
|
is the beginning address (or @code{$pc})
|
|
|
|
@item @var{end-addr}
|
|
|
|
is the end address
|
|
|
|
@item @var{filename}
|
|
|
|
is the name of the file to disassemble
|
|
|
|
@item @var{linenum}
|
|
|
|
is the line number to disassemble around
|
|
|
|
@item @var{lines}
|
|
|
|
is the the number of disassembly lines to be produced. If it is -1,
|
2000-05-07 10:55:24 +00:00
|
|
|
the whole function will be disassembled, in case no @var{end-addr} is
|
2000-04-23 08:15:49 +00:00
|
|
|
specified. If @var{end-addr} is specified as a non-zero value, and
|
2000-05-07 10:55:24 +00:00
|
|
|
@var{lines} is lower than the number of disassembly lines between
|
2000-04-23 08:15:49 +00:00
|
|
|
@var{start-addr} and @var{end-addr}, only @var{lines} lines are
|
|
|
|
displayed; if @var{lines} is higher than the number of lines between
|
|
|
|
@var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr}
|
|
|
|
are displayed.
|
|
|
|
@item @var{mode}
|
|
|
|
is either 0 (meaning only disassembly) or 1 (meaning mixed source and
|
2000-07-24 06:09:49 +00:00
|
|
|
disassembly).
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Result
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
The output for each instruction is composed of four fields:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@itemize @bullet
|
|
|
|
@item Address
|
2000-03-06 22:14:44 +00:00
|
|
|
@item Func-name
|
|
|
|
@item Offset
|
2000-02-23 00:25:43 +00:00
|
|
|
@item Instruction
|
|
|
|
@end itemize
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-03-06 22:14:44 +00:00
|
|
|
Note that whatever included in the instruction field, is not manipulated
|
2000-08-23 09:15:25 +00:00
|
|
|
directely by @sc{gdb/mi}, i.e. it is not possible to adjust its format.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-03-06 22:14:44 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
There's no direct mapping from this command to the CLI.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
Disassemble from the current value of @code{$pc} to @code{$pc + 20}:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-data-disassemble -s $pc -e "$pc + 20" -- 0
|
2000-03-06 22:14:44 +00:00
|
|
|
^done,
|
2000-04-23 08:15:49 +00:00
|
|
|
asm_insns=@{
|
|
|
|
@{address="0x000107c0",func-name="main",offset="4",
|
|
|
|
inst="mov 2, %o0"@},
|
|
|
|
@{address="0x000107c4",func-name="main",offset="8",
|
|
|
|
inst="sethi %hi(0x11800), %o2"@},
|
|
|
|
@{address="0x000107c8",func-name="main",offset="12",
|
|
|
|
inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@},
|
|
|
|
@{address="0x000107cc",func-name="main",offset="16",
|
|
|
|
inst="sethi %hi(0x11800), %o2"@},
|
|
|
|
@{address="0x000107d0",func-name="main",offset="20",
|
|
|
|
inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Disassemble the whole @code{main} function. Line 32 is part of
|
|
|
|
@code{main}.
|
|
|
|
|
|
|
|
@smallexample
|
2000-03-06 22:14:44 +00:00
|
|
|
-data-disassemble -f basics.c -l 32 -- 0
|
2000-04-23 08:15:49 +00:00
|
|
|
^done,asm_insns=@{
|
|
|
|
@{address="0x000107bc",func-name="main",offset="0",
|
|
|
|
inst="save %sp, -112, %sp"@},
|
|
|
|
@{address="0x000107c0",func-name="main",offset="4",
|
|
|
|
inst="mov 2, %o0"@},
|
|
|
|
@{address="0x000107c4",func-name="main",offset="8",
|
|
|
|
inst="sethi %hi(0x11800), %o2"@},
|
2000-07-24 06:09:49 +00:00
|
|
|
[@dots{}]
|
2000-04-23 08:15:49 +00:00
|
|
|
@{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
|
|
|
|
@{address="0x00010820",func-name="main",offset="100",inst="restore "@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-05-07 10:55:24 +00:00
|
|
|
Disassemble 3 instructions from the start of @code{main}:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-03-06 22:14:44 +00:00
|
|
|
-data-disassemble -f basics.c -l 32 -n 3 -- 0
|
2000-04-23 08:15:49 +00:00
|
|
|
^done,asm_insns=@{
|
|
|
|
@{address="0x000107bc",func-name="main",offset="0",
|
|
|
|
inst="save %sp, -112, %sp"@},
|
|
|
|
@{address="0x000107c0",func-name="main",offset="4",
|
|
|
|
inst="mov 2, %o0"@},
|
|
|
|
@{address="0x000107c4",func-name="main",offset="8",
|
|
|
|
inst="sethi %hi(0x11800), %o2"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-03-06 22:14:44 +00:00
|
|
|
|
2000-05-07 10:55:24 +00:00
|
|
|
Disassemble 3 instructions from the start of @code{main} in mixed mode:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-03-06 22:14:44 +00:00
|
|
|
-data-disassemble -f basics.c -l 32 -n 3 -- 1
|
2000-04-23 08:15:49 +00:00
|
|
|
^done,asm_insns=@{
|
|
|
|
src_and_asm_line=@{line="31",
|
|
|
|
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
|
|
|
|
testsuite/gdb.mi/basics.c",line_asm_insn=@{
|
|
|
|
@{address="0x000107bc",func-name="main",offset="0",
|
|
|
|
inst="save %sp, -112, %sp"@}@}@},
|
|
|
|
|
|
|
|
src_and_asm_line=@{line="32",
|
|
|
|
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
|
|
|
|
testsuite/gdb.mi/basics.c",line_asm_insn=@{
|
|
|
|
@{address="0x000107c0",func-name="main",offset="4",
|
|
|
|
inst="mov 2, %o0"@},
|
|
|
|
@{address="0x000107c4",func-name="main",offset="8",
|
|
|
|
inst="sethi %hi(0x11800), %o2"@}@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-data-evaluate-expression} Command
|
|
|
|
@findex -data-evaluate-expression
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-data-evaluate-expression @var{expr}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Evaluate @var{expr} as an expression. The expression could contain an
|
|
|
|
inferior function call. The function call will execute synchronously.
|
|
|
|
If the expression contains spaces, it must be enclosed in double quotes.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} commands are @samp{print}, @samp{output}, and
|
2000-05-07 10:55:24 +00:00
|
|
|
@samp{call}. In @code{gdbtk} only, there's a corresponding
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{gdb_eval} command.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
In the following example, the numbers that precede the commands are the
|
2000-07-24 06:09:49 +00:00
|
|
|
@dfn{tokens} described in @ref{GDB/MI Command Syntax, ,@sc{gdb/mi}
|
2000-04-23 08:15:49 +00:00
|
|
|
Command Syntax}. Notice how @sc{gdb/mi} returns the same tokens in its
|
|
|
|
output.
|
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
211-data-evaluate-expression A
|
|
|
|
211^done,value="1"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
311-data-evaluate-expression &A
|
|
|
|
311^done,value="0xefffeb7c"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
411-data-evaluate-expression A+3
|
|
|
|
411^done,value="4"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
511-data-evaluate-expression "A + 3"
|
|
|
|
511^done,value="4"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-data-list-changed-registers} Command
|
|
|
|
@findex -data-list-changed-registers
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-data-list-changed-registers
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Display a list of the registers that have changed.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@value{GDBN} doesn't have a direct analog for this command; @code{gdbtk}
|
|
|
|
has the corresponding command @samp{gdb_changed_register_list}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
On a PPC MBX board:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-continue
|
2000-02-23 00:25:43 +00:00
|
|
|
^running
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
|
|
|
|
args=@{@},file="try.c",line="5"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-data-list-changed-registers
|
|
|
|
^done,changed-registers=@{"0","1","2","4","5","6","7","8","9",
|
|
|
|
"10","11","13","14","15","16","17","18","19","20","21","22","23",
|
|
|
|
"24","25","26","27","28","30","31","64","65","66","67","69"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-data-list-register-names} Command
|
|
|
|
@findex -data-list-register-names
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-data-list-register-names [ ( @var{regno} )+ ]
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
|
|
|
Show a list of register names for the current target. If no arguments
|
|
|
|
are given, it shows a list of the names of all the registers. If
|
|
|
|
integer numbers are given as arguments, it will print a list of the
|
2000-04-23 08:15:49 +00:00
|
|
|
names of the registers corresponding to the arguments.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@value{GDBN} does not have a command which corresponds to
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{-data-list-register-names}. In @code{gdbtk} there is a
|
|
|
|
corresponding command @samp{gdb_regnames}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
For the PPC MBX board:
|
2000-04-23 08:15:49 +00:00
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-data-list-register-names
|
|
|
|
^done,register-names=@{"r0","r1","r2","r3","r4","r5","r6","r7",
|
|
|
|
"r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
|
|
|
|
"r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
|
|
|
|
"r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
|
|
|
|
"f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
|
|
|
|
"f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
|
|
|
|
"pc","ps","cr","lr","ctr","xer"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-data-list-register-names 1 2 3
|
|
|
|
^done,register-names=@{"r1","r2","r3"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-data-list-register-values} Command
|
|
|
|
@findex -data-list-register-values
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-data-list-register-values @var{fmt} [ ( @var{regno} )*]
|
|
|
|
@end example
|
|
|
|
|
2000-05-07 10:55:24 +00:00
|
|
|
Display the registers' contents. @var{fmt} is the format according to
|
|
|
|
which the registers' contents are to be returned, followed by an optional
|
2000-04-23 08:15:49 +00:00
|
|
|
list of numbers specifying the registers to display. A missing list of
|
|
|
|
numbers indicates that the contents of all the registers must be returned.
|
|
|
|
|
|
|
|
Allowed formats for @var{fmt} are:
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
@item x
|
|
|
|
Hexadecimal
|
|
|
|
@item o
|
|
|
|
Octal
|
|
|
|
@item t
|
|
|
|
Binary
|
|
|
|
@item d
|
|
|
|
Decimal
|
|
|
|
@item r
|
|
|
|
Raw
|
|
|
|
@item N
|
|
|
|
Natural
|
|
|
|
@end table
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} commands are @samp{info reg}, @samp{info
|
|
|
|
all-reg}, and (in @code{gdbtk}) @samp{gdb_fetch_registers}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
For a PPC MBX board (note: line breaks are for readability only, they
|
|
|
|
don't appear in the actual output):
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-data-list-register-values r 64 65
|
|
|
|
^done,register-values=@{@{number="64",value="0xfe00a300"@},
|
|
|
|
@{number="65",value="0x00029002"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-data-list-register-values x
|
|
|
|
^done,register-values=@{@{number="0",value="0xfe0043c8"@},
|
|
|
|
@{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@},
|
|
|
|
@{number="3",value="0x0"@},@{number="4",value="0xa"@},
|
|
|
|
@{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@},
|
|
|
|
@{number="7",value="0xfe011e98"@},@{number="8",value="0x2"@},
|
|
|
|
@{number="9",value="0xfa202820"@},@{number="10",value="0xfa202808"@},
|
|
|
|
@{number="11",value="0x1"@},@{number="12",value="0x0"@},
|
|
|
|
@{number="13",value="0x4544"@},@{number="14",value="0xffdfffff"@},
|
|
|
|
@{number="15",value="0xffffffff"@},@{number="16",value="0xfffffeff"@},
|
|
|
|
@{number="17",value="0xefffffed"@},@{number="18",value="0xfffffffe"@},
|
|
|
|
@{number="19",value="0xffffffff"@},@{number="20",value="0xffffffff"@},
|
|
|
|
@{number="21",value="0xffffffff"@},@{number="22",value="0xfffffff7"@},
|
|
|
|
@{number="23",value="0xffffffff"@},@{number="24",value="0xffffffff"@},
|
|
|
|
@{number="25",value="0xffffffff"@},@{number="26",value="0xfffffffb"@},
|
|
|
|
@{number="27",value="0xffffffff"@},@{number="28",value="0xf7bfffff"@},
|
|
|
|
@{number="29",value="0x0"@},@{number="30",value="0xfe010000"@},
|
|
|
|
@{number="31",value="0x0"@},@{number="32",value="0x0"@},
|
|
|
|
@{number="33",value="0x0"@},@{number="34",value="0x0"@},
|
|
|
|
@{number="35",value="0x0"@},@{number="36",value="0x0"@},
|
|
|
|
@{number="37",value="0x0"@},@{number="38",value="0x0"@},
|
|
|
|
@{number="39",value="0x0"@},@{number="40",value="0x0"@},
|
|
|
|
@{number="41",value="0x0"@},@{number="42",value="0x0"@},
|
|
|
|
@{number="43",value="0x0"@},@{number="44",value="0x0"@},
|
|
|
|
@{number="45",value="0x0"@},@{number="46",value="0x0"@},
|
|
|
|
@{number="47",value="0x0"@},@{number="48",value="0x0"@},
|
|
|
|
@{number="49",value="0x0"@},@{number="50",value="0x0"@},
|
|
|
|
@{number="51",value="0x0"@},@{number="52",value="0x0"@},
|
|
|
|
@{number="53",value="0x0"@},@{number="54",value="0x0"@},
|
|
|
|
@{number="55",value="0x0"@},@{number="56",value="0x0"@},
|
|
|
|
@{number="57",value="0x0"@},@{number="58",value="0x0"@},
|
|
|
|
@{number="59",value="0x0"@},@{number="60",value="0x0"@},
|
|
|
|
@{number="61",value="0x0"@},@{number="62",value="0x0"@},
|
|
|
|
@{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@},
|
|
|
|
@{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@},
|
|
|
|
@{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@},
|
|
|
|
@{number="69",value="0x20002b03"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-data-read-memory} Command
|
|
|
|
@findex -data-read-memory
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-data-read-memory [ -o @var{byte-offset} ]
|
|
|
|
@var{address} @var{word-format} @var{word-size}
|
|
|
|
@var{nr-rows} @var{nr-cols} [ @var{aschar} ]
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@noindent
|
|
|
|
where:
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@table @samp
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{address}
|
2000-02-23 00:25:43 +00:00
|
|
|
An expression specifying the address of the first memory word to be
|
|
|
|
read. Complex expressions containing embedded white space should be
|
|
|
|
quoted using the C convention.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@item @var{word-format}
|
2000-02-23 00:25:43 +00:00
|
|
|
The format to be used to print the memory words. The notation is the
|
2000-07-24 06:09:49 +00:00
|
|
|
same as for @value{GDBN}'s @code{print} command (@pxref{Output Formats,
|
|
|
|
,Output formats}).
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@item @var{word-size}
|
2000-02-23 00:25:43 +00:00
|
|
|
The size of each memory word in bytes.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@item @var{nr-rows}
|
2000-02-23 00:25:43 +00:00
|
|
|
The number of rows in the output table.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@item @var{nr-cols}
|
2000-02-23 00:25:43 +00:00
|
|
|
The number of columns in the output table.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@item @var{aschar}
|
|
|
|
If present, indicates that each row should include an @sc{ascii} dump. The
|
|
|
|
value of @var{aschar} is used as a padding character when a byte is not a
|
|
|
|
member of the printable @sc{ascii} character set (printable @sc{ascii}
|
|
|
|
characters are those whose code is between 32 and 126, inclusively).
|
|
|
|
|
|
|
|
@item @var{byte-offset}
|
|
|
|
An offset to add to the @var{address} before fetching memory.
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
This command displays memory contents as a table of @var{nr-rows} by
|
|
|
|
@var{nr-cols} words, each word being @var{word-size} bytes. In total,
|
|
|
|
@code{@var{nr-rows} * @var{nr-cols} * @var{word-size}} bytes are read
|
2000-05-07 10:55:24 +00:00
|
|
|
(returned as @samp{total-bytes}). Should less then the requested number
|
2000-04-23 08:15:49 +00:00
|
|
|
of bytes be returned by the target, the missing words are identified
|
2000-05-07 10:55:24 +00:00
|
|
|
using @samp{N/A}. The number of bytes read from the target is returned
|
2000-04-23 08:15:49 +00:00
|
|
|
in @samp{nr-bytes} and the starting address used to read memory in
|
|
|
|
@samp{addr}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
The address of the next/previous row or page is available in
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{next-row} and @samp{prev-row}, @samp{next-page} and
|
|
|
|
@samp{prev-page}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{x}. @code{gdbtk} has
|
|
|
|
@samp{gdb_get_mem} memory read command.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
Read six bytes of memory starting at @code{bytes+6} but then offset by
|
2000-07-24 06:09:49 +00:00
|
|
|
@code{-6} bytes. Format as three rows of two columns. One byte per
|
2000-02-23 00:25:43 +00:00
|
|
|
word. Display each word in hex.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
9-data-read-memory -o -6 -- bytes+6 x 1 3 2
|
|
|
|
9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
|
|
|
|
next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
|
|
|
|
prev-page="0x0000138a",memory=@{
|
|
|
|
@{addr="0x00001390",data=@{"0x00","0x01"@}@},
|
|
|
|
@{addr="0x00001392",data=@{"0x02","0x03"@}@},
|
|
|
|
@{addr="0x00001394",data=@{"0x04","0x05"@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
Read two bytes of memory starting at address @code{shorts + 64} and
|
|
|
|
display as a single word formatted in decimal.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
5-data-read-memory shorts+64 d 2 1 1
|
|
|
|
5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
|
|
|
|
next-row="0x00001512",prev-row="0x0000150e",
|
|
|
|
next-page="0x00001512",prev-page="0x0000150e",memory=@{
|
|
|
|
@{addr="0x00001510",data=@{"128"@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
Read thirty two bytes of memory starting at @code{bytes+16} and format
|
2000-08-23 09:15:25 +00:00
|
|
|
as eight rows of four columns. Include a string encoding with @samp{x}
|
2000-02-23 00:25:43 +00:00
|
|
|
used as the non-printable character.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
4-data-read-memory bytes+16 x 1 8 4 x
|
|
|
|
4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
|
|
|
|
next-row="0x000013c0",prev-row="0x0000139c",
|
|
|
|
next-page="0x000013c0",prev-page="0x00001380",memory=@{
|
|
|
|
@{addr="0x000013a0",data=@{"0x10","0x11","0x12","0x13"@},ascii="xxxx"@},
|
|
|
|
@{addr="0x000013a4",data=@{"0x14","0x15","0x16","0x17"@},ascii="xxxx"@},
|
|
|
|
@{addr="0x000013a8",data=@{"0x18","0x19","0x1a","0x1b"@},ascii="xxxx"@},
|
|
|
|
@{addr="0x000013ac",data=@{"0x1c","0x1d","0x1e","0x1f"@},ascii="xxxx"@},
|
|
|
|
@{addr="0x000013b0",data=@{"0x20","0x21","0x22","0x23"@},ascii=" !\"#"@},
|
|
|
|
@{addr="0x000013b4",data=@{"0x24","0x25","0x26","0x27"@},ascii="$%&'"@},
|
|
|
|
@{addr="0x000013b8",data=@{"0x28","0x29","0x2a","0x2b"@},ascii="()*+"@},
|
|
|
|
@{addr="0x000013bc",data=@{"0x2c","0x2d","0x2e","0x2f"@},ascii=",-./"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-display-delete} Command
|
|
|
|
@findex -display-delete
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-display-delete @var{number}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Delete the display @var{number}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{delete display}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-display-disable} Command
|
|
|
|
@findex -display-disable
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-display-disable @var{number}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Disable display @var{number}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{disable display}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-display-enable} Command
|
|
|
|
@findex -display-enable
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-display-enable @var{number}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Enable display @var{number}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{enable display}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-display-insert} Command
|
|
|
|
@findex -display-insert
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-display-insert @var{expression}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Display @var{expression} every time the program stops.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{display}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-display-list} Command
|
|
|
|
@findex -display-list
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-display-list
|
|
|
|
@end example
|
|
|
|
|
|
|
|
List the displays. Do not show the current values.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info display}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-environment-cd} Command
|
|
|
|
@findex -environment-cd
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-environment-cd @var{pathdir}
|
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Set @value{GDBN}'s working directory.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{cd}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-environment-directory} Command
|
|
|
|
@findex -environment-directory
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-environment-directory @var{pathdir}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Add directory @var{pathdir} to beginning of search path for source files.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{dir}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-environment-path} Command
|
|
|
|
@findex -environment-path
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-environment-path ( @var{pathdir} )+
|
|
|
|
@end example
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
Add directories @var{pathdir} to beginning of search path for object files.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{path}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-environment-pwd} Command
|
|
|
|
@findex -environment-pwd
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-environment-pwd
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Show the current working directory.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{pwd}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-environment-pwd
|
|
|
|
~Working directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb.
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Program Control
|
|
|
|
@section @sc{gdb/mi} Program control
|
|
|
|
|
|
|
|
@subsubheading Program termination
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
As a result of execution, the inferior program can run to completion, if
|
2000-07-24 06:09:49 +00:00
|
|
|
it doesn't encounter any breakpoints. In this case the output will
|
2000-02-23 00:25:43 +00:00
|
|
|
include an exit code, if the program has exited exceptionally.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
@subsubheading Examples
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@noindent
|
2000-02-23 00:25:43 +00:00
|
|
|
Program exited normally:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-run
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
x = 55
|
|
|
|
*stopped,reason="exited-normally"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@noindent
|
2000-02-23 00:25:43 +00:00
|
|
|
Program exited exceptionally:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-run
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
x = 55
|
|
|
|
*stopped,reason="exited",exit-code="01"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Another way the program can terminate is if it receives a signal such as
|
|
|
|
@code{SIGINT}. In this case, @sc{gdb/mi} displays this:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
*stopped,reason="exited-signalled",signal-name="SIGINT",
|
|
|
|
signal-meaning="Interrupt"
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-exec-abort} Command
|
|
|
|
@findex -exec-abort
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-abort
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
|
|
|
Kill the inferior running program.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{kill}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-exec-arguments} Command
|
|
|
|
@findex -exec-arguments
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-arguments @var{args}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Set the inferior program arguments, to be used in the next
|
|
|
|
@samp{-exec-run}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{set args}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@c FIXME!
|
|
|
|
Don't have one around.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-exec-continue} Command
|
|
|
|
@findex -exec-continue
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-continue
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Asynchronous command. Resumes the execution of the inferior program
|
|
|
|
until a breakpoint is encountered, or until the inferior exits.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} corresponding is @samp{continue}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-continue
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@@Hello world
|
|
|
|
*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=@{@},
|
|
|
|
file="hello.c",line="13"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-exec-finish} Command
|
|
|
|
@findex -exec-finish
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-finish
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Asynchronous command. Resumes the execution of the inferior program
|
|
|
|
until the current function is exited. Displays the results returned by
|
|
|
|
the function.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{finish}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
Function returning @code{void}.
|
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-finish
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
@@hello from foo
|
|
|
|
*stopped,reason="function-finished",frame=@{func="main",args=@{@},
|
|
|
|
file="hello.c",line="7"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Function returning other than @code{void}. The name of the internal
|
|
|
|
@value{GDBN} variable storing the result is printed, together with the
|
|
|
|
value itself.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-finish
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo",
|
2000-04-23 08:15:49 +00:00
|
|
|
args=@{@{name="a",value="1"@},@{name="b",value="9"@}@},
|
|
|
|
file="recursive2.c",line="14"@},
|
2000-02-23 00:25:43 +00:00
|
|
|
gdb-result-var="$1",return-value="0"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-exec-interrupt} Command
|
|
|
|
@findex -exec-interrupt
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-exec-interrupt
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Asynchronous command. Interrupts the background execution of the target.
|
2000-02-23 00:25:43 +00:00
|
|
|
Note how the token associated with the stop message is the one for the
|
2000-04-23 08:15:49 +00:00
|
|
|
execution command that has been interrupted. The token for the interrupt
|
2000-07-24 06:09:49 +00:00
|
|
|
itself only appears in the @samp{^done} output. If the user is trying to
|
2000-04-23 08:15:49 +00:00
|
|
|
interrupt a non-running program, an error message will be printed.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{interrupt}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
111-exec-continue
|
|
|
|
111^running
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
222-exec-interrupt
|
|
|
|
222^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
|
|
|
|
frame=@{addr="0x00010140",func="foo",args=@{@},file="try.c",line="13"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-interrupt
|
|
|
|
^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-exec-next} Command
|
|
|
|
@findex -exec-next
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-next
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Asynchronous command. Resumes execution of the inferior program, stopping
|
2000-02-23 00:25:43 +00:00
|
|
|
when the beginning of the next source line is reached.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{next}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-next
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="end-stepping-range",line="8",file="hello.c"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-exec-next-instruction} Command
|
|
|
|
@findex -exec-next-instruction
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-next-instruction
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Asynchronous command. Executes one machine instruction. If the
|
2000-02-23 00:25:43 +00:00
|
|
|
instruction is a function call continues until the function returns. If
|
|
|
|
the program stops at an instruction in the middle of a source line, the
|
|
|
|
address will be printed as well.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{nexti}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-next-instruction
|
2000-02-23 00:25:43 +00:00
|
|
|
^running
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="end-stepping-range",
|
|
|
|
addr="0x000100d4",line="5",file="hello.c"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-exec-return} Command
|
|
|
|
@findex -exec-return
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-exec-return
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Makes current function return immediately. Doesn't execute the inferior.
|
|
|
|
Displays the new current frame.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{return}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
200-break-insert callee4
|
|
|
|
200^done,bkpt=@{number="1",addr="0x00010734",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
000-exec-run
|
2000-02-23 00:25:43 +00:00
|
|
|
000^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
000*stopped,reason="breakpoint-hit",bkptno="1",
|
|
|
|
frame=@{func="callee4",args=@{@},
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
205-break-delete
|
|
|
|
205^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
111-exec-return
|
|
|
|
111^done,frame=@{level="0 ",func="callee3",
|
2000-04-23 08:15:49 +00:00
|
|
|
args=@{@{name="strarg",
|
|
|
|
value="0x11940 \"A string argument.\""@}@},
|
2000-02-23 00:25:43 +00:00
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-exec-run} Command
|
|
|
|
@findex -exec-run
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-run
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Asynchronous command. Starts execution of the inferior from the
|
|
|
|
beginning. The inferior executes until either a breakpoint is
|
2000-02-23 00:25:43 +00:00
|
|
|
encountered or the program exits.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{run}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-break-insert main
|
|
|
|
^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-run
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="breakpoint-hit",bkptno="1",
|
|
|
|
frame=@{func="main",args=@{@},file="recursive2.c",line="4"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-exec-show-arguments} Command
|
|
|
|
@findex -exec-show-arguments
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-show-arguments
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
Print the arguments of the program.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{show args}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -exec-signal
|
|
|
|
|
|
|
|
@subheading The @code{-exec-step} Command
|
|
|
|
@findex -exec-step
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-exec-step
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Asynchronous command. Resumes execution of the inferior program, stopping
|
2000-02-23 00:25:43 +00:00
|
|
|
when the beginning of the next source line is reached, if the next
|
2000-04-23 08:15:49 +00:00
|
|
|
source line is not a function call. If it is, stop at the first
|
2000-02-23 00:25:43 +00:00
|
|
|
instruction of the called function.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{step}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
Stepping into a function:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-step
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
*stopped,reason="end-stepping-range",
|
|
|
|
frame=@{func="foo",args=@{@{name="a",value="10"@},
|
2000-02-23 00:25:43 +00:00
|
|
|
@{name="b",value="0"@}@},file="recursive2.c",line="11"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Regular stepping:
|
|
|
|
|
|
|
|
@smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-step
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="end-stepping-range",line="14",file="recursive2.c"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-exec-step-instruction} Command
|
|
|
|
@findex -exec-step-instruction
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-step-instruction
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Asynchronous command. Resumes the inferior which executes one machine
|
2000-07-24 06:09:49 +00:00
|
|
|
instruction. The output, once @value{GDBN} has stopped, will vary depending on
|
2000-05-07 10:57:54 +00:00
|
|
|
whether we have stopped in the middle of a source line or not. In the
|
|
|
|
former case, the address at which the program stopped will be printed as
|
|
|
|
well.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{stepi}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-step-instruction
|
|
|
|
^running
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="end-stepping-range",
|
|
|
|
frame=@{func="foo",args=@{@},file="try.c",line="10"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-step-instruction
|
|
|
|
^running
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="end-stepping-range",
|
|
|
|
frame=@{addr="0x000100f4",func="foo",args=@{@},file="try.c",line="10"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-exec-until} Command
|
|
|
|
@findex -exec-until
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-exec-until [ @var{location} ]
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Asynchronous command. Executes the inferior until the @var{location}
|
|
|
|
specified in the argument is reached. If there is no argument, the inferior
|
2000-02-23 00:25:43 +00:00
|
|
|
executes until a source line greater than the current one is reached.
|
2000-08-23 09:15:25 +00:00
|
|
|
The reason for stopping in this case will be @samp{location-reached}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{until}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-until recursive2.c:6
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
x = 55
|
|
|
|
*stopped,reason="location-reached",frame=@{func="main",args=@{@},
|
|
|
|
file="recursive2.c",line="6"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@ignore
|
|
|
|
@subheading -file-clear
|
2000-02-23 00:25:43 +00:00
|
|
|
Is this going away????
|
2000-04-23 08:15:49 +00:00
|
|
|
@end ignore
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-file-exec-and-symbols} Command
|
|
|
|
@findex -file-exec-and-symbols
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-file-exec-and-symbols @var{file}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Specify the executable file to be debugged. This file is the one from
|
|
|
|
which the symbol table is also read. If no file is specified, the
|
|
|
|
command clears the executable and symbol information. If breakpoints
|
2000-07-24 06:09:49 +00:00
|
|
|
are set when using this command with no arguments, @value{GDBN} will produce
|
2000-05-07 10:55:24 +00:00
|
|
|
error messages. Otherwise, no output is produced, except a completion
|
2000-04-23 08:15:49 +00:00
|
|
|
notification.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{file}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-file-exec-file} Command
|
|
|
|
@findex -file-exec-file
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-file-exec-file @var{file}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Specify the executable file to be debugged. Unlike
|
|
|
|
@samp{-file-exec-and-symbols}, the symbol table is @emph{not} read
|
2000-07-24 06:09:49 +00:00
|
|
|
from this file. If used without argument, @value{GDBN} clears the information
|
2000-02-23 00:25:43 +00:00
|
|
|
about the executable file. No output is produced, except a completion
|
|
|
|
notification.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{exec-file}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-file-list-exec-sections} Command
|
|
|
|
@findex -file-list-exec-sections
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-file-list-exec-sections
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
|
|
|
List the sections of the current executable file.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The @value{GDBN} command @samp{info file} shows, among the rest, the same
|
2000-04-23 08:15:49 +00:00
|
|
|
information as this command. @code{gdbtk} has a corresponding command
|
|
|
|
@samp{gdb_load_info}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-file-list-exec-source-files} Command
|
|
|
|
@findex -file-list-exec-source-files
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-file-list-exec-source-files
|
|
|
|
@end example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
List the source files for the current executable.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
There's no @value{GDBN} command which directly corresponds to this one.
|
2000-04-23 08:15:49 +00:00
|
|
|
@code{gdbtk} has an analogous command @samp{gdb_listfiles}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-file-list-shared-libraries} Command
|
|
|
|
@findex -file-list-shared-libraries
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-file-list-shared-libraries
|
|
|
|
@end example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
List the shared libraries in the program.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info shared}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-file-list-symbol-files} Command
|
|
|
|
@findex -file-list-symbol-files
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-file-list-symbol-files
|
|
|
|
@end example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
List symbol files.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info file} (part of it).
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-file-symbol-file} Command
|
|
|
|
@findex -file-symbol-file
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-file-symbol-file @var{file}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Read symbol table info from the specified @var{file} argument. When
|
2000-07-24 06:09:49 +00:00
|
|
|
used without arguments, clears @value{GDBN}'s symbol table info. No output is
|
2000-04-23 08:15:49 +00:00
|
|
|
produced, except for a completion notification.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{symbol-file}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2000-05-07 10:55:24 +00:00
|
|
|
@node GDB/MI Miscellaneous Commands
|
2000-07-24 06:09:49 +00:00
|
|
|
@section Miscellaneous @value{GDBN} commands in @sc{gdb/mi}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -gdb-complete
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-gdb-exit} Command
|
|
|
|
@findex -gdb-exit
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-gdb-exit
|
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Exit @value{GDBN} immediately.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
Approximately corresponds to @samp{quit}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-gdb-exit
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-gdb-set} Command
|
|
|
|
@findex -gdb-set
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-gdb-set
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Set an internal @value{GDBN} variable.
|
2000-04-23 08:15:49 +00:00
|
|
|
@c IS THIS A DOLLAR VARIABLE? OR SOMETHING LIKE ANNOTATE ?????
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{set}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-gdb-set $foo=3
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-gdb-show} Command
|
|
|
|
@findex -gdb-show
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-gdb-show
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Show the current value of a @value{GDBN} variable.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{show}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-gdb-show annotate
|
|
|
|
^done,value="0"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -gdb-source
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-gdb-version} Command
|
|
|
|
@findex -gdb-version
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-gdb-version
|
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Show version information for @value{GDBN}. Used mostly in testing.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
There's no equivalent @value{GDBN} command. @value{GDBN} by default shows this
|
2000-04-23 08:15:49 +00:00
|
|
|
information when you start an interactive session.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@c This example modifies the actual output from GDB to avoid overfull
|
|
|
|
@c box in TeX.
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-gdb-version
|
2000-04-23 08:15:49 +00:00
|
|
|
~GNU gdb 5.2.1
|
|
|
|
~Copyright 2000 Free Software Foundation, Inc.
|
|
|
|
~GDB is free software, covered by the GNU General Public License, and
|
|
|
|
~you are welcome to change it and/or distribute copies of it under
|
|
|
|
~ certain conditions.
|
2000-02-23 00:25:43 +00:00
|
|
|
~Type "show copying" to see the conditions.
|
2000-04-23 08:15:49 +00:00
|
|
|
~There is absolutely no warranty for GDB. Type "show warranty" for
|
|
|
|
~ details.
|
|
|
|
~This GDB was configured as
|
|
|
|
"--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
|
2000-02-23 00:25:43 +00:00
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@ignore
|
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Kod Commands
|
|
|
|
@section @sc{gdb/mi} Kod Commands
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
The Kod commands are not implemented.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -kod-info
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -kod-list
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -kod-list-object-types
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -kod-show
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Memory Overlay Commands
|
|
|
|
@section @sc{gdb/mi} Memory Overlay Commands
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The memory overlay commands are not implemented.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-auto
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-list-mapping-state
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-list-overlays
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-map
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-off
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-on
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -overlay-unmap
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Signal Handling Commands
|
|
|
|
@section @sc{gdb/mi} Signal Handling Commands
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
Signal handling commands are not implemented.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -signal-handle
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -signal-list-handle-actions
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -signal-list-signal-types
|
|
|
|
@end ignore
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Stack Manipulation
|
|
|
|
@section Stack manipulation commands in @sc{gdb/mi}
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-stack-info-frame} Command
|
|
|
|
@findex -stack-info-frame
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-stack-info-frame
|
|
|
|
@end example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
Get info on the current frame.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame}
|
2000-04-23 08:15:49 +00:00
|
|
|
(without arguments).
|
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-stack-info-depth} Command
|
|
|
|
@findex -stack-info-depth
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-stack-info-depth [ @var{max-depth} ]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Return the depth of the stack. If the integer argument @var{max-depth}
|
|
|
|
is specified, do not count beyond @var{max-depth} frames.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
There's no equivalent @value{GDBN} command.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
For a stack with frame levels 0 through 11:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-info-depth
|
|
|
|
^done,depth="12"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-info-depth 4
|
|
|
|
^done,depth="4"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-info-depth 12
|
|
|
|
^done,depth="12"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-info-depth 11
|
|
|
|
^done,depth="11"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-info-depth 13
|
|
|
|
^done,depth="12"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@subheading The @code{-stack-list-arguments} Command
|
|
|
|
@findex -stack-list-arguments
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-stack-list-arguments @var{show-values}
|
|
|
|
[ @var{low-frame} @var{high-frame} ]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Display a list of the arguments for the frames between @var{low-frame}
|
|
|
|
and @var{high-frame} (inclusive). If @var{low-frame} and
|
|
|
|
@var{high-frame} are not provided, list the arguments for the whole call
|
|
|
|
stack.
|
|
|
|
|
|
|
|
The @var{show-values} argument must have a value of 0 or 1. A value of
|
|
|
|
0 means that only the names of the arguments are listed, a value of 1
|
2000-05-07 10:55:24 +00:00
|
|
|
means that both names and values of the arguments are printed.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@value{GDBN} does not have an equivalent command. @code{gdbtk} has a
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{gdb_get_args} command which partially overlaps with the
|
|
|
|
functionality of @samp{-stack-list-arguments}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-frames
|
|
|
|
^done,
|
|
|
|
stack=@{
|
|
|
|
frame=@{level="0 ",addr="0x00010734",func="callee4",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
|
|
|
|
frame=@{level="1 ",addr="0x0001076c",func="callee3",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="17"@},
|
|
|
|
frame=@{level="2 ",addr="0x0001078c",func="callee2",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@},
|
|
|
|
frame=@{level="3 ",addr="0x000107b4",func="callee1",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
|
|
|
|
frame=@{level="4 ",addr="0x000107e0",func="main",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-arguments 0
|
|
|
|
^done,
|
|
|
|
stack-args=@{
|
|
|
|
frame=@{level="0",args=@{@}@},
|
|
|
|
frame=@{level="1",args=@{name="strarg"@}@},
|
|
|
|
frame=@{level="2",args=@{name="intarg",name="strarg"@}@},
|
|
|
|
frame=@{level="3",args=@{name="intarg",name="strarg",name="fltarg"@}@},
|
|
|
|
frame=@{level="4",args=@{@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-arguments 1
|
|
|
|
^done,
|
|
|
|
stack-args=@{
|
|
|
|
frame=@{level="0",args=@{@}@},
|
2000-04-23 08:15:49 +00:00
|
|
|
frame=@{level="1",
|
|
|
|
args=@{@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
|
2000-02-23 00:25:43 +00:00
|
|
|
frame=@{level="2",args=@{
|
|
|
|
@{name="intarg",value="2"@},
|
|
|
|
@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
|
|
|
|
@{frame=@{level="3",args=@{
|
|
|
|
@{name="intarg",value="2"@},
|
|
|
|
@{name="strarg",value="0x11940 \"A string argument.\""@},
|
|
|
|
@{name="fltarg",value="3.5"@}@}@},
|
|
|
|
frame=@{level="4",args=@{@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-arguments 0 2 2
|
|
|
|
^done,stack-args=@{frame=@{level="2",args=@{name="intarg",name="strarg"@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-arguments 1 2 2
|
|
|
|
^done,stack-args=@{frame=@{level="2",
|
|
|
|
args=@{@{name="intarg",value="2"@},
|
|
|
|
@{name="strarg",value="0x11940 \"A string argument.\""@}@}@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@c @subheading -stack-list-exception-handlers
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-stack-list-frames} Command
|
|
|
|
@findex -stack-list-frames
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-stack-list-frames [ @var{low-frame} @var{high-frame} ]
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
List the frames currently on the stack. For each frame it displays the
|
|
|
|
following info:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @samp
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{level}
|
2000-02-23 00:25:43 +00:00
|
|
|
The frame number, 0 being the topmost frame, i.e. the innermost function.
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{addr}
|
|
|
|
The @code{$pc} value for that frame.
|
|
|
|
@item @var{func}
|
|
|
|
Function name.
|
|
|
|
@item @var{file}
|
|
|
|
File name of the source file where the function lives.
|
|
|
|
@item @var{line}
|
|
|
|
Line number corresponding to the @code{$pc}.
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
If invoked without arguments, this command prints a backtrace for the
|
|
|
|
whole stack. If given two integer arguments, it shows the frames whose
|
|
|
|
levels are between the two arguments (inclusive). If the two arguments
|
|
|
|
are equal, it shows the single frame at the corresponding level.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} commands are @samp{backtrace} and @samp{where}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
Full stack backtrace:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-frames
|
|
|
|
^done,stack=
|
2000-04-23 08:15:49 +00:00
|
|
|
@{frame=@{level="0 ",addr="0x0001076c",func="foo",
|
|
|
|
file="recursive2.c",line="11"@},
|
|
|
|
frame=@{level="1 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="2 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="3 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="4 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="5 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="6 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="7 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="8 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="9 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="10",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="11",addr="0x00010738",func="main",
|
|
|
|
file="recursive2.c",line="4"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Show frames between @var{low_frame} and @var{high_frame}:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-frames 3 5
|
|
|
|
^done,stack=
|
2000-04-23 08:15:49 +00:00
|
|
|
@{frame=@{level="3 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="4 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@},
|
|
|
|
frame=@{level="5 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Show a single frame:
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-stack-list-frames 3 3
|
|
|
|
^done,stack=
|
2000-04-23 08:15:49 +00:00
|
|
|
@{frame=@{level="3 ",addr="0x000107a4",func="foo",
|
|
|
|
file="recursive2.c",line="14"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-stack-list-locals} Command
|
|
|
|
@findex -stack-list-locals
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-stack-list-locals @var{print-values}
|
|
|
|
@end example
|
|
|
|
|
2000-05-07 10:55:24 +00:00
|
|
|
Display the local variable names for the current frame. With an
|
2000-04-23 08:15:49 +00:00
|
|
|
argument of 0 prints only the names of the variables, with argument of 1
|
|
|
|
prints also their values.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@samp{info locals} in @value{GDBN}, @samp{gdb_get_locals} in @code{gdbtk}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-stack-list-locals 0
|
|
|
|
^done,locals=@{name="A",name="B",name="C"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-stack-list-locals 1
|
|
|
|
^done,locals=@{@{name="A",value="1"@},@{name="B",value="2"@},
|
|
|
|
@{name="C",value="3"@}@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-stack-select-frame} Command
|
|
|
|
@findex -stack-select-frame
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-stack-select-frame @var{framenum}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Change the current frame. Select a different frame @var{framenum} on
|
|
|
|
the stack.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} commands are @samp{frame}, @samp{up},
|
|
|
|
@samp{down}, @samp{select-frame}, @samp{up-silent}, and @samp{down-silent}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
-stack-select-frame 2
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Symbol Query
|
|
|
|
@section @sc{gdb/mi} Symbol Query Commands
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-info-address} Command
|
|
|
|
@findex -symbol-info-address
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-info-address @var{symbol}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Describe where @var{symbol} is stored.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info address}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-info-file} Command
|
|
|
|
@findex -symbol-info-file
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-info-file
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Show the file for the symbol.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
There's no equivalent @value{GDBN} command. @code{gdbtk} has
|
|
|
|
@samp{gdb_find_file}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-info-function} Command
|
|
|
|
@findex -symbol-info-function
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-info-function
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Show which function the symbol lives in.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@samp{gdb_get_function} in @code{gdbtk}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-info-line} Command
|
|
|
|
@findex -symbol-info-line
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-info-line
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Show the core addresses of the code for a source line.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} comamnd is @samp{info line}.
|
|
|
|
@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-info-symbol} Command
|
|
|
|
@findex -symbol-info-symbol
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-info-symbol @var{addr}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Describe what symbol is at location @var{addr}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{info symbol}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-list-functions} Command
|
|
|
|
@findex -symbol-list-functions
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-list-functions
|
|
|
|
@end example
|
|
|
|
|
|
|
|
List the functions in the executable.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@samp{info functions} in @value{GDBN}, @samp{gdb_listfunc} and
|
|
|
|
@samp{gdb_search} in @code{gdbtk}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-list-types} Command
|
|
|
|
@findex -symbol-list-types
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-list-types
|
|
|
|
@end example
|
|
|
|
|
|
|
|
List all the type names.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding commands are @samp{info types} in @value{GDBN},
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{gdb_search} in @code{gdbtk}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-list-variables} Command
|
|
|
|
@findex -symbol-list-variables
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-list-variables
|
|
|
|
@end example
|
|
|
|
|
|
|
|
List all the global and static variable names.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@samp{info variables} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-locate} Command
|
|
|
|
@findex -symbol-locate
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-locate
|
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@samp{gdb_loc} in @code{gdbtk}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-symbol-type} Command
|
|
|
|
@findex -symbol-type
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-symbol-type @var{variable}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Show type of @var{variable}.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{ptype}, @code{gdbtk} has
|
2000-04-23 08:15:49 +00:00
|
|
|
@samp{gdb_obj_variable}.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Target Manipulation
|
|
|
|
@section @sc{gdb/mi} Target Manipulation Commands
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-target-attach} Command
|
|
|
|
@findex -target-attach
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-target-attach @var{pid} | @var{file}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Attach to a process @var{pid} or a file @var{file} outside of @value{GDBN}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{attach}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-target-compare-sections} Command
|
|
|
|
@findex -target-compare-sections
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-target-compare-sections [ @var{section} ]
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Compare data of section @var{section} on target to the exec file.
|
|
|
|
Without the argument, all sections are compared.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The @value{GDBN} equivalent is @samp{compare-sections}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-target-detach} Command
|
|
|
|
@findex -target-detach
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-target-detach
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Disconnect from the remote target. There's no output.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{detach}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-target-detach
|
|
|
|
^done
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-target-download} Command
|
|
|
|
@findex -target-download
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-target-download
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
|
|
|
Loads the executable onto the remote target.
|
|
|
|
It prints out an update message every half second, which includes the fields:
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@table @samp
|
|
|
|
@item section
|
|
|
|
The name of the section.
|
|
|
|
@item section-sent
|
|
|
|
The size of what has been sent so far for that section.
|
|
|
|
@item section-size
|
|
|
|
The size of the section.
|
|
|
|
@item total-sent
|
|
|
|
The total size of what was sent so far (the current and the previous sections).
|
|
|
|
@item total-size
|
|
|
|
The size of the overall executable to download.
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
Each message is sent as status record (@pxref{GDB/MI Output Syntax, ,
|
|
|
|
@sc{gdb/mi} Output Syntax}).
|
|
|
|
|
|
|
|
In addition, it prints the name and size of the sections, as they are
|
|
|
|
downloaded. These messages include the following fields:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@table @samp
|
|
|
|
@item section
|
|
|
|
The name of the section.
|
|
|
|
@item section-size
|
|
|
|
The size of the section.
|
|
|
|
@item total-size
|
|
|
|
The size of the overall executable to download.
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@noindent
|
2000-07-24 06:09:49 +00:00
|
|
|
At the end, a summary is printed.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{load}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
Note: each status message appears on a single line. Here the messages
|
2000-05-07 10:55:24 +00:00
|
|
|
have been broken down so that they can fit onto a page.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-target-download
|
|
|
|
+download,@{section=".text",section-size="6668",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="512",section-size="6668",
|
|
|
|
total-sent="512",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="1024",section-size="6668",
|
|
|
|
total-sent="1024",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="1536",section-size="6668",
|
|
|
|
total-sent="1536",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="2048",section-size="6668",
|
|
|
|
total-sent="2048",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="2560",section-size="6668",
|
|
|
|
total-sent="2560",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="3072",section-size="6668",
|
|
|
|
total-sent="3072",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="3584",section-size="6668",
|
|
|
|
total-sent="3584",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="4096",section-size="6668",
|
|
|
|
total-sent="4096",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="4608",section-size="6668",
|
|
|
|
total-sent="4608",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="5120",section-size="6668",
|
|
|
|
total-sent="5120",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="5632",section-size="6668",
|
|
|
|
total-sent="5632",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="6144",section-size="6668",
|
|
|
|
total-sent="6144",total-size="9880"@}
|
|
|
|
+download,@{section=".text",section-sent="6656",section-size="6668",
|
|
|
|
total-sent="6656",total-size="9880"@}
|
|
|
|
+download,@{section=".init",section-size="28",total-size="9880"@}
|
|
|
|
+download,@{section=".fini",section-size="28",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-size="3156",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-sent="512",section-size="3156",
|
|
|
|
total-sent="7236",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-sent="1024",section-size="3156",
|
|
|
|
total-sent="7748",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-sent="1536",section-size="3156",
|
|
|
|
total-sent="8260",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-sent="2048",section-size="3156",
|
|
|
|
total-sent="8772",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-sent="2560",section-size="3156",
|
|
|
|
total-sent="9284",total-size="9880"@}
|
|
|
|
+download,@{section=".data",section-sent="3072",section-size="3156",
|
|
|
|
total-sent="9796",total-size="9880"@}
|
2000-04-23 08:15:49 +00:00
|
|
|
^done,address="0x10004",load-size="9880",transfer-rate="6586",
|
|
|
|
write-rate="429"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-target-exec-status} Command
|
|
|
|
@findex -target-exec-status
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-target-exec-status
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Provide information on the state of the target (whether it is running or
|
|
|
|
not, for instance).
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
There's no equivalent @value{GDBN} command.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-target-list-available-targets} Command
|
|
|
|
@findex -target-list-available-targets
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-target-list-available-targets
|
|
|
|
@end example
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
List the possible targets to connect to.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{help target}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-target-list-current-targets} Command
|
|
|
|
@findex -target-list-current-targets
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-target-list-current-targets
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Describe the current target.
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
The corresponding information is printed by @samp{info file} (among
|
|
|
|
other things).
|
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subheading The @code{-target-list-parameters} Command
|
|
|
|
@findex -target-list-parameters
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-target-list-parameters
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@c ????
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
No equivalent.
|
|
|
|
|
|
|
|
@subsubheading Example
|
2000-02-23 00:25:43 +00:00
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-target-select} Command
|
|
|
|
@findex -target-select
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
2000-07-24 06:09:49 +00:00
|
|
|
-target-select @var{type} @var{parameters @dots{}}
|
2000-04-23 08:15:49 +00:00
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Connect @value{GDBN} to the remote target. This command takes two args:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @samp
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{type}
|
|
|
|
The type of target, for instance @samp{async}, @samp{remote}, etc.
|
|
|
|
@item @var{parameters}
|
|
|
|
Device names, host names and the like. @xref{Target Commands, ,
|
|
|
|
Commands for managing targets}, for more details.
|
2000-02-23 00:25:43 +00:00
|
|
|
@end table
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
The output is a connection notification, followed by the address at
|
2000-04-23 08:15:49 +00:00
|
|
|
which the target program is, in the following form:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@smallexample
|
|
|
|
^connected,addr="@var{address}",func="@var{function name}",
|
|
|
|
args=@{@var{arg list}@}
|
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{target}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-target-select async /dev/ttya
|
|
|
|
^connected,addr="0xfe00a300",func="??",args=@{@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Thread Commands
|
|
|
|
@section @sc{gdb/mi} Thread Commands
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-thread-info} Command
|
|
|
|
@findex -thread-info
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-thread-info
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
No equivalent.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-thread-list-all-threads} Command
|
|
|
|
@findex -thread-list-all-threads
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-thread-list-all-threads
|
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The equivalent @value{GDBN} command is @samp{info threads}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
N.A.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-thread-list-ids} Command
|
|
|
|
@findex -thread-list-ids
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@example
|
2000-04-23 08:15:49 +00:00
|
|
|
-thread-list-ids
|
|
|
|
@end example
|
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
Produces a list of the currently known @value{GDBN} thread ids. At the
|
|
|
|
end of the list it also prints the total number of such threads.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
Part of @samp{info threads} supplies the same information.
|
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
No threads present, besides the main process:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-thread-list-ids
|
|
|
|
^done,thread-ids=@{@},number-of-threads="0"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
Several threads:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-thread-list-ids
|
|
|
|
^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
|
|
|
|
number-of-threads="3"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-thread-select} Command
|
|
|
|
@findex -thread-select
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-thread-select @var{threadnum}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end example
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Make @var{threadnum} the current thread. It prints the number of the new
|
2000-02-23 00:25:43 +00:00
|
|
|
current thread, and the topmost frame for that thread.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
@subsubheading @value{GDBN} Command
|
2000-04-23 08:15:49 +00:00
|
|
|
|
2000-07-24 06:09:49 +00:00
|
|
|
The corresponding @value{GDBN} command is @samp{thread}.
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@subsubheading Example
|
|
|
|
|
|
|
|
@smallexample
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-exec-next
|
|
|
|
^running
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
*stopped,reason="end-stepping-range",thread-id="2",line="187",
|
|
|
|
file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-thread-list-ids
|
|
|
|
^done,
|
2000-04-23 08:15:49 +00:00
|
|
|
thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
|
2000-02-23 00:25:43 +00:00
|
|
|
number-of-threads="3"
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-02-23 00:25:43 +00:00
|
|
|
-thread-select 3
|
|
|
|
^done,new-thread-id="3",
|
|
|
|
frame=@{level="0 ",func="vprintf",
|
|
|
|
args=@{@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
|
|
|
|
@{name="arg",value="0x2"@}@},file="vprintf.c",line="31"@}
|
2000-07-24 06:09:49 +00:00
|
|
|
(@value{GDBP})
|
2000-04-23 08:15:49 +00:00
|
|
|
@end smallexample
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Tracepoint Commands
|
|
|
|
@section @sc{gdb/mi} Tracepoint Commands
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The tracepoint commands are not yet implemented.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-actions
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-delete
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-disable
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-dump
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-enable
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-exists
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-find
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-frame-number
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-info
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-insert
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-list
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-pass-count
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-save
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-start
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c @subheading -trace-stop
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Variable Objects
|
|
|
|
@section @sc{gdb/mi} Variable Objects
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading Motivation for Variable Objects in @sc{gdb/mi}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
For the implementation of a variable debugger window (locals, watched
|
2000-05-07 10:55:24 +00:00
|
|
|
expressions, etc.), we are proposing the adaptation of the existing code
|
2000-04-23 08:15:49 +00:00
|
|
|
used by @code{Insight}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The two main reasons for that are:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@enumerate 1
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
It has been proven in practice (it is already on its second generation).
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
@item
|
|
|
|
It will shorten development time (needless to say how important it is
|
2000-04-23 08:15:49 +00:00
|
|
|
now).
|
2000-02-23 00:25:43 +00:00
|
|
|
@end enumerate
|
|
|
|
|
|
|
|
The original interface was designed to be used by Tcl code, so it was
|
2000-08-23 09:15:25 +00:00
|
|
|
slightly changed so it could be used through @sc{gdb/mi}. This section
|
|
|
|
describes the @sc{gdb/mi} operations that will be available and gives some
|
2000-04-23 08:15:49 +00:00
|
|
|
hints about their use.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@emph{Note}: In addition to the set of operations described here, we
|
2000-04-23 08:15:49 +00:00
|
|
|
expect the @sc{gui} implementation of a variable window to require, at
|
|
|
|
least, the following operations:
|
|
|
|
|
|
|
|
@itemize @bullet
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-gdb-show} @code{output-radix}
|
|
|
|
@item @code{-stack-list-arguments}
|
|
|
|
@item @code{-stack-list-locals}
|
|
|
|
@item @code{-stack-select-frame}
|
2000-02-23 00:25:43 +00:00
|
|
|
@end itemize
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading Introduction to Variable Objects in @sc{gdb/mi}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@cindex variable objects in @sc{gdb/mi}
|
2000-02-23 00:25:43 +00:00
|
|
|
The basic idea behind variable objects is the creation of a named object
|
|
|
|
to represent a variable, an expression, a memory location or even a CPU
|
|
|
|
register. For each object created, a set of operations is available for
|
|
|
|
examining or changing its properties.
|
|
|
|
|
|
|
|
Furthermore, complex data types, such as C structures, are represented
|
2000-04-23 08:15:49 +00:00
|
|
|
in a tree format. For instance, the @code{struct} type variable is the
|
|
|
|
root and the children will represent the struct members. If a child
|
|
|
|
is itself of a complex type, it will also have children of its own.
|
|
|
|
Appropriate language differences are handled for C, C@t{++} and Java.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
When returning the actual values of the objects, this facility allows
|
|
|
|
for the individual selection of the display format used in the result
|
|
|
|
creation. It can be chosen among: binary, decimal, hexadecimal, octal
|
2000-05-07 10:55:24 +00:00
|
|
|
and natural. Natural refers to a default format automatically
|
2000-04-23 08:15:49 +00:00
|
|
|
chosen based on the variable type (like decimal for an @code{int}, hex
|
|
|
|
for pointers, etc.).
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
The following is the complete set of @sc{gdb/mi} operations defined to
|
2000-02-23 00:25:43 +00:00
|
|
|
access this functionality:
|
|
|
|
|
2000-10-16 07:34:02 +00:00
|
|
|
@multitable @columnfractions .4 .6
|
2000-02-23 00:25:43 +00:00
|
|
|
@item @strong{Operation}
|
|
|
|
@tab @strong{Description}
|
|
|
|
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-create}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab create a variable object
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-delete}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab delete the variable object and its children
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-set-format}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab set the display format of this variable
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-show-format}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab show the display format of this variable
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-info-num-children}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab tells how many children this object has
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-list-children}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab return a list of the object's children
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-info-type}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab show the type of this variable object
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-info-expression}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab print what this variable object represents
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-show-attributes}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab is this variable editable? does it exist here?
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-evaluate-expression}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab get the value of this variable
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-assign}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab set the value of this variable
|
2000-08-23 09:15:25 +00:00
|
|
|
@item @code{-var-update}
|
2000-02-23 00:25:43 +00:00
|
|
|
@tab update the variable and its children
|
|
|
|
@end multitable
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
In the next subsection we describe each operation in detail and suggest
|
|
|
|
how it can be used.
|
|
|
|
|
|
|
|
@subheading Description And Use of Operations on Variable Objects
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-create} Command
|
|
|
|
@findex -var-create
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-create @{@var{name} | "-"@}
|
|
|
|
@{@var{frame-addr} | "*"@} @var{expression}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
This operation creates a variable object, which allows the monitoring of
|
|
|
|
a variable, the result of an expression, a memory cell or a CPU
|
|
|
|
register.
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The @var{name} parameter is the string by which the object can be
|
|
|
|
referenced. It must be unique. If @samp{-} is specified, the varobj
|
2000-08-23 09:15:25 +00:00
|
|
|
system will generate a string ``varNNNNNN'' automatically. It will be
|
2000-04-23 08:15:49 +00:00
|
|
|
unique provided that one does not specify @var{name} on that format.
|
|
|
|
The command fails if a duplicate name is found.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
The frame under which the expression should be evaluated can be
|
2000-04-23 08:15:49 +00:00
|
|
|
specified by @var{frame-addr}. A @samp{*} indicates that the current
|
|
|
|
frame should be used.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-05-07 10:55:24 +00:00
|
|
|
@var{expression} is any expression valid on the current language set (must not
|
2000-04-23 08:15:49 +00:00
|
|
|
begin with a @samp{*}), or one of the following:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
@samp{*@var{addr}}, where @var{addr} is the address of a memory cell
|
|
|
|
|
|
|
|
@item
|
2000-08-23 09:15:25 +00:00
|
|
|
@samp{*@var{addr}-@var{addr}} --- a memory address range (TBD)
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@item
|
2000-08-23 09:15:25 +00:00
|
|
|
@samp{$@var{regname}} --- a CPU register name
|
2000-04-23 08:15:49 +00:00
|
|
|
@end itemize
|
|
|
|
|
|
|
|
@subsubheading Result
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
This operation returns the name, number of children and the type of the
|
|
|
|
object created. Type is returned as a string as the ones generated by
|
2000-07-24 06:09:49 +00:00
|
|
|
the @value{GDBN} CLI:
|
2000-04-23 08:15:49 +00:00
|
|
|
|
|
|
|
@example
|
|
|
|
name="@var{name}",numchild="N",type="@var{type}"
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-var-delete} Command
|
|
|
|
@findex -var-delete
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-var-delete @var{name}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Deletes a previously created variable object and all of its children.
|
|
|
|
|
|
|
|
Returns an error if the object @var{name} is not found.
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-var-set-format} Command
|
|
|
|
@findex -var-set-format
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-var-set-format @var{name} @var{format-spec}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Sets the output format for the value of the object @var{name} to be
|
|
|
|
@var{format-spec}.
|
|
|
|
|
|
|
|
The syntax for the @var{format-spec} is as follows:
|
|
|
|
|
|
|
|
@example
|
|
|
|
@var{format-spec} @expansion{}
|
|
|
|
@{binary | decimal | hexadecimal | octal | natural@}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-var-show-format} Command
|
|
|
|
@findex -var-show-format
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-var-show-format @var{name}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Returns the format used to display the value of the object @var{name}.
|
|
|
|
|
|
|
|
@example
|
2000-08-23 09:15:25 +00:00
|
|
|
@var{format} @expansion{}
|
2000-04-23 08:15:49 +00:00
|
|
|
@var{format-spec}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
|
|
@subheading The @code{-var-info-num-children} Command
|
|
|
|
@findex -var-info-num-children
|
|
|
|
|
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-var-info-num-children @var{name}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
Returns the number of children of a variable object @var{name}:
|
|
|
|
|
|
|
|
@example
|
|
|
|
numchild=@var{n}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-list-children} Command
|
|
|
|
@findex -var-list-children
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-list-children @var{name}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Returns a list of the children of the specified variable object:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
numchild=@var{n},children=@{@{name=@var{name},
|
2000-08-23 09:15:25 +00:00
|
|
|
numchild=@var{n},type=@var{type}@},@r{(repeats N times)}@}
|
2000-04-23 08:15:49 +00:00
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-info-type} Command
|
|
|
|
@findex -var-info-type
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-info-type @var{name}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Returns the type of the specified variable @var{name}. The type is
|
2000-07-24 06:09:49 +00:00
|
|
|
returned as a string in the same format as it is output by the
|
|
|
|
@value{GDBN} CLI:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
type=@var{typename}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-info-expression} Command
|
|
|
|
@findex -var-info-expression
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-info-expression @var{name}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Returns what is represented by the variable object @var{name}:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
lang=@var{lang-spec},exp=@var{expression}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@noindent
|
|
|
|
where @var{lang-spec} is @code{@{"C" | "C++" | "Java"@}}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-show-attributes} Command
|
|
|
|
@findex -var-show-attributes
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-show-attributes @var{name}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
List attributes of the specified variable object @var{name}:
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
status=@var{attr} [ ( ,@var{attr} )* ]
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@noindent
|
|
|
|
where @var{attr} is @code{@{ @{ editable | noneditable @} | TBD @}}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-evaluate-expression} Command
|
|
|
|
@findex -var-evaluate-expression
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-evaluate-expression @var{name}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
Evaluates the expression that is represented by the specified variable
|
|
|
|
object and returns its value as a string in the current format specified
|
2000-04-23 08:15:49 +00:00
|
|
|
for the object:
|
|
|
|
|
|
|
|
@example
|
|
|
|
value=@var{value}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@subheading The @code{-var-assign} Command
|
|
|
|
@findex -var-assign
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@example
|
|
|
|
-var-assign @var{name} @var{expression}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Assigns the value of @var{expression} to the variable object specified
|
2000-08-23 09:15:25 +00:00
|
|
|
by @var{name}. The object must be @samp{editable}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subheading The @code{-var-update} Command
|
|
|
|
@findex -var-update
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@subsubheading Synopsis
|
|
|
|
|
|
|
|
@example
|
|
|
|
-var-update @{@var{name} | "*"@}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Update the value of the variable object @var{name} by evaluating its
|
|
|
|
expression after fetching all the new values from memory or registers.
|
|
|
|
A @samp{*} causes all existing variable objects to be updated.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-26 23:39:53 +00:00
|
|
|
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
@node GDB/MI Draft Changes to Output Syntax
|
|
|
|
@section @sc{gdb/mi} Draft Changes to Output Syntax
|
|
|
|
|
|
|
|
@cindex draft changes to output syntax of @sc{gdb/mi}
|
|
|
|
@cindex @sc{gdb/mi}, draft changes to output syntax
|
|
|
|
|
|
|
|
One problem identified in the existing @sc{gdb/mi} output syntax was the
|
|
|
|
difficulty in differentiating between a tuple such as:
|
|
|
|
|
|
|
|
@example
|
|
|
|
@{number="1",type="breakpoint",disp="keep",enabled="y"@}
|
|
|
|
@end example
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-26 23:39:53 +00:00
|
|
|
where each value has a unique label, and a list such as:
|
|
|
|
|
|
|
|
@example
|
|
|
|
@{"1","2","4"@}
|
|
|
|
@{bp="1",bp="2",bp="4"@}
|
|
|
|
@end example
|
|
|
|
|
|
|
|
where values are un-labeled or the label is duplicated.
|
|
|
|
|
|
|
|
What follows is a draft revision to the output specification that
|
|
|
|
addresses this problem.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
The output from @sc{gdb/mi} consists of zero or more out-of-band records
|
2000-05-07 10:55:24 +00:00
|
|
|
optionally followed by a single result record, the result record being
|
|
|
|
for the most recent command input. The sequence is terminated by
|
2000-08-23 09:15:25 +00:00
|
|
|
@samp{(@value{GDBP})}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
Asynchronous @sc{gdb/mi} output is similar.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
Each output record directly associated with an input command is prefixed
|
2000-08-23 09:15:25 +00:00
|
|
|
by the input command's @code{@var{token}}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@table @code
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{output} @expansion{}
|
2000-08-23 09:15:25 +00:00
|
|
|
@{ @var{out-of-band-record} @} @code{[} @var{result-record} @code{]} "@code{(@value{GDBP})}" @var{nl}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{result-record} @expansion{}
|
|
|
|
@code{[} @var{token} @code{]} "^" @var{result-class} @{ "," @var{result} @} @var{nl}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{out-of-band-record} @expansion{}
|
|
|
|
@var{async-record} @code{|} @var{stream-record}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{async-record} @expansion{}
|
|
|
|
@var{exec-async-output} @code{|} @var{status-async-output} @code{|} @var{notify-async-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{exec-async-output} @expansion{}
|
|
|
|
@code{[} @var{token} @code{]} "*" @var{async-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{status-async-output} @expansion{}
|
|
|
|
@code{[} @var{token} @code{]} "+" @var{async-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{notify-async-output} @expansion{}
|
|
|
|
@code{[} @var{token} @code{]} "=" @var{async-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{async-output} @expansion{}
|
|
|
|
@var{async-class} @{ "," @var{result} @} @var{nl}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{result-class} @expansion{}
|
|
|
|
"done" @code{|} "running" @code{|} "connected" @code{|} "error" @code{|} "exit"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{async-class} @expansion{}
|
|
|
|
"stopped" @code{|} @emph{others depending on need as still in development}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{result} @expansion{}
|
|
|
|
@var{string} "=" @var{value}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{value} @expansion{}
|
|
|
|
@var{c-string} @code{|} @var{tupple} @code{|} @var{list}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{tupple} @expansion{}
|
|
|
|
"@{@}" @code{|} "@{" @var{result} @{ "," @var{result} @} "@}"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{list} @expansion{}
|
|
|
|
"@code{[]}" @code{|} "@code{[}" @var{value} @{ "," @var{value} @} "@code{]}"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{string} @expansion{}
|
2000-02-23 00:25:43 +00:00
|
|
|
@emph{[-A-Za-z\.0-9_]*}
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{c-string} @expansion{}
|
2000-02-23 00:25:43 +00:00
|
|
|
@emph{See the input specification}
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{stream-record} @expansion{}
|
|
|
|
@var{console-stream-output} @code{|} @var{target-stream-output} @code{|} @var{log-stream-output}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{console-stream-output} @expansion{}
|
|
|
|
"~" @var{c-string}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{target-stream-output} @expansion{}
|
|
|
|
"@@" @var{c-string}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{log-stream-output} @expansion{}
|
|
|
|
"&" @var{c-string}
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{nl} @expansion{}
|
|
|
|
CR @code{|} CR-LF
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{token} @expansion{}
|
|
|
|
"any sequence of digits"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
In addition, the following are still being developed.
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
|
2000-04-23 08:15:49 +00:00
|
|
|
@item @var{query}
|
2000-02-23 00:25:43 +00:00
|
|
|
This action is currently undefined.
|
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
Notes:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
|
|
|
|
@item
|
|
|
|
All output sequences end in a single line containing a period.
|
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
The @code{@var{token}} is from the corresponding request. If an execution
|
2000-08-23 09:15:25 +00:00
|
|
|
command is interrupted by the @code{-exec-interrupt} command, the token
|
2000-02-23 00:25:43 +00:00
|
|
|
associated with the `*stopped' message is the one of the original
|
2000-08-23 09:15:25 +00:00
|
|
|
execution command, not the one of the interrupt command.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-08-23 09:15:25 +00:00
|
|
|
@var{status-async-output} contains on-going status information about the
|
|
|
|
progress of a slow operation. It can be discarded. All status output is
|
|
|
|
prefixed by the prefix @samp{+}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@var{exec-async-output} contains asynchronous state change on the target
|
2000-08-23 09:15:25 +00:00
|
|
|
(stopped, started, disappeared). All async output is prefixed by
|
|
|
|
the prefix @samp{*}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-08-23 09:15:25 +00:00
|
|
|
@var{notify-async-output} contains supplementary information that the
|
|
|
|
client should handle (new breakpoint information). All notify output is
|
|
|
|
prefixed by the prefix @samp{=}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-05-07 10:55:24 +00:00
|
|
|
@var{console-stream-output} is output that should be displayed as is, in the
|
2000-08-23 09:15:25 +00:00
|
|
|
console. It is the textual response to a CLI command. All the console
|
|
|
|
output is prefixed by the prefix @samp{~}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-04-23 08:15:49 +00:00
|
|
|
@var{target-stream-output} is the output produced by the target program.
|
2000-08-23 09:15:25 +00:00
|
|
|
All the target output is prefixed by the prefix @samp{@@}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@item
|
2000-07-24 06:09:49 +00:00
|
|
|
@var{log-stream-output} is output text coming from @value{GDBN}'s
|
|
|
|
internals, for instance messages that should be displayed as part of an
|
2000-08-23 09:15:25 +00:00
|
|
|
error log. All the log output is prefixed by the prefix @samp{&}.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
@c Local variables:
|
|
|
|
@c change-log-default-name: "ChangeLog-mi"
|
|
|
|
@c End:
|