From: Tom de Vries Date: Mon, 3 Mar 2025 16:13:20 +0000 (+0100) Subject: [gdb/doc] Don't advertise *&function for pascal and modula-2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d468657e665e4bba3c971ce8496528c496616840;p=thirdparty%2Fbinutils-gdb.git [gdb/doc] Don't advertise *&function for pascal and modula-2 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. ... In Pascal and Modula-2, this is &function. ... I tried "break *&function" for Pascal and Modula-2, and this doesn't work, while "break *function" works fine. Fix this by updating the documentation to reflect actual behaviour. Approved-By: Eli Zaretskii PR gdb/32754 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32754 [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 29c0118dda2..f064645a2fa 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -9689,11 +9689,10 @@ Any expression valid in the current working language. @item @var{funcaddr} An address of a function or procedure derived from its name. In C, -C@t{++}, Objective-C, Fortran, minimal, and assembly, this is +C@t{++}, Objective-C, Fortran, Pascal, Modula-2, minimal, and assembly, this is simply the function's name @var{function} (and actually a special case -of a valid expression). In Pascal and Modula-2, this is -@code{&@var{function}}. In Ada, this is @code{@var{function}'Address} -(although the Pascal form also works). +of a valid expression). In Ada, this is @code{@var{function}'Address} +(although @code{&@var{function}} also works). This form specifies the address of the function's first instruction, before the stack frame and arguments have been set up.