tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: static functions are your friends (Was GPIO revisited)



On Sun, Aug 09, 2009 at 08:25:04PM +0200, Marc Balmer wrote:
> [...]
> See, that is why I do not declare functions static.  Gcc likely  
> inlines them and ddb trace output becomes useless.

that's not really true. You can use ddb's output with gdb, and gdb
will tell you exactly where the issue happened, better than ddb
(ddb gives you a function name, gdb gives you a line number).
Codes I'm working on includes static functions, which sometimes gets
inlined and I've always been able to make sense of ddb's output,
even when the crash did happen on someone else's box.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index