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

cleanInvalidSocketPath on start #400

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

cleanInvalidSocketPath on start #400

wants to merge 2 commits into from

Conversation

GitMensch
Copy link
Collaborator

@GitMensch GitMensch commented Jun 6, 2023

start for existing and invalid debugserver sockets and close those

originally done by @chenhaoyang2019 as a side change in fd7d8ee1642b6e29e84667daefd4083c0771af45 at https://gitee.com/openkylin/native-debug.git

Note: this is not verified at all, I mostly wanted to point this change (and fork, which is published as Kylin Native Debug) out and let others review this in more depth.

The parts that are a bit more complex and relevant "upstream" are:

  • assembly debugging (should be mostly fine)
  • stdin in debug console, but that seems to be "local linux only" (so may need a bunch of changes)

... and some unrelated changes like editor tab commands to start/stop recording via GDB (which sadly does not work well on most platforms, is very likely gdb-only, and can be enabled/disabled via debug console).

@GitMensch GitMensch requested review from WebFreak001 and brownts June 6, 2023 18:28
@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (9fb2875) 20.89% compared to head (8b1188c) 20.62%.

Files Patch % Lines
src/mibase.ts 0.00% 25 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #400      +/-   ##
==========================================
- Coverage   20.89%   20.62%   -0.27%     
==========================================
  Files          14       14              
  Lines        1771     1794      +23     
  Branches      381      387       +6     
==========================================
  Hits          370      370              
- Misses       1356     1379      +23     
  Partials       45       45              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GitMensch
Copy link
Collaborator Author

@WebFreak001 Should I rebase and fix the linting issues - or isn't this likely to get merged?

src/mibase.ts Outdated
if (files.length == 0) resolve('');
files.forEach((file)=>{
try {
const conn = net.connect(systemPath.join(socketlists, file));
Copy link
Owner

Choose a reason for hiding this comment

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

unclosed connection?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The only thing needed now (manually): testing that everything works fine with two separate debugging sessions.
To easily test that outside of a dev environment it would be nice if the CI could create a vsix artifact...

@WebFreak001
Copy link
Owner

cleaning up at startup sounds like a reasonable idea to me

@GitMensch GitMensch force-pushed the cleanup-on-start branch 2 times, most recently from 8770e2c to 392ef6a Compare February 7, 2024 08:18
check for existing and invalid debugserver sockets on start and close those

originally done by @chenhaoyang2019 as a side change in fd7d8ee1642b6e29e84667daefd4083c0771af45 at https://gitee.com/openkylin/native-debug.git
@GitMensch
Copy link
Collaborator Author

Not sure what the lint-docs want, when I run prettier on that file, I get the exact same result.

@WebFreak001
Copy link
Owner

issues in CHANGELOG.md?

@WebFreak001
Copy link
Owner

looks like my version bump was missing a link when I updated the docs - will fix in master

@WebFreak001
Copy link
Owner

fixed on master now

@GitMensch
Copy link
Collaborator Author

Please recheck the changes, if they look good to you now I'll rebase and merge. Thanks!

@GitMensch
Copy link
Collaborator Author

@WebFreak001 updated and possibly ready to merge (still haven't done any tests other than the passing unit-tests, so inspecting those changes manually seems reasonable).

As I just recognized how much we have in the Changelog already... a new release would be really good.

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