From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199707230818.CAA08946@novak.lanl.gov> Date: Wed, 23 Jul 1997 02:18:46 -0600 From: Richard Holmes Subject: profiling in GCC Hello, I want to use gprof on an executable, but I'm having some trouble. Perhaps someone can give me some advice. I compiled my program using gcc 2.7.2.1 with the -pg flag and made sure I linked in all the right libraries (I think), such as libm_p rather than libm. What happens is that as soon as I start my program I get a "segmentation violation", which doesn't happen if I compile without the -pg flag. I traced the problem to a call to ctime() by using gdb. If I take out the call to ctime() and rerun I get an "illegal instruction" error that I can't trace with gdb. Again, it all works fine if I don't use the -pg flag. Any ideas? I was originally using the libc from glibc-0.961212-4.axp.rpm and tried using the libraries from glibc-profile-2.0.3-1.alpha.rpm, but that didn't change anything. I remember some list traffic about profiling in the last month or two, but the archives at redhat.com don't seem to be available at the moment. Rich --------------------------------------- Richard Holmes Los Alamos National Laboratory Group XTA MS B220 Los Alamos, NM 87545 (505) 667-3598 holmes@lanl.gov -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com