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: DWARF question


-----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-----


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