🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52390

gcc-2.2.2 doesn't call _mcleanup

#52390
From: L. Jonas Olsson
Date: Sun, 25 Oct 1992 23:33
20 lines
1584 bytes
I have compiled gcc-2.2.2 on 386BSD, using patches that I posted
in comp.unix.bsd. Now I have found that when profiling with the
-pg option the functions monstartup and moncontrol gets called
as they should before the main program. Inside the program mcount
also gets called correctly, but when the program finishes there
are no calls to _mcleanup and moncontrol. The _mcleanup function
is the one that writes out the gmon.out file. I was able to put
an explicit call to _mcleanup() at the end of C programs and
get a good gmon.out, but for C++ this didn't work that well.

Now the question is where/how do I fix this? Do I have to change
the startup code (/usr/lib/gcrt0.o), gcc-2.2.2, or something else?

I also noticed that there is a file gmon.c in the gcc distribution
that seems to be the same as the 386BSD code for compiling gcrt0.o.
This file doesn't seem to be used for anything, but could it be
related to my problem?

	Jonas Olsson
	ljo@po.cwru.edu
Technical Details
Message-ID: <1cfas6INNalj@usenet.INS.CWRU.Edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!usenet.ins.cwru.edu!ljo

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,8c320c96b587bd46,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-10-25 10:41:14 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!usenet.ins.cwru.edu!ljo
From: ljo@r2d2.eeap.cwru.edu (L. Jonas Olsson)
Newsgroups: gnu.gcc.help
Subject: gcc-2.2.2 doesn't call _mcleanup
Date: 25 Oct 1992 23:33:26 GMT
Organization: Case Western Reserve Univ. Cleveland, Ohio (USA)
Lines: 21
Message-ID: <1cfas6INNalj@usenet.INS.CWRU.Edu>
NNTP-Posting-Host: johnny5.eeap.cwru.edu
Keywords: gcc-2.2.2 profiling 386BSD profiling