diff options
Diffstat (limited to 'lldb/lit/Breakpoint')
29 files changed, 1206 insertions, 0 deletions
diff --git a/lldb/lit/Breakpoint/Inputs/case-sensitive.c b/lldb/lit/Breakpoint/Inputs/case-sensitive.c new file mode 100644 index 00000000000..6df38dcacd7 --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/case-sensitive.c @@ -0,0 +1,4 @@ +int main() { + int x = 47; // REGEX-THIS + return x; +} diff --git a/lldb/lit/Breakpoint/Inputs/debug_addrx.yaml b/lldb/lit/Breakpoint/Inputs/debug_addrx.yaml new file mode 100644 index 00000000000..7d4cd74543e --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/debug_addrx.yaml @@ -0,0 +1,57 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000201000 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000201000 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C08011200048C7C11011200048C7C700112000E897010000F4CCCCCCCCCCCC55B810202000483D102020004889E57417B8000000004885C0740D5DBF10202000FFE00F1F4400005DC3660F1F440000BE10202000554881EE102020004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF10202000FFE00F1F005DC3660F1F440000803D592F0000007517554889E5E87EFFFFFFC605472F0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89CCCCCCCCCCCCCCCCCCC3CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC3CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC31C0C3CCCCCCCCCCCCCCCCCCCCCCCCCC415741564189FF415541544C8D25E61E000055488D2DE61E0000534989F64989D54C29E54883EC0848C1FD03E8430000004885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 44000000050000006B0000005F0000003A0000000E0000001A0000001E000000930000002E0000001600000067000000050000009A0000008E000000000000006900000095000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 74686973005F5A336261723141005F76707472244100666F6F00696E74005F5F7674626C5F7074725F74797065005F5A4E314133666F6F4576002F686F6D652F756D622F74657374735F323031382F3131326C6C64625F726C657461677300746573742E63630041006100636C616E672076657273696F6E20382E302E3020287472756E6B2033343438333429006D61696E0078006F626A410062617200 + - Name: .debug_loc + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: E010200000000000E010200000000000030011009FE010200000000000E1102000000000000500110023019F00000000000000000000000000000000 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 011101252513050325721710171B25731711015517741700000213011D13360B03250B0B3A0B3B0B0000030D0003254913380B34190000040D00032549133A0B3B0B380B0000052E016E2503253A0B3B0B4C0B4D183C193F191D130000060500491334190000070F0049130000080F00491303250000091500491300000A240003253E0B0B0B00000B2E01111B1206401864137A193B0B471300000C050003254913341900000D3400021703253A0B3B0B491300000E2E01111B120640187A196E2503253A0B3B0B3F1900000F050003253A0B3B0B49130000102E01111B120640187A1903253A0B3B0B49133F19000011340003253A0B3B0B4913000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: C8000000050001080000000001000400010800000000000000020800000000000000000000000C0000000C000000022E000000040910010303035C0000000004066C0000000104080507080105010210002E000000067000000000000761000000086700000005096C0000000A040504072E0000000B000100000001578600000008480000000C0DC60000000D000000000601096C000000000E010100000001570A0B010D0F0E010D2E0000000010020300000001570C01116C000000110F01122E00000000072E00000000 + - Name: .debug_rnglists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 27000000050008000000000007E0102000000000000107F010200000000000010700112000000000000300 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_addr + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 1C00000005000800E010200000000000F0102000000000000011200000000000 + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 97000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E02250000000066F622AD4EB40BCEA506478235D9D438250000000066F622AD4EB40BCEA506478235D9D438000902E0102000000000001905010A150201000101000902F010200000000000030C0105010A140201000101000902001120000000000003100105030A170203000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F3131326C6C64625F726C657461677300746573742E636300 +Symbols: diff --git a/lldb/lit/Breakpoint/Inputs/debug_rnglist_basic.yaml b/lldb/lit/Breakpoint/Inputs/debug_rnglist_basic.yaml new file mode 100644 index 00000000000..6a6db28790e --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/debug_rnglist_basic.yaml @@ -0,0 +1,50 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000400440 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400440 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C0C005400048C7C15005400048C7C730054000E8B7FFFFFFF4660F1F44000055B820204000483D202040004889E57417B8000000004885C0740D5DBF20204000FFE00F1F4400005DC3660F1F440000BE20204000554881EE202040004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF20204000FFE00F1F005DC3660F1F440000803D391B0000007517554889E5E87EFFFFFFC605271B0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89900F1F840000000000554889E5B8010000005DC30F1F440000554889E54883EC10C745FC00000000E8DCFFFFFF4883C4105DC3660F1F440000415741564189FF415541544C8D25A618000055488D2DA6180000534989F64989D54C29E54883EC0848C1FD03E86FFEFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 200000000500000000000000230000002C0000005D00000065000000690000006D000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 636C616E672076657273696F6E20382E302E3020287472756E6B203334333438372900746573742E637070002F686F6D652F756D622F74657374735F323031382F313033726E676C697374732F6C6C64622F63726561746574657374005F5A337A656476007A656400696E74006D61696E00 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 011101252513050325721710171B251101551774170000022E001101120640186E2503253A0B3B0B49133F190000032E0011011206401803253A0B3B0B49133F19000004240003253E0B0B0B000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 580000000500010800000000010004000108000000000000000200000000000000000C0000000C0000000220054000000000000B000000015603040101570000000330054000000000001A0000000156060105570000000405050400 + - Name: .debug_rnglists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 1D00000005000800000000000720054000000000000B0730054000000000001A00 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 82000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E023100000000F7B7492A97F18E69F7EC76B19E9024873100000000F7B7492A97F18E69F7EC76B19E90248700090220054000000000000105020A4B020700010100090230054000000000001605090AE5050206580206000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F313033726E676C697374732F6C6C64622F6372656174657465737400746573742E63707000 +Symbols: +... diff --git a/lldb/lit/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml b/lldb/lit/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml new file mode 100644 index 00000000000..b919e3e4d1c --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml @@ -0,0 +1,53 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000400440 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400440 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C0C005400048C7C15005400048C7C740054000E8B7FFFFFFF4660F1F44000055B820204000483D202040004889E57417B8000000004885C0740D5DBF20204000FFE00F1F4400005DC3660F1F440000BE20204000554881EE202040004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF20204000FFE00F1F005DC3660F1F440000803D391B0000007517554889E5E87EFFFFFFC605271B0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89660F1F840000000000B9020000008B05F91A00000F1F44000021F883C1FF75F98905E71A0000C3669050BF01000000E8D5FFFFFF31C059C390415741564189FF415541544C8D25A618000055488D2DA6180000534989F64989D54C29E54883EC0848C1FD03E86FFEFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 300000000500000000000000230000002C0000004F00000051000000550000005D0000006100000066000000680000006A000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 636C616E672076657273696F6E20382E302E3020287472756E6B203334343033352900746573742E637070002F686F6D652F756D622F74657374735F323031382F3130365F726E676C6973747332004300696E74005F5A33666F6F6900666F6F006D61696E00500049005700 + - Name: .debug_loc + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 05000000000000001000000000000000030011009F00000000000000000000000000000000 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 011101252513050325721710171B251101120674170000023400032549133F193A0B3B0B0218000003240003253E0B0B0B0000042E011101120640187A196E2503253A0B3B0B3F190000050500021803253A0B3B0B49130000060B01110112060000073400021703253A0B3B0B49130000080B015517000009340003253A0B3B0B491300000A2E011101120640187A1903253A0B3B0B49133F1900000B48007F137D0100000C0F004913000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: AC0000000500010800000000010004000108000000000000000220054000000000002F0000000C00000002033C000000010309032420400000000000030405040420054000000000001E0000000157050601040501550801043C0000000625054000000000001800000007000000000901063C000000080C000000090A0107AA0000000000000A40054000000000000F000000015707010E3C0000000B400000004B05400000000000000C3C00000000 + - Name: .debug_rnglists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 18000000050008000000000005200540000000000004051204171D00 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 7F000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E0223000000003D8C80E874CE6D5F1FC4A6544BE9D5B323000000003D8C80E874CE6D5F1FC4A6544BE9D5B300090220054000000000001605080A5B0515C60503063C0508063005016805004105030A21A00204000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F3130365F726E676C697374733200746573742E63707000 +Symbols: diff --git a/lldb/lit/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml b/lldb/lit/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml new file mode 100644 index 00000000000..79807773432 --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml @@ -0,0 +1,49 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000201000 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000201000 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C08011200048C7C11011200048C7C7F0102000E897010000F4CCCCCCCCCCCC55B810202000483D102020004889E57417B8000000004885C0740D5DBF10202000FFE00F1F4400005DC3660F1F440000BE10202000554881EE102020004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF10202000FFE00F1F005DC3660F1F440000803D592F0000007517554889E5E87EFFFFFFC605472F0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89CCCCCCCCCCCCCCCCCC554889E5B8010000005DC3CCCCCCCCCC554889E54883EC10C745FC00000000E8DCFFFFFF4883C4105DC3CCCCCCCCCCCC415741564189FF415541544C8D25E61E000055488D2DE61E0000534989F64989D54C29E54883EC0848C1FD03E8430000004885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2000000005000000040000002B0000003900000062000000270000000000000034000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 696E7400636C616E672076657273696F6E20382E302E3020287472756E6B2033343430333529007A656400746573742E637070006D61696E002F686F6D652F756D622F74657374735F323031382F3130375F726E676C6973747374617274656E64005F5A337A65647600 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 011101252513050325721710171B251101551774170000022E001101120640186E2503253A0B3B0B49133F190000032E0011011206401803253A0B3B0B49133F19000004240003253E0B0B0B000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 580000000500010800000000010004000108000000000000000200000000000000000C0000000C00000002E0102000000000000B0000000156030401015700000003F0102000000000001A0000000156060105570000000405050400 + - Name: .debug_rnglists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2B000000050008000000000006E010200000000000EB1020000000000006F0102000000000000A1120000000000000 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 82000000050008004C000000010101FB0E0D00010101010000000100000101011F010900000003011F020F051E020000000000C404455D157064301CF8C713A4AC4CEE0000000000C404455D157064301CF8C713A4AC4CEE000902E0102000000000000105030A4B0207000101000902F01020000000000016050A0AE5050306580206000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 746573742E637070002F686F6D652F756D622F74657374735F323031382F3130375F726E676C6973747374617274656E6400 +Symbols: diff --git a/lldb/lit/Breakpoint/Inputs/debug_rnglistx_rlex.yaml b/lldb/lit/Breakpoint/Inputs/debug_rnglistx_rlex.yaml new file mode 100644 index 00000000000..15b95e2a175 --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/debug_rnglistx_rlex.yaml @@ -0,0 +1,57 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000201000 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000201000 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C08011200048C7C11011200048C7C700112000E897010000F4CCCCCCCCCCCC55B810202000483D102020004889E57417B8000000004885C0740D5DBF10202000FFE00F1F4400005DC3660F1F440000BE10202000554881EE102020004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF10202000FFE00F1F005DC3660F1F440000803D592F0000007517554889E5E87EFFFFFFC605472F0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89CCCCCCCCCCCCCCCCCCC3CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC3CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC31C0C3CCCCCCCCCCCCCCCCCCCCCCCCCC415741564189FF415541544C8D25E61E000055488D2DE61E0000534989F64989D54C29E54883EC0848C1FD03E8430000004885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 28000000050000003000000067000000000000002800000076000000240000006F0000007400000022000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F3131345F726E676C69737473007900696E74005F5A336261726900636C616E672076657273696F6E20382E302E3020287472756E6B203334353639392920286C6C766D2F7472756E6B203334353530362900746573742E6363006D61696E00780062617200 + - Name: .debug_loclists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '15000000050008000000000003000301005503020101005000' + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 011101252513050325721710171B2573171101552374178C01170000022E01111B120640187A196E2503253A0B3B0B49133F190000030500021703253A0B3B0B49130000042E01111B120640187A1903253A0B3B0B49133F1900000534001C0D03253A0B3B0B4913000006240003253E0B0B0B000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 6600000005000108000000000100040001080000000000000002080000000000000000000000000C0000000C00000002000400000001570304010365000000030C0000000701036500000000040106000000015706010765000000050108010865000000000605050400 + - Name: .debug_rnglists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '1300000005000800010000000400000003000403010600' + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_addr + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 1C00000005000800E010200000000000F010200000000000E310200000000000 + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 82000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E022200000000FC42F1EAF1396417A8FBE442FBADC7032200000000FC42F1EAF1396417A8FBE442FBADC703000902E01020000000000014050B0A130504063C0201000101000902F0102000000000001805030A140206000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F3131345F726E676C6973747300746573742E636300 +Symbols: diff --git a/lldb/lit/Breakpoint/Inputs/implicit_const_form_support.yaml b/lldb/lit/Breakpoint/Inputs/implicit_const_form_support.yaml new file mode 100644 index 00000000000..f1d8373923b --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/implicit_const_form_support.yaml @@ -0,0 +1,41 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x00000000004004A0 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x00000000004004A0 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C01006400048C7C1A005400048C7C77E054000E8B7FFFFFFF4660F1F440000B820204000483D202040007413B8000000004885C07409BF20204000FFE06690C30F1F440000662E0F1F840000000000BE202040004881EE2020400048C1FE034889F048C1E83F4801C648D1FE7411B8000000004885C07407BF20204000FFE0C30F1F440000662E0F1F840000000000803DD91A0000007517554889E5E87EFFFFFFC605C71A0000015DC30F1F440000C30F1F440000662E0F1F840000000000EB8EB800000000C3B800000000C3554889E5534883EC08E8E6FFFFFF89C3E8E5FFFFFF01D84883C4085B5DC30F1F4000415741564189FF415541544C8D251618000055488D2D16180000534989F64989D54C29E54883EC0848C1FD03E877FEFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_frame + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000008 + Content: 14000000FFFFFFFF03000178100C0708900100000000000014000000000000007205400000000000060000000000000014000000000000007805400000000000060000000000000034000000000000007E054000000000001E0000000000000004010000000E10860204030000000D060405000000830304140000000C070800 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 900000000500010800000000023A00000021310000000000000072054000000000002A0000000000000000000000039A0000000109054C0000007E054000000000001E00000000000000019C040405696E7400012C000000059F0000004C00000078054000000000000600000000000000019C018C00000001910000004C00000072054000000000000600000000000000019C00 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 012E003F19030E3A21013B0B3921056E0E49131101120740187A190000021101250E130B030E1B0E1101120710170000032E003F19030E3A0B3B0B390B49131101120740187C1900000424000B0B3E0B0308000000 + - Name: .debug_aranges + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2C00000002000000000008000000000072054000000000002A0000000000000000000000000000000000000000000000 + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 5600000002001F0000000101FB0E0D00010101010000000100000100746573742E6370700000000000050C000902720540000000000001050913050159050C22050913050159050C22050D9105167405175805012F0207000101 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F3130315F696D706C696369745F636F6E73742F6E657700666F6F3200746573742E63707000474E5520432B2B313420382E302E3120323031383033313920286578706572696D656E74616C29202D6D74756E653D67656E65726963202D6D617263683D7838362D3634202D67202D6764776172662D3500666F6F31005F5A34666F6F3176006D61696E005F5A34666F6F327600 +Symbols: +... diff --git a/lldb/lit/Breakpoint/Inputs/jitbp.cpp b/lldb/lit/Breakpoint/Inputs/jitbp.cpp new file mode 100644 index 00000000000..447d9d66df8 --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/jitbp.cpp @@ -0,0 +1,2 @@ +int jitbp() { return 0; } +int main() { return jitbp(); } diff --git a/lldb/lit/Breakpoint/Inputs/ppc64-localentry.s b/lldb/lit/Breakpoint/Inputs/ppc64-localentry.s new file mode 100644 index 00000000000..5fe0a97d06d --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/ppc64-localentry.s @@ -0,0 +1,55 @@ + .text + .abiversion 2 + + .globl lfunc + .p2align 4 + .type lfunc,@function +lfunc: # @lfunc +.Lfunc_begin0: +.Lfunc_gep0: + addis 2, 12, .TOC.-.Lfunc_gep0@ha + addi 2, 2, .TOC.-.Lfunc_gep0@l +.Lfunc_lep0: + .localentry lfunc, .Lfunc_lep0-.Lfunc_gep0 +# BB#0: + mr 4, 3 + addis 3, 2, .LC0@toc@ha + ld 3, .LC0@toc@l(3) + stw 4, -12(1) + lwz 4, 0(3) + lwz 5, -12(1) + mullw 4, 4, 5 + extsw 3, 4 + blr + .long 0 + .quad 0 +.Lfunc_end0: + .size lfunc, .Lfunc_end0-.Lfunc_begin0 + + .globl simple + .p2align 4 + .type simple,@function +simple: # @simple +.Lfunc_begin1: +# %bb.0: # %entry + mr 4, 3 + stw 4, -12(1) + lwz 4, -12(1) + mulli 4, 4, 10 + extsw 3, 4 + blr + .long 0 + .quad 0 +.Lfunc_end1: + .size simple, .Lfunc_end1-.Lfunc_begin1 + + .section .toc,"aw",@progbits +.LC0: + .tc g_foo[TC],g_foo + .type g_foo,@object # @g_foo + .data + .globl g_foo + .p2align 2 +g_foo: + .long 2 # 0x2 + .size g_foo, 4 diff --git a/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.o.yaml b/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.o.yaml new file mode 100644 index 00000000000..5adc9d82fca --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.o.yaml @@ -0,0 +1,84 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x0000000000000010 + Content: 554889E531C0C745FC000000005DC390554889E55DC3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 0C000000050000000000000000000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 746573742E6F002F686F6D652F756D622F74657374735F323031382F39355F6C6C64622F726570726F2F6477617266355F73706C69745F73696E676C655F66696C652F707265706172655F73616D706C65006D61696E00666F6F005F5A33666F6F7600696E7400 + - Name: .debug_loc.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: '' + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 01110010177217B042251B25B44219B3421711011206000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2B00000005000408000000003F4B7684A29835B9010000000000000000000100000000000000000000000016000000 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_str_offsets.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 200000000500000000000000070000002A00000033000000380000003C00000044000000 + - Name: .debug_str.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE, SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 746573742E6F00636C616E672076657273696F6E20382E302E3020287472756E6B203334323731382900746573742E637070006D61696E00696E74005F5A33666F6F7600666F6F00 + - Name: .debug_info.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 3600000005000508000000003F4B7684A29835B901000104000202000F0000000156030101350000000301060000000156050601050404050400 + - Name: .debug_abbrev.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 011101B042252525130503250000022E0011813E1206401803253A0B3B0B49133F190000032E0011813E120640186E2503253A0B3B0B3F19000004240003253E0B0B0B000000 + - Name: .debug_addr + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '140000000500080000000000000000000000000000000000' + - Name: .debug_names + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000004 + Content: A00000000500000001000000000000000000000004000000040000000D000000080000004C4C564D3037303000000000010000000200000003000000040000003080880B8973880B6A7F9A7C0B3D06B5000000000000000000000000000000000000000009000000120000001B0000002E2E03130000242403130000002435000000000000002E29000000000000002E1A000000000000002E2900000000000000000000 + - Name: .debug_gnu_pubnames + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 210000000200000000002F0000002900000030666F6F001A000000306D61696E0000000000 + - Name: .debug_gnu_pubtypes + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 170000000200000000002F0000003500000090696E740000000000 + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 70000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E020000000000FD7C0F2E46BA561F7BDA351B04E677090000000000FD7C0F2E46BA561F7BDA351B04E6770900090200000000000000000105030AC905003F05010A4B0202000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F39355F6C6C64622F726570726F2F6477617266355F73706C69745F73696E676C655F66696C652F707265706172655F73616D706C6500746573742E63707000 +... diff --git a/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.yaml b/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.yaml new file mode 100644 index 00000000000..da3e160a26e --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.yaml @@ -0,0 +1,61 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000400440 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400440 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C0B005400048C7C14005400048C7C720054000E8B7FFFFFFF4660F1F44000055B820204000483D202040004889E57417B8000000004885C0740D5DBF20204000FFE00F1F4400005DC3660F1F440000BE20204000554881EE202040004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF20204000FFE00F1F005DC3660F1F440000803D391B0000007517554889E5E87EFFFFFFC605271B0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89660F1F840000000000554889E531C0C745FC000000005DC390554889E55DC3662E0F1F840000000000415741564189FF415541544C8D25B618000055488D2DB6180000534989F64989D54C29E54883EC0848C1FD03E87FFEFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 0C000000050000000000000007000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 746573742E6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006D61696E00666F6F005F5A33666F6F7600696E7400 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 01110010177217B042251B25B44219B3421711011206000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2B00000005000408000000003F4B7684A29835B9010000000008000000000108000000200540000000000016000000 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_addr + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '140000000500080020054000000000003005400000000000' + - Name: .debug_names + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000004 + Content: A00000000500000001000000000000000000000004000000040000000D000000080000004C4C564D3037303000000000010000000200000003000000040000003080880B8973880B6A7F9A7C0B3D06B56300000057000000520000005B0000000000000009000000120000001B0000002E2E03130000242403130000002435000000000000002E29000000000000002E1A000000000000002E2900000000000000000000 + - Name: .debug_gnu_pubnames + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 210000000200000000002F0000002900000030666F6F001A000000306D61696E0000000000 + - Name: .debug_gnu_pubtypes + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 170000000200000000002F0000003500000090696E740000000000 + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 70000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E024B00000000FD7C0F2E46BA561F7BDA351B04E677094B00000000FD7C0F2E46BA561F7BDA351B04E6770900090220054000000000000105030AC905003F05010A4B0202000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000746573742E63707000 +... diff --git a/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml b/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml new file mode 100644 index 00000000000..1e304e5fc46 --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml @@ -0,0 +1,33 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .debug_loc.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: '' + - Name: .debug_str_offsets.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 200000000500000000000000090000002C000000340000003C0000004000000045000000 + - Name: .debug_str.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE, SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 746573742E64776F00636C616E672076657273696F6E20382E302E3020287472756E6B203334373239392900746573742E6363005F5A3362617A760062617A006D61696E00696E7400 + - Name: .debug_info.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 360000000500050800000000E93484C441B7E84A01000104000202000600000001560304010103011C0000000156050104350000000406050400 + - Name: .debug_abbrev.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 011101B042252525130503250000022E00111B120640186E2503253A0B3B0B3F190000032E00111B1206401803253A0B3B0B49133F19000004240003253E0B0B0B000000 +... diff --git a/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml b/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml new file mode 100644 index 00000000000..3a362b0d02d --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml @@ -0,0 +1,61 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000400440 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400440 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C0C005400048C7C15005400048C7C730054000E8B7FFFFFFF4660F1F44000055B820204000483D202040004889E57417B8000000004885C0740D5DBF20204000FFE00F1F4400005DC3660F1F440000BE20204000554881EE202040004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF20204000FFE00F1F005DC3660F1F440000803D391B0000007517554889E5E87EFFFFFFC605271B0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89660F1F840000000000554889E55DC3662E0F1F840000000000554889E54883EC10C745FC00000000E8DCFFFFFF31C04883C4105DC30F1F4000415741564189FF415541544C8D25A618000055488D2DA6180000534989F64989D54C29E54883EC0848C1FD03E86FFEFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 0C000000050000000000000009000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 746573742E64776F002F686F6D652F756D622F74657374735F323031382F3132322F69737375652F6477617266355F73706C69740062617A005F5A3362617A76006D61696E00696E7400 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 01110010177217B042251B25B442197317111B1206000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 240000000500040800000000E93484C441B7E84A010000000008000000000108000000002C000000 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '00' + - Name: .debug_addr + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '140000000500080020054000000000003005400000000000' + - Name: .debug_names + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000004 + Content: A00000000500000001000000000000000000000004000000040000000D000000080000004C4C564D3037303000000000010000000000000003000000000000003080880B64D103B5C260880B6A7F9A7C460000003900000035000000410000000000000009000000120000001B0000002E2E03130000242403130000002435000000000000002E1A000000000000002E1A000000000000002E2600000000000000000000 + - Name: .debug_gnu_pubnames + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 210000000200000000002800000026000000306D61696E001A0000003062617A0000000000 + - Name: .debug_gnu_pubtypes + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '17000000020000000000280000003500000090696E740000000000' + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 71000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E022C000000004B61BD987753AF9C38389263DC08E24F2C000000004B61BD987753AF9C38389263DC08E24F00090220054000000000000105010A4B0500BC05030AE5750206000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 2F686F6D652F756D622F74657374735F323031382F3132322F69737375652F6477617266355F73706C697400746573742E636300 + diff --git a/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml b/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml new file mode 100644 index 00000000000..fbcb9a24921 --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml @@ -0,0 +1,38 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .debug_loc.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: '' + - Name: .debug_str_offsets.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 5C00000005000000000000000A0000002D000000370000004000000050000000520000005A000000600000006200000066000000760000007F000000840000008A0000008F0000009400000096000000990000009C000000A5000000B5000000 + - Name: .debug_str.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE, SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 66696C65312E64776F00636C616E672076657273696F6E20382E302E3020287472756E6B20333437323939290066696C65312E637070007E73747275637431005F5A4E37737472756374313166457600660073747275637431005F5A316776006700696E74005F5A4E377374727563743144324576005F5A347465737476007465737400666C6F6174006D61696E00746869730078007331007332007E73747275637432005F5A4E377374727563743231664576007374727563743200 + - Name: .debug_info.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: D900000005000508000000008D03E0CB5B41F18901000104000202000B000000015607080103B400000003040601020104030202054000000000060405020300072A00000008013200000001565800000001070A30000000090291780FBC0000000A000B029174100108B400000000000C02060000000156010B3A00000002030900000001560B0C010DB80000000D046E00000001560E0111B40000000B0291781101152A0000000B029170120116C1000000000E0905040E0D0404072A0000000304150102060413020705D70000000006140502080007C100000000 + - Name: .debug_abbrev.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 011101B042252525130503250000022E00111B120640186E2503253A0B3B0B49133F190000031301360B03250B0B3A0B3B0B0000042E0103253A0B3B0B3C193F190000050500491334190000062E006E2503253A0B3B0B3C193F190000070F0049130000082E01111B1206401864133A0B3B0B6E2547130000090500021803254913341900000A0B01552300000B3400021803253A0B3B0B491300000C2E00111B120640183A0B3B0B471300000D2E01111B1206401803253A0B3B0B49133F1900000E240003253E0B0B0B000000 + - Name: .debug_rnglists.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 150000000500080001000000040000000101040C1F04253200 +... diff --git a/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml b/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml new file mode 100644 index 00000000000..ef06915cddc --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml @@ -0,0 +1,38 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .debug_loc.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: '' + - Name: .debug_str_offsets.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 3000000005000000000000000A0000002D000000370000004000000050000000520000005A0000006A0000006F00000071000000 + - Name: .debug_str.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE, SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 66696C65322E64776F00636C616E672076657273696F6E20382E302E3020287472756E6B20333437323939290066696C65322E637070007E73747275637432005F5A4E37737472756374323166457600660073747275637432005F5A4E3773747275637432443245760074686973007800696E7400 + - Name: .debug_info.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 740000000500050800000000B90811685AA26A1801000104000202040601020603030207043000000000050405020800061A0000000700320000000156480000000103072000000008029178086E00000009000A0291740901047300000000000B0106000000015601072A000000061A0000000C0A050400 + - Name: .debug_abbrev.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 011101B042252525130503250000021301360B03250B0B3A0B3B0B0000032E0103253A0B3B0B3C193F190000040500491334190000052E006E2503253A0B3B0B3C193F190000060F0049130000072E01111B1206401864133A0B3B0B6E254713000008050002180325491334190000090B01552300000A3400021803253A0B3B0B491300000B2E00111B120640183A0B3B0B471300000C240003253E0B0B0B000000 + - Name: .debug_rnglists.dwo + Type: SHT_PROGBITS + Flags: [ SHF_EXCLUDE ] + AddressAlign: 0x0000000000000001 + Content: 150000000500080001000000040000000100040C1F04253200 +... diff --git a/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml b/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml new file mode 100644 index 00000000000..ee998b4969f --- /dev/null +++ b/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml @@ -0,0 +1,70 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000400630 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400630 + AddressAlign: 0x0000000000000010 + Content: 31ED4989D15E4889E24883E4F0505449C7C0C008400048C7C15008400048C7C790074000E877FFFFFFF4660F1F44000055B840204000483D402040004889E57417B8000000004885C0740D5DBF40204000FFE00F1F4400005DC3660F1F440000BE40204000554881EE402040004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF40204000FFE00F1F005DC3660F1F440000803D69190000007517554889E5E87EFFFFFFC60557190000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89900F1F840000000000554889E5B8010000005DC30F1F440000554889E54883EC2048897DF8E8DFFFFFFF8945F0E9000000008B45F08945F44883C4205DC389D14889C7894DECE80E00000066666666662E0F1F84000000000050E88AFEFFFF48890424E891FEFFFF90554889E55DC3662E0F1F840000000000554889E50F57C05DC30F1F8000000000554889E54883EC20C745FC00000000E8CCFFFFFFE897000000E8D2FFFFFFF30F1145E0E900000000C745FC00000000488D7DF0E838000000488D7DF8E84FFFFFFF8B45FC4883C4205DC389D1488945E8894DE4488D7DF0E814000000488D7DF8E82BFFFFFF488B7DE8E812FEFFFF6690554889E54883EC2048897DF8E8FFFEFFFF8945F0E9000000008B45F08945F44883C4205DC389D14889C7894DECE82EFFFFFF66666666662E0F1F840000000000554889E55DC3662E0F1F840000000000415741564189FF415541544C8D257615000055488D2D76150000534989F64989D54C29E54883EC0848C1FD03E81FFDFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3 + - Name: .eh_frame_hdr + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC ] + Address: 0x0000000000400B1C + AddressAlign: 0x0000000000000004 + Content: 011B033BE8FDFFFF0C000000A4FAFFFF04FFFFFF14FBFFFF44FFFFFFF4FBFFFF04FEFFFF04FCFFFF7CFFFFFF44FCFFFF24FEFFFF54FCFFFF3CFEFFFF64FCFFFF5CFEFFFF74FCFFFFA4FFFFFFE4FCFFFFD4FFFFFF24FDFFFF7CFEFFFF34FDFFFFA4FEFFFFA4FDFFFFECFEFFFF + - Name: .debug_str_offsets + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 0C00000005000000000000000A0000000C000000050000008F0000000A000000 + - Name: .debug_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 66696C65312E64776F000000000000000000000000000000000000000000000000000000000000000000000000000067005F5A3167760073747275637431007E73747275637431005F5A4E3773747275637431443245760066005F5A4E3773747275637431316645760074657374005F5A347465737476006D61696E00696E7400666C6F617400737472756374320066696C65322E64776F007E73747275637432005F5A4E377374727563743244324576005F5A4E37737472756374323166457600 + - Name: .debug_abbrev + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 01110010177217B042251B25B44219731711015523741700000001110010177217B042251B25B442197317110155237417000000 + - Name: .debug_info + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2C00000005000408000000008D03E0CB5B41F1890100000000080000000001080000000000000000000000000C0000002C000000050004081A000000B90811685AA26A1801F4000000180000000001380000000000000000000000002C000000 + - Name: .debug_rnglists + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 1C00000005000800010000000400000003000B03013203020603030903046E001300000005000800010000000400000003003203010600 + - Name: .debug_macinfo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: '0000' + - Name: .debug_addr + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 2C0000000500080010074000000000002007400000000000700740000000000080074000000000009007400000000000140000000500080000084000000000004008400000000000 + - Name: .debug_names + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000004 + Content: 84010000050000000100000000000000000000000D0000000D00000013000000080000004C4C564D3037303000000000000000000000000001000000050000000600000007000000000000000800000000000000000000000B0000000C0000000D0000006CDCF90ECAA55B7A6A7F9A7C1B1710AF1C1710AF0BB602000CB602003080880B88F31A59AB8B407A65689E7C798A6A6F9BE1710F3100000048000000780000003700000087000000580000002F0000007D0000006F0000005A0000006A0000003F000000810000000000000009000000120000001B000000240000002D000000360000003F00000048000000510000005A000000630000006C0000002E2E03130000242403130000131303130000002E1A000000000000002E45000000000000002E8E00000000000000132A0000000000000013C1000000000000002E70000000000000002E1A0000000000000024B4000000000000002E7E000000000000002E70000000000000002E7E000000000000002E450000000000000024B800000000000000D800000005000000010000000000000000000000060000000600000013000000080000004C4C564D30373030300000000100000002000000030000000500000006000000000000007A8A6A6F4BBE6D7A3080880B1C1710AF0BB602002CA4527A99000000A20000007D0000008700000058000000B20000000000000009000000120000001B000000240000002D0000002E2E03130000242403130000131303130000002E35000000000000002E3500000000000000247300000000000000131A000000000000002E60000000000000002E6000000000000000000000 + - Name: .debug_gnu_pubnames + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 50000000020000000000300000007000000030737472756374313A3A66007E0000003074657374008E000000306D61696E001A0000003067004500000030737472756374313A3A7E73747275637431000000000035000000020030000000300000003500000030737472756374323A3A7E73747275637432006000000030737472756374323A3A660000000000 + - Name: .debug_gnu_pubtypes + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: 3C000000020000000000300000002A000000107374727563743100B800000090666C6F617400C1000000107374727563743200B400000090696E74000000000024000000020030000000300000001A0000001073747275637432007300000090696E740000000000 + - Name: .debug_line + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: F00000000500080065000000010101FB0E0D00010101010000000100000101011F02000000002500000003011F020F051E0327000000004195A4D2AC12B4F174DBFAD42A0CB9B227000000004195A4D2AC12B4F174DBFAD42A0CB9B2310000000193DBF7D5AE9184526D2D968251B49D0200090210074000000000001405030A4B0207000101000902200740000000000018050B0ABB060378C80507440501063D050B65020D0001010009027007400000000000030A0105140A4A02020001010009028007400000000000030C0105020A4B0205000101000902900740000000000003100105030AE5595DE6050175023F000101A30000000500080065000000010101FB0E0D00010101010000000100000101011F02000000002500000003011F020F051E03390000000040CCBAC21BCB1E430C6A1484F8570F05390000000040CCBAC21BCB1E430C6A1484F8570F05310000000193DBF7D5AE9184526D2D968251B49D02000902000840000000000014050B0ABB06C40507400501063D050B65020D00010100090240084000000000001805140A4A0202000101 + - Name: .debug_line_str + Type: SHT_PROGBITS + Flags: [ SHF_MERGE, SHF_STRINGS ] + AddressAlign: 0x0000000000000001 + Content: 000000000000000000000000000000000000000000000000000000000000000000000000002E0066696C65312E637070006465636C732E680066696C65322E63707000 diff --git a/lldb/lit/Breakpoint/case-insensitive.test b/lldb/lit/Breakpoint/case-insensitive.test new file mode 100644 index 00000000000..f6330b5f432 --- /dev/null +++ b/lldb/lit/Breakpoint/case-insensitive.test @@ -0,0 +1,44 @@ +# REQUIRES: system-windows + +# RUN: %build %p/Inputs/case-sensitive.c --nodefaultlib -o %t +# RUN: lldb-test breakpoints %t %s | FileCheck %s + +breakpoint set -f case-sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f case-sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f %p/Inputs/case-sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f {{.*}}/Inputs/case-sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f %p/INPUTS/case-sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/case-sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f Case-Sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f Case-Sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f %p/INPUTS/Case-Sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/Case-Sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f case-sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f case-sensitive.c -p REGEX-THIS +# CHECK: At least one location. + +breakpoint set -f %p/Inputs/case-sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f {{.*}}/Inputs/case-sensitive.c -p REGEX-THIS +# CHECK: At least one location. + +breakpoint set -f %p/INPUTS/case-sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/case-sensitive.c -p REGEX-THIS +# CHECK: At least one location. + +breakpoint set -f Case-Sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f Case-Sensitive.c -p REGEX-THIS +# CHECK: At least one location. + +breakpoint set -f %p/INPUTS/Case-Sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/Case-Sensitive.c -p REGEX-THIS +# CHECK: At least one location. diff --git a/lldb/lit/Breakpoint/case-sensitive.test b/lldb/lit/Breakpoint/case-sensitive.test new file mode 100644 index 00000000000..bab66282cde --- /dev/null +++ b/lldb/lit/Breakpoint/case-sensitive.test @@ -0,0 +1,46 @@ +# UNSUPPORTED: system-windows +# +# RUN: %build %p/Inputs/case-sensitive.c --nodefaultlib -o %t +# RUN: lldb-test breakpoints %t %s | FileCheck %s + +breakpoint set -f case-sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f case-sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f %p/Inputs/case-sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f {{.*}}/Inputs/case-sensitive.c -l 3 +# CHECK: At least one location. + +breakpoint set -f %p/INPUTS/case-sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/case-sensitive.c -l 3 +# CHECK: 0 locations. + +breakpoint set -f Case-Sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f Case-Sensitive.c -l 3 +# CHECK: 0 locations. + +breakpoint set -f %p/INPUTS/Case-Sensitive.c -l 3 +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/Case-Sensitive.c -l 3 +# CHECK: 0 locations. + +breakpoint set -f case-sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f case-sensitive.c -p REGEX-THIS +# CHECK: At least one location. + +breakpoint set -f %p/Inputs/case-sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f {{.*}}/Inputs/case-sensitive.c -p REGEX-THIS +# CHECK: At least one location. + +breakpoint set -f %p/INPUTS/case-sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/case-sensitive.c -p REGEX-THIS +# CHECK: 0 locations. + +breakpoint set -f Case-Sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f Case-Sensitive.c -p REGEX-THIS +# CHECK: 0 locations. + +breakpoint set -f %p/INPUTS/Case-Sensitive.c -p REGEX-THIS +# CHECK-LABEL: breakpoint set -f {{.*}}/INPUTS/Case-Sensitive.c -p REGEX-THIS +# CHECK: 0 locations. + + diff --git a/lldb/lit/Breakpoint/debug_addrx.test b/lldb/lit/Breakpoint/debug_addrx.test new file mode 100644 index 00000000000..d5813cb9668 --- /dev/null +++ b/lldb/lit/Breakpoint/debug_addrx.test @@ -0,0 +1,30 @@ +# RUN: yaml2obj %p/Inputs/debug_addrx.yaml > %ttest +# RUN: lldb-test breakpoints %ttest %s | FileCheck %s + +# The following code and invocation were used. +# clang -gdwarf-5 test.cc -o test_v5 -fuse-ld=lld -fno-rtti -O2 -ffunction-sections +# Then output was converted to yaml and reduced. +# +# struct A { +# void foo() {}; +# }; +# +# void bar(struct A a) { +# a.foo(); +# } +# +# int main() { +# A objA; +# bar(objA); +# +# return 0; +# } +# +# clang and LLD versions were 8.0.0 (trunk 344834) +# +# Output file contains DW_FORM_addrx forms. + +b bar + +# CHECK-LABEL: b bar +# CHECK: Address: {{.*}}`bar(A) at test.cc:15:1 diff --git a/lldb/lit/Breakpoint/debug_rnglist_basic.test b/lldb/lit/Breakpoint/debug_rnglist_basic.test new file mode 100644 index 00000000000..268e4a0ed30 --- /dev/null +++ b/lldb/lit/Breakpoint/debug_rnglist_basic.test @@ -0,0 +1,30 @@ +# RUN: yaml2obj %p/Inputs/debug_rnglist_basic.yaml > %ttest +# RUN: lldb-test breakpoints %ttest %s | FileCheck %s + +# The following code and invocation were used to produce yaml file, +# which was manually reduced after that. +# clang -O0 -gdwarf-5 test.cpp -o test -fuse-ld=lld -ffunction-sections +# +# //test.cpp: +# int zed() { +# return 1; +# } +# +# int main() { +# return zed(); +# } +# +# clang and LLD versions were 8.0.0 (trunk 343487) +# +# Output file contains .debug_rnglists section with basic entries: +# DW_RLE_start_length and DW_RLE_end_of_list. +# If LLDB would not be able to parse the section and entries correctly, +# then reported location would be incorrect. + +b main +# CHECK-LABEL: b main +# CHECK: Address: {{.*}}`main + 15 at test.cpp:6:9 + +b zed +# CHECK-LABEL: b zed +# CHECK: Address: {{.*}}`zed() + 4 at test.cpp:2:2 diff --git a/lldb/lit/Breakpoint/debug_rnglist_offset_pair.test b/lldb/lit/Breakpoint/debug_rnglist_offset_pair.test new file mode 100644 index 00000000000..8edf3ee4f00 --- /dev/null +++ b/lldb/lit/Breakpoint/debug_rnglist_offset_pair.test @@ -0,0 +1,33 @@ +# RUN: yaml2obj %p/Inputs/debug_rnglist_offset_pair.yaml > %ttest +# RUN: lldb-test breakpoints %ttest %s | FileCheck %s + +# The following code and invocation were used to produce asm file, +# which was manually edited to add DW_RLE_base_address entry. +# clang -S -g -gdwarf-5 -O1 test.cpp -o test.s +# Then it was compiled and converted to yaml. +# +# int C = 0; +# void foo(int P) +# { +# for (int I = 0; I < 2; ++I) { +# int *W = &C; +# *W &= P; +# } +# } +# +# int main () +# { +# foo (1); +# return 0; +# } +# +# clang and LLD versions were 8.0.0 (trunk 344035) +# +# Output file contains .debug_rnglists section with entries: +# DW_RLE_offset_pair and DW_RLE_base_address. + +b foo +# CHECK-LABEL: b foo +# CHECK: Address: {{.*}}`foo(int) + 5 at test.cpp:8:8 + + diff --git a/lldb/lit/Breakpoint/debug_rnglist_rlestartend.test b/lldb/lit/Breakpoint/debug_rnglist_rlestartend.test new file mode 100644 index 00000000000..9c8beb82c52 --- /dev/null +++ b/lldb/lit/Breakpoint/debug_rnglist_rlestartend.test @@ -0,0 +1,28 @@ +# RUN: yaml2obj %p/Inputs/debug_rnglist_rlestartend.yaml > %ttest +# RUN: lldb-test breakpoints %ttest %s | FileCheck %s + +# Test shows that LDLB is able to handle DW_RLE_start_end entries properly. + +# The following code and invocation were used to produce asm file. +# clang -O0 -gdwarf-5 test.cpp -S -o test.s -fuse-ld=lld -ffunction-sections +# It was edited to use DW_RLE_start_end, compiled and converted to yaml. +# The yaml was manually reduced. +# +# //test.cpp: +# int zed() { +# return 1; +# } +# +# int main() { +# return zed(); +# } +# +# clang and LLD versions were 8.0.0 (trunk 344035) + +b main +# CHECK-LABEL: b main +# CHECK: Address: {{.*}}`main + 15 at test.cpp:6:10 + +b zed +# CHECK-LABEL: b zed +# CHECK: Address: {{.*}}`zed() + 4 at test.cpp:2:3 diff --git a/lldb/lit/Breakpoint/debug_rnglistx_rlex.test b/lldb/lit/Breakpoint/debug_rnglistx_rlex.test new file mode 100644 index 00000000000..79a80479e72 --- /dev/null +++ b/lldb/lit/Breakpoint/debug_rnglistx_rlex.test @@ -0,0 +1,28 @@ +# RUN: yaml2obj %p/Inputs/debug_rnglistx_rlex.yaml > %ttest +# RUN: lldb-test breakpoints %ttest %s | FileCheck %s + +# The following code and invocation were used. +# clang -gdwarf-5 test.cc -o test_v5 -fuse-ld=lld -fno-rtti -O2 -ffunction-sections +# Then output was converted to yaml and reduced. +# +# int bar(int x) { +# return ++x; +# } +# +# int main() { +# int y = 1; +# return bar(y); +# } +# +# clang and LLD versions were 8.0.0 (trunk 345699) +# +# Output file contains DW_FORM_rnglistx and DW_RLE_startx_length. + +b bar +b main + +# CHECK-LABEL: b bar +# CHECK: Address: {{.*}}`bar(int) at test.cc:4:11 + +# CHECK-LABEL: b main +# CHECK: Address: {{.*}}`main at test.cc:9:3 diff --git a/lldb/lit/Breakpoint/implicit_const_form_support.test b/lldb/lit/Breakpoint/implicit_const_form_support.test new file mode 100644 index 00000000000..183181d2f30 --- /dev/null +++ b/lldb/lit/Breakpoint/implicit_const_form_support.test @@ -0,0 +1,33 @@ +# RUN: yaml2obj %p/Inputs/implicit_const_form_support.yaml > %ttest +# RUN: lldb-test breakpoints %ttest %s | FileCheck %s + +## The intention of the test is to check that DW_FORM_implicit_const +## is supported and handled properly. + +## About implicit_const_form_support.yaml: +## The following invocation and code were used to produce the binary +## which was converted to yaml and reduced: +## gcc version 8.0.1 20180319 (experimental) (GCC) +## +## g++ test.cpp -g -gdwarf-5 -o test +## +## // test.cpp +## int foo1() { +## return 0; +## } +## +## int foo2() { +## return 0; +## } +## +## int main() { +## return foo1() + foo2(); +## } + +b foo1 +# CHECK-LABEL: b foo1 +# CHECK: Address: {{.*}}foo1() at test.cpp:2:9 + +b foo2 +# CHECK-LABEL: b foo2 +# CHECK: Address: {{.*}}foo2() at test.cpp:6:9 diff --git a/lldb/lit/Breakpoint/jitbp_elf.test b/lldb/lit/Breakpoint/jitbp_elf.test new file mode 100644 index 00000000000..1dc5fa97005 --- /dev/null +++ b/lldb/lit/Breakpoint/jitbp_elf.test @@ -0,0 +1,11 @@ +# REQUIRES: target-x86_64 +# XFAIL: system-windows + +# RUN: %clang -g -S -emit-llvm --target=x86_64-unknown-unknown-elf -o %t.ll %p/Inputs/jitbp.cpp +# RUN: %lldb -b -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b jitbp' -o 'run -jit-kind=mcjit %t.ll' lli | FileCheck %s + +# CHECK: Breakpoint 1: no locations (pending). +# CHECK: (lldb) run -jit-kind=mcjit {{.*}}/jitbp_elf.test.tmp.ll +# CHECK: Process {{.*}} stopped +# CHECK: JIT(0x{{.*}})`jitbp: +# CHECK: Process {{.*}} launched: {{.*}} diff --git a/lldb/lit/Breakpoint/ppc64-localentry.test b/lldb/lit/Breakpoint/ppc64-localentry.test new file mode 100644 index 00000000000..16cce703045 --- /dev/null +++ b/lldb/lit/Breakpoint/ppc64-localentry.test @@ -0,0 +1,12 @@ +# REQUIRES: powerpc +# +# RUN: llvm-mc -triple=powerpc64le -filetype=obj %p/Inputs/ppc64-localentry.s -o %t +# RUN: lldb-test breakpoints %t %s | FileCheck %s + +breakpoint set -n lfunc +# CHECK-LABEL: breakpoint set -n lfunc +# CHECK: Address: {{.*}}`lfunc + 8 + +breakpoint set -n simple +# CHECK-LABEL: breakpoint set -n simple +# CHECK: Address: {{.*}}`simple diff --git a/lldb/lit/Breakpoint/single-file-split-dwarf.test b/lldb/lit/Breakpoint/single-file-split-dwarf.test new file mode 100644 index 00000000000..d0cc003bf21 --- /dev/null +++ b/lldb/lit/Breakpoint/single-file-split-dwarf.test @@ -0,0 +1,44 @@ +# RUN: rm -rf %t.dir +# RUN: mkdir %t.dir +# RUN: cd %t.dir +# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.yaml > %t.dir/test +# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.o.yaml > %t.dir/test.o +# RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s + +# This test checks that source code location is shown correctly +# when single split file debug information is used (when .dwo sections are in .o files). +# +# single-file-split-dwarf.yaml and single-file-split-dwarf.o.yaml are +# reduced yaml files produces from the object file and the corresponding executable. +# +# The following code was used initially: +# int main() { +# return 0; +# } +# +# void foo() { +# } +# +# Invocation used to produce .o file was: +# clang test.cpp -gdwarf-5 -gsplit-dwarf=single -c -o test.o -v +# +# The full invocation used to produce the executable was: +# "/usr/local/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker +# /lib64/ld-linux-x86-64.so.2 -o test /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crt1.o +# /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/7.3.0/crtbegin.o +# -L/usr/lib/gcc/x86_64-linux-gnu/7.3.0 -L/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu +# -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../.. +# -L/home/umb/LLVM/build/bin/../lib -L/lib -L/usr/lib test.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc +# --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/7.3.0/crtend.o +# /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crtn.o +# +# Also, the DW_AT_comp_dir string value set to empty in yaml produced. +# Build bots had different path there and failed to find object. + +b main +# CHECK-LABEL: b main +# CHECK: Address: {{.*}}main + 13 at test.cpp:2:3 + +b foo +# CHECK-LABEL: b foo +# CHECK: Address: {{.*}}foo() + 4 at test.cpp:6:1 diff --git a/lldb/lit/Breakpoint/split-dwarf-5-addrbase.test b/lldb/lit/Breakpoint/split-dwarf-5-addrbase.test new file mode 100644 index 00000000000..72a717d609d --- /dev/null +++ b/lldb/lit/Breakpoint/split-dwarf-5-addrbase.test @@ -0,0 +1,30 @@ +# RUN: rm -rf %t.dir +# RUN: mkdir %t.dir +# RUN: cd %t.dir +# RUN: yaml2obj %p/Inputs/split-dwarf-5-addrbase.dwo.yaml > %t.dir/test.dwo +# RUN: yaml2obj %p/Inputs/split-dwarf-5-addrbase.yaml > %t.dir/test +# RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s + +# This test checks that source code location is shown correctly +# when -gsplit-dwarf and DWARF 5 are used. +# +# split-dwarf-5-addrbase.dwo.yaml and split-dwarf-5-addrbase.yamlare +# reduced yaml files produces from the dwo file and the corresponding executable. +# +# The following code was used initially: +# void baz() { +# } +# +# int main() { +# baz(); +# return 0; +# } +# +# Invocation used to produce outputs was: +# clang test.cc -g -fno-rtti -c -gdwarf-5 -gsplit-dwarf +# clang test.o -g -fno-rtti -gdwarf-5 -o test -gsplit-dwarf +# clang version 8.0.0 (trunk 347299) + +b baz +# CHECK-LABEL: b baz +# CHECK: Address: {{.*}}baz() + 4 at test.cc:2:1 diff --git a/lldb/lit/Breakpoint/split-dwarf5-debug-stroffsets.test b/lldb/lit/Breakpoint/split-dwarf5-debug-stroffsets.test new file mode 100644 index 00000000000..c1418ebb0d5 --- /dev/null +++ b/lldb/lit/Breakpoint/split-dwarf5-debug-stroffsets.test @@ -0,0 +1,84 @@ +# RUN: rm -rf %t.dir +# RUN: mkdir %t.dir +# RUN: cd %t.dir +# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml > %t.dir/file1.dwo +# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml > %t.dir/file2.dwo +# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-main.yaml > %t.dir/test +# RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s + +# This test checks that source code location is shown correctly +# when split DWARF 5 is used and both DWO/executable file contains +# .debug_str_offsets/.debug_str_offsets.dwo sections. +# Used clang version 8.0.0 (trunk 347299) +# +# split-dwarf5-debug-stroffsets-file1.dwo.yaml, split-dwarf5-debug-stroffsets-file2.dwo.yaml +# and split-dwarf5-debug-stroffsets-main.yaml are reduced yaml files produces +# from the DWO files and the corresponding executable. +# +# Code: +# // decl.h +# struct struct1 { +# ~struct1(); +# static void f(); +# }; +# +# struct struct2 { +# ~struct2(); +# static void f(); +# }; +# +# int g(); +# +# // file1.cpp +# #include "decls.h" +# +# int g() { +# return 1; +# } +# +# struct1::~struct1() { +# int x = g(); +# } +# +# void struct1::f() {} +# +# float test() { +# return 0.0f; +# } +# +# int main() { +# struct1::f(); +# struct2::f(); +# +# struct1 s1; +# struct2 s2; +# +# test(); +# +# return 0; +# } +# +# // file2.cpp +# +# +# #include "decls.h" +# +# struct2::~struct2() { +# int x = g(); +# } +# +# void struct2::f() {} +# +# +# Invocation used was: +# clang++ file1.cpp -o file1.o -g -fno-rtti -c -gdwarf-5 -gsplit-dwarf -ffunction-sections +# clang++ file2.cpp -o file2.o -g -fno-rtti -c -gdwarf-5 -gsplit-dwarf -ffunction-sections +# clang++ file1.o file2.o -g -fno-rtti -gdwarf-5 -o test -gsplit-dwarf -ffunction-sections + +b struct1::f +# CHECK-LABEL: b struct1::f +# CHECK: Address: {{.*}}struct1::f() + 4 at file1.cpp:11:20 + +b struct2::f +# CHECK-LABEL: b struct2::f +# CHECK: Address: {{.*}}struct2::f() + 4 at file2.cpp:7:20 |