How to highlight and color gdb output during interactive debugging?

前端 未结 11 1507
南方客
南方客 2020-12-02 03:42

Please don\'t reply I should use ffffd, nemiver, emacs, vim, or any other front-end, I just prefer gdb as it is, but would like to see its output with some terminal colors.

11条回答
  •  甜味超标
    2020-12-02 03:56

    It's not colours, but consider gdb's text gui. It makes a vast difference to how usable gdb is.

    You can launch it with:

    gdb -tui executable.out
    

    Screenshot:

    enter image description here

    As you can see, the main features are:

    • shows what line of the source we are on and surrounding lines
    • shows breakpoints

提交回复
热议问题