Re: Debugging support - Re: g77 features lacking in gfortran - PR19292

Wu Zhou
2005-10-26T03:44:46Z

Hi Thomas,

On Tue, 25 Oct 2005, Thomas Koenig wrote:

> On Tue, Oct 25, 2005 at 02:18:33PM +0800, Wu Zhou wrote:
>
> > GDB also has some other problems while working with gfortran, such as the
> > printing of one-dimensional array, function evaluation, handling of common
> > block variable and so on...
>
> ... variables from modules (I've just reported this as PR 24526),
> allocatable arrays (PR 17905) and so on.

PR 24526 could be worked around by using __foo__a, where foo is the
modular name and a being the variable name. To handle a directly, maybe
some changes in gdb is needed. I had added a comment in the bug report.

For 17905, if gfortran could output similar debuginfo as IFC does, gdb
could handle that. I ever pointed that out in the bug report.

BTW, if you can add me into the cc-list when you find a bug is with
reference to debugging, that will be highly appreciated.

> >
> > Some of these problems stems from the DWARF output of gfortran, some lies
> > in the code of gdb, some might involve both. I has been working on some
> > of these problem at gdb's side. I am now thinking of whether there are
> > any specific requirement from gfortran community for GDB. Did any of you
> > have a big picture about how well gdb work with gfortran? Did you
> > have a list of things that want GDB to support first?
>
> My (personal) vote would go to supporting arrays (one- and
> multidimensional) (PR 22244) should be pretty hight on the list,
> followed by variables in common blocks (PR 23057).

IIRC, Andrew Pinski ever said that Paul Brook is looking at the way to fix
PR 22244, but I didn't see any update for a long time. Don't know if Paul
ever had any time on this? Maybe you can contact him for clue on how to
fix that. If you can work out a way in gfortran to correctly represent
arrary dimension information in DWARF output, I am very happy to test
that. For PR 23057, if gfortran could output standard compliant DWARF
output, gdb (other debugger as well IMHO) could handle that. But maybe I
can take a look at gdb code to see whether it could be resolved in gdb's
side.

> Any help you can provide is certainly very welcome!

Great pleasure. I am more than happy to contribute to that. :-)

Best Regards
- wu Zhou