lkml.org 
[lkml]   [1997]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Ugh in 2.1.60
Date
From
Bill Hawes wrote:
>
> David Woodhouse wrote:
> > Isn't it a bit difficult to get "file and line number" information?
> > Personally, I liked the approach that I saw in a recent 2.1 kernel:
> >
> > if (code has done somthing wrong)
> > *(int *)0=0;
> >
> > I've forgotten where it was now, but it definitely made sure the offending
> > code was fixed :)
>
> The copy_xx_user functions are actually macros, so you can have the
> compiler embed the source file name and line (__FILE__, __LINE__, I
> think.)
>
> In this case generating an oops would be too draconian -- the code works
> _most_ of the time, we just want to find it and make it 100%.

And in case they aren't macros, you can make the header file define a
macro that calls the "debugging" function. For example:

#ifdef CONFIG_DEBUG_KMALLOC
#define kmalloc(s,p) debug_kmalloc (__FILE__, __LINE__, s, p)
#endif

Regards,

Roger.

--
** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
Florida -- A 39 year old construction worker woke up this morning when a
109-car freight train drove over him. According to the police the man was
drunk. The man himself claims he slipped while walking the dog. 080897

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.034 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site