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

fix: split current iterm window during gdb.debug process #2341

Merged
merged 5 commits into from
Feb 8, 2024

Conversation

teddav
Copy link
Contributor

@teddav teddav commented Jan 31, 2024

This "improves" the current gdb.debug on mac for people using iTerm. Currently, gdb.debug returns an error because it can't figure out how to split the terminal and run the gdb process. Best option so far was to use tmux. This PR fixes it and allows to run gdb in the current window by splitting the terminal in 2.
Related to #2329

If/when this is merged, the next step would be to do the same for Vscode which would probably be useful to a lot of people.

This might need to be tested by someone else before merging. It works for me but my local setup is a bit messy as I do not have gdb/gdbserver installed, I'm running a docker container and pwntools (which runs on localhost) executes the gdb/gdbserver commands within the docker container. (If you want more details, I can write a quick script to show how to reproduce this setup)

@teddav
Copy link
Contributor Author

teddav commented Jan 31, 2024

I see that I decreased the coverage. Do you want me to write some tests for it? It seems a bit complicated to test... 😕

Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

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

Don't worry about the coverage, there is a problem running all tests all the time currently and that run misses the ui.rst tests causing the large drop.

@teddav teddav force-pushed the gdb-dbg-mac-iterm branch 2 times, most recently from a3465bb to 242bb20 Compare February 1, 2024 15:13
@teddav teddav force-pushed the gdb-dbg-mac-iterm branch from 242bb20 to 5fe63fe Compare February 1, 2024 15:13
Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

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

Looks good and enables the common case of passing argv as array safely. Thank you!

@peace-maker peace-maker merged commit 73f2a31 into Gallopsled:dev Feb 8, 2024
4 of 8 checks passed
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.

2 participants