Hi,
are there any Python scripts to debug a std::wstring (i.e. std::basic_string<int> in osx)?
It would be very useful, especially when debugging a vector of strings (i.estd::vector< std::wstring >)
After searching a while in the internet I found nothing, so I started to write my own Python class for generating synthetic children (exactly one chiled, i.e. the string itself),
but there are several problems I could not solve.
My test programm looks as follows:
std::vector< std::wstring > aWideStringVector;
aWideStringVector.push_back(L"Filter/EQ");
aWideStringVector.push_back(L"Lowpass Filter");
aWideStringVector.push_back(L"Wah Wah");
aWideStringVector.push_back(L"Pitch Shift");
aWideStringVector.push_back(L"Highpass Filter");
aWideStringVector.push_back(L"Bandpass Filter");
I registered the synthetic children class with type synthetic add -x "^(std::)?basic_string<.+>" --python-class wstring.StdWStringSynthProvider but
frame variable aWideStringVector
gives me
(vector<std::basic_string<wchar_t>, std::allocator<std::basic_string<wchar_t> > >) aWideStringVector = {
}
and
frame variable aWideStringVector[0]
gives me
error: array index 0 is not valid for "(vector<std::basic_string<wchar_t>, std::allocator<std::basic_string<wchar_t> > >) aWideStringVector"
Am I doing something wrong?
Is it in general a good idea to debug a std::wstring with synthetic children?
thanks,
Nino
wstring.py (1.54 KB)