On Thu, 2006-10-05 at 23:32 +0200, Andi Kleen wrote: > On Thursday 05 October 2006 23:30, Piet Delaney wrote: > > On Thu, 2006-10-05 at 12:17 -0700, Tom Rini wrote: > > > On Thu, Oct 05, 2006 at 08:46:20AM -0700, George Anzinger wrote: > > > > Tom Rini wrote: > > > > >On Wed, Oct 04, 2006 at 08:42:04PM -0700, Piet Delaney wrote: > > > > > > > > > > > > > > >>Ton, George, Amit, et. al: > > > > >> > > > > >>If CONFIG_KGDB isn't defined, the kernel should be exactly the > > > > >>same as when kgdb isn't integrated. So shouldn't we should add > > > > >>#ifdef CONFIG_KGDB in the traps.c code where the traps are > > > > >>initialized and panic notify is registered. > > > > > > > > > > > > > > >No, because that makes the code look way too ugly. > > > > I agree that it's ugly, but until stock kernel wants to > > do it this way I suspect that we will have an easier time > > in being assimilated into the kernel.org repository by > > being non-invasive. > > If you need any ifdefs in core code you're doing something > wrong. Any needed support should be integrated in a clean > non preprocessor way.
There are zillions of preprocessor hooks for debug printfs; surely your not suggesting they be removed. IMHO we should use preprocessor hooks more for debugging. For example converting 'static inlines' to static in subsystems your working on and making the stack larger since taking out inlines can increase the stack size. Pascal was a language that came out at the same time as C but didn't have preprocessor hooks. There was a Pascal kernel but I never took to it. I liked the power that preprocessor hooks provides. Gosling also intentionally didn't provide preprocessor support in Java but the Java OS never really took off at Sun. I think debugging is an excellent case were the existence of preprocessor can be made. We abuse the preprocessor useing #defines where enumerations should be used and we use empty structure declarations instead of getting our #include files organized cleanly. I find these abuses of the C language much more offensive than using cpp for debugging hooks. > > The only patch should be to Makefiles with an option > to build the whole thing out of tree for modular loading too. Then you can't use kgdb for early startup. kgdb has for 25 years now been available for debugging the complete kernel. I'm not convinced we should break with that tradition. In fact, IMHO we should be supporting kgdb down in the hypervisor; 'crash' just isn't as useful as live debugging. Debuging with printf's is 1960's technology. -piet > > -Andi -- Piet Delaney Phone: (408) 200-5256 Blue Lane Technologies Fax: (408) 200-5299 10450 Bubb Rd. Cupertino, Ca. 95014 Email: [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Kgdb-bugreport mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
