[PATCH] D132900: [DWARF] Fix infinite recursion in Type Printer.
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 13:36:45 PDT 2022
ayermolo added a comment.
Working example:
0x000002a3: DW_TAG_ptr_to_member_type [15] (0x0000000b)
DW_AT_type [DW_FORM_ref4] (cu + 0x0287 => {0x00000287} "ns::inner")
DW_AT_containing_type [DW_FORM_ref4] (cu + 0x0287 => {0x00000287} "ns::inner")
0x000002ac: DW_TAG_ptr_to_member_type [15] (0x0000000b)
DW_AT_type [DW_FORM_ref4] (cu + 0x02b5 => {0x000002b5} "ns::inner (ns::inner *, ns::inner)")
DW_AT_containing_type [DW_FORM_ref4] (cu + 0x0287 => {0x00000287} "ns::inner")
0x000002b5: DW_TAG_subroutine_type [29] * (0x0000000b)
DW_AT_type [DW_FORM_ref4] (cu + 0x0287 => {0x00000287} "ns::inner")
0x00000287: DW_TAG_structure_type [16] (0x00000282)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000d6] = "inner")
DW_AT_declaration [DW_FORM_flag_present] (true)
0x00000282: DW_TAG_namespace [30] * (0x0000000b)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000d3] = "ns")
0x000000e1: DW_TAG_template_type_parameter [5] (0x0000003c)
DW_AT_type [DW_FORM_ref4] (cu + 0x02a3 => {0x000002a3} "ns::inner ns::inner::*")
0x000000e6: DW_TAG_template_type_parameter [5] (0x0000003c)
DW_AT_type [DW_FORM_ref4] (cu + 0x02ac => {0x000002ac} "ns::inner (ns::inner::*)()")
Couple traces through calls with DIE offsets printed.
0x000000e1: DW_TAG_template_type_parameter [5] (0x0000003c)
DW_AT_type [DW_FORM_ref4] (cu + 0x02a3 => {0x000002a3} “
appendQualifiedName: 2a3
appendUnqualifiedName: 2a3
appendUnqualifiedNameBefore: 2a3
appendQualifiedNameBefore: 287
appendScopes: 282
appendUnqualifiedName: 282
appendUnqualifiedNameBefore: 282
nsappendUnqualifiedNameAfter: 282
::appendUnqualifiedNameBefore: 287
innerappendTemplateParameters: 287
appendQualifiedName: 287
appendScopes: 282
appendUnqualifiedName: 282
appendUnqualifiedNameBefore: 282
nsappendUnqualifiedNameAfter: 282
::appendUnqualifiedName: 287
appendUnqualifiedNameBefore: 287
innerappendTemplateParameters: 287
appendUnqualifiedNameAfter: 287
::*appendUnqualifiedNameAfter: 2a3
appendUnqualifiedNameAfter: 287
")
0x000000e6: DW_TAG_template_type_parameter [5] (0x0000003c)
DW_AT_type [DW_FORM_ref4] (cu + 0x02ac => {0x000002ac} “
appendQualifiedName: 2ac
appendUnqualifiedName: 2ac
appendUnqualifiedNameBefore: 2ac
appendQualifiedNameBefore: 2b5
appendUnqualifiedNameBefore: 2b5
appendQualifiedNameBefore: 287
appendScopes: 282
appendUnqualifiedName: 282
appendUnqualifiedNameBefore: 282
nsappendUnqualifiedNameAfter: 282
::appendUnqualifiedNameBefore: 287
innerappendTemplateParameters: 287
(
appendQualifiedName: 287
appendScopes: 282
appendUnqualifiedName: 282
appendUnqualifiedNameBefore: 282
nsappendUnqualifiedNameAfter: 282
::appendUnqualifiedName: 287
appendUnqualifiedNameBefore: 287
innerappendTemplateParameters: 287
appendUnqualifiedNameAfter: 287
::*appendUnqualifiedNameAfter: 2ac
)appendUnqualifiedNameAfter: 2b5
appendUnqualifiedName: 2b5
(
appendQualifiedName: 287
appendScopes: 282
appendUnqualifiedName: 282
appendUnqualifiedNameBefore: 282
nsappendUnqualifiedNameAfter: 282
::appendUnqualifiedName: 287
appendUnqualifiedNameBefore: 287
innerappendTemplateParameters: 287
appendUnqualifiedNameAfter: 287
)appendUnqualifiedNameAfter: 287
")
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132900/new/
https://reviews.llvm.org/D132900
More information about the llvm-commits
mailing list