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

Add a setting to automatically ask gdb for pwd on executable start #30

Closed
aolo2 opened this issue Jun 29, 2021 · 1 comment
Closed

Add a setting to automatically ask gdb for pwd on executable start #30

aolo2 opened this issue Jun 29, 2021 · 1 comment

Comments

@aolo2
Copy link

aolo2 commented Jun 29, 2021

What the title says. I find myself hitting the button every time after I step into an executable.

@nakst
Copy link
Owner

nakst commented Jun 30, 2021

I've made the following changes in the latest commit:

  • Preset commands can now run the last command asynchronously, by adding a & at the end.
  • Preset commands can now run special commands.
  • Keyboard shortcuts can now run special commands.
  • I added a special command to get the working directory from GDB, called gf-get-pwd.
  • I added a special command to run a preset command, called gf-command.
  • Standard keyboard shortcuts can be overridden.

Putting this all together, you can add a new preset command to configuration file:

[commands]
run-pwd=start;gf-get-pwd;c&

This starts the application paused, get the working directory from GDB, and finally continues execution asynchronously.

And then you can overwrite the standard keyboard shortcut for running the application to call into this preset command instead:

[shortcuts]
Shift+F5=gf-command run-pwd

There have been several structural changes made in this commit so please tell me if something has been broken!

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

No branches or pull requests

2 participants