[fpc-devel] [Dwarf AVR] DIE refers to abbreviation number which does not exist
Florian Klämpfl
florian at freepascal.org
Thu Feb 4 22:10:22 CET 2021
Am 04.02.21 um 00:28 schrieb Dimitrios Chr. Ioannidis via fpc-devel:
> Hi,
>
> in Windows which cross tools / toolchain for avr should I use ? FPC's
> avr-embedded-xxxx ( from
> https://svn.freepascal.org/svn/fpcbuild/binaries/i386-win32 ) or
> Microchip's AVR Toolchain for Windows (
> https://www.microchip.com/en-us/development-tools-tools-and-software/gcc-compilers-avr-and-arm
> ) ?
>
> AFAIK, the fpc's supplied avr cross ld, objdump, objcopy, etc version is
> "GNU ld (GNU Binutils) 2.30" and Microchip's version is
> "(AVR_8_bit_GNU_Toolchain_3.6.2_1778) 2.26.20160125" .
>
>
> I'm asking because with FPC's avr-embedded-xxxx cross tools, I get the
> following warning ( error ? ) but with Microchip's cross tools, the
> warning ( error ? ) is gone.
Maybe our cross tools have a bug. I am using 2.36 on linux and it works
here.
>
> ( test program at the end )
>
> "avr-embedded-objdump.exe: Warning: DIE at offset 0x119f refers to
> abbreviation number 17 which does not exist"
>
> and the output of avr-embedded-objdump.exe --dwarf
> dwarf_DIE_ABBREV_Bug.elf is :
>
> -------------------------------------------------------------
>
> < a lot more before >
>
> <1><1025>: Abbrev Number: 7 (DW_TAG_base_type)
> <1026> DW_AT_name : WORD
> <102b> DW_AT_encoding : 7 (unsigned)
> <102c> DW_AT_byte_size : 2
> <1><102d>: Abbrev Number: 8 (DW_TAG_reference_type)
> <102e> DW_AT_type : <0x101b>
> <1><1032>: Abbrev Number: 0
> Compilation Unit @ offset 0x1033:
> Length: 0x1e4 (32-bit)
> Version: 2
> Abbrev Offset: 0x0
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
More information about the fpc-devel
mailing list