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

Fixed st-trace reconnect on Windows #1292

Merged
merged 1 commit into from Jan 8, 2023

Conversation

simplerobot
Copy link
Collaborator

This should fix issue #1272.

The windows signal handling was returning FALSE which caused the default handler to be called. The default handler called ExitProcess before our process had a chance to cleanup. While the code looks similar, st-util does not have the same issue since it actually cleans up its resources in the signal handler.

@Nightwalker-87 Nightwalker-87 self-requested a review January 2, 2023 10:49
@Nightwalker-87 Nightwalker-87 added this to In progress in Release v1.8.0 via automation Jan 2, 2023
@Nightwalker-87 Nightwalker-87 added this to the v1.7.1 milestone Jan 2, 2023
@Nightwalker-87 Nightwalker-87 moved this from In progress to Review in progress in Release v1.8.0 Jan 2, 2023
Copy link
Member

@Nightwalker-87 Nightwalker-87 left a comment

Choose a reason for hiding this comment

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

I'd suggest to fix this in gdb-server.c as well, as mentioned before, so we can include some testing there too. 😉

@simplerobot
Copy link
Collaborator Author

I was wrong about gdb-server.c needing a fix. The signal handler directly cleans up resources before returning.

@Nightwalker-87 Nightwalker-87 self-requested a review January 2, 2023 20:29
Release v1.8.0 automation moved this from Review in progress to Reviewer approved Jan 2, 2023
@Nightwalker-87
Copy link
Member

Now awaiting testing by @jared52005.

@Nightwalker-87 Nightwalker-87 changed the title Fixing st-trace reconnect on Windows Fixed st-trace reconnect on Windows Jan 8, 2023
@Nightwalker-87 Nightwalker-87 merged commit 6bc70f7 into stlink-org:develop Jan 8, 2023
Release v1.8.0 automation moved this from Reviewer approved to Done Jan 8, 2023
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jan 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

STM32F407: st-trace can't reconnect
2 participants