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


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


Joel Brobecker wrote:
>
> It should be the same if the "current file" is set to test.f.
> It looks like it isn't. For some reason, GDB thinks that the current
> file is something else. Again, perhaps a copy of your GDB session
> might give a clue.
>
Here's a sample output with some comments:

(gdb) b 25
No line 25 in file "init.c".
(gdb) b this
Breakpoint 1 at 0x10000670: file /tst111/ptr/fxdb1251.f, line 25.
(gdb) b 31
No line 31 in file "init.c".
(gdb) b ifunc
Breakpoint 2 at 0x10000770: file /tst111/ptr/fxdb1251.f, line 30.

As you can see, breakpoints by line number don't work. However, if I
use the function name, it works correctly.
At this point, if I clear all breakpoints and try to set them again by
line number, it doesn't work. Now, if I run the program, this happens:

(gdb) r
Starting program: /home/cseo/gdb-bugs/pr36275/fxdb1251
[Thread debugging using libthread_db enabled]
[New Thread 0xf7fb9000 (LWP 16185)]
[Switching to Thread 0xf7fb9000 (LWP 16185)]

Breakpoint 1, this () at /tst111/ptr/fxdb1251.f:25
25              i=ifunc(1)
Current language:  auto; currently fortran
(gdb) c
Continuing.

Breakpoint 2, ifunc (i=
During symbol reading, incomplete CFI data; unspecified registers
(e.g., r0) at 0x100007dc.
1) at /tst111/ptr/fxdb1251.f:30
30              print *,i*2
(gdb) c
Continuing.
 2
 1

Program exited normally.
(gdb) del
Delete all breakpoints? (y or n) y
(gdb) b 25
Breakpoint 3 at 0x10000670: file /tst111/ptr/fxdb1251.f, line 25.
(gdb) b 31
Breakpoint 4 at 0x100007cc: file /tst111/ptr/fxdb1251.f, line 31.
(gdb)

After running the program, if I clear all breakpoints and try to set
them again by line number, it works.

Any ideas?

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

iD8DBQFG9dE8qvq7Aov/qQARAnoGAJ9oAM2QSypensiZxsv1fJBvnucUQACfSWFD
zbU+0hlFgADSvx1JGGzkU3E=
=m8M+
-----END PGP SIGNATURE-----


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