|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
-
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- Invariant Sections being "Free Software" and "Free Software Needs
- Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
- and with the Back-Cover Texts as in (a) below.
-
- (a) The FSF's Back-Cover Text is: "You are free to copy and modify
- this GNU Manual. Buying copies from GNU Press supports the FSF in
- developing GNU and promoting software freedom." -->
- <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>GDB/MI Symbol Query (Debugging with GDB)</title>
-
- <meta name="description" content="GDB/MI Symbol Query (Debugging with GDB)">
- <meta name="keywords" content="GDB/MI Symbol Query (Debugging with GDB)">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
- <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="GDB_002fMI.html#GDB_002fMI" rel="up" title="GDB/MI">
- <link href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" rel="next" title="GDB/MI File Commands">
- <link href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" rel="prev" title="GDB/MI Tracepoint Commands">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style: oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <a name="GDB_002fMI-Symbol-Query"></a>
- <div class="header">
- <p>
- Next: <a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" accesskey="n" rel="next">GDB/MI File Commands</a>, Previous: <a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" accesskey="p" rel="prev">GDB/MI Tracepoint Commands</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <hr>
- <a name="GDB_002fMI-Symbol-Query-Commands"></a>
- <h3 class="section">27.18 <small>GDB/MI</small> Symbol Query Commands</h3>
-
-
-
- <a name="The-_002dsymbol_002dinfo_002dfunctions-Command"></a>
- <h4 class="subheading">The <code>-symbol-info-functions</code> Command</h4>
- <a name="index-_002dsymbol_002dinfo_002dfunctions"></a>
- <a name="g_t_002dsymbol_002dinfo_002dfunctions"></a>
- <a name="Synopsis-80"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-info-functions [--include-nondebug]
- [--type <var>type_regexp</var>]
- [--name <var>name_regexp</var>]
- [--max-results <var>limit</var>]
- </pre></div>
-
- <p>Return a list containing the names and types for all global functions
- taken from the debug information. The functions are grouped by source
- file, and shown with the line number on which each function is
- defined.
- </p>
- <p>The <code>--include-nondebug</code> option causes the output to include
- code symbols from the symbol table.
- </p>
- <p>The options <code>--type</code> and <code>--name</code> allow the symbols returned
- to be filtered based on either the name of the function, or the type
- signature of the function.
- </p>
- <p>The option <code>--max-results</code> restricts the command to return no
- more than <var>limit</var> results. If exactly <var>limit</var> results are
- returned then there might be additional results available if a higher
- limit is used.
- </p>
- <a name="GDB-Command-62"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info functions</samp>’.
- </p>
- <a name="Example-62"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-info-functions
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="36", name="f4", type="void (int *)",
- description="void f4(int *);"},
- {line="42", name="main", type="int ()",
- description="int main();"},
- {line="30", name="f1", type="my_int_t (int, int)",
- description="static my_int_t f1(int, int);"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="33", name="f2", type="float (another_float_t)",
- description="float f2(another_float_t);"},
- {line="39", name="f3", type="int (another_int_t)",
- description="int f3(another_int_t);"},
- {line="27", name="f1", type="another_float_t (int)",
- description="static another_float_t f1(int);"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-functions --name f1
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="30", name="f1", type="my_int_t (int, int)",
- description="static my_int_t f1(int, int);"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="27", name="f1", type="another_float_t (int)",
- description="static another_float_t f1(int);"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-functions --type void
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="36", name="f4", type="void (int *)",
- description="void f4(int *);"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-functions --include-nondebug
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="36", name="f4", type="void (int *)",
- description="void f4(int *);"},
- {line="42", name="main", type="int ()",
- description="int main();"},
- {line="30", name="f1", type="my_int_t (int, int)",
- description="static my_int_t f1(int, int);"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="33", name="f2", type="float (another_float_t)",
- description="float f2(another_float_t);"},
- {line="39", name="f3", type="int (another_int_t)",
- description="int f3(another_int_t);"},
- {line="27", name="f1", type="another_float_t (int)",
- description="static another_float_t f1(int);"}]}],
- nondebug=
- [{address="0x0000000000400398",name="_init"},
- {address="0x00000000004003b0",name="_start"},
- ...
- ]}
- </pre></div>
-
- <a name="The-_002dsymbol_002dinfo_002dmodule_002dfunctions-Command"></a>
- <h4 class="subheading">The <code>-symbol-info-module-functions</code> Command</h4>
- <a name="index-_002dsymbol_002dinfo_002dmodule_002dfunctions"></a>
- <a name="g_t_002dsymbol_002dinfo_002dmodule_002dfunctions"></a>
- <a name="Synopsis-81"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-info-module-functions [--module <var>module_regexp</var>]
- [--name <var>name_regexp</var>]
- [--type <var>type_regexp</var>]
- </pre></div>
-
- <p>Return a list containing the names of all known functions within all
- know Fortran modules. The functions are grouped by source file and
- containing module, and shown with the line number on which each
- function is defined.
- </p>
- <p>The option <code>--module</code> only returns results for modules matching
- <var>module_regexp</var>. The option <code>--name</code> only returns functions
- whose name matches <var>name_regexp</var>, and <code>--type</code> only returns
- functions whose type matches <var>type_regexp</var>.
- </p>
- <a name="GDB-Command-63"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info module functions</samp>’.
- </p>
- <a name="Example-63"></a>
- <h4 class="subsubheading">Example</h4>
-
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-info-module-functions
- ^done,symbols=
- [{module="mod1",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- symbols=[{line="21",name="mod1::check_all",type="void (void)",
- description="void mod1::check_all(void);"}]}]},
- {module="mod2",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- symbols=[{line="30",name="mod2::check_var_i",type="void (void)",
- description="void mod2::check_var_i(void);"}]}]},
- {module="mod3",
- files=[{filename="/projec/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/projec/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="21",name="mod3::check_all",type="void (void)",
- description="void mod3::check_all(void);"},
- {line="27",name="mod3::check_mod2",type="void (void)",
- description="void mod3::check_mod2(void);"}]}]},
- {module="modmany",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="35",name="modmany::check_some",type="void (void)",
- description="void modmany::check_some(void);"}]}]},
- {module="moduse",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="44",name="moduse::check_all",type="void (void)",
- description="void moduse::check_all(void);"},
- {line="49",name="moduse::check_var_x",type="void (void)",
- description="void moduse::check_var_x(void);"}]}]}]
- </pre></div>
-
- <a name="The-_002dsymbol_002dinfo_002dmodule_002dvariables-Command"></a>
- <h4 class="subheading">The <code>-symbol-info-module-variables</code> Command</h4>
- <a name="index-_002dsymbol_002dinfo_002dmodule_002dvariables"></a>
- <a name="g_t_002dsymbol_002dinfo_002dmodule_002dvariables"></a>
- <a name="Synopsis-82"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-info-module-variables [--module <var>module_regexp</var>]
- [--name <var>name_regexp</var>]
- [--type <var>type_regexp</var>]
- </pre></div>
-
- <p>Return a list containing the names of all known variables within all
- know Fortran modules. The variables are grouped by source file and
- containing module, and shown with the line number on which each
- variable is defined.
- </p>
- <p>The option <code>--module</code> only returns results for modules matching
- <var>module_regexp</var>. The option <code>--name</code> only returns variables
- whose name matches <var>name_regexp</var>, and <code>--type</code> only returns
- variables whose type matches <var>type_regexp</var>.
- </p>
- <a name="GDB-Command-64"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info module variables</samp>’.
- </p>
- <a name="Example-64"></a>
- <h4 class="subsubheading">Example</h4>
-
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-info-module-variables
- ^done,symbols=
- [{module="mod1",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- symbols=[{line="18",name="mod1::var_const",type="integer(kind=4)",
- description="integer(kind=4) mod1::var_const;"},
- {line="17",name="mod1::var_i",type="integer(kind=4)",
- description="integer(kind=4) mod1::var_i;"}]}]},
- {module="mod2",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- symbols=[{line="28",name="mod2::var_i",type="integer(kind=4)",
- description="integer(kind=4) mod2::var_i;"}]}]},
- {module="mod3",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="18",name="mod3::mod1",type="integer(kind=4)",
- description="integer(kind=4) mod3::mod1;"},
- {line="17",name="mod3::mod2",type="integer(kind=4)",
- description="integer(kind=4) mod3::mod2;"},
- {line="19",name="mod3::var_i",type="integer(kind=4)",
- description="integer(kind=4) mod3::var_i;"}]}]},
- {module="modmany",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="33",name="modmany::var_a",type="integer(kind=4)",
- description="integer(kind=4) modmany::var_a;"},
- {line="33",name="modmany::var_b",type="integer(kind=4)",
- description="integer(kind=4) modmany::var_b;"},
- {line="33",name="modmany::var_c",type="integer(kind=4)",
- description="integer(kind=4) modmany::var_c;"},
- {line="33",name="modmany::var_i",type="integer(kind=4)",
- description="integer(kind=4) modmany::var_i;"}]}]},
- {module="moduse",
- files=[{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="42",name="moduse::var_x",type="integer(kind=4)",
- description="integer(kind=4) moduse::var_x;"},
- {line="42",name="moduse::var_y",type="integer(kind=4)",
- description="integer(kind=4) moduse::var_y;"}]}]}]
- </pre></div>
-
- <a name="The-_002dsymbol_002dinfo_002dmodules-Command"></a>
- <h4 class="subheading">The <code>-symbol-info-modules</code> Command</h4>
- <a name="index-_002dsymbol_002dinfo_002dmodules"></a>
- <a name="g_t_002dsymbol_002dinfo_002dmodules"></a>
- <a name="Synopsis-83"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-info-modules [--name <var>name_regexp</var>]
- [--max-results <var>limit</var>]
-
- </pre></div>
-
- <p>Return a list containing the names of all known Fortran modules. The
- modules are grouped by source file, and shown with the line number on
- which each modules is defined.
- </p>
- <p>The option <code>--name</code> allows the modules returned to be filtered
- based the name of the module.
- </p>
- <p>The option <code>--max-results</code> restricts the command to return no
- more than <var>limit</var> results. If exactly <var>limit</var> results are
- returned then there might be additional results available if a higher
- limit is used.
- </p>
- <a name="GDB-Command-65"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info modules</samp>’.
- </p>
- <a name="Example-65"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-info-modules
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- symbols=[{line="16",name="mod1"},
- {line="22",name="mod2"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="16",name="mod3"},
- {line="22",name="modmany"},
- {line="26",name="moduse"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-modules --name mod[123]
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules-2.f90",
- symbols=[{line="16",name="mod1"},
- {line="22",name="mod2"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- fullname="/project/gdb/testsuite/gdb.mi/mi-fortran-modules.f90",
- symbols=[{line="16",name="mod3"}]}]}
- </pre></div>
-
- <a name="The-_002dsymbol_002dinfo_002dtypes-Command"></a>
- <h4 class="subheading">The <code>-symbol-info-types</code> Command</h4>
- <a name="index-_002dsymbol_002dinfo_002dtypes"></a>
- <a name="g_t_002dsymbol_002dinfo_002dtypes"></a>
- <a name="Synopsis-84"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-info-types [--name <var>name_regexp</var>]
- [--max-results <var>limit</var>]
-
- </pre></div>
-
- <p>Return a list of all defined types. The types are grouped by source
- file, and shown with the line number on which each user defined type
- is defined. Some base types are not defined in the source code but
- are added to the debug information by the compiler, for example
- <code>int</code>, <code>float</code>, etc.; these types do not have an associated
- line number.
- </p>
- <p>The option <code>--name</code> allows the list of types returned to be
- filtered by name.
- </p>
- <p>The option <code>--max-results</code> restricts the command to return no
- more than <var>limit</var> results. If exactly <var>limit</var> results are
- returned then there might be additional results available if a higher
- limit is used.
- </p>
- <a name="GDB-Command-66"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info types</samp>’.
- </p>
- <a name="Example-66"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-info-types
- ^done,symbols=
- {debug=
- [{filename="gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{name="float"},
- {name="int"},
- {line="27",name="typedef int my_int_t;"}]},
- {filename="gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="24",name="typedef float another_float_t;"},
- {line="23",name="typedef int another_int_t;"},
- {name="float"},
- {name="int"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-types --name _int_
- ^done,symbols=
- {debug=
- [{filename="gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="27",name="typedef int my_int_t;"}]},
- {filename="gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="23",name="typedef int another_int_t;"}]}]}
- </pre></div>
-
- <a name="The-_002dsymbol_002dinfo_002dvariables-Command"></a>
- <h4 class="subheading">The <code>-symbol-info-variables</code> Command</h4>
- <a name="index-_002dsymbol_002dinfo_002dvariables"></a>
- <a name="g_t_002dsymbol_002dinfo_002dvariables"></a>
- <a name="Synopsis-85"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-info-variables [--include-nondebug]
- [--type <var>type_regexp</var>]
- [--name <var>name_regexp</var>]
- [--max-results <var>limit</var>]
-
- </pre></div>
-
- <p>Return a list containing the names and types for all global variables
- taken from the debug information. The variables are grouped by source
- file, and shown with the line number on which each variable is
- defined.
- </p>
- <p>The <code>--include-nondebug</code> option causes the output to include
- data symbols from the symbol table.
- </p>
- <p>The options <code>--type</code> and <code>--name</code> allow the symbols returned
- to be filtered based on either the name of the variable, or the type
- of the variable.
- </p>
- <p>The option <code>--max-results</code> restricts the command to return no
- more than <var>limit</var> results. If exactly <var>limit</var> results are
- returned then there might be additional results available if a higher
- limit is used.
- </p>
- <a name="GDB-Command-67"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>The corresponding <small>GDB</small> command is ‘<samp>info variables</samp>’.
- </p>
- <a name="Example-67"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-info-variables
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="25",name="global_f1",type="float",
- description="static float global_f1;"},
- {line="24",name="global_i1",type="int",
- description="static int global_i1;"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="21",name="global_f2",type="int",
- description="int global_f2;"},
- {line="20",name="global_i2",type="int",
- description="int global_i2;"},
- {line="19",name="global_f1",type="float",
- description="static float global_f1;"},
- {line="18",name="global_i1",type="int",
- description="static int global_i1;"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-variables --name f1
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="25",name="global_f1",type="float",
- description="static float global_f1;"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="19",name="global_f1",type="float",
- description="static float global_f1;"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-variables --type float
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="25",name="global_f1",type="float",
- description="static float global_f1;"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="19",name="global_f1",type="float",
- description="static float global_f1;"}]}]}
- </pre><pre class="smallexample">(gdb)
- -symbol-info-variables --include-nondebug
- ^done,symbols=
- {debug=
- [{filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-1.c",
- symbols=[{line="25",name="global_f1",type="float",
- description="static float global_f1;"},
- {line="24",name="global_i1",type="int",
- description="static int global_i1;"}]},
- {filename="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- fullname="/project/gdb/testsuite/gdb.mi/mi-sym-info-2.c",
- symbols=[{line="21",name="global_f2",type="int",
- description="int global_f2;"},
- {line="20",name="global_i2",type="int",
- description="int global_i2;"},
- {line="19",name="global_f1",type="float",
- description="static float global_f1;"},
- {line="18",name="global_i1",type="int",
- description="static int global_i1;"}]}],
- nondebug=
- [{address="0x00000000004005d0",name="_IO_stdin_used"},
- {address="0x00000000004005d8",name="__dso_handle"}
- ...
- ]}
- </pre></div>
-
-
-
- <a name="The-_002dsymbol_002dlist_002dlines-Command"></a>
- <h4 class="subheading">The <code>-symbol-list-lines</code> Command</h4>
- <a name="index-_002dsymbol_002dlist_002dlines"></a>
-
- <a name="Synopsis-86"></a>
- <h4 class="subsubheading">Synopsis</h4>
-
- <div class="smallexample">
- <pre class="smallexample"> -symbol-list-lines <var>filename</var>
- </pre></div>
-
- <p>Print the list of lines that contain code and their associated program
- addresses for the given source filename. The entries are sorted in
- ascending PC order.
- </p>
- <a name="GDB-Command-68"></a>
- <h4 class="subsubheading"><small>GDB</small> Command</h4>
-
- <p>There is no corresponding <small>GDB</small> command.
- </p>
- <a name="Example-68"></a>
- <h4 class="subsubheading">Example</h4>
- <div class="smallexample">
- <pre class="smallexample">(gdb)
- -symbol-list-lines basics.c
- ^done,lines=[{pc="0x08048554",line="7"},{pc="0x0804855a",line="8"}]
- (gdb)
- </pre></div>
-
-
-
-
- <hr>
- <div class="header">
- <p>
- Next: <a href="GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands" accesskey="n" rel="next">GDB/MI File Commands</a>, Previous: <a href="GDB_002fMI-Tracepoint-Commands.html#GDB_002fMI-Tracepoint-Commands" accesskey="p" rel="prev">GDB/MI Tracepoint Commands</a>, Up: <a href="GDB_002fMI.html#GDB_002fMI" accesskey="u" rel="up">GDB/MI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
- </div>
-
-
-
- </body>
- </html>
|