On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote: > On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > >> Adding static to internal function allows the compiler to better >> detect dead code (functions, variables, etc) and makes it easier for >> the compiler to optimize; e.g., since it knows a function will only >> called once it can inline code; or not output a symbol for a certain >> function. > > In general we don't lik this because it makes things harder to debug. > For libraries, yes, but for programs, no.
Isn't that rule only for the kernel? ddb can only see global symbols, but gdb should work fine in userland. Certainly I can set breakpoints on static functions, even when compiled without -g. I think the diff is fine.