Gdb print to file instead of stdout

后端 未结 8 1993
醉话见心
醉话见心 2020-11-29 17:15

I am running gdb and want to examine one of those unfortunate god objects. It takes many pages (and I have a 24\" monitor turned sideways!) to see the whole thing. For eas

8条回答
  •  自闭症患者
    2020-11-29 17:43

    You've had multiple answers here. They are corrects. I just want to add a command that will help you to collect all the output at once. This really helpful when your collecting a huge backtrace. Before doing any logging configuration, do this:

    (gdb)set height 0
    

    I found it on this article: https://askaralikhan.blogspot.com/2016/05/gdb-all-threads-bt-to-file.html?showComment=1584614942454#c4584028195226351332

提交回复
热议问题