Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

gdb

tui

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

like image 328
neuron Avatar asked Jan 21 '12 14:01

neuron


People also ask

How do I exit TUI mode?

To disable ​TUI​ mode, you can type ​tui disable​. If the layout of the ​TUI​becomes unreadable, pressing ​Ctrl-l​will reload it. Once you are running TUI mode, there are several commands you can use to change the display. One of them is layout name.

How do I scroll up in GDB?

When in GDB mode, the user is in command mode or scroll mode. When in command mode, the user is typing in commands to interact with GDB. When in scroll mode, the user can scroll through the GDB output. You can enter scroll mode by typing page up and quit scroll mode by typing q , i or enter .


1 Answers

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

like image 142
user2201636 Avatar answered Sep 19 '22 16:09

user2201636