-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[lldb][lldb-dap] Added support for "WriteMemory" request. #131820
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
Conversation
Adding a "port" property to the VsCode "attach" command likely extends the functionality of the debugger configuratiuon to allow attaching to a process using PID or PORT number.
Currently, the "Attach" configuration lets the user specify a pid. We tell the user to use the attachCommands property to run "gdb-remote <port>".
Followed the below conditions for "attach" command with "port" and "pid"
We should add a "port" property. If port is specified and pid is not, use that port to attach. If both port and pid are specified, return an error saying that the user can't specify both pid and port.
Ex - launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "lldb-dap Debug",
"type": "lldb-dap",
"request": "attach",
"port":1234,
"program": "${workspaceFolder}/a.out",
"args": [],
"stopOnEntry": false,
"cwd": "${workspaceFolder}",
"env": [],
}
]
}
Adding a "port" property to the VsCode "attach" command likely extends the functionality of the debugger configuration to allow attaching to a process using PID or PORT number.
Currently, the "Attach" configuration lets the user specify a pid. We tell the user to use the attachCommands property to run "gdb-remote ".
Followed the below conditions for "attach" command with "port" and "pid"
We should add a "port" property. If port is specified and pid is not, use that port to attach. If both port and pid are specified, return an error saying that the user can't specify both pid and port.
Ex - launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "lldb-dap Debug",
"type": "lldb-dap",
"request": "attach",
"port":1234,
"program": "${workspaceFolder}/a.out",
"args": [],
"stopOnEntry": false,
"cwd": "${workspaceFolder}",
"env": [],
}
]
}
In this patch we have resolved code formatting issues and fixed "test_by_name" failure.
Resolved code format issues.
…ed review comments Addressed all review comments.
…e format resolved code format issues.
…d all review comments. All review comments have been addressed, and the attach-by-port tests have been verified on Linux machine. Although the functionality is intended to support both Linux and macOS, we were unable to verify it on macOS due to lack of access.
Resolved code format issues.
Move to the start of the next memory region + 1.
|
Thank you so much for your valuable feedback and suggestions. I have incorporated most of the requested changes, with just two remaining suggestions that I will address in a follow-up PR.
Would you be kind enough to review the current changes at your convenience time? Please suggest if I am missing anything to mention here Thanks & Best regards, |
|
Hi, any further comments or suggestion on the changes. |
Merge remote-tracking branch 'upstream/main' into main
Followed non-legacy approach to implement "writeMemory" request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but please fix the CI checks / formatting
Resolved conflicts and format issues
Added debug adapter support for write memory.