Lost source code
I am using SunStudio12 and have stopped the program while in the debugger. I seem to have misplaced the source code window (as I can not find it). Any idea where I can find this as it's difficult to use without this. In the breakpoints windows, I can not select the "Show source" option and when moving up and down the call tree, source code does not appear.
When I look at this in gdb, I see the code just fine and I am building with gcc, so can dbx not read gdb object files? Breaks give me a message "no debugger info" which is incorrect from a gcc standpoint.
I tried compiling with a -gstab in gcc, but this did not seem to work.
Thanks
Message was edited by:
Brett_Tiplitz
Message was edited by:
Brett_Tiplitz
# 1
Dbx should read any object files, as long as they are in ELF; the problem (I think) is with the debugger info, which is generated into a.out and/or object files. Dbx should understand DWARF (debugger info format) generated by the following versions of gcc: 3.3.3, 3.4.2 and 3.4.3, but if you have different version, it is likely that smth has changed in the way DWARF is generated and dbx can't read it.
There's an article titled 'Why can't dbx find my function', which you might find helpful:
http://developers.sun.com/sunstudio/articles/dbxerr.html
BTW, can you try compiling you app with Sun Studio compiler and see if it helps? And just to make sure it is dbx's problem: please try loading your program into dbx without the GUI and issuing 'stop in <some_function>' -- does it emit the same 'no debugger info' message?
Anyway, it is most likely dbx problem and it would be great if you can file a bug against dbx through bugs.sun.com.
# 2
I was using gcc 3.4.4 when I encountered the problem. I have tried smaller programs and it works there. The main program seems to have source, but the libraries that I am linking with seem to have lost it. I checked the binary between gdb and dbx and it has all the source info there for gdb.
So on putting in a bug, I guess I feel that I can not provide a test case or sufficient information that would be useful towards tracking the problem down.
# 3
Your first descriptions sounds like you lost the source WINDOW
in the IDE. This might be fixed by using the "windows" menu item to turn
on the source window.
But your second message makes it sound like you can go back and forth
between the main program and a library and the source will appear
and disappear.