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

GDB: Add support for multi line prompts #4027

Open
aldelaro5 opened this issue Feb 23, 2022 · 3 comments
Open

GDB: Add support for multi line prompts #4027

aldelaro5 opened this issue Feb 23, 2022 · 3 comments
Labels

Comments

@aldelaro5
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I am trying to use the breakpoint commands feature of GDB to for example log some interesting stuff and resuming immediately when the breakpoint triggers but this is currently not possible to do because it requires to type multiple commands in multiple lines. Currently, if you enter commands in the interpreter, you get this:
Ghidra GDB Agent: Multi-line / follow-up input is not currently supported. I just typed 'end' for you.

Describe the solution you'd like
Add support for multi line prompts in the interpreter.

Describe alternatives you've considered
Not really, it would be hard to implement this in the GUI without the use of the interpreter and it is a rather advanced feature. That being said, it might be possible to have some sort of checkbox to have a breakpoint log an expression. Maybe add a way to have it resume immediately? It seems p specific at this point though.

@d-millar
Copy link
Collaborator

@aldelaro5 I think we already have a ticket in for this. Unfortunately, not a trivial fix. Have you tried moving your code to a script and exec'ing the script?

@aldelaro5
Copy link
Contributor Author

@aldelaro5 I think we already have a ticket in for this. Unfortunately, not a trivial fix. Have you tried moving your code to a script and exec'ing the script?

I thought about it, but at that point, I concluded it was way simpler to just use a pure GDB connexion (because it would require me to change the file for everytime I want a different set of commands).

@d-millar
Copy link
Collaborator

Understood, and that's really a fail on our part. The MI2/pty stuff has added a layer of complexity that makes some simpler things more complicated than we would like. But, it is in the queue. Will add a vote for upping its priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants