This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Problems while debugging fortran
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, gdb at sourceware dot org
- Date: Wed, 24 Oct 2007 12:33:36 -0700
- Subject: Re: Problems while debugging fortran
- References: <46EB035B.4090802@linux.vnet.ibm.com> <20070920173246.GJ16400@adacore.com> <46F2CE45.5020308@linux.vnet.ibm.com> <20070920204622.GB4368@adacore.com> <20070920205629.GA17779@caradoc.them.org> <46FAD136.5030406@linux.vnet.ibm.com> <20070926214619.GC9403@adacore.com> <471F70C0.3000206@linux.vnet.ibm.com>
> The compiler is XLF and the only way it tags the "main" function is by
> adding DW_AT_calling_convention = DW_CC_program. Unfortunately, I
> don't have any control over the compiler, so I'm stuck with this. Any
> other thoughts?
Apart from using "DW_AT_calling_convention = DW_CC_program", not much, no.
The idea is to try to find something that is unique to the main function.
Sometimes it's the naming of the function, but it could be something else.
Question to the other GDB contributors/maintainers: Is it going to
hurt GDB if we fallback to using "DW_AT_calling_convention =
DW_CC_program" to find the main? The DWARF3 manual says that this
attribute value was <<intended to support Fortran main programs>>.
This is very unclear, since they don't explain what "support"
refers to. But for people stuck with XLF, if we can improve their
lives without hurting the rest of GDB, I'm ok with compromising and
using this attribute value be used to find the main.
--
Joel