[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 17:35 schrieb Thor Lancelot Simon:
On Sun, Aug 09, 2009 at 03:30:12PM +0000, YAMAMOTO Takashi wrote:
I took the time to write a function that crahses the kernel on
purpose. Compiled as non static function, ddb showed me the
name and function call trace with proper function names. Quite easy
to locate the faulty spot. To complete my test, I compiled the very
same code with all functions declared static. Now the ddb trace
not show me the function names, making it a lot harder to locate the
you want __noinline?
I think so, yeah. But maybe we need another macro which does 'static'
either way, but only does __noinline if !DIAGNOSTIC (or !DEBUG)? I
that is approximately what Marc wants.
What I really wanted is that in the moment the system crashed and
enters ddb, it should be very easy to immediately get to the spot
where the error happened. A useful backtrace so that I can go to the
source code and see where it happened.
And this should of course be a feature of a stock kernel, not of a
custom debug kernel. The crashed will happen in the wild, not when I
am debugging in my lab.
People decided to try to force me to make my functions static,
although. many, many functions in the kernel are not.
Main Index |
Thread Index |