Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 25f1764

Browse files
committed
Clarify confusing GUID-length message
The GUID parameter to RetrieveSymbols must be exactly 32 characters in length but when it isn't the tool wouldn't tell you what the length was. It would also print some confusing information about trimmed GUIDs which was not always relevant. Now it prints the size and only prints the trimming information when it is relevant (and more clearly).
1 parent 2e5ce32 commit 25f1764

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

RetrieveSymbols/RetrieveSymbols.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ int main(int argc, _Pre_readable_size_(argc) char* argv[])
122122
}
123123
if (gText.size() != 32)
124124
{
125-
printf("Error: PDB GUIDs must be exactly 32 characters"
126-
" (%s was stripped to %s).\n", gTextArg.c_str(), gText.c_str());
127-
return 10;
125+
if (gText == gTextArg)
126+
printf("Error: PDB GUIDs must be exactly 32 characters, length of %s is %zu.",
127+
gText.c_str(), gText.size());
128+
else
129+
printf("Error: PDB GUIDs must be exactly 32 characters, length of %s (stripped from %s) is %zu.",
130+
gText.c_str(), gTextArg.c_str(), gText.size());
131+
return 10;
128132
}
129133

130134
int count = sscanf_s(gText.substr(0, 8).c_str(), "%x", &g.Data1);

0 commit comments

Comments
 (0)