Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2021-02

[Dwarf AVR] DIE refers to abbreviation number which does not exist

8 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

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.

( 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
   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     (DW_OP_constu: 0; (Unknown location op 0x0))
    <119b>   DW_AT_type        : <0x6c05000b>  <1><119f>: Abbrev Number: 17
Contents of the .debug_abbrev section:

  Number TAG (0x0)
   1      DW_TAG_compile_unit    [has children]     DW_AT_name         DW_FORM_string
    DW_AT_producer     DW_FORM_string

< a lot more after >

-------------------------------------------------------------

==========CODE=========

program dwarf_DIE_ABBREV_Bug;
uses
   dwarf_DIE_ABBREV_Bug_used_unit;
var
   aArray: tmpArray;
begin
end.

==========CODE=========

==========CODE=========

unit dwarf_DIE_ABBREV_Bug_used_unit;
interface
type
   tmpArray = array[0..1] of word;
implementation
end.

==========CODE=========

Compiled with : ppcrossavr.exe -MObjFPC -Tembedded -Pavr -CpAVR5 -WpATMEGA328p -Xm -gw2 -O1 dwarf_DIE_ABBREV_Bug.pas

I'm using fpc trunk on Windows 10 :

"Free Pascal Compiler version 3.3.1

Compiler date      : 2021/02/03
Compiler CPU target: avr"

regards,

Dimitrios Chr. Ioannidis

Reply by email

Florian Klämpfl
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 17 lines
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.

Show quoted text 24 lines
( 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.

Show quoted text 22 lines
   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

Reply by email

Dimitrios Chr. Ioannidis
to Florian Klämpfl

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 >

Show quoted text 26 lines
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

Reply by email

Dimitrios Chr. Ioannidis
to Dimitrios Chr. Ioannidis

Hi,

  I made some more tests, and it seems that there is a problem with the array types, used in other units where they are defined.

  I don't know if it helps but, if I define an array type on unit B, which a unit A uses it, and the unit B has a procedure / function which is called from the unit B, then the warning / error goes away ( at least I don't get that warning / error ).

  i.e. the following doesn't produce the dwarf warning / error, using the FPC's cross tools :

==========CODE=========
program dwarf_DIE_ABBREV_Bug;
uses
   dwarf_DIE_ABBREV_Bug_used_unit;
var
   aArray: tmpArray;
begin
   dummy;
end.
==========CODE=========

==========CODE=========

unit dwarf_DIE_ABBREV_Bug_used_unit;
interface
type
   tmpArray = array[0..1] of word;
   procedure dummy;
implementation
procedure dummy;
begin
end;
end.
==========CODE=========

Build with : ppcrossavr.exe -MObjFPC -Tembedded -Pavr -CpAVR5 -WpATMEGA328p -al -Xm -gw2 -O1 dwarf_DIE_ABBREV_Bug.pas

FPC version:

Free Pascal Compiler version 3.3.1

Compiler date      : 2021/02/04
Compiler CPU target: avr

Supported targets (targets marked with '{*}' are under development):   embedded: Embedded

OS: Windows 10 64bit

regards,

Dimitrios Chr. Ioannidis

Reply by email

Dimitrios Chr. Ioannidis
to Florian Klämpfl: Maybe our cross tools have a bug. I am using 2.36 on linux and it works here. This is…

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.

< snip >

as requested, attached you will find two zip files. The fpc_avr_dwarf_bug_dummy.zip file, has the results with the procedure added in Unit B and doesn't produce the dwarf warning / error and the fpc_avr_dwarf_bug.zip file has the results with the dwarf warning /error.

regards,

Dimitrios Chr. Ioannidis

Reply by email

Florian Klämpfl
to Dimitrios Chr. Ioannidis:   I made some more tests, and it seems that there is a problem with the array types,…
Dimitrios Chr. Ioannidis wrote 12 lines
Hi,   I made some more tests, and it seems that there is a problem with the array types, used in other units where they are defined.   I don't know if it helps but, if I define an array type on unit B, which a unit A uses it, and the unit B has a procedure / function which is called from the unit B, then the warning / error goes away ( at least I don't get that warning / error ).   i.e. the following doesn't produce the dwarf warning / error, using the FPC's cross tools :

I suspect it is binutils related. Maybe some of the windows users can build new avr-embedded binutils.

Reply by email

Dimitrios Chr. Ioannidis
to Florian Klämpfl

Hi,

Στις 7/2/2021 2:29 μ.μ., ο/η Florian Klämpfl via fpc-devel έγραψε:

Show quoted text 16 lines
Am 07.02.21 um 11:49 schrieb Dimitrios Chr. Ioannidis via fpc-devel: > Hi, > >    I made some more tests, and it seems that there is a problem with > the array types, used in other units where they are defined. > >    I don't know if it helps but, if I define an array type on unit B, > which a unit A uses it, and the unit B has a procedure / function > which is called from the unit B, then the warning / error goes away ( > at least I don't get that warning / error ). > >    i.e. the following doesn't produce the dwarf warning / error, > using the FPC's cross tools : I suspect it is binutils related. Maybe some of the windows users can build new avr-embedded binutils.

tried, a fairly recent, avr binutils 2.34 ( from
https://blog.zakkemble.net/avr-gcc-builds/ ) and the error is gone . Also I am able to debug some firmwares using Lazarus, avr-gdb-8.3 ( patched by Michael Ring ) and ATBackend simulator without a problem on Windows 10 64bit.

What is the "official" way to build FPC avr binutils for windows ? I searched a little but I couldn't find anything regarding this .

PS : The above binutils have avr-as version ( GNU assembler version 2.34 (avr) using BFD version (GNU Binutils) 2.34 ) and a avr-embedded-ld.bfd binary.

regards,

Dimitrios Chr. Ioannidis

Reply by email

Dimitrios Chr. Ioannidis
to Florian Klämpfl: I suspect it is binutils related. Maybe some of the windows users can build new…

Hi,

Στις 7/2/2021 2:29 μ.μ., ο/η Florian Klämpfl via fpc-devel έγραψε:

Show quoted text 16 lines
Am 07.02.21 um 11:49 schrieb Dimitrios Chr. Ioannidis via fpc-devel: > Hi, > >    I made some more tests, and it seems that there is a problem with > the array types, used in other units where they are defined. > >    I don't know if it helps but, if I define an array type on unit B, > which a unit A uses it, and the unit B has a procedure / function > which is called from the unit B, then the warning / error goes away ( > at least I don't get that warning / error ). > >    i.e. the following doesn't produce the dwarf warning / error, > using the FPC's cross tools : I suspect it is binutils related. Maybe some of the windows users can build new avr-embedded binutils.

Just noticed that you uploaded new avr-embedded binutils. Thx !

regards,

Dimitrios Chr. Ioannidis

Reply by email