mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Pdb Fixed std::[w]string pretty printing (clang version)
This commit is contained in:
parent
a0bf195b95
commit
33431e0b32
2 changed files with 21 additions and 11 deletions
|
|
@ -8,18 +8,16 @@ void Pdb::PrettyStdString(Pdb::Val val, const Vector<String>& tparam, int64 from
|
|||
int size;
|
||||
bool w = tparam[0] == "wchar_t";
|
||||
if(HasAttr(val, "__r_")) { // CLANG variant
|
||||
Val r = GetAttr(GetAttr(val, "__r_"), "__value_");
|
||||
Val s = GetAttr(r, "__s");
|
||||
size = GetByteAttr(s, "__size_");
|
||||
if(size & 1) {
|
||||
Val l = GetAttr(r, "__l");
|
||||
size = GetIntAttr(l, "__size_");
|
||||
a = DeRef(GetAttr(l, "__data_")).address;
|
||||
}
|
||||
else {
|
||||
size = size >> 1;
|
||||
a = s.address + 1 + w;
|
||||
Val r = GetAttr(val, "__r_");
|
||||
Val v = GetAttr(r, "__value_");
|
||||
Val s = GetAttr(v, "__s");
|
||||
if(GetInt(GetAttr(s, "__is_long_"))) {
|
||||
s = GetAttr(v, "__l");
|
||||
a = DeRef(GetAttr(s, "__data_")).address;
|
||||
}
|
||||
else
|
||||
a = GetAttr(s, "__data_").address;
|
||||
size = GetIntAttr(s, "__size_");
|
||||
}
|
||||
else {
|
||||
Val q = GetAttr(GetAttr(val, "_Mypair"), "_Myval2");
|
||||
|
|
|
|||
|
|
@ -49,4 +49,16 @@ GUI_APP_MAIN
|
|||
std::unordered_multiset<std::string> std_unordered_multiset { "I", "II", "III", "IV", "V" };
|
||||
std::unordered_map<int, std::string> std_unordered_map { { 1 , "I"}, { 2, "II" }, { 3, "III"}, { 4, "IV"}, { 5, "V" } };
|
||||
std::unordered_multimap<int, std::string> std_unordered_multimap { { 1 , "I"}, { 2, "II" }, { 3, "III"}, { 4, "IV"}, { 5, "V" } };
|
||||
|
||||
|
||||
for(String h : { "Hello world!", "Very very very very very very very long hello world!" }) {
|
||||
std::string sh = h.ToStd();
|
||||
WString wh = h.ToWString();
|
||||
std::wstring swh = wh.ToStd();
|
||||
|
||||
DDUMP(h);
|
||||
DDUMP(sh);
|
||||
DDUMP(wh);
|
||||
DDUMP(swh);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue