WinDbg and SoS, how do I print/dump a large string?

后端 未结 4 999
渐次进展
渐次进展 2020-12-30 04:59

I am debugging a hangdump coming from a production server using WinDbg with the SoS extension.

There is a string parameter in one of the stacks, that I need to know

4条回答
  •  醉酒成梦
    2020-12-30 05:16

    I would think twice before dumping 2562638 characters worth of text, but if you really want to, the text is stored following the fields of the string instance, so you can do a du to dump the actual text of the string. The output will look something like this:

    00000000`132ab050  "this is an extremely long string"
    00000000`132ab090  " of text, so don't even bother t"
    00000000`132ab0d0  "o try to dump it to the screen -"
    

    By logging the session output to a file, you can easily capture the output and do whatever post-processing you need.

提交回复
热议问题