Subject: Re: Line & file debugging info for vnode locking.
To: John Kohl <jtk@kolvir.arlington.ma.us>
From: Julian Assange <proff@suburbia.net>
List: tech-kern
Date: 08/15/1999 00:08:16
> We can use ANSI string pasting to use a single "const char *" argument
> to include file and function name information (and, with a little bit of
> quoting hair, the line number too):
> 
> #define _quote(x) #x
> #define quote(x) _quote(x)
> 
> 	printf("%s\n", __FILE__ ":" __FUNCTION__ ":" quote(__LINE__));
> 
> -- 
> ==John Kohl <jtk@kolvir.arlington.ma.us>, <john_kohl@alum.mit.edu>
> Home page: <http://people.ne.mediaone.net/jtk/>
> Bicycling and Skiing to keep fit.
> 

This is what I do with my simple malloc debugging library, which has
only a pointer of overhead per malloc (in non-text space anyway).

Cheers,
Julian.