Various web pages tell me that to get full truthful stack backtraces in the Linux kernel, I need to set CONFIG_FRAME_POINTER=y
in my .config file. So I run make menuconfig
and try to find it in there, but it's hardly intuitive where to navigate to do so. I search the web and find lots of pages that say to enable it, but no pages that tell me what menu options to drill down into in order to do so. So I think maybe I could run make config
and just hit [Enter] a million times to select the current configuration choice for everything, then copy-paste the whole command window buffer contents into a text file & search (case insensitive) for "frame_pointer" or "frame pointer", but still no luck; apparently I'd have to select 'y' for some submenu to even drill down to wherever it is.
How can I find such options in config or menuconfig? Is there an option configuration hierarchy listed somewhere?
I'm using Linux Kernel v2.6.30.4-uc0; that's what I'm given with the Lantronix XPort Pro SDK.
Based on answers I got, I use the /
search option (not sure how I missed that before), but I'm not really able to get much farther. When I search for "FRAME_POINTER" this is what I see:
Symbol: ARCH_WANT_FRAME_POINTERS [=n]
Symbol: FRAME_POINTER [=n]
Prompt: Compile the kernel with frame pointers
Defined at lib/Kconfig.debug:620
Depends on: DEBUG_KERNEL && (CRIS || M68K || M68KNOMMU || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300) || ARCH_WANT_FRAME_POINTERS
Location:
-> Kernel hacking
Selected by: LOCKDEP && DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT && !MIPS && !PPC && !ARM_UNWIND && !S390 || FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_
Note that the "Selected by:" line is longer than what I can see, even when I stretch the make menuconfig
window as wide as the whole screen, and there's no option I can find to scroll the text to see it all. Very frustrating, as most of this ordeal has been.
So I try to navigate to this option using the "search" information above, but it's still nowhere to be found!
When I go to the Kernel hacking --->
menu, there is no choice to enable stack frames. There is also no menu choice "Compile-time checks and compiler options" as indicated in @ShantanuAde's answer. I see these choices:
------- Kernel hacking -------------------------
[ ] Show timing information on printks
[ ] Enable __deprecated logic
[ ] Enable __must_check logic
(1024) Warn for stack frames larger than (needs gcc 4.4)
[ ] Magic SysRq key
[ ] Enable unused/obsolete exported symbols
[ ] Debug Filesystem
[ ] Run 'make headers_check' when building vmlinux
[ ] Kernel debugging
[ ] Debug memory initialisation
[ ] Check for stalled CPUs delaying RCU grace periods
[ ] Sysctl checks
[ ] Sample kernel code --->
[ ] Full Symbolic/Source Debugging support
[ ] Use fast second timer for profiling
[ ] Compiled-in Kernel Boot Parameter
[ ] Suppress Kernel BUG Messages
The only thing I can think of that might get me closer to CONFIG_FRAME_POINTER is "Kernel debugging" but when I turn that on, the only extra options I get are:
[*] Kernel debugging
[ ] Debug shared IRQ handlers (NEW)
[*] Detect Soft Lockups (NEW)
[ ] Panic (Reboot) On Soft Lockups (NEW)
[*] Detect Hung Tasks (NEW)
[ ] Panic (Reboot) On Hung Tasks (NEW)
[*] Collect scheduler debugging info (NEW)
[ ] Collect scheduler statistics (NEW)
[ ] Collect kernel timers statistics (NEW)
[ ] Debug object operations (NEW)
[ ] Debug slab memory allocations (NEW)
[ ] Spinlock and rw-lock debugging: basic checks (NEW)
[ ] Mutex debugging: basic checks (NEW)
[ ] Spinlock debugging: sleep-inside-spinlock checking (NEW)
[ ] Locking API boot-time self-tests (NEW)
[ ] kobject debugging (NEW)
[ ] Verbose BUG() reporting (adds 70K) (NEW)
[ ] Compile the kernel with debug info (NEW)
[ ] Debug VM (NEW)
[ ] Debug the global anon/private NOMMU mapping region tree (NEW)
[ ] Debug filesystem writers count (NEW)