Build the Linux kernel without gcc optimization
1
vote
1
answer
3861
views
I follow one of many tutorials found on Google results to build and debug the Linux kernel with gcc and kgdb/gdb. And I end up by discovering that is all waste of time. Since I can't compile the kernel without gcc optimization -O0 neither -Og. There's no config option for removing optimization. And last but not leat, Linus said years ago that is against debugging.
Saying that kgdb must exist for some reason. I was wondering if there is a way to get rid of variables/arguments "**optimized out**" and let the debugger step through the code sequentially and not jumping from everywhere to everywhere?
Asked by Joe Smith
(11 rep)
Aug 27, 2020, 01:05 PM
Last activity: Jun 26, 2022, 02:02 PM
Last activity: Jun 26, 2022, 02:02 PM