Skip to content

[lldb-dap] Fix for missing 'raw_string_ostream::flush' removal in ProgressEvent.cpp; addressing #108745 #114087

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

Merged
merged 91 commits into from
Oct 30, 2024

Conversation

santhoshe447
Copy link
Contributor

I hope it was missed unintentionally, pushing the same for the review.
Ref: #108745

Santhosh Kumar Ellendula and others added 30 commits November 17, 2023 15:09
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.
…ed review comments

Addressed all review comments.
…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 follwoing review comments :
1. Removed usage of removed_ibp, removed deleted instruction breakpoints deirectly from g_dap.instruction_breakpoints.erase(prev_ibp.first)
2. Reused CreateJsonObject function in CreateInstructionBreakpoint.
3. Updated test cases with stop reason.
TestDAP_instruction_breakpoint.py failed on windows, so these test were skipped for windows build.
@santhoshe447 santhoshe447 merged commit 62ff85f into llvm:main Oct 30, 2024
8 checks passed
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…gressEvent.cpp; addressing llvm#108745 (llvm#114087)

I hope it was missed unintentionally, pushing the same for the review.
Ref: llvm#108745

---------

Co-authored-by: Santhosh Kumar Ellendula <[email protected]>
Co-authored-by: Santhosh Kumar Ellendula <[email protected]>
JDevlieghere pushed a commit to swiftlang/llvm-project that referenced this pull request Feb 25, 2025
…gressEvent.cpp; addressing llvm#108745 (llvm#114087)

I hope it was missed unintentionally, pushing the same for the review.
Ref: llvm#108745

---------

Co-authored-by: Santhosh Kumar Ellendula <[email protected]>
Co-authored-by: Santhosh Kumar Ellendula <[email protected]>
(cherry picked from commit 62ff85f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants