« Return to Thread: sun compiler and gdb

Re: sun compiler and gdb

by Sergio Durigan Junior :: Rate this Message:

| View in Thread

On Thursday, May 03 2012, Tomasz Grobelny wrote:

> Hi all,
> Should it be possible to debug C++ programs compiled using sun compiler
> using GDB? If so which debug format should I use? Which versions of the
> compiler/gdb support such a scenario? Currently the situation looks like
> this (which does not look very promising):

Indeed.  In a quick search using Google, I found some links reporting
that the compiler is kind of broken, probably when it comes to DWARF
generation.  Anyway, by reading this link:

    http://netbeans.org/bugzilla/show_bug.cgi?id=89876

especifically in comment #8, I saw that you can try enabling some
options in your C++ compiler:

    -Qoption cg -h_gcc -xO0 -g

Also, I saw that passing `-xs' to the compiler might help a bit.  But
overall, AFAIU, you don't have many options here, unfortunately.
However, I'm definitely not an expert in the platform, so maybe someone
more experienced will show up and help you further.

Good luck.

--
Sergio

 « Return to Thread: sun compiler and gdb