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

Implement --debugger option to improve UX when debugging crashes #13157

Merged
merged 3 commits into from Jan 22, 2023

Conversation

sfan5
Copy link
Member

@sfan5 sfan5 commented Jan 19, 2023

Instead of trying to direct users to enter the magic words to start gdb and then pull out a backtrace with this PR we can just tell them to add a single argument.
This is so seamless that you could even add it to your startup script and have e.g. the server always run under gdb.

To do

This PR is a Work in Progress

  • proper Windows support (maybe this and this)

How to test

./bin/minetest --debugger
optionally add a segfault bug somewhere first to see what happens

@sfan5 sfan5 added @ Startup / Config / Util WIP The PR is still being worked on by its author and not ready yet. Feature ✨ PRs that add or enhance a feature labels Jan 19, 2023
@celeron55
Copy link
Member

celeron55 commented Jan 20, 2023

I didn't test but I did read through the code and the code looks good. And it seems like a nice feature.

@sfan5 sfan5 force-pushed the debugger branch 2 times, most recently from dcde792 to b30226d Compare January 21, 2023 16:53
@sfan5 sfan5 removed the WIP The PR is still being worked on by its author and not ready yet. label Jan 21, 2023
Copy link
Contributor

@TurkeyMcMac TurkeyMcMac left a comment

Choose a reason for hiding this comment

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

Works on Linux. I haven't tested thoroughly on Windows (I'm using Wine).

src/porting.cpp Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@TurkeyMcMac TurkeyMcMac left a comment

Choose a reason for hiding this comment

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

Tested on Windows too now.

@x2048 x2048 merged commit 87d509e into minetest:master Jan 22, 2023
@sfan5 sfan5 deleted the debugger branch January 23, 2023 08:43
LizzyFleckenstein03 pushed a commit to LizzyFleckenstein03/minetest that referenced this pull request Mar 7, 2023
appgurueu pushed a commit to appgurueu/minetest that referenced this pull request May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants