[fpc-devel] [Dwarf AVR] DIE refers to abbreviation number which does not exist
Dimitrios Chr. Ioannidis
d.ioannidis at nephelae.eu
Fri Feb 5 07:43:02 CET 2021
Hi,
Στις 4/2/2021 11:10 μ.μ., ο/η Florian Klämpfl via fpc-devel έγραψε:
> Am 04.02.21 um 00:28 schrieb Dimitrios Chr. Ioannidis via fpc-devel:
< snip >
> This is most likely wrong. Can you please compile the unit with -al
> send the .s file? If it is too big, send it to me in private.
>
>> Pointer Size: 4
>> <0><103e>: Abbrev Number: 1 (DW_TAG_compile_unit)
>> <103f> DW_AT_name : dwarf_DIE_ABBREV_Bug_used_unit.pas
>> <1062> DW_AT_producer : Free Pascal 3.3.1 2021/02/03
>> <107f> DW_AT_comp_dir :
>> G:/Programming/dimitris/Projects/fpc_avr_dwarf_bug/
>> <10b3> DW_AT_language : 9 (ANSI Pascal)
>> <10b4> DW_AT_identifier_case: 3 (case_insensitive)
>> <10b5> DW_AT_stmt_list : 0x0
>> <10b9> DW_AT_low_pc : 0x0
>> <10bd> DW_AT_high_pc : 0x0
>> <1><10c1>: Abbrev Number: 2 (DW_TAG_variable)
>> <10c2> DW_AT_name : TMPARRAY
>> <10cb> DW_AT_location : 207 byte block: 10 0 0 3 54 4d 50
>> 41 52 52 41 59 0 4 2 e4 11 0 0 4 0 1 fb 11 0 0 0 5 c1 10 0 0 2 72 74
>> 74 69 64 65 66 24 52 54 54 49 5f 24 44 57 41 52 46 5f 44 49 45 5f 41
>> 42 42 52 45 56 5f 42 55 47 5f 55 53 45 44 5f 55 4e 49 54 5f 24 24 5f
>> 54 4d 50 41 52 52 41 59 0 2a 11 0 0 6 24 52 54 54 49 44 45 46 24 52
>> 54 54 49 5f 24 44 57 41 52 46 5f 44 49 45 5f 41 42 42 52 45 56 5f 42
>> 55 47 5f 55 53 45 44 5f 55 4e 49 54 5f 24 24 5f 54 4d 50 41 52 52 41
>> 59 0 15 0 5 ec 10 0 0 2 72 74 74 69 5f 6e 6f 72 6d 61 6c 5f 61 72 72
>> 61 79 24 31 0 85 11 0 0 6 24 52 54 54 49 5f 4e 4f 52 4d 41 4c 5f 41
>> 52 52 41 59 24 31 0
Compiled with : ppcrossavr.exe -MObjFPC -Tembedded -Pavr -CpAVR5
-WpATMEGA328p -al -Xm -gw2 -O1 dwarf_DIE_ABBREV_Bug.pas
dwarf_DIE_ABBREV_Bug.s
--------------------------------------------------------------------
.file "dwarf_DIE_ABBREV_Bug.pas"
# Begin asmlist al_begin
.section .debug_line
.Ldebug_linesection0:
.Ldebug_line0:
.section .debug_abbrev
.Ldebug_abbrevsection0:
.Ldebug_abbrev0:
.section .text.b_DEBUGSTART_sPsDWARF_DIE_ABBREV_BUG,"ax"
.globl DEBUGSTART_sPsDWARF_DIE_ABBREV_BUG
DEBUGSTART_sPsDWARF_DIE_ABBREV_BUG:
# End asmlist al_begin
# Begin asmlist al_procedures
.section .text.n_main,"ax"
.globl main
main:
.globl PASCALMAIN
PASCALMAIN:
.Ll1:
# [dwarf_DIE_ABBREV_Bug.pas]
# [9] begin
call FPC_INIT_FUNC_TABLE
.Ll2:
# [10] end.
call fpc_do_exit
.Lt1:
.Le0:
.size main, .Le0 - main
.Ll3:
.section .fpc.n_links,"aw"
.short DEBUGSTART_sPsDWARF_DIE_ABBREV_BUG
.short DEBUGEND_sPsDWARF_DIE_ABBREV_BUG
.short DEBUGSTART_sATMEGA328P
.short DEBUGEND_sATMEGA328P
.short DEBUGSTART_sDWARF_DIE_ABBREV_BUG_USED_UNIT
.short DEBUGEND_sDWARF_DIE_ABBREV_BUG_USED_UNIT
.section .text.n_FPC_INIT_FUNC_TABLE,"ax"
.globl FPC_INIT_FUNC_TABLE
FPC_INIT_FUNC_TABLE:
ret
.section .text.n_FPC_FINALIZE_FUNC_TABLE,"ax"
.globl FPC_FINALIZE_FUNC_TABLE
FPC_FINALIZE_FUNC_TABLE:
ret
# End asmlist al_procedures
# Begin asmlist al_globals
.section .bss.n_u_spsdwarf_die_abbrev_bug_ss_aarray,"aw",%nobits
# [7] aArray: tmpArray;
.size U_sPsDWARF_DIE_ABBREV_BUG_ss_AARRAY,4
U_sPsDWARF_DIE_ABBREV_BUG_ss_AARRAY:
.zero 4
.section .data.n_INITFINAL
.globl INITFINAL
INITFINAL:
.byte 0,0
.Le1:
.size INITFINAL, .Le1 - INITFINAL
.section .data.n_FPC_THREADVARTABLES
.globl FPC_THREADVARTABLES
FPC_THREADVARTABLES:
.long 0
.Le2:
.size FPC_THREADVARTABLES, .Le2 - FPC_THREADVARTABLES
.section .data.n_FPC_RESOURCESTRINGTABLES
.globl FPC_RESOURCESTRINGTABLES
FPC_RESOURCESTRINGTABLES:
.short 0
.Le3:
.size FPC_RESOURCESTRINGTABLES, .Le3 - FPC_RESOURCESTRINGTABLES
.section .data.n_FPC_WIDEINITTABLES
.globl FPC_WIDEINITTABLES
FPC_WIDEINITTABLES:
.short 0
.Le4:
.size FPC_WIDEINITTABLES, .Le4 - FPC_WIDEINITTABLES
.section .data.n_FPC_RESSTRINITTABLES
.globl FPC_RESSTRINITTABLES
FPC_RESSTRINITTABLES:
.short 0
.Le5:
.size FPC_RESSTRINITTABLES, .Le5 - FPC_RESSTRINITTABLES
.section .fpc.n_version,"aw"
__fpc_ident:
.ascii "FPC 3.3.1 [2021/02/04] for avr - embedded"
.Le6:
.size __fpc_ident, .Le6 - __fpc_ident
.section .data.n___stklen
.globl __stklen
__stklen:
.short 1024
.Le7:
.size __stklen, .Le7 - __stklen
.section .data.n___heapsize
.globl __heapsize
__heapsize:
.short 128
.Le8:
.size __heapsize, .Le8 - __heapsize
.section .bss.n___fpc_initialheap,"aw",%nobits
.globl __fpc_initialheap
.size __fpc_initialheap,128
__fpc_initialheap:
.zero 128
.section .data.n___fpc_valgrind
.globl __fpc_valgrind
__fpc_valgrind:
.byte 0
.Le9:
.size __fpc_valgrind, .Le9 - __fpc_valgrind
# End asmlist al_globals
# Begin asmlist al_dwarf_info
.section .debug_info
.Ldebug_info0:
.long .Ledebug_info0-.Lf2
.Lf2:
.short 2
.long .Ldebug_abbrev0
.byte 4
.uleb128 1
.ascii "dwarf_DIE_ABBREV_Bug.pas\000"
.ascii "Free Pascal 3.3.1 2021/02/04\000"
.ascii "G:/Programming/dimitris/Projects/fpc_avr_dwarf_bug/"
.ascii "\000"
.byte 9
.byte 3
.long .Ldebug_line0
.long DEBUGSTART_sPsDWARF_DIE_ABBREV_BUG
.long DEBUGEND_sPsDWARF_DIE_ABBREV_BUG
# Syms - Begin Staticsymtable
# Symbol SYSTEM
# Symbol OBJPAS
# Symbol ATMEGA328P
# Symbol DWARF_DIE_ABBREV_BUG_USED_UNIT
# Symbol DWARF_DIE_ABBREV_BUG
# Symbol main
# Symbol AARRAY
.uleb128 2
.ascii "AARRAY\000"
.byte 5
.byte 3
.long U_sPsDWARF_DIE_ABBREV_BUG_ss_AARRAY
.long DBG_sDWARF_DIE_ABBREV_BUG_USED_UNIT_ss_TMPARRAY
# Syms - End Staticsymtable
# Procdef $main; StdCall;
.uleb128 3
.ascii "main\000"
.byte 1
.byte 1
.long main
.long .Lt1
.byte 0
# Defs - Begin unit SYSTEM has index 1
# Defs - End unit SYSTEM has index 1
# Defs - Begin unit OBJPAS has index 2
# Defs - End unit OBJPAS has index 2
# Defs - Begin unit INTRINSICS has index 4
# Defs - End unit INTRINSICS has index 4
# Defs - Begin unit ATMEGA328P has index 3
# Defs - End unit ATMEGA328P has index 3
# Defs - Begin unit DWARF_DIE_ABBREV_BUG_USED_UNIT has index 5
# Defs - End unit DWARF_DIE_ABBREV_BUG_USED_UNIT has index 5
# Defs - Begin Staticsymtable
# Defs - End Staticsymtable
.byte 0
.Ledebug_info0:
# End asmlist al_dwarf_info
# Begin asmlist al_dwarf_abbrev
.section .debug_abbrev
# Abbrev 1
.uleb128 1
.uleb128 17
.byte 1
.uleb128 3
.uleb128 8
.uleb128 37
.uleb128 8
.uleb128 27
.uleb128 8
.uleb128 19
.uleb128 11
.uleb128 66
.uleb128 11
.uleb128 16
.uleb128 6
.uleb128 17
.uleb128 1
.uleb128 18
.uleb128 1
.byte 0
.byte 0
# Abbrev 2
.uleb128 2
.uleb128 52
.byte 0
.uleb128 3
.uleb128 8
.uleb128 2
.uleb128 10
.uleb128 73
.uleb128 16
.byte 0
.byte 0
# Abbrev 3
.uleb128 3
.uleb128 46
.byte 1
.uleb128 3
.uleb128 8
.uleb128 39
.uleb128 12
.uleb128 63
.uleb128 12
.uleb128 17
.uleb128 1
.uleb128 18
.uleb128 1
.byte 0
.byte 0
.byte 0
# End asmlist al_dwarf_abbrev
# Begin asmlist al_dwarf_line
.section .debug_line
# === header start ===
.long .Ledebug_line0-.Lf3
.Lf3:
.short 2
.long .Lehdebug_line0-.Lf4
.Lf4:
.byte 1
.byte 1
.byte 1
.byte 255
.byte 13
.byte 0
.byte 1
.byte 1
.byte 1
.byte 1
.byte 0
.byte 0
.byte 0
.byte 1
.byte 0
.byte 0
.byte 1
# include_directories
.byte 0
# file_names
.ascii "dwarf_DIE_ABBREV_Bug.pas\000"
.uleb128 0
.uleb128 0
.uleb128 0
.byte 0
.Lehdebug_line0:
# === header end ===
# function: main
# function: PASCALMAIN
# [9:1]
.byte 0
.uleb128 5
.byte 2
.long .Ll1
.byte 5
.uleb128 1
.byte 20
# [10:1]
.byte 2
.uleb128 .Ll2-.Ll1
.byte 13
.byte 0
.uleb128 5
.byte 2
.long .Ll3
.byte 0
.byte 1
.byte 1
# ###################
.Ledebug_line0:
# End asmlist al_dwarf_line
# Begin asmlist al_dwarf_aranges
.section .debug_aranges
.long .Learanges0-.Lf1
.Lf1:
.short 2
.long .Ldebug_info0
.byte 4
.byte 0
.long 0
.long main
.long .Lt1-main
.byte 0
.byte 0
.Learanges0:
# End asmlist al_dwarf_aranges
# Begin asmlist al_dwarf_ranges
.section .debug_ranges
# End asmlist al_dwarf_ranges
# Begin asmlist al_end
.section .text.z_DEBUGEND_sPsDWARF_DIE_ABBREV_BUG,"ax"
.globl DEBUGEND_sPsDWARF_DIE_ABBREV_BUG
DEBUGEND_sPsDWARF_DIE_ABBREV_BUG:
# End asmlist al_end
--------------------------------------------------------------------
regards,
--
Dimitrios Chr. Ioannidis
More information about the fpc-devel
mailing list