-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug option:change -g to -g3, add macro information to elf #13446
Conversation
[Experimental Bot, please feedback here] Here's a breakdown of the PR against the NuttX requirements, along with suggestions for improvement: Strengths:
Areas for Improvement:
Example Testing Logs:
Revised Summary Example:
In Conclusion: The PR has potential but needs more detail and robust testing evidence to meet NuttX's standards. Clearly demonstrate the benefits, address potential impacts, and provide comprehensive testing logs to make a strong case for your changes. |
OK, I will add some instructions later. |
Signed-off-by: anjiahao <[email protected]>
Signed-off-by: ligd <[email protected]>
Summary
Debug option:change -g to -g3, add macro information to elf
Impact
all use debug symbol option
Testing
build qemu & sim
The advantage is that there is more macro information when debugging
i test with qemu mps3-an547, my cpu is i7-12700
test step is:
./tools/configure.sh mps3-an547:nsh
time make -j20
-g3
to-g
, thentime make -j20
with g3
make -j20 84.90s user 33.43s system 1144% cpu 10.341 total
with g0
make -j20 67.12s user 30.45s system 1198% cpu 8.142 total
Compile time increased by 2.199s, 20%
with g3 output file size:
with g0 output file size:
elf increase 50% , map file increase 340 %, bin & hex almost unchanged
readelf -S output with g3:
readelf -S output with g0:
Added .debug_macro section in elf file to enhance the debugging ability of macro, without affecting other debugging
gdb debug will be better like this:
debug with g3 elf
debug with g0 elf:
Of course, I think the current PC performance is better in most cases. More debug information during debugging can help developers solve problems more quickly.