- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,I am working on a very large body of code (~80k lines) and I would like to be able to debug using GDB. I have been working for a few days to be able to compile this fortran source in a way that would let me use GDB, but have been unsuccessful so far.I have been using the -g -debug -debug-parameters all options in my code.When I open the executable with GDB it saysGNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-37.el5_7.1)Copyright (C) 2009 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.This GDB was configured as "x86_64-redhat-linux-gnu".For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>...Reading symbols from EXECUTABLE...(no debugging symbols found)...done.(I left the version info there on purpose). I can set breakpoints and the work. It will list source code, but when I attempt to print a variable it fails. I am not sure why this is, but this is important functionality.Is there a flag or something I am not setting? I have even tried using the -dwarf-2/3 flags.Thanks in advance,Larry
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am going to move this thread over to our new Debugger Solutions User Forum.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this might be an issue with GDB itself that is better addressed at http://www.gnu.org/software/gdb/mailing-lists/.
That said let me try to see whetehr we can identify the problem more clearly.
Since you can list source code inside GDB and also set breakpoints, the most likely root cause would be that optimizations force some variables to be propageted in registers and the symbol info for those variable sbeing lost.
However - you do get the message (no debugging symbols found). This is the message you would get if -g does not get passed on correctly to the linker and the symbol info gets stripepd out again somewhere in the build process.
Can you provide me with
One typical complete compiler build/options line?
One complete linker command line?
My suspicion at first glance would be that you loose your symbol info other than basic function level info during the link step.
Thanks, Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the options as such look ok. It looks as though you are using the compiler driver (ifort) to pass the objects to the linker ld to do the linking.
Perhaps you can try to add the -Xlinker option (after all the compile roptions) and specify -debug there for the linker explicitly as well.
If this doesn't help we would probably have to have a look at the generated binary with the readelf utiltiy to confirm that there is indeed no symbol info in the object.
Thanks, Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok - so we at least know now that we are looking for the problem in the right place. Somehow the symbol info does not make it into the final executable.
Could you follow up with a private response that contains acomplete build log and your makefile /.configure build setup.
I will have to look at it in more detail to find out where the ball gets dropped I am afraid.
Thanks, Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
are you able to reproduce the same behavior if you are using IDB instead of GDB? IDB is part of the Composer XE installation you are using to run the Intel Fortran Compiler - and it is tested more extensively against ifort.
It may be helpful to see how the Intel Debugger reacts.
Are you also checking with the open source GDB community in parallel?
From your description it sounds more and more as though we are dealing with a scope issue instead of a symbol info table issue. Although I don't know why GDB would state that there is no symbol info table information. That is contradicting what we see,
Ifyou would like you could forward your small hello world test case to me as a private attachement and I'll run some tests on my end as well.
Thanks, Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page