public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
To: gdb@sourceware.org
Cc: drow@false.org
Subject: Re: DWARF question
Date: Fri, 28 Sep 2007 20:26:00 -0000	[thread overview]
Message-ID: <46FD5A9B.2070004@linux.vnet.ibm.com> (raw)
In-Reply-To: <46FAD46B.9000006@br.ibm.com>

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


Carlos Eduardo Seo wrote:
> It's generating one compilation unit for the "main" program and another
> one for a function called by that program. Both are implemented in the
> same source file.
> 
> 
And the source is in Fortran. This another problem that happens in the
situation I described in this thread:
http://sourceware.org/ml/gdb/2007-09/msg00134.html
aside from that finding "main" problem.


The problem is that, when I try to set a breakpoint by line number in
this case, two things may happen:

1. if I set the breakpoint somewhere inside "main", it works.
2. if I set the breakpoint somewhere inside the function, it doesn't
work (i.e.  'No line xx in file "foo.f".').

In other words, it seems that GDB doesn't have the line number
information for that function.

In order to fix this, I can think about two approaches:

- - Make GDB read the two existing symtabs for that source file when the
binary is loaded; or
- - When a breakpoint by line number is called, GDB tries to look for that
line in the other symtabs corresponding to the current objfile.

What do you think?

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/Vqbqvq7Aov/qQARAorRAJ9wLu3GrdBQr2W1jE+X/mDnmHV4nQCfZmWX
5FYKUlqCGlx0e6ZSFpK+qHQ=
=y1w8
-----END PGP SIGNATURE-----

  reply	other threads:[~2007-09-28 19:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26 21:25 Carlos Eduardo Seo
2007-09-26 21:27 ` Daniel Jacobowitz
2007-09-27  8:29   ` Carlos Eduardo Seo
2007-09-28 20:26     ` Carlos Eduardo Seo [this message]
2007-09-28 21:13       ` Jim Blandy
2007-09-28 23:14         ` Carlos Eduardo Seo
2007-09-28 23:49           ` Jim Blandy
2007-10-01 17:49             ` Carlos Eduardo Seo
2007-10-02 19:15               ` Jim Blandy
2007-10-02 19:26                 ` Carlos Eduardo Seo
2007-10-02 21:43                 ` Carlos Eduardo Seo
2007-10-02 23:05                   ` Carlos Eduardo Seo
2007-10-02 20:03               ` Jim Blandy
2007-10-02 20:09               ` Jim Blandy

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=46FD5A9B.2070004@linux.vnet.ibm.com \
    --to=cseo@linux.vnet.ibm.com \
    --cc=drow@false.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).