https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122812
Bug ID: 122812
Summary: pretty printing the map<> sometimes fails because of
unexpected type specifiers
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: vlad.bespalov at jetstreamsoft dot com
Target Milestone: ---
Created attachment 62885
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62885&action=edit
Proposed pretty printer fix
Under unknown circumstances the type map<>::value_type gets a "struct " prefix
in type.name, preventing construction/lookup of the original type when
pretty-printing the map.
good instance:
str(type) -> "std::pair<unsigned short const, JsLoggerDisk*>"
repr(type) -> "<gdb.Type code=TYPE_CODE_STRUCT name=std::pair<unsigned short
const, JsLoggerDisk*>>"
type.tag -> "std::pair<unsigned short const, JsLoggerDisk*>"
bad instance:
str(type) -> "struct std::pair<unsigned short const, JsLoggerDisk*>"
repr(type) -> "<gdb.Type code=TYPE_CODE_STRUCT name=struct std::pair<unsigned
short const, JsLoggerDisk*>>"
type.tag -> "std::pair<unsigned short const, JsLoggerDisk*>"
Similar to the fix for PR67440 using type.tag in lookup_templ_spec() solves the
problem - see the attachment.
Unfortunately, I cannot provide the minimal testcase for the issue.