🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50390

hacking gcc to call a user func at each line?

#50390
From: Michael Golan
Date: Tue, 05 Oct 1993 20:26
18 lines
1229 bytes
Anyone can suply code or suggest where to look/what to do,
in order to modify gcc to produce a call to a user function
before every source line (or every basic block)?

In essence, I think this could be done by hacking -a to produce
a function call instead of direct counting code. 


Note: I have not, todate, hacked gcc - only gdb.

Thanks!



-- 
Michael Golan       | Duel, PD add-on to gdb, let x[..100].val >? 0
mg@cs.princeton.edu | show the positive val elements of array x[100] in the
		    | debugger, etc. annon ftp ftp.cs.princeton.edu:/duel 
Technical Details
Message-ID: <1993Oct5.202652.25733@Princeton.EDU>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usc!yeshua.marcam.com!siemens!princeton!salomon!mg

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1d5211167df248a5,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-10-05 16:58:01 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usc!yeshua.marcam.com!siemens!princeton!salomon!mg
From: mg@salomon.Princeton.EDU (Michael Golan)
Subject: hacking gcc to call a user func at each line?
Message-ID: <1993Oct5.202652.25733@Princeton.EDU>
Originator: news@nimaster
Sender: news@Princeton.EDU (USENET News System)
Nntp-Posting-Host: salomon.princeton.edu
Organization: Princeton University
Date: Tue, 5 Oct 1993 20:26:52 GMT
Lines: 19