Problems with -pg option

Vishwas H.K vishwas@amplewave.com
Thu Jul 31 16:58:00 GMT 2003


Hi,

I am facing problems with the gcc options -fomit-frame-pointer and -pg
(option for the profiler gprof). As I could find out, -pg and
-fomit-frame-pointer don't and can't co-exist. What I have done is, I
have
removed the option -fomit-frame-pointer and instead, I am using
-fno-omit-frame-pointer. Even then, -pg seems to cause a segmentation
fault in my application.

My application is such that shared libraries are linked with one main
".o" and each of the shared library is built using separate makefiles.
All the makefiles have the -pg option and the -fno-omit-frame-pointer.

Do I need to turn off any optimization (like -O2, -O3, etc) also ?

Any info would be of great help.

PLEASE CC THE REPLY TO vishwas@amplewave.com ALSO.

Thanks in advance,
Vishwas .H.K



More information about the Gcc mailing list