From: Tom de Vries Date: Mon, 3 Mar 2025 16:13:20 +0000 (+0100) Subject: [gdb/doc] Fix address location with file prefix X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9ee63c0c0f30e32f30eaebb1f66c8f04d72fd0c;p=thirdparty%2Fbinutils-gdb.git [gdb/doc] Fix address location with file prefix 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 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 --- diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index f064645a2fa..3c0d6de3c1c 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -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