Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windbg - How can I Dump Strings which match a given filter

Tags:

windbg

sos

One can dump all the string using the following command !dumpheap -type System.string

How can dump or print only those string which starts or contains a specific "string"

Example. I am only intrested to view the string which contains "/my/app/request"

like image 254
imasud Avatar asked Jan 16 '23 14:01

imasud


2 Answers

Use sosex instead of sos for this. It has a !strings command which allows you to filter strings using the /m:<filter> option.

like image 170
Brian Rasmussen Avatar answered Feb 05 '23 00:02

Brian Rasmussen


Use !sosex.strings. See !sosex.help for options to filter strings based on content and/or length.

like image 45
Steve Johnson Avatar answered Feb 05 '23 02:02

Steve Johnson