Cannot leave tui mode with Ctrl-X A nor see program output in tui mode

neuron picture neuron · Jan 21, 2012 · Viewed 7.3k times · Source

Problem A:

  1. I start gdb in command line with "gdb test"
  2. I press ctrl-x,ctrl-a before I do anything else
  3. Then I set break point using "b main"
  4. Then I start running the program using "r"

Till this point, if I press the Up arrow key the src window will not scroll. Instead, something will appear in my command window - "^[0A". If I try to refresh the screen with ctrl-l, "^L" is what appears in the command window.

I don't think this is supposed to happen. Under this situation I can't even quit tui mode with c-x,c-a ("^X^A" will appear instead). Am I doing something wrong? I realize this problem occurs so long as I use the "run" command inside the TUI interface. I can, however, use the run command in TUI if I start gdb with "gdb -tui"

Problem B

I can't see the output of my program in TUI mode. GDB's own output can be seen, but not that of the program being debugged. This occurs both when I enter TUI using ctrl-x,ctrl-a and when using -tui command-line option.

Is there any way to fix this?

I've read some TUI articles on the net and some people seem to use TUI "exclusively". I suppose TUI can work properly, it's just there's a set of rules that must be carefully followed?

EDIT: I use gnome-terminal in ubuntu 11.04

Answer

user2201636 picture user2201636 · Mar 23, 2013

Run gdb with -tui option instead (https://bbs.archlinux.org/viewtopic.php?id=112660)