Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] add -rdynamic to the linker flags (#1909)
When the otbr-agent is crashed, the platform will output the backtrace info. Without the "-rdynamic" flags, the backtrace info only contains the address of the backtrace functions. This commit adds the "-rdynamic" flags to linker flags to make the backtrace module to be able to parse the function name from the function address. Example of the backtrace ouput after adding -rdynamic flag: [C] Platform------: ------------------ BEGINNING OF CRASH ------------- [C] Platform------: *** FATAL ERROR: Caught signal: 8 (Floating point exception) [C] Platform------: # 0: ./build/otbr/src/agent/otbr-agent(+0x18b89d) [0x55b56df0b89d] [C] Platform------: # 1: ./build/otbr/src/agent/otbr-agent(+0x18b9c8) [0x55b56df0b9c8] [C] Platform------: # 2: /lib/x86_64-linux-gnu/libc.so.6(+0x3bf90) [0x7f1f84c5af90] [C] Platform------: # 3: ./build/otbr/src/agent/otbr-agent otbr::Ncp::ControllerOpenThread::Init()+0x146 [0x6dfd4dda] [C] Platform------: # 4: ./build/otbr/src/agent/otbr-agent otbr::Application::Init()+0x1e [0x6decbfbc] [C] Platform------: # 5: ./build/otbr/src/agent/otbr-agent(+0x14d97d) [0x55b56decd97d] [C] Platform------: # 6: ./build/otbr/src/agent/otbr-agent main+0x92 [0x6decdb88] [C] Platform------: # 7: /lib/x86_64-linux-gnu/libc.so.6(+0x2718a) [0x7f1f84c4618a] [C] Platform------: # 8: /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main+0x85 [0x84c46245] [C] Platform------: # 9: ./build/otbr/src/agent/otbr-agent _start+0x21 [0x6decbd81] [C] Platform------: ------------------ END OF CRASH ------------------
- Loading branch information