From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0d3b03a4167917a988de9f48d31ecf57@quanstro.net> From: erik quanstrom Date: Sun, 9 Apr 2006 18:04:55 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] Good enough approximation for ape/pcc MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 33d8e098-ead1-11e9-9d60-3106f5b1d025 i'm not convinced this is useful. if your program is sufficiently complicated to warrent this sort of debugging aid, just printing the caller's name (or pc) is most likely insufficient. most likely you're going to need to know the whole call stack. and likely function arguments and locals. i did write a pretty large billing system that announced that selected functions had been called in the debugging log. even if we had been programming to c99 at the time, __func__ would not have been useful because we also printed out the most helpful arguments to the functions we were tracing. - erik On Sun Apr 9 16:58:17 CDT 2006, schwartz@bio.cse.psu.edu wrote: > Nah, even simple function calls can use it. > > check(a, b, c, __func__); > > It's true, it would be nice to find out the caller from within check(), > but this achieves most of the utility with a much simpler implementation. >