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

Utilizing GDBHISTFILE #909

Closed
ask1234560 opened this issue Oct 28, 2022 · 6 comments · Fixed by #912
Closed

Utilizing GDBHISTFILE #909

ask1234560 opened this issue Oct 28, 2022 · 6 comments · Fixed by #912

Comments

@ask1234560
Copy link
Contributor

ask1234560 commented Oct 28, 2022

Type of feature request

No response

Misc

Use GDBHISTFILE environment variable

Summary Description

Hi, first of all thank you for this amazing project.

I am new to gdb and gef, when doing setup i wanted to organize the files required for gdb.

https://wiki.archlinux.org/title/XDG_Base_Directory
image

in gef.py
image

gef is not using GDBHISTFILE, i am not sure where to do change.

Implementation idea/suggestion

check if GDBHISTFILE variable is set and read if it is set.

Existing alternatives?

No response

Additional information

No response

@hugsy
Copy link
Owner

hugsy commented Oct 28, 2022

GEF doesn't change what's set in your ~/.gdbinit file (except for actually sourcing gef).
It's up to your to do that.

@ask1234560
Copy link
Contributor Author

ask1234560 commented Oct 29, 2022

Hi @hugsy, gdb looks for GDBHISTFILE and if not found then it will create ~/.gdb_history.

But in gef -
image
the path is hard coded and it is not looking for GDBHISTFILE.

@Grazfather
Copy link
Collaborator

So something like f"set history filename {os.getenv('GDBHISTFILE', '~/.gdb_history')}" should do the trick.

@ask1234560
Copy link
Contributor Author

Yes, this will do.

@Grazfather
Copy link
Collaborator

Why don't you go ahead with the PR, since you can test it? :)

@ask1234560
Copy link
Contributor Author

ask1234560 commented Oct 29, 2022

Created the pull request, #912

@hugsy hugsy removed their assignment Nov 8, 2022
@hugsy hugsy closed this as completed in #912 Nov 8, 2022
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 a pull request may close this issue.

3 participants