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 Prompt Hangs after Pressing Tab in a "Command List" #67

Closed
jhxie opened this issue Oct 11, 2015 · 4 comments
Closed

GDB Prompt Hangs after Pressing Tab in a "Command List" #67

jhxie opened this issue Oct 11, 2015 · 4 comments

Comments

@jhxie
Copy link

jhxie commented Oct 11, 2015

2015-10-11-172813_1920x1080_scrot
Bug Behavior:
Like the image shows, the GDB prompt will hang(no longer accept any input) after I pressed [TAB] in a "command list", which is attatched to a hardware watchpoint by setting a watchpoint on a strcuture "confinfo", then type "commands 2".
Details:
The situation here is that I can still return back to the source code window by using [ESC], but after I was brought back to the GDB prompt by typing [i] the prompt will not accept any input because I pressed [TAB] to try to complete "printf"' so the only thing I can do is to quit by tying ":quit" in the source window.
Platform:
x86-64 Archlinux running 4.1.10-2-lts kernel
CGDB 0.6.8 from default pacman repository
Thank you for looking into this issue!

@scottlu
Copy link
Contributor

scottlu commented May 6, 2016

This problem is being caused by a bug in the CGDB's implementation of the GDB/annotate-2 protocol.

When you press tab, CGDB sends GDB a "server complete " command, then normally GDB replies with the completion results. CGDB then updates readline with the new updated line, and updates the screen.

But, when GDB is waiting for you to enter breakpoint commands it doesn't offer a response to the "server complete " command, and this causes CGDB's annotate-2 state machine to get confused.

CGDB's annotate-2 state machine has the same state value for the normal prompt vs. the "enter breakpoint commands" prompt. This could be differentiated to fix the bug, however there is talk of moving to the GDB/MI protocol, which would make this issue moot.

@brasko
Copy link
Contributor

brasko commented Mar 3, 2017

I'm working towards a patch for this. At a minimum, I'll try to ignore tab completion in this situation rather than completely ruin the debugging session. I'll probably not get this into the next release, but most likely we'll release more regularly for a while.

@brasko
Copy link
Contributor

brasko commented Mar 1, 2021

This should be fixed in the new-ui branch. Please let me know. Thanks.

@brasko
Copy link
Contributor

brasko commented Mar 6, 2021

Fixed in master

@brasko brasko closed this as completed Mar 6, 2021
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

4 participants