DBX on Ubuntu
Hi,
I downloaded and installed SunStudio 12 on my Ubuntu machine. Thanks a lot for this great tool, the IDE works like a charm and compiling is smoothly.
But sadly the debugging using dbx does not work. I tried it on Ubuntu Dapper Drake LTS (6.06) and get the following errors:
Reading ld-linux.so.2
dbx: internal warning: Mismatched checksum - file /lib/ld-2.3.6.so has f305999e, expecting 41122dd
Reading libfsu.so.1
Reading libmtsk.so.1
Reading libpthread.so.0
dbx: internal warning: Mismatched checksum - file /lib/tls/i686/cmov/libpthread-2.3.6.so has a7db34c2, expecting a58fb47c
Reading libm.so.6
dbx: internal warning: Mismatched checksum - file /lib/tls/i686/cmov/libm-2.3.6.so has 2525b926, expecting 9953a5ea
Reading libc.so.6
dbx: internal warning: Mismatched checksum - file /lib/tls/i686/cmov/libc-2.3.6.so has cd229517, expecting c99d524a
Reading librt.so.1
dbx: internal warning: Mismatched checksum - file /lib/tls/i686/cmov/librt-2.3.6.so has a8bfe6d0, expecting 9f9c3ba0
Reading libdl.so.2
dbx: internal warning: Mismatched checksum - file /lib/tls/i686/cmov/libdl-2.3.6.so has e03cf453, expecting 6b2cf121
On Ubuntu Feisty Fawn (7.04) I get a similar error.
Obviously there is a issue with the system libraries, but I don't know how to work around it.
I would appreciate any help ;)
Thanks a lot,
Harald
[1457 byte] By [
hpcklimaa] at [2007-11-27 6:27:21]

# 1
I think dbx issues these warnings during .gnu_debuglink section processing. This section is supposed to point to external debugging information. Dbx calculates checksum of the file pointed to by this section and compares this checksum with one stored in the section itself.
From what I see in the code, it should be a problem -- dbx should just skip reading this external debug information and go on; symbols from those libraries should be visible anyway. Can you actually debug a program after all those warnings?
Unfortunately, I don't have any Ubuntu system to test dbx there, so I'm only making a guess.
# 2
Hi,
thanks a lot for your very fast reply.
In fact you are right, the Debugger is running without any appearend problems after the reported messages.
I just forgot to set a breakpoint, and the execution exited so fast previously, I just thought the debugger aborted after complaining.
With a breakpoint everything seems to work as proposed. :)
So I think I can report sunstudio to be working on ubuntu.
Thanks again,
Harald
# 3
> the Debugger is running without any appeared problems after the reported messages.You probably mean the debugger on a 32-bit system. Just a reminder to the developers: the debugger does not work at all on a 64-bit system (Core-2 Duo).
# 4
> You probably mean the debugger on a 32-bit system.
Well yes, my Ubuntu Box is a 32-bit system.
> Just a reminder to the developers: the debugger does
> not work at all on a 64-bit system (Core-2 Duo).
But I have another system available with Suse Linux, running on 64Bit Dual Core AMD Opteron(tm) Processor 270.
And seems to work, I did not test it really well, but at least a little test example can be debugged.
As said this is on Suse, I don't have a 64-Bit Ubuntu system available right now, so I can't state anything about this.
# 5
> So I think I can report sunstudio to be working on ubuntu.Glad to hear that. I guess we need to update unofficial FAQ on http://www.genunix.org/wiki/index.php/Sun_Studio_FAQs with this warning so that it doesn't frighten people :-)
# 6
> Just a reminder to the developers: the debugger does not work at all on a 64-bit system (Core-2 Duo).
Unlike on Solaris, Linux only allows to debug application of the same "bitness" as debugger. That is, 64-bit dbx (launched automatically by default on 64-bit system) can not debug 32-bit apps. Can it be the case with you? And if it's not, what exactly is the problem that doesn't allow you to debug programs with dbx? I remember that half a year ago I was able to use dbx (intermediate version) on my x64 Fedora Core.
# 7
> 64-bit dbx can not debug 32-bit apps.If you want to debug 32-bit app on 64-bit Linux you can use -xexec32 option (btw, thats what dbxwill tell you to do if you ever will start it on 32bit app).regards,__Fedor.
SFVa at 2007-7-12 17:49:12 >

# 8
> > Just a reminder to the developers: the debugger
> does not work at all on a 64-bit system (Core-2
> Duo).
That statement doesn't seem to be correct in SunStudio12. Using Express Releases (all of them), I was not able to debug any Fortran program on my Debian x64 system. I have just downloaded and installed SunStudio12, which seems to be much more efficient: I tested SunStudio12 with a large Fortran project, and both the Fortran error parser and the debugger worked as expected. However, that was just a first (although not trivial) test. I will be able to do a full test, and I'll post the conclusions soon.
> Unlike on Solaris, Linux only allows to debug
> application of the same "bitness" as debugger. That
> is, 64-bit dbx (launched automatically by default on
> 64-bit system) can not debug 32-bit apps. Can it be
> the case with you? And if it's not, what exactly is
> the problem that doesn't allow you to debug programs
> with dbx? I remember that half a year ago I was able
> to use dbx (intermediate version) on my x64 Fedora
> Core.
I use Debian 4.0 "Etch", which is a "pure" x64 system. Nevertheless, the debugger seems to work now. Until recently, it was not possible to debug anything in my x64 system. Dbx crashed as soon as I was pressing F5. Fortunately, this is not true anymore.
