]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/doc] Fix address location with file prefix
authorTom de Vries <tdevries@suse.de>
Mon, 3 Mar 2025 16:13:20 +0000 (17:13 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 3 Mar 2025 16:13:20 +0000 (17:13 +0100)
In the docs I read [1]:
...
Address locations indicate a specific program address.  They have the
generalized form *address.

funcaddr

    An address of a function or procedure derived from its name.
    ...

'filename':funcaddr

    Like funcaddr 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.
...

This is incorrect, the notation is in fact 'filename'::funcaddr.

Fix this by correcting the typo, and add a reference to "variable name
conflict", where the concept is explained in more detail.

Approved-By: Eli Zaretskii <eliz@gnu.org>
PR gdb/32748
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32748

[1] https://sourceware.org/gdb/current/onlinedocs/gdb.html/Address-Locations.html

gdb/doc/gdb.texinfo

index f064645a2fa4393a9105c929561353fe2fc9774b..3c0d6de3c1cc21cf7db6d277e31e8051f4ac7988 100644 (file)
@@ -9697,11 +9697,12 @@ of a valid expression).  In Ada, this is @code{@var{function}'Address}
 This form specifies the address of the function's first instruction,
 before the stack frame and arguments have been set up.
 
-@item '@var{filename}':@var{funcaddr}
+@item '@var{filename}'::@var{funcaddr}
 Like @var{funcaddr} 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.
+functions with identical names in different source files,
+see @ref{variable name conflict}.
 @end table
 
 @node Edit
@@ -11000,6 +11001,7 @@ executing within the function @code{foo}, but you can only use or
 examine the variable @code{b} while your program is executing inside
 the block where @code{b} is declared.
 
+@anchor{variable name conflict}
 @cindex variable name conflict
 There is an exception: you can refer to a variable or function whose
 scope is a single source file even if the current execution point is not