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

前端 未结 4 1237
再見小時候
再見小時候 2020-12-17 10:14

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 po
相关标签:
4条回答
  • 2020-12-17 10:38

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

    0 讨论(0)
  • 2020-12-17 10:39

    Change your terminal to get rid of your first problem. I used to use gnome-terminal my self, but then changed to terminator. Some terminals don't support keys like Alt sometimes (used to experience this in vim with some Alt+something maps)

    You can change forcus to another window by 'focus winName', in your case, use 'focus src' got this from here

    Not sure about your 2nd problem. Good luck!

    0 讨论(0)
  • 2020-12-17 10:46

    I think you are looking for, "focus next." it switches you among (there can be more than two) the windows. I'm sure there is a short-cut for this too. Please note, this is almost the same answer as user1888039, so if you agree you should up-vote that answer.

    0 讨论(0)
  • 2020-12-17 10:55

    ~/.inputrc was the culprit in GDB 7.7 because of:

    set editing-mode vi
    set keymap vi
    

    If I remove those lines it works.

    This seems to be mentioned at in the following bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=15163

    I have requested a workaround at https://sourceware.org/ml/gdb/2015-06/msg00009.html and Andrew Burgess replied that he had just submitted a well received patch to add:

    tui enable
    tui disable
    

    so in future versions we should have commands as an alternative to the shortcuts.

    But then I saw the light and moved from TUI to GDB Dashboard: https://github.com/cyrus-and/gdb-dashboard which is simply more powerful and less buggy. See also: How to highlight and color gdb output during interactive debugging?

    0 讨论(0)
提交回复
热议问题