Re: GDB 5.1 on Solaris 2.8

Eli Zaretskii
2001-11-25T08:39:39Z

On Sat, 24 Nov 2001, Dan Nicolaescu wrote:

> > $ gdb a.out
> > gdb> list
> > /opt/src/devel/gdb-5.1: Is a directory.
>
> Well, it works for me... But it seems that you have a newer version of
> the Sun compiler than I do:
>
> cc -V
> cc: Sun WorkShop 6 update 1 C 5.2 2000/09/11

Thanks to everyone who replied; -xs seems to be what I need.

The example above works for me as well, but I have an even older
version of the compiler.

However, it sounds like turning on optimizations makes GDB debugging
impossible with this compiler. Is that expected? Am I spoiled by
GCC?