-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
gdbstub: fix memory binary upload on latest GDB #15759
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GDB release 16.2 recently to fix the incompatibility issue with LLDB. For us, the only change is stub must report it support feature 'binary-upload' before GDB will use this feature. For more information, find bug report and discussion in https://sourceware.org/bugzilla/show_bug.cgi?id=32593 Use GDB 16.2, now it works with binary upload. ``` [remote] Sending packet: $x39c,4#a7 [remote] Received Ack [remote] Packet received: b\000\203 ``` Signed-off-by: Neo Xu <[email protected]>
Add this config so we can test GDB stub feature easily. Signed-off-by: Neo Xu <[email protected]>
a064422
to
e2314d3
Compare
[Experimental Bot, please feedback here] Yes, this PR appears to meet the NuttX requirements, although some minor improvements could be made. Strengths:
Areas for Improvement:
Conclusion: The PR is mostly compliant and provides valuable information. By addressing the minor improvements above, you can strengthen the PR and make it easier for reviewers to understand and accept. |
lupyuen
approved these changes
Feb 5, 2025
Minor - remove
in PR description |
anchao
approved these changes
Feb 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: OS Components
OS Components issues
Board: arm
Size: S
The size of the change in this PR is small
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
GDB release 16.2 recently to fix the incompatibility issue with LLDB.
For us, the only change is stub must report it support feature 'binary-upload' before GDB will use this feature.
For more information, find bug report and discussion in https://sourceware.org/bugzilla/show_bug.cgi?id=32593
Use GDB 16.2, now it works with binary upload.
Impact
Since GDB 16.1 is only alive for a short time, I expect minor impact on user.
Now they should upgrade to GDB 16.2 if previously using 16.1. Failing to do so will have slower memory read just like before 16.1.
Testing
You may need to build GDB 16.2 manually. Follow these steps.
Test using QEMU mps3-an547.
Compile
Run qemu
Notice the redirected pts device in log, like
char device redirected to /dev/pts/74 (label serial1)
.In this case
/dev/pts/74
is the one we are going to use for GDB to connect the stub.Connect to GDB stub
Current configuration is only to attach GDB stub to serial device only when crash happened by turning off
CONFIG_SERIAL_GDBSTUB_AUTO_ATTACH
.So trigger a force panic by input
ctrl+/
in nsh.Input
y
to enter GDB debug mode.Now connect to GDB stub