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

Using the gdb display command with an empty context layout #663

Closed
nkaretnikov opened this issue Jun 16, 2021 · 4 comments
Closed

Using the gdb display command with an empty context layout #663

nkaretnikov opened this issue Jun 16, 2021 · 4 comments

Comments

@nkaretnikov
Copy link

My current config:

source ~/.gef-00e05d3fe243a12ee0856048b4e3f35a843fdccc.py
gef config context.layout ""
display/8i $pc

I don't like the context layout but still want to take advantage of gef's features. However, gef ignores (or overrides) display, which I like to use. Is there a way to make this work?

And nope, I don't want to add code to the context. :p

@hugsy
Copy link
Owner

hugsy commented Jun 16, 2021

It's all in the docs but:

To disable the context

gef config context.enable 0

Use gef save if you want to make that permanent.

However, gef ignores (or overrides) display, which I like to use. Is there a way to make this work?

Not sure what it means, we don't override display at all. Got an example?

@nkaretnikov
Copy link
Author

@hugsy Hmm, the above is my ~/.gdbinit. But nevermind, I just double-checked with gdb without any settings: for some reason, the display command doesn't work when specified in the init file. I updated gdb recently, maybe they changed something. Or maybe it never actually worked and I'm just confusing things.

Closing as invalid.

@nkaretnikov
Copy link
Author

To follow up: I actually kinda got the behavior I wanted with this:

source ~/.gef-00e05d3fe243a12ee0856048b4e3f35a843fdccc.py
gef config context.layout "code"
gef config context.clear_screen 0

It's slightly different than display output but close enough.

@hugsy
Copy link
Owner

hugsy commented Jun 16, 2021

Ah did you mean to do that

define hook-stop
   display/8i $pc 
end

??

That's pure gdb, not gef btw.

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