Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: Problems while debugging fortran
Date: Tue, 25 Sep 2007 17:34:00 -0000	[thread overview]
Message-ID: <46F9439A.3010806@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070924234910.GB8601@adacore.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joel Brobecker wrote:
>
> I wonder why that is. Is this the file where function "main" is
> reported to be?
>
Yes, it seems that way. The problem is: in that sample code I sent in
my first post, there's no function "main".  If GDB assumes that it
will always be like:

program main
    ...blah blah
end

it'll never work for something like:

program foo
    ... blah blah
end

If I change the name of my Fortran program to "main", I can set a
breakpoint by line number inside it. So it seems that GDB is only
looking for "main". This is fine for C, but it won't work for Fortran
IMHO, not even using that patch Daniel posted. So, I believe we should
address this issue in symtab.c:find_main_name. I can start looking
into it.

In the scenario above, a breakpoint by line number inside a function
will fail. I think this may has to do with the compiler generating two
DWARF compilation units (one for "main" and other for the function)
and GDB is not reading the one related to the function. What are your
thoughts about this?

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

iD4DBQFG+UOZqvq7Aov/qQARAgXlAJ0fa3E/Dv15WNFHB9s0uODC/YUKXQCY1xhJ
9jNxJPlD98kMq1XIuFE6pA==
=3bWB
-----END PGP SIGNATURE-----


  reply	other threads:[~2007-09-25 17:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-15 11:37 Carlos Eduardo Seo
2007-09-20 19:47 ` Joel Brobecker
2007-09-20 20:46   ` Carlos Eduardo Seo
2007-09-20 20:56     ` Joel Brobecker
2007-09-21  6:52       ` Daniel Jacobowitz
2007-09-26 21:46         ` Carlos Eduardo Seo
2007-09-26 21:51           ` Joel Brobecker
2007-10-24 16:20             ` Carlos Eduardo Seo
2007-10-24 19:33               ` Joel Brobecker
2007-10-24 19:57                 ` Daniel Jacobowitz
2007-10-24 20:16                   ` Carlos Eduardo Seo
2007-10-24 21:56                     ` Carlos Eduardo Seo
2007-09-26 21:51           ` Pierre Muller
2007-09-23  2:52       ` Carlos Eduardo Seo
2007-09-24 10:01         ` Joel Brobecker
2007-09-24 23:49           ` Carlos Eduardo Seo
2007-09-25  1:29             ` Joel Brobecker
2007-09-25 17:34               ` Carlos Eduardo Seo [this message]
2007-09-26  6:29                 ` Joel Brobecker
2007-10-25 16:07 François-Xavier Coudert
2007-10-25 17:06 ` Daniel Jacobowitz
2007-10-25 18:44   ` Jim Blandy
2007-10-25 19:01     ` Daniel Jacobowitz
2007-10-25 19:27       ` Jim Blandy
2007-10-25 20:24         ` Joel Brobecker
2007-10-25 20:36           ` Carlos Eduardo Seo
2007-10-25 20:41             ` Joel Brobecker
2007-10-25 20:55             ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46F9439A.3010806@linux.vnet.ibm.com \
    --to=cseo@linux.vnet.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox