diff options
author | Tom de Vries <tdevries@suse.de> | 2025-03-03 17:13:21 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-03-03 17:13:21 +0100 |
commit | f96ad03c0e6c2440f30d9fe7e1215ff0c2a61f2a (patch) | |
tree | 64bfc9586f53a8dcd0c2da31c27d7d392796349f /gdb/doc | |
parent | c9ee63c0c0f30e32f30eaebb1f66c8f04d72fd0c (diff) | |
download | binutils-f96ad03c0e6c2440f30d9fe7e1215ff0c2a61f2a.zip binutils-f96ad03c0e6c2440f30d9fe7e1215ff0c2a61f2a.tar.gz binutils-f96ad03c0e6c2440f30d9fe7e1215ff0c2a61f2a.tar.bz2 |
[gdb/doc] Indicate in which languages 'filename'::funcaddr works
In the docs I read [1]:
...
In this section, we discuss operators that you can use in GDB expressions
regardless of your programming language.
...
GDB supports these operators, in addition to those common to programming
languages:
‘::’ allows you to specify a variable in terms of the file or function
where it is defined. See Program Variables.
...
In fact, this is not supported in Ada:
...
(gdb) b *'foo.adb'::foo
No file or function "foo.adb'".
(gdb)
...
and likewise in a few other working languages.
Fix this by making this restriction explicit.
Approved-By: Eli Zaretskii <eliz@gnu.org>
PR gdb/32753
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32753
[1] https://sourceware.org/gdb/current/onlinedocs/gdb.html/Expressions.html
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 3c0d6de..95a881e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -9702,7 +9702,8 @@ 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, -see @ref{variable name conflict}. +see @ref{variable name conflict}. This may not be supported for all +languages, see @ref{Expressions}. @end table @node Edit @@ -10843,8 +10844,9 @@ this manual are in C. @xref{Languages, , Using @value{GDBN} with Different Languages}, for information on how to use expressions in other languages. -In this section, we discuss operators that you can use in @value{GDBN} -expressions regardless of your programming language. +In this section, we discuss operators that may be available in @value{GDBN} +expressions in addition to those of your programming language. However, +they are not necessarily available in all working languages. @cindex casts, in expressions Casts are supported in all languages, not just in C, because it is so @@ -10863,6 +10865,7 @@ to programming languages: @item :: @samp{::} allows you to specify a variable in terms of the file or function where it is defined. @xref{Variables, ,Program Variables}. +This is currently not supported in Ada, Rust, Pascal, Modula-2 and D. @cindex @{@var{type}@} @cindex type casting memory @@ -11009,7 +11012,8 @@ in this file. But it is possible to have more than one such variable or function with the same name (in different source files). If that happens, referring to that name has unpredictable effects. If you wish, you can specify a static variable in a particular function or file by -using the colon-colon (@code{::}) notation: +using the colon-colon (@code{::}) notation (this may not be supported for all +languages, @pxref{Expressions}): @cindex colon-colon, context for variables/functions @ifnotinfo |