Skip to content

Option to make debuggable program use the original gdbgui terminal #215

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

Closed
sim642 opened this issue Jul 10, 2018 · 3 comments · Fixed by #346
Closed

Option to make debuggable program use the original gdbgui terminal #215

sim642 opened this issue Jul 10, 2018 · 3 comments · Fixed by #346
Labels

Comments

@sim642
Copy link

sim642 commented Jul 10, 2018

Is your feature request related to a problem? Please describe.
I was trying to use gdbgui to ease debugging of weechat, a ncurses application. The trouble with those is that gdb is hard to work with if the application is supposed to be controlling the terminal window entirely at all times. So I thought gdbgui might make it simpler but it didn't because the debugged program started using the web terminal, not the original terminal.

Describe the solution you'd like
Option to make the debuggable program run in the original terminal and write output to there, instead of the one in the web interface which doesn't support necessary escapes to display a ncurses application.

Describe alternatives you've considered
gdbserver or attaching to an existing process can work around this but somehow gdbgui had trouble handling either while gdb was fine directly.

Additional context
Currently the terminal where gdbgui is run is essentially unused anyway. Doesn't hurt to allow giving it to the debuggable program's use anyway.

@cs01
Copy link
Owner

cs01 commented Jul 10, 2018

Nice idea, I like it.

As a temporary workaround, you could use

set inferior-tty [ tty ]

https://sourceware.org/gdb/onlinedocs/gdb/Input_002fOutput.html

set inferior-tty [ tty ]
Set the tty for the program being debugged to tty. Omitting tty restores the default behavior, which is to use the same terminal as GDB.

show inferior-tty
Show the current tty for the program being debugged.

For my future reference: https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Miscellaneous-Commands.html has MI options that gdbgui can use to visually set the tty.

@cs01
Copy link
Owner

cs01 commented Jul 15, 2018

A note for myself: on windows do not use the tty command, but set new-console off and
set new-console on

@cs01
Copy link
Owner

cs01 commented Aug 23, 2020

This should be fixed in 0.14, since the terminal application in the web frontend uses xterm.js, which should support all escape sequences.

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

Successfully merging a pull request may close this issue.

2 participants