Good morning,
In this post, I was looking for a way to find CString
entries within a dump, and I still am :-)
It seems possible to find object related entries, based on the first field as mentioned in Windbg's x /2
result. For objects who have virtual methods, this seems to be the __vptr
field (which corresponds with *vftable'
entries), and I'd thought this question to be easy for the particular case of the CString
class.
In the source code (C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\<version>\crt\src\vcruntime\undname.cxx
), I've found following entry:
#if ( !NO_COMPILER_NAMES )
"`vftable'", <--- vftable: the one I'm working with
"`vbtable'",
"`vcall'",
"`typeof'",
"`local static guard'",
"`string'",
"`vbase destructor'",
"`vector deleting destructor'",
"`default constructor closure'",
"`scalar deleting destructor'",
"`vector constructor iterator'",
"`vector destructor iterator'",
"`vector vbase constructor iterator'",
"`virtual displacement map'",
"`eh vector constructor iterator'",
"`eh vector destructor iterator'",
"`eh vector vbase constructor iterator'",
"`copy constructor closure'",
"`udt returning'",
"`EH", //eh initialized struct
"`RTTI", //rtti initialized struct
"`local vftable'",
"`local vftable constructor closure'",
#endif // !NO_COMPILER_NAMES
This makes me wonder if I could use one of the mentioned entries as candidates for the first field of an object. I already have found out that there exists an entry in windbg
's x /2 *!ATL::CStringT*
command, ending by scalar deleting destructor'
, but I don't know if I could use this as a "first field" candidate.
P.s. In case you wonder "But why don't you just try it?", there is the issue that the CStringT
objects, present in my dumpfiles, contain quite some strange characters, which makes it very difficult to see if I'm doing the right thing and see strange but correct characters, or if I'm looking at bogus results.
Thanks in advance