-
Notifications
You must be signed in to change notification settings - Fork 510
add interactive pty to frontend #295
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
Comments
I am able to create two ptys: one for the user to interact with, and another for the UI to interact with by using an mi2 interpreter. I first create a pty for mi2 protocol. I get its path (such as /dev/pts/19) then run You can test this with gdbgui commit 2621c26 (branch cs01/use-pty), and pygdbmi commit 535522b99f71e1 (branch cs01/refactor). The user-facing terminal works pretty well; it's just a matter of getting the mi2 messages passed back and forth to keep the UI in sync. |
I don't have time to look at your code right now, but I just wanted to point out that this is used (and works) for cdt-gdb-adapter: So there's hope :) |
Thanks! Got it working. I had two threads competing to read from the pty at the same time. |
Your link did give me more confidence that I wasn't wasting my time and there was a solution though 😄 |
Nice :). I'll have to try it. |
It would be great to get some folks testing it before it's released! I'll let you know when it's ready for testing. |
Is your feature request related to a problem? Please describe.
The frontend terminal is not truly interactive. gdb behaves differently when it is connected to a terminal and will prompt and wait for user responses rather than assume things and carry on.
Describe the solution you'd like
A fully interactive terminal with gdb in the frontend. xterm.js can be used to render the terminal, and Python pty's can be used on the backend. One will be created for the user to interact with, and another for the UI to send/receive gdb's mi2 messages.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
https://xtermjs.org/ can be used to render the terminal in the frontend.
The
new-ui
command can be used to split I/O between the UI for the gui and the terminal for the user. https://sourceware.org/gdb/onlinedocs/gdb/Interpreters.htmlThe text was updated successfully, but these errors were encountered: