[bsp/qemu-vexpress-a9] support function names in backtraces - #11728
[bsp/qemu-vexpress-a9] support function names in backtraces#11728liulangrenaaa wants to merge 1 commit into
Conversation
Pass -mpoke-function-name to the compiler and assembler when RT_BACKTRACE_FUNCTION_NAME is enabled for the Cortex-A9 QEMU BSP. Keep the BSP configuration opt-in so users can enable symbolized backtraces through menuconfig without changing the default build. Validation: - scons --pyconfig-silent - scons -C bsp/qemu-vexpress-a9 -j2 - QEMU function-name backtrace verified with RT_BACKTRACE_FUNCTION_NAME enabled in a local configuration. Signed-off-by: Hui Su <3164683437@qq.com>
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
Pass -mpoke-function-name to the compiler and assembler when RT_BACKTRACE_FUNCTION_NAME is enabled for the Cortex-A9 QEMU BSP. Keep the BSP configuration opt-in so users can enable symbolized backtraces through menuconfig without changing the default build.
Validation:
为什么提交这份PR (why to submit this PR)
qemu-vexpress-a9 BSP 默认没有开启函数名符号支持,导致启用
RT_BACKTRACE_FUNCTION_NAME后 backtrace 仍然只能打印地址,无法直接显示函数名,调试体验较差。你的解决方案是什么 (what is your solution)
在
bsp/qemu-vexpress-a9/SConstruct中检测rtconfig.h是否定义了RT_BACKTRACE_FUNCTION_NAME,若已启用则向编译器和汇编器追加-mpoke-function-name选项。该选项由 GCC ARM 提供,会把函数名嵌入 text 段,使 Cortex-A 的 backtrace 能直接输出函数名。此配置保持 opt-in,不影响默认构建。请提供验证的bsp和config (provide the config and bsp)
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up