]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
gdb/fortran: Clean up array/string expression evaluation
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 6 May 2020 17:53:21 +0000 (18:53 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 19 Sep 2020 08:42:38 +0000 (09:42 +0100)
commit8c37706a511209f6a92d887812c14e860c3bd0a0
tree62b9b1a9f84ef196e179e582f4a53493621dd612
parent14f9473ca225290680c8b21240cdca49f8d3b332
gdb/fortran: Clean up array/string expression evaluation

This commit is a refactor of part of the Fortran array and string
handling code.

The current code is split into two blocks, linked, weirdly, with a
goto.  After this commit all the code is moved to its own function,
and arrays and strings are now handled using the same code; this will
be useful later when I want to add array stride support where strings
will want to be treated just like arrays, but is a good clean up even
without the array stride work, which is why I'm merging it now.

For now the new function is added as a static within eval.c, even
though the function is Fortran only.  A following commit will remove
some of the Fortran specific code from eval.c into one of the Fortran
specific files, including this new function.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* eval.c (fortran_value_subarray): New function, content is taken
from...
(evaluate_subexp_standard): ...here, in two places.  Now arrays
and strings both call the new function.
(calc_f77_array_dims): Add header comment, handle strings.
gdb/ChangeLog
gdb/eval.c