CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT

Override compiler defaults for -fomit-frame-pointer

Type: bool

Help

Omitting the frame pointer prevents the compiler from putting the stack
frame pointer into a register. Saves a few instructions in function
prologues/epilogues and frees up a register for general-purpose use,
which can provide good performance improvements on register-constrained
architectures like x86. On some architectures (including x86) omitting
frame pointers impedes debugging as local variables are harder to
locate. At -O1 and above gcc will enable -fomit-frame-pointer
automatically but only if the architecture does not require if for
effective debugging.

Choose Y if you want to override the default frame pointer behavior
of your compiler, otherwise choose N.

Defaults

No defaults. Implicitly defaults to n.

Kconfig definition

At <Zephyr>/subsys/debug/Kconfig:270

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:44<Zephyr>/subsys/Kconfig:17

Menu path: (Top) → Sub Systems and OS Services → Debugging Options

config OVERRIDE_FRAME_POINTER_DEFAULT
    bool "Override compiler defaults for -fomit-frame-pointer"
    help
      Omitting the frame pointer prevents the compiler from putting the stack
      frame pointer into a register. Saves a few instructions in function
      prologues/epilogues and frees up a register for general-purpose use,
      which can provide good performance improvements on register-constrained
      architectures like x86. On some architectures (including x86) omitting
      frame pointers impedes debugging as local variables are harder to
      locate. At -O1 and above gcc will enable -fomit-frame-pointer
      automatically but only if the architecture does not require if for
      effective debugging.

      Choose Y if you want to override the default frame pointer behavior
      of your compiler, otherwise choose N.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)