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

Ignore users .gdbint file (or provide an option to do so) #10

Closed
aolo2 opened this issue May 8, 2021 · 4 comments
Closed

Ignore users .gdbint file (or provide an option to do so) #10

aolo2 opened this issue May 8, 2021 · 4 comments

Comments

@aolo2
Copy link

aolo2 commented May 8, 2021

As gdb is my primary debugger, I have quite a few options in my .gdbinit. Some of those options (tui new-layout, layout), however, are for working with the builtin TUI. Some others (dissasembly-flavor, print pretty) are useful in gf too.

IMHO, it would be best if gf launched gdb with -nx, ignoring users .gdbinit, and instead maintained its own gdb settings somewhere (in the .project.gf maybe?).

By the way, I must say I LOVE this project! Can't wait for the watch window, but this is strictly better than the TUI already.

@nakst
Copy link
Owner

nakst commented May 8, 2021

Temporary workaround: any command line flags passed to gf are forwarded to GDB, so you can pass -nx to gf.

In the near future, I'm planning on replacing .project.gf with a proper ini-style configuration file, and also loading a global configuration file from $HOME/.config (this is currently where the theme is stored). This could contain things like arguments passed to GDB and startup commands, as well as other things like better keyboard shortcut customization, and maybe changing the font/font size without recompiling.

Do you have any thoughts on this?

@nakst
Copy link
Owner

nakst commented May 9, 2021

Added support for ini-style configuration files in commit 962f0de.

@nakst nakst closed this as completed May 9, 2021
@aolo2
Copy link
Author

aolo2 commented May 10, 2021

Do you have any thoughts on this?

Sorry for the late reply! This looks like a step in a right direction, however there still are some problems. In particular, it's not really clear in which directory is gdb launched, and because of this I can't provide a custom .gdbinit.

I'm probably missing something, but atm I still don't see a way to have a separate .gdbinit for invoking gf (as opposed to just calling gdb).

Also, it's not really clear what "interface scaling" value does. Looks like it adjusts padding?

By the way, I don't want to sound picky, I'm really loving gf! Things listed above are at most minor inconveniences.

@nakst
Copy link
Owner

nakst commented May 17, 2021

Sorry for the late reply! This looks like a step in a right direction, however there still are some problems. In particular, it's not really clear in which directory is gdb launched, and because of this I can't provide a custom .gdbinit.

I believe the GDB process should be created with the same working directory as gf. But you could always specify an absolute path to your .gdbinit file in .project.gf.

Also, it's not really clear what "interface scaling" value does. Looks like it adjusts padding?

The font size and interface scale should be used together. If you increase the font size, you should increase the interface scale so that things like buttons and textboxes are sized large enough to fit the text. I'll probably make it automatically pick the best interface scale for a given font and font size if the scale isn't explicitly specified.

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