How to highlight and color gdb output during interactive debugging?

前端 未结 11 1484
南方客
南方客 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 04:11

    you can get whatever colors you want;

    # gdb
    (gdb) shell echo -en '\E[47;34m'"\033[1m"
    ...
    anything is now blue foreground and white background
    ...
    (gdb) shell tput sgr0
    ... back to normal
    

提交回复
热议问题