Re: kernel debugging

From: Martin Dalecki (dalecki@evision-ventures.com)
Date: Tue Sep 05 2000 - 17:48:20 EST


Elmer Joandi wrote:
>
> > understanding the
> > > underlying principles and the code.
>
> Speaking about that, I have been long time dreaming
> about following strict standard template for linux kernel functions:
> (macroplay intended)
> ----------------------
> INLINE(context,level,for_speed, fixed) returntype functionname
> (PARM(parameters)){
> DEBUG(ENTRY,SUBSYSTEM, module, functionname);
> /* function body starts */
> do something
> do something
> on success goto ok;
> on failure goto failure_reason_name;
> /* function body ends */
> ok:
> on ok do something
> DEBUG(EXIT,SUBSYSTEM, module functionname, OK);
> exit or return whatever
> failure_reason_name;
> on this reason do something
> DEBUG(EXIT,SUBSYSTEM, module, functionname, reason_name);
> exit or return whatever
> failure_reason_name1;
> on this reason do something
> DEBUG(EXIT,SUBSYSTEM, module, functionname, reason_name1);
> exit or return whatever
> };
> ----------------------

Please have a tought look at the floppy tape streamer driver to see why
this
is a BAD IDEA.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:23 EST