This is the mail archive of the gdb@sourceware.org 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: Problems while debugging fortran


  I am about to commit a similar patch to
recognize the special symbol name used
by GNU pascal compiler.
  I tought about adding a check for
current_language == language_pascal,
but the language is only set if the
program is compiled with debug information
on (will be the case most of the time),
but also only if the main source is recognized
as a pascal source.

  Currently, '.inc', '.p', '.pp' and '.pas'
suffixes are recognized as pascal sources,
but Delphi uses '.dpr' so chances are that
you compile a source that will not be recognized 
as a pascal source and in that case, the
pascal_main_name would not be called at all.

  
Pierre Muller
pascal language maintainer

> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
> Behalf Of Carlos Eduardo Seo
> Sent: Wednesday, September 26, 2007 11:38 PM
> To: Daniel Jacobowitz
> Cc: gdb@sourceware.org; brobecker@adacore.com
> Subject: Re: Problems while debugging fortran
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Daniel Jacobowitz wrote:
> >
> > Here's a relevant patch from the Debian packages of GDB.  As you can
> > see it comes from a mailing list message - I don't remember exactly
> > who submitted it without looking it up and I don't remember exactly
> > why it was never committed, but it was probably Wu Zhou and it was
> > probably never merged because of the larger issue of symbol case
> > sensitivity.
> This patch works fine _if_ the compiler is gfortran/g77. However, not
> all compilers call the program by "MAIN__". So, I was thinking about
> having something in symtab.c:find_main_name that checks DW_CC_program
> value if the language is Fortran and get the name from the main
> routine from DW_AT_name. Is that an acceptable solution?
> 
> Regards,
> 
> - --
> Carlos Eduardo Seo
> Software Engineer
> IBM Linux Technology Center
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFG+tE1qvq7Aov/qQARAprFAJ0aijQ2D6Mhuc4e4mGr/y1VAskdfgCfQeXT
> /47+1mSHn6XRATG0ihLyUo0=
> =DbGQ
> -----END PGP SIGNATURE-----




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