Skip to content
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

service/dap: Support local attach #2260

Merged
merged 4 commits into from
Dec 28, 2020
Merged

Conversation

polinasok
Copy link
Collaborator

Updates #1515

@polinasok
Copy link
Collaborator Author

I think there is a race condition that I need to debug.

@aarzilli
Copy link
Member

I think it would be better if the test for this was more like TestAttachDetach in proc_test and used testnextnethttp, which will wait forever, instead of changing loopprog.

@polinasok
Copy link
Collaborator Author

I think it would be better if the test for this was more like TestAttachDetach in proc_test and used testnextnethttp, which will wait forever, instead of changing loopprog.

I changed loopprog to print status messages a bit less often, so I could use it for manual testing. The change is not necessary for the unittest. I can remove it.

Using testnextnethttp has more moving parts. I would need to wait for the server to start listening, then have a client and send a request to trigger the code that has the breakpoint. What's the advantage of using that? I am not quite following. Also, my current test harness doesn't have a good spot to run the client code while guaranteeing that it would trigger the breakpoint after the debugger is fully attached and ready to process the breakpoint.

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the advantage of using that?

You could test that detach without kill works, but on second thought this is fine.
It seems that dap tests are getting stuck on freebsd, I don't know if it's your fault or a preexisting problem in the freebsd backend, if it's the latter you can disable this new test on freebsd.

@polinasok
Copy link
Collaborator Author

It seems that dap tests are getting stuck on freebsd, I don't know if it's your fault or a preexisting problem in the freebsd backend, if it's the latter you can disable this new test on freebsd.

How can you tell? I can't seem to make sense of this new output format :( Also, the output is not verbose and doesn't have RUN + PASS/FAIL messages, so I can't even tell which test functions worked.

@aarzilli
Copy link
Member

It seems that dap tests are getting stuck on freebsd, I don't know if it's your fault or a preexisting problem in the freebsd backend, if it's the latter you can disable this new test on freebsd.

How can you tell? I can't seem to make sense of this new output format :( Also, the output is not verbose and doesn't have RUN + PASS/FAIL messages, so I can't even tell which test functions

You can force the verbose output by temporarily changing _scripts/make.go.

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekparker derekparker merged commit 796278e into go-delve:master Dec 28, 2020
abner-chenc pushed a commit to loongson/delve that referenced this pull request Mar 1, 2024
* Support local attach

* Undo loopprog change

* Remove test check for system-specific error message

* Skip attach tests on freebasd

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants