This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch]: Fix access to SPU registers for fortran


Daniel Jacobowitz schrieb:
On Mon, Apr 21, 2008 at 10:00:42PM +0200, Ulrich Weigand wrote:
Daniel Jacobowitz wrote:

Not without documentation, please.  Syntax that doesn't come from
Fortran (as far as I know) and isn't in the manual might as well not
be there :-)
Hmmm, most of the output changes in Markus' patch actually bring the
output in line with correct Fortran syntax in the first place ;-)

The one addition is the representation of "union" types in the output;
this can never happen in regular Fortran, but can happen if you access
registers that use a gdbarch-defined union type.  This extension is
simply the "C_Union" marker; note that as far as the *parser* is
concerned, there is no syntax extension.

But I guess you're right that this extension should be documented.
I assume the right place would be somewhere in section 12.4.3 Fortran?

I see. I didn't realize we already had the % operator that did the necessary operation - I must have not found it when this was last discussed.

Maybe we could mention it in the Operators bit of the Fortran
documentation, and there add that GDB allows it on unions?

thanks for your comments. I added some lines to the documentation.
Is this ok ?


* gdb.texinfo (Fortran Operators): Describe '%' operator.

-- Markus Deuling GNU Toolchain for Linux on Cell BE

diff -urpN src/gdb/doc/gdb.texinfo dev/gdb/doc/gdb.texinfo
--- src/gdb/doc/gdb.texinfo	2008-04-21 06:23:26.000000000 +0200
+++ dev/gdb/doc/gdb.texinfo	2008-04-22 07:10:59.000000000 +0200
@@ -9903,6 +9903,12 @@ of the second one.
 @item :
 The range operator.  Normally used in the form of array(low:high) to
 represent a section of array.
+@item %
+The access component operator.  Normally used to access elements in derived
+types.  Also suitable for unions.  As unions aren't part of regular fortran
+this can only happen when accessing a register that uses a gdbarch-defined
+union type.
 @end table
 @node Fortran Defaults

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]