87 lines
4.0 KiB
HTML
87 lines
4.0 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<title>Address Locations - Debugging with GDB</title>
|
|
<meta http-equiv="Content-Type" content="text/html">
|
|
<meta name="description" content="Debugging with GDB">
|
|
<meta name="generator" content="makeinfo 4.13">
|
|
<link title="Top" rel="start" href="index.html#Top">
|
|
<link rel="up" href="Specify-Location.html#Specify-Location" title="Specify Location">
|
|
<link rel="prev" href="Explicit-Locations.html#Explicit-Locations" title="Explicit Locations">
|
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
|
<!--
|
|
Copyright (C) 1988-2019 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.''
|
|
-->
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
<style type="text/css"><!--
|
|
pre.display { font-family:inherit }
|
|
pre.format { font-family:inherit }
|
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
|
pre.smallexample { font-size:smaller }
|
|
pre.smalllisp { font-size:smaller }
|
|
span.sc { font-variant:small-caps }
|
|
span.roman { font-family:serif; font-weight:normal; }
|
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
<div class="node">
|
|
<a name="Address-Locations"></a>
|
|
<p>
|
|
Previous: <a rel="previous" accesskey="p" href="Explicit-Locations.html#Explicit-Locations">Explicit Locations</a>,
|
|
Up: <a rel="up" accesskey="u" href="Specify-Location.html#Specify-Location">Specify Location</a>
|
|
<hr>
|
|
</div>
|
|
|
|
<h4 class="subsection">9.2.3 Address Locations</h4>
|
|
|
|
<p><a name="index-address-locations-566"></a>
|
|
<dfn>Address locations</dfn> indicate a specific program address. They have
|
|
the generalized form *<var>address</var>.
|
|
|
|
<p>For line-oriented commands, such as <code>list</code> and <code>edit</code>, this
|
|
specifies a source line that contains <var>address</var>. For <code>break</code> and
|
|
other breakpoint-oriented commands, this can be used to set breakpoints in
|
|
parts of your program which do not have debugging information or
|
|
source files.
|
|
|
|
<p>Here <var>address</var> may be any expression valid in the current working
|
|
language (see <a href="Languages.html#Languages">working language</a>) that specifies a code
|
|
address. In addition, as a convenience, <span class="sc">gdb</span> extends the
|
|
semantics of expressions used in locations to cover several situations
|
|
that frequently occur during debugging. Here are the various forms
|
|
of <var>address</var>:
|
|
|
|
<dl>
|
|
<dt><var>expression</var><dd>Any expression valid in the current working language.
|
|
|
|
<br><dt><var>funcaddr</var><dd>An address of a function or procedure derived from its name. In C,
|
|
C<tt>++</tt>, Objective-C, Fortran, minimal, and assembly, this is
|
|
simply the function's name <var>function</var> (and actually a special case
|
|
of a valid expression). In Pascal and Modula-2, this is
|
|
<code>&</code><var>function</var>. In Ada, this is <var>function</var><code>'Address</code>
|
|
(although the Pascal form also works).
|
|
|
|
<p>This form specifies the address of the function's first instruction,
|
|
before the stack frame and arguments have been set up.
|
|
|
|
<br><dt><code>'</code><var>filename</var><code>':</code><var>funcaddr</var><dd>Like <var>funcaddr</var> above, but also specifies the name of the source
|
|
file explicitly. This is useful if the name of the function does not
|
|
specify the function unambiguously, e.g., if there are several
|
|
functions with identical names in different source files.
|
|
</dl>
|
|
|
|
</body></html>
|
|
|