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)




Am 09.08.2009 um 20:34 schrieb Manuel Bouyer:

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.

ddb's trace command should produce the function name. no voodoo should be required.



Home | Main Index | Thread Index | Old Index