compuphase / Black-Magic-Probe-Book

A guide plus associated utilities for the Black Magic Probe.
Apache License 2.0
147 stars 26 forks source link

Crash: bmdebug: dwarf.c:1287: dwarf_linetable: Assertion `prologue.version<5' failed. #45

Closed retif closed 4 months ago

retif commented 4 months ago
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ./bmdebug ~/projects/orbmule/examples/simple/ofiles/simple.elf 
bmdebug: dwarf.c:1287: dwarf_linetable: Assertion `prologue.version<5' failed.
Aborted (core dumped)
$ readelf --debug-dump=info ~/projects/orbmule/examples/simple/ofiles/simple.elf 
Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x335 (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0x0
   Pointer Size:  4
 <0><c>: Abbrev Number: 10 (DW_TAG_compile_unit)
    <d>   DW_AT_producer    : (indirect string, offset: 0x1938): GNU C99 13.2.1 20231009 -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -march=armv7e-m+fp -g3 -gdwarf-5 -ggdb -Og -std=gnu99 -ffunction-sections -fdata-sections -fmerge-constants -fno-common -ffreestanding -fno-builtin -fstack-usage
    <11>   DW_AT_language    : 12   (ANSI C99)
    <12>   DW_AT_name        : (indirect string, offset: 0x11cd): src/itm_messages.c
    <16>   DW_AT_comp_dir    : (indirect string, offset: 0x2b15): /home/oleks/projects/orbmule/examples/simple
    <1a>   DW_AT_ranges      : 0xc
    <1e>   DW_AT_low_pc      : 0x0
    <22>   DW_AT_stmt_list   : 0x0
    <26>   DW_AT_macros      : 0x0
 <1><2a>: Abbrev Number: 2 (DW_TAG_base_type)
    <2b>   DW_AT_byte_size   : 8
    <2c>   DW_AT_encoding    : 7    (unsigned)
    <2d>   DW_AT_name        : (indirect string, offset: 0x346e): long long unsigned int
 <1><31>: Abbrev Number: 2 (DW_TAG_base_type)
    <32>   DW_AT_byte_size   : 4
    <33>   DW_AT_encoding    : 7    (unsigned)
    <34>   DW_AT_name        : (indirect string, offset: 0x313d): unsigned int
 <1><38>: Abbrev Number: 2 (DW_TAG_base_type)
    <39>   DW_AT_byte_size   : 1
    <3a>   DW_AT_encoding    : 8    (unsigned char)
    <3b>   DW_AT_name        : (indirect string, offset: 0x2aea): unsigned char
 <1><3f>: Abbrev Number: 2 (DW_TAG_base_type)
    <40>   DW_AT_byte_size   : 2
    <41>   DW_AT_encoding    : 7    (unsigned)
    <42>   DW_AT_name        : (indirect string, offset: 0x474): short unsigned int
 <1><46>: Abbrev Number: 2 (DW_TAG_base_type)
    <47>   DW_AT_byte_size   : 1
    <48>   DW_AT_encoding    : 6    (signed char)
    <49>   DW_AT_name        : (indirect string, offset: 0x2966): signed char
 <1><4d>: Abbrev Number: 2 (DW_TAG_base_type)
    <4e>   DW_AT_byte_size   : 2
    <4f>   DW_AT_encoding    : 5    (signed)
    <50>   DW_AT_name        : (indirect string, offset: 0x61f): short int
 <1><54>: Abbrev Number: 2 (DW_TAG_base_type)
    <55>   DW_AT_byte_size   : 4
    <56>   DW_AT_encoding    : 5    (signed)
    <57>   DW_AT_name        : (indirect string, offset: 0x27c8): long int
 <1><5b>: Abbrev Number: 2 (DW_TAG_base_type)
    <5c>   DW_AT_byte_size   : 8
    <5d>   DW_AT_encoding    : 5    (signed)
    <5e>   DW_AT_name        : (indirect string, offset: 0x15fa): long long int
 <1><62>: Abbrev Number: 6 (DW_TAG_typedef)
    <63>   DW_AT_name        : (indirect string, offset: 0x1ae5): uint8_t
    <67>   DW_AT_decl_file   : 2
    <67>   DW_AT_decl_line   : 46
    <68>   DW_AT_decl_column : 24
    <69>   DW_AT_type        : <0x38>
 <1><6d>: Abbrev Number: 6 (DW_TAG_typedef)
    <6e>   DW_AT_name        : (indirect string, offset: 0x24ae): uint16_t
    <72>   DW_AT_decl_file   : 2
    <72>   DW_AT_decl_line   : 49
    <73>   DW_AT_decl_column : 25
    <74>   DW_AT_type        : <0x3f>
 <1><78>: Abbrev Number: 6 (DW_TAG_typedef)
    <79>   DW_AT_name        : (indirect string, offset: 0xad7): uint32_t
    <7d>   DW_AT_decl_file   : 2
    <7d>   DW_AT_decl_line   : 52
    <7e>   DW_AT_decl_column : 25
    <7f>   DW_AT_type        : <0x83>
 <1><83>: Abbrev Number: 2 (DW_TAG_base_type)
    <84>   DW_AT_byte_size   : 4
    <85>   DW_AT_encoding    : 7    (unsigned)
    <86>   DW_AT_name        : (indirect string, offset: 0x247c): long unsigned int
 <1><8a>: Abbrev Number: 11 (DW_TAG_base_type)
    <8b>   DW_AT_byte_size   : 4
    <8c>   DW_AT_encoding    : 5    (signed)
    <8d>   DW_AT_name        : int
 <1><91>: Abbrev Number: 4 (DW_TAG_subprogram)
    <92>   DW_AT_external    : 1
    <92>   DW_AT_name        : (indirect string, offset: 0x37b2): ITM_ChannelEnabled
    <96>   DW_AT_decl_file   : 1
    <96>   DW_AT_decl_line   : 97
    <97>   DW_AT_decl_column : 6
    <98>   DW_AT_prototyped  : 1
    <98>   DW_AT_type        : <0xbd>
    <9c>   DW_AT_low_pc      : 0x80004e6
    <a0>   DW_AT_high_pc     : 0x16
    <a4>   DW_AT_frame_base  : 1 byte block: 9c     (DW_OP_call_frame_cfa)
    <a6>   DW_AT_call_all_calls: 1
    <a6>   DW_AT_sibling     : <0xbd>
 <2><aa>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <ab>   DW_AT_name        : ch
    <ae>   DW_AT_decl_file   : 1
    <ae>   DW_AT_decl_line   : 97
    <af>   DW_AT_decl_column : 34
    <b0>   DW_AT_type        : <0x78>
    <b4>   DW_AT_location    : 0x10 (location list)
    <b8>   DW_AT_GNU_locviews: 0xc
 <2><bc>: Abbrev Number: 0
 <1><bd>: Abbrev Number: 2 (DW_TAG_base_type)
    <be>   DW_AT_byte_size   : 1
    <bf>   DW_AT_encoding    : 2    (boolean)
    <c0>   DW_AT_name        : (indirect string, offset: 0xb1a): _Bool
 <1><c4>: Abbrev Number: 7 (DW_TAG_subprogram)
    <c5>   DW_AT_external    : 1
    <c5>   DW_AT_name        : (indirect string, offset: 0x371c): ITM_ChannelDisable
    <c9>   DW_AT_decl_file   : 1
    <c9>   DW_AT_decl_line   : 91
    <ca>   DW_AT_decl_column : 6
    <ca>   DW_AT_prototyped  : 1
    <ca>   DW_AT_low_pc      : 0x0
    <ce>   DW_AT_high_pc     : 0x16
    <d2>   DW_AT_frame_base  : 1 byte block: 9c     (DW_OP_call_frame_cfa)
    <d4>   DW_AT_call_all_calls: 1
    <d4>   DW_AT_sibling     : <0xe5>
 <2><d8>: Abbrev Number: 8 (DW_TAG_formal_parameter)
    <d9>   DW_AT_name        : ch
    <dc>   DW_AT_decl_file   : 1
    <dc>   DW_AT_decl_line   : 91
    <dd>   DW_AT_decl_column : 34
    <de>   DW_AT_type        : <0x78>
    <e2>   DW_AT_location    : 1 byte block: 50     (DW_OP_reg0 (r0))
 <2><e4>: Abbrev Number: 0
 <1><e5>: Abbrev Number: 7 (DW_TAG_subprogram)
    <e6>   DW_AT_external    : 1
    <e6>   DW_AT_name        : (indirect string, offset: 0x1792): ITM_ChannelEnable
    <ea>   DW_AT_decl_file   : 1
    <ea>   DW_AT_decl_line   : 85
    <eb>   DW_AT_decl_column : 6
    <eb>   DW_AT_prototyped  : 1
    <eb>   DW_AT_low_pc      : 0x80004d2
    <ef>   DW_AT_high_pc     : 0x14
    <f3>   DW_AT_frame_base  : 1 byte block: 9c     (DW_OP_call_frame_cfa)
    <f5>   DW_AT_call_all_calls: 1
    <f5>   DW_AT_sibling     : <0x106>
 <2><f9>: Abbrev Number: 8 (DW_TAG_formal_parameter)
    <fa>   DW_AT_name        : ch
    <fd>   DW_AT_decl_file   : 1
    <fd>   DW_AT_decl_line   : 85
    <fe>   DW_AT_decl_column : 33
    <ff>   DW_AT_type        : <0x78>
    <103>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
 <2><105>: Abbrev Number: 0
 <1><106>: Abbrev Number: 9 (DW_TAG_subprogram)
    <107>   DW_AT_external    : 1
    <107>   DW_AT_name        : (indirect string, offset: 0x8f0): ITM_Disable
    <10b>   DW_AT_decl_file   : 1
    <10b>   DW_AT_decl_line   : 79
    <10c>   DW_AT_decl_column : 6
    <10c>   DW_AT_prototyped  : 1
    <10c>   DW_AT_low_pc      : 0x0
    <110>   DW_AT_high_pc     : 0x12
    <114>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <116>   DW_AT_call_all_calls: 1
 <1><116>: Abbrev Number: 9 (DW_TAG_subprogram)
    <117>   DW_AT_external    : 1
    <117>   DW_AT_name        : (indirect string, offset: 0x31f7): ITM_Enable
    <11b>   DW_AT_decl_file   : 1
    <11b>   DW_AT_decl_line   : 73
    <11c>   DW_AT_decl_column : 6
    <11c>   DW_AT_prototyped  : 1
    <11c>   DW_AT_low_pc      : 0x80004c0
    <120>   DW_AT_high_pc     : 0x12
    <124>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <126>   DW_AT_call_all_calls: 1
 <1><126>: Abbrev Number: 4 (DW_TAG_subprogram)
    <127>   DW_AT_external    : 1
    <127>   DW_AT_name        : (indirect string, offset: 0x1de): ITM_SendString
    <12b>   DW_AT_decl_file   : 1
    <12b>   DW_AT_decl_line   : 57
    <12c>   DW_AT_decl_column : 10
    <12d>   DW_AT_prototyped  : 1
    <12d>   DW_AT_type        : <0x78>
    <131>   DW_AT_low_pc      : 0x8000566
    <135>   DW_AT_high_pc     : 0x32
    <139>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <13b>   DW_AT_call_all_calls: 1
    <13b>   DW_AT_sibling     : <0x19e>
 <2><13f>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <140>   DW_AT_name        : c
    <142>   DW_AT_decl_file   : 1
    <142>   DW_AT_decl_line   : 57
    <143>   DW_AT_decl_column : 35
    <144>   DW_AT_type        : <0x78>
    <148>   DW_AT_location    : 0x31 (location list)
    <14c>   DW_AT_GNU_locviews: 0x29
 <2><150>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <151>   DW_AT_name        : s
    <153>   DW_AT_decl_file   : 1
    <153>   DW_AT_decl_line   : 57
    <154>   DW_AT_decl_column : 44
    <155>   DW_AT_type        : <0x19e>
    <159>   DW_AT_location    : 0x5a (location list)
    <15d>   DW_AT_GNU_locviews: 0x54
 <2><161>: Abbrev Number: 12 (DW_TAG_variable)
    <162>   DW_AT_name        : cc
    <165>   DW_AT_decl_file   : 1
    <166>   DW_AT_decl_line   : 60
    <167>   DW_AT_decl_column : 14
    <168>   DW_AT_type        : <0x78>
    <16c>   DW_AT_location    : 0x75 (location list)
    <170>   DW_AT_GNU_locviews: 0x6f
 <2><174>: Abbrev Number: 13 (DW_TAG_call_site)
    <175>   DW_AT_call_return_pc: 0x8000572
    <179>   DW_AT_call_origin : <0x91>
    <17d>   DW_AT_sibling     : <0x188>
 <3><181>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <182>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <184>   DW_AT_call_value  : 2 byte block: 76 0  (DW_OP_breg6 (r6): 0)
 <3><187>: Abbrev Number: 0
 <2><188>: Abbrev Number: 5 (DW_TAG_call_site)
    <189>   DW_AT_call_return_pc: 0x8000582
    <18d>   DW_AT_call_origin : <0x2da>
 <3><191>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <192>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <194>   DW_AT_call_value  : 2 byte block: 76 0  (DW_OP_breg6 (r6): 0)
 <3><197>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <198>   DW_AT_location    : 1 byte block: 52    (DW_OP_reg2 (r2))
    <19a>   DW_AT_call_value  : 1 byte block: 31    (DW_OP_lit1)
 <3><19c>: Abbrev Number: 0
 <2><19d>: Abbrev Number: 0
 <1><19e>: Abbrev Number: 14 (DW_TAG_pointer_type)
    <19f>   DW_AT_byte_size   : 4
    <1a0>   DW_AT_type        : <0x1a4>
 <1><1a4>: Abbrev Number: 2 (DW_TAG_base_type)
    <1a5>   DW_AT_byte_size   : 1
    <1a6>   DW_AT_encoding    : 8   (unsigned char)
    <1a7>   DW_AT_name        : (indirect string, offset: 0x296d): char
 <1><1ab>: Abbrev Number: 4 (DW_TAG_subprogram)
    <1ac>   DW_AT_external    : 1
    <1ac>   DW_AT_name        : (indirect string, offset: 0xb80): ITM_Send32
    <1b0>   DW_AT_decl_file   : 1
    <1b0>   DW_AT_decl_line   : 51
    <1b1>   DW_AT_decl_column : 10
    <1b2>   DW_AT_prototyped  : 1
    <1b2>   DW_AT_type        : <0x78>
    <1b6>   DW_AT_low_pc      : 0x0
    <1ba>   DW_AT_high_pc     : 0xa
    <1be>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <1c0>   DW_AT_call_all_calls: 1
    <1c0>   DW_AT_sibling     : <0x210>
 <2><1c4>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <1c5>   DW_AT_name        : c
    <1c7>   DW_AT_decl_file   : 1
    <1c7>   DW_AT_decl_line   : 51
    <1c8>   DW_AT_decl_column : 31
    <1c9>   DW_AT_type        : <0x78>
    <1cd>   DW_AT_location    : 0x90 (location list)
    <1d1>   DW_AT_GNU_locviews: 0x8c
 <2><1d5>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <1d6>   DW_AT_name        : d
    <1d8>   DW_AT_decl_file   : 1
    <1d8>   DW_AT_decl_line   : 51
    <1d9>   DW_AT_decl_column : 43
    <1da>   DW_AT_type        : <0x78>
    <1de>   DW_AT_location    : 0xad (location list)
    <1e2>   DW_AT_GNU_locviews: 0xa9
 <2><1e6>: Abbrev Number: 5 (DW_TAG_call_site)
    <1e7>   DW_AT_call_return_pc: 0x0
    <1eb>   DW_AT_call_origin : <0x2da>
 <3><1ef>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <1f0>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <1f2>   DW_AT_call_value  : 9 byte block: a3 3 a5 0 2a a8 31 a8 0   (DW_OP_entry_value: (DW_OP_regval_type: 0 (r0) <0x2a>); DW_OP_convert <0x31>; DW_OP_convert <0x0>)
 <3><1fc>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <1fd>   DW_AT_location    : 1 byte block: 51    (DW_OP_reg1 (r1))
    <1ff>   DW_AT_call_value  : 9 byte block: a3 3 a5 1 2a a8 31 a8 0   (DW_OP_entry_value: (DW_OP_regval_type: 1 (r1) <0x2a>); DW_OP_convert <0x31>; DW_OP_convert <0x0>)
 <3><209>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <20a>   DW_AT_location    : 1 byte block: 52    (DW_OP_reg2 (r2))
    <20c>   DW_AT_call_value  : 1 byte block: 34    (DW_OP_lit4)
 <3><20e>: Abbrev Number: 0
 <2><20f>: Abbrev Number: 0
 <1><210>: Abbrev Number: 4 (DW_TAG_subprogram)
    <211>   DW_AT_external    : 1
    <211>   DW_AT_name        : (indirect string, offset: 0x435): ITM_Send16
    <215>   DW_AT_decl_file   : 1
    <215>   DW_AT_decl_line   : 45
    <216>   DW_AT_decl_column : 10
    <217>   DW_AT_prototyped  : 1
    <217>   DW_AT_type        : <0x78>
    <21b>   DW_AT_low_pc      : 0x0
    <21f>   DW_AT_high_pc     : 0xa
    <223>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <225>   DW_AT_call_all_calls: 1
    <225>   DW_AT_sibling     : <0x275>
 <2><229>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <22a>   DW_AT_name        : c
    <22c>   DW_AT_decl_file   : 1
    <22c>   DW_AT_decl_line   : 45
    <22d>   DW_AT_decl_column : 31
    <22e>   DW_AT_type        : <0x78>
    <232>   DW_AT_location    : 0xca (location list)
    <236>   DW_AT_GNU_locviews: 0xc6
 <2><23a>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <23b>   DW_AT_name        : d
    <23d>   DW_AT_decl_file   : 1
    <23d>   DW_AT_decl_line   : 45
    <23e>   DW_AT_decl_column : 43
    <23f>   DW_AT_type        : <0x6d>
    <243>   DW_AT_location    : 0xe7 (location list)
    <247>   DW_AT_GNU_locviews: 0xe3
 <2><24b>: Abbrev Number: 5 (DW_TAG_call_site)
    <24c>   DW_AT_call_return_pc: 0x0
    <250>   DW_AT_call_origin : <0x2da>
 <3><254>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <255>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <257>   DW_AT_call_value  : 9 byte block: a3 3 a5 0 2a a8 31 a8 0   (DW_OP_entry_value: (DW_OP_regval_type: 0 (r0) <0x2a>); DW_OP_convert <0x31>; DW_OP_convert <0x0>)
 <3><261>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <262>   DW_AT_location    : 1 byte block: 51    (DW_OP_reg1 (r1))
    <264>   DW_AT_call_value  : 9 byte block: a3 3 a5 1 2a a8 31 a8 0   (DW_OP_entry_value: (DW_OP_regval_type: 1 (r1) <0x2a>); DW_OP_convert <0x31>; DW_OP_convert <0x0>)
 <3><26e>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <26f>   DW_AT_location    : 1 byte block: 52    (DW_OP_reg2 (r2))
    <271>   DW_AT_call_value  : 1 byte block: 32    (DW_OP_lit2)
 <3><273>: Abbrev Number: 0
 <2><274>: Abbrev Number: 0
 <1><275>: Abbrev Number: 4 (DW_TAG_subprogram)
    <276>   DW_AT_external    : 1
    <276>   DW_AT_name        : (indirect string, offset: 0x2394): ITM_Send8
    <27a>   DW_AT_decl_file   : 1
    <27a>   DW_AT_decl_line   : 39
    <27b>   DW_AT_decl_column : 10
    <27c>   DW_AT_prototyped  : 1
    <27c>   DW_AT_type        : <0x78>
    <280>   DW_AT_low_pc      : 0x800055c
    <284>   DW_AT_high_pc     : 0xa
    <288>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <28a>   DW_AT_call_all_calls: 1
    <28a>   DW_AT_sibling     : <0x2da>
 <2><28e>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <28f>   DW_AT_name        : c
    <291>   DW_AT_decl_file   : 1
    <291>   DW_AT_decl_line   : 39
    <292>   DW_AT_decl_column : 30
    <293>   DW_AT_type        : <0x78>
    <297>   DW_AT_location    : 0x104 (location list)
    <29b>   DW_AT_GNU_locviews: 0x100
 <2><29f>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <2a0>   DW_AT_name        : d
    <2a2>   DW_AT_decl_file   : 1
    <2a2>   DW_AT_decl_line   : 39
    <2a3>   DW_AT_decl_column : 41
    <2a4>   DW_AT_type        : <0x62>
    <2a8>   DW_AT_location    : 0x121 (location list)
    <2ac>   DW_AT_GNU_locviews: 0x11d
 <2><2b0>: Abbrev Number: 5 (DW_TAG_call_site)
    <2b1>   DW_AT_call_return_pc: 0x8000564
    <2b5>   DW_AT_call_origin : <0x2da>
 <3><2b9>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <2ba>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <2bc>   DW_AT_call_value  : 9 byte block: a3 3 a5 0 2a a8 31 a8 0   (DW_OP_entry_value: (DW_OP_regval_type: 0 (r0) <0x2a>); DW_OP_convert <0x31>; DW_OP_convert <0x0>)
 <3><2c6>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <2c7>   DW_AT_location    : 1 byte block: 51    (DW_OP_reg1 (r1))
    <2c9>   DW_AT_call_value  : 9 byte block: a3 3 a5 1 2a a8 31 a8 0   (DW_OP_entry_value: (DW_OP_regval_type: 1 (r1) <0x2a>); DW_OP_convert <0x31>; DW_OP_convert <0x0>)
 <3><2d3>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <2d4>   DW_AT_location    : 1 byte block: 52    (DW_OP_reg2 (r2))
    <2d6>   DW_AT_call_value  : 1 byte block: 31    (DW_OP_lit1)
 <3><2d8>: Abbrev Number: 0
 <2><2d9>: Abbrev Number: 0
 <1><2da>: Abbrev Number: 15 (DW_TAG_subprogram)
    <2db>   DW_AT_name        : (indirect string, offset: 0x4c6): _sendITM
    <2df>   DW_AT_decl_file   : 1
    <2e0>   DW_AT_decl_line   : 13
    <2e1>   DW_AT_decl_column : 24
    <2e2>   DW_AT_prototyped  : 1
    <2e2>   DW_AT_type        : <0x78>
    <2e6>   DW_AT_low_pc      : 0x80004fc
    <2ea>   DW_AT_high_pc     : 0x60
    <2ee>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <2f0>   DW_AT_call_all_calls: 1
 <2><2f0>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <2f1>   DW_AT_name        : ch
    <2f4>   DW_AT_decl_file   : 1
    <2f4>   DW_AT_decl_line   : 13
    <2f5>   DW_AT_decl_column : 42
    <2f6>   DW_AT_type        : <0x78>
    <2fa>   DW_AT_location    : 0x13e (location list)
    <2fe>   DW_AT_GNU_locviews: 0x13a
 <2><302>: Abbrev Number: 3 (DW_TAG_formal_parameter)
    <303>   DW_AT_name        : d
    <305>   DW_AT_decl_file   : 1
    <305>   DW_AT_decl_line   : 13
    <306>   DW_AT_decl_column : 55
    <307>   DW_AT_type        : <0x78>
    <30b>   DW_AT_location    : 0x156 (location list)
    <30f>   DW_AT_GNU_locviews: 0x14e
 <2><313>: Abbrev Number: 16 (DW_TAG_formal_parameter)
    <314>   DW_AT_name        : (indirect string, offset: 0xb7b): size
    <318>   DW_AT_decl_file   : 1
    <319>   DW_AT_decl_line   : 13
    <31a>   DW_AT_decl_column : 66
    <31b>   DW_AT_type        : <0x62>
    <31f>   DW_AT_location    : 0x181 (location list)
    <323>   DW_AT_GNU_locviews: 0x179
 <2><327>: Abbrev Number: 5 (DW_TAG_call_site)
    <328>   DW_AT_call_return_pc: 0x8000528
    <32c>   DW_AT_call_origin : <0x91>
 <3><330>: Abbrev Number: 1 (DW_TAG_call_site_parameter)
    <331>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <333>   DW_AT_call_value  : 2 byte block: 74 0  (DW_OP_breg4 (r4): 0)
 <3><336>: Abbrev Number: 0
 <2><337>: Abbrev Number: 0
 <1><338>: Abbrev Number: 0
  Compilation Unit @ offset 0x339:
   Length:        0x1f7 (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0x120
   Pointer Size:  4
 <0><345>: Abbrev Number: 9 (DW_TAG_compile_unit)
    <346>   DW_AT_producer    : (indirect string, offset: 0x1938): GNU C99 13.2.1 20231009 -mthumb -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -march=armv7e-m+fp -g3 -gdwarf-5 -ggdb -Og -std=gnu99 -ffunction-sections -fdata-sections -fmerge-constants -fno-common -ffreestanding -fno-builtin -fstack-usage
    <34a>   DW_AT_language    : 12  (ANSI C99)
    <34b>   DW_AT_name        : (indirect string, offset: 0x6ccc): src/main.c
    <34f>   DW_AT_comp_dir    : (indirect string, offset: 0x2b15): /home/oleks/projects/orbmule/examples/simple
    <353>   DW_AT_ranges      : 0x6d
    <357>   DW_AT_low_pc      : 0x0
    <35b>   DW_AT_stmt_list   : 0x296
    <35f>   DW_AT_macros      : 0xea3
 <1><363>: Abbrev Number: 1 (DW_TAG_base_type)
    <364>   DW_AT_byte_size   : 1
    <365>   DW_AT_encoding    : 6   (signed char)
    <366>   DW_AT_name        : (indirect string, offset: 0x2966): signed char
 <1><36a>: Abbrev Number: 1 (DW_TAG_base_type)
    <36b>   DW_AT_byte_size   : 1
    <36c>   DW_AT_encoding    : 8   (unsigned char)
    <36d>   DW_AT_name        : (indirect string, offset: 0x2aea): unsigned char
 <1><371>: Abbrev Number: 1 (DW_TAG_base_type)
    <372>   DW_AT_byte_size   : 2
    <373>   DW_AT_encoding    : 5   (signed)
    <374>   DW_AT_name        : (indirect string, offset: 0x61f): short int
 <1><378>: Abbrev Number: 1 (DW_TAG_base_type)
    <379>   DW_AT_byte_size   : 2
    <37a>   DW_AT_encoding    : 7   (unsigned)
    <37b>   DW_AT_name        : (indirect string, offset: 0x474): short unsigned int
 <1><37f>: Abbrev Number: 1 (DW_TAG_base_type)
    <380>   DW_AT_byte_size   : 4
    <381>   DW_AT_encoding    : 5   (signed)
    <382>   DW_AT_name        : (indirect string, offset: 0x27c8): long int
 <1><386>: Abbrev Number: 1 (DW_TAG_base_type)
    <387>   DW_AT_byte_size   : 4
    <388>   DW_AT_encoding    : 7   (unsigned)
    <389>   DW_AT_name        : (indirect string, offset: 0x247c): long unsigned int
 <1><38d>: Abbrev Number: 1 (DW_TAG_base_type)
    <38e>   DW_AT_byte_size   : 8
    <38f>   DW_AT_encoding    : 5   (signed)
    <390>   DW_AT_name        : (indirect string, offset: 0x15fa): long long int
 <1><394>: Abbrev Number: 1 (DW_TAG_base_type)
    <395>   DW_AT_byte_size   : 8
    <396>   DW_AT_encoding    : 7   (unsigned)
    <397>   DW_AT_name        : (indirect string, offset: 0x346e): long long unsigned int
 <1><39b>: Abbrev Number: 10 (DW_TAG_base_type)
    <39c>   DW_AT_byte_size   : 4
    <39d>   DW_AT_encoding    : 5   (signed)
    <39e>   DW_AT_name        : int
 <1><3a2>: Abbrev Number: 1 (DW_TAG_base_type)
    <3a3>   DW_AT_byte_size   : 4
    <3a4>   DW_AT_encoding    : 7   (unsigned)
    <3a5>   DW_AT_name        : (indirect string, offset: 0x313d): unsigned int
 <1><3a9>: Abbrev Number: 11 (DW_TAG_pointer_type)
    <3aa>   DW_AT_byte_size   : 4
    <3ab>   DW_AT_type        : <0x3af>
 <1><3af>: Abbrev Number: 1 (DW_TAG_base_type)
    <3b0>   DW_AT_byte_size   : 1
    <3b1>   DW_AT_encoding    : 8   (unsigned char)
    <3b2>   DW_AT_name        : (indirect string, offset: 0x296d): char
 <1><3b6>: Abbrev Number: 5 (DW_TAG_typedef)
    <3b7>   DW_AT_name        : (indirect string, offset: 0x1ae5): uint8_t
    <3bb>   DW_AT_decl_file   : 2
    <3bb>   DW_AT_decl_line   : 46
    <3bc>   DW_AT_decl_column : 24
    <3bd>   DW_AT_type        : <0x36a>
 <1><3c1>: Abbrev Number: 5 (DW_TAG_typedef)
    <3c2>   DW_AT_name        : (indirect string, offset: 0xad7): uint32_t
    <3c6>   DW_AT_decl_file   : 2
    <3c6>   DW_AT_decl_line   : 52
    <3c7>   DW_AT_decl_column : 25
    <3c8>   DW_AT_type        : <0x386>
 <1><3cc>: Abbrev Number: 12 (DW_TAG_array_type)
    <3cd>   DW_AT_type        : <0x3af>
    <3d1>   DW_AT_sibling     : <0x3dd>
 <2><3d5>: Abbrev Number: 13 (DW_TAG_subrange_type)
    <3d6>   DW_AT_type        : <0x3a2>
    <3da>   DW_AT_upper_bound : 10000
 <2><3dc>: Abbrev Number: 0
 <1><3dd>: Abbrev Number: 14 (DW_TAG_variable)
    <3de>   DW_AT_name        : (indirect string, offset: 0x65b9): notprime
    <3e2>   DW_AT_decl_file   : 1
    <3e3>   DW_AT_decl_line   : 19
    <3e4>   DW_AT_decl_column : 6
    <3e5>   DW_AT_type        : <0x3cc>
    <3e9>   DW_AT_external    : 1
    <3e9>   DW_AT_location    : 5 byte block: 3 28 0 0 20   (DW_OP_addr: 20000028)
 <1><3ef>: Abbrev Number: 6 (DW_TAG_subprogram)
    <3f0>   DW_AT_external    : 1
    <3f0>   DW_AT_name        : (indirect string, offset: 0x2394): ITM_Send8
    <3f4>   DW_AT_decl_file   : 3
    <3f4>   DW_AT_decl_line   : 7
    <3f5>   DW_AT_decl_column : 10
    <3f5>   DW_AT_prototyped  : 1
    <3f5>   DW_AT_type        : <0x3c1>
    <3f9>   DW_AT_declaration : 1
    <3f9>   DW_AT_sibling     : <0x408>
 <2><3fd>: Abbrev Number: 2 (DW_TAG_formal_parameter)
    <3fe>   DW_AT_type        : <0x3c1>
 <2><402>: Abbrev Number: 2 (DW_TAG_formal_parameter)
    <403>   DW_AT_type        : <0x3b6>
 <2><407>: Abbrev Number: 0
 <1><408>: Abbrev Number: 6 (DW_TAG_subprogram)
    <409>   DW_AT_external    : 1
    <409>   DW_AT_name        : (indirect string, offset: 0x1de): ITM_SendString
    <40d>   DW_AT_decl_file   : 3
    <40d>   DW_AT_decl_line   : 10
    <40e>   DW_AT_decl_column : 10
    <40e>   DW_AT_prototyped  : 1
    <40e>   DW_AT_type        : <0x3c1>
    <412>   DW_AT_declaration : 1
    <412>   DW_AT_sibling     : <0x421>
 <2><416>: Abbrev Number: 2 (DW_TAG_formal_parameter)
    <417>   DW_AT_type        : <0x3c1>
 <2><41b>: Abbrev Number: 2 (DW_TAG_formal_parameter)
    <41c>   DW_AT_type        : <0x3a9>
 <2><420>: Abbrev Number: 0
 <1><421>: Abbrev Number: 15 (DW_TAG_subprogram)
    <422>   DW_AT_external    : 1
    <422>   DW_AT_name        : (indirect string, offset: 0x31f7): ITM_Enable
    <426>   DW_AT_decl_file   : 3
    <427>   DW_AT_decl_line   : 11
    <428>   DW_AT_decl_column : 6
    <429>   DW_AT_prototyped  : 1
    <429>   DW_AT_declaration : 1
 <1><429>: Abbrev Number: 16 (DW_TAG_subprogram)
    <42a>   DW_AT_external    : 1
    <42a>   DW_AT_name        : (indirect string, offset: 0x1792): ITM_ChannelEnable
    <42e>   DW_AT_decl_file   : 3
    <42f>   DW_AT_decl_line   : 13
    <430>   DW_AT_decl_column : 6
    <431>   DW_AT_prototyped  : 1
    <431>   DW_AT_declaration : 1
    <431>   DW_AT_sibling     : <0x43b>
 <2><435>: Abbrev Number: 2 (DW_TAG_formal_parameter)
    <436>   DW_AT_type        : <0x3c1>
 <2><43a>: Abbrev Number: 0
 <1><43b>: Abbrev Number: 17 (DW_TAG_subprogram)
    <43c>   DW_AT_external    : 1
    <43c>   DW_AT_name        : (indirect string, offset: 0x4189): main
    <440>   DW_AT_decl_file   : 1
    <441>   DW_AT_decl_line   : 56
    <442>   DW_AT_decl_column : 5
    <443>   DW_AT_prototyped  : 1
    <443>   DW_AT_type        : <0x39b>
    <447>   DW_AT_low_pc      : 0x80001a4
    <44b>   DW_AT_high_pc     : 0x34
    <44f>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <451>   DW_AT_call_all_calls: 1
    <451>   DW_AT_sibling     : <0x4c3>
 <2><455>: Abbrev Number: 18 (DW_TAG_lexical_block)
    <456>   DW_AT_ranges      : 0x61
    <45a>   DW_AT_sibling     : <0x48e>
 <3><45e>: Abbrev Number: 4 (DW_TAG_variable)
    <45f>   DW_AT_name        : a
    <461>   DW_AT_decl_file   : 1
    <461>   DW_AT_decl_line   : 64
    <462>   DW_AT_decl_column : 23
    <463>   DW_AT_type        : <0x3af>
    <467>   DW_AT_location    : 0x1b8 (location list)
    <46b>   DW_AT_GNU_locviews: 0x1b0
 <3><46f>: Abbrev Number: 7 (DW_TAG_call_site)
    <470>   DW_AT_call_return_pc: 0x80001be
    <474>   DW_AT_call_origin : <0x4c3>
 <3><478>: Abbrev Number: 8 (DW_TAG_call_site)
    <479>   DW_AT_call_return_pc: 0x80001c6
    <47d>   DW_AT_call_origin : <0x3ef>
 <4><481>: Abbrev Number: 3 (DW_TAG_call_site_parameter)
    <482>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <484>   DW_AT_call_value  : 1 byte block: 30    (DW_OP_lit0)
 <4><486>: Abbrev Number: 3 (DW_TAG_call_site_parameter)
    <487>   DW_AT_location    : 1 byte block: 51    (DW_OP_reg1 (r1))
    <489>   DW_AT_call_value  : 2 byte block: 74 0  (DW_OP_breg4 (r4): 0)
 <4><48c>: Abbrev Number: 0
 <3><48d>: Abbrev Number: 0
 <2><48e>: Abbrev Number: 19 (DW_TAG_call_site)
    <48f>   DW_AT_call_return_pc: 0x80001ac
    <493>   DW_AT_call_origin : <0x429>
    <497>   DW_AT_sibling     : <0x4a1>
 <3><49b>: Abbrev Number: 3 (DW_TAG_call_site_parameter)
    <49c>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <49e>   DW_AT_call_value  : 1 byte block: 30    (DW_OP_lit0)
 <3><4a0>: Abbrev Number: 0
 <2><4a1>: Abbrev Number: 7 (DW_TAG_call_site)
    <4a2>   DW_AT_call_return_pc: 0x80001b0
    <4a6>   DW_AT_call_origin : <0x421>
 <2><4aa>: Abbrev Number: 8 (DW_TAG_call_site)
    <4ab>   DW_AT_call_return_pc: 0x80001b8
    <4af>   DW_AT_call_origin : <0x408>
 <3><4b3>: Abbrev Number: 3 (DW_TAG_call_site_parameter)
    <4b4>   DW_AT_location    : 1 byte block: 50    (DW_OP_reg0 (r0))
    <4b6>   DW_AT_call_value  : 1 byte block: 30    (DW_OP_lit0)
 <3><4b8>: Abbrev Number: 3 (DW_TAG_call_site_parameter)
    <4b9>   DW_AT_location    : 1 byte block: 51    (DW_OP_reg1 (r1))
    <4bb>   DW_AT_call_value  : 5 byte block: 3 b4 5 0 8    (DW_OP_addr: 80005b4)
 <3><4c1>: Abbrev Number: 0
 <2><4c2>: Abbrev Number: 0
 <1><4c3>: Abbrev Number: 20 (DW_TAG_subprogram)
    <4c4>   DW_AT_name        : (indirect string, offset: 0x4cf5): _sieve
    <4c8>   DW_AT_decl_file   : 1
    <4c9>   DW_AT_decl_line   : 23
    <4ca>   DW_AT_decl_column : 13
    <4cb>   DW_AT_prototyped  : 1
    <4cb>   DW_AT_low_pc      : 0x800014c
    <4cf>   DW_AT_high_pc     : 0x58
    <4d3>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <4d5>   DW_AT_call_all_calls: 1
    <4d5>   DW_AT_sibling     : <0x521>
 <2><4d9>: Abbrev Number: 4 (DW_TAG_variable)
    <4da>   DW_AT_name        : k
    <4dc>   DW_AT_decl_file   : 1
    <4dc>   DW_AT_decl_line   : 26
    <4dd>   DW_AT_decl_column : 9
    <4de>   DW_AT_type        : <0x39b>
    <4e2>   DW_AT_location    : 0x1d8 (location list)
    <4e6>   DW_AT_GNU_locviews: 0x1d6
 <2><4ea>: Abbrev Number: 21 (DW_TAG_lexical_block)
    <4eb>   DW_AT_low_pc      : 0x800014c
    <4ef>   DW_AT_high_pc     : 0x14
    <4f3>   DW_AT_sibling     : <0x509>
 <3><4f7>: Abbrev Number: 4 (DW_TAG_variable)
    <4f8>   DW_AT_name        : y
    <4fa>   DW_AT_decl_file   : 1
    <4fa>   DW_AT_decl_line   : 28
    <4fb>   DW_AT_decl_column : 14
    <4fc>   DW_AT_type        : <0x39b>
    <500>   DW_AT_location    : 0x1e5 (location list)
    <504>   DW_AT_GNU_locviews: 0x1e1
 <3><508>: Abbrev Number: 0
 <2><509>: Abbrev Number: 22 (DW_TAG_lexical_block)
    <50a>   DW_AT_ranges      : 0x55
 <3><50e>: Abbrev Number: 4 (DW_TAG_variable)
    <50f>   DW_AT_name        : t
    <511>   DW_AT_decl_file   : 1
    <511>   DW_AT_decl_line   : 36
    <512>   DW_AT_decl_column : 17
    <513>   DW_AT_type        : <0x39b>
    <517>   DW_AT_location    : 0x1f8 (location list)
    <51b>   DW_AT_GNU_locviews: 0x1f6
 <3><51f>: Abbrev Number: 0
 <2><520>: Abbrev Number: 0
 <1><521>: Abbrev Number: 23 (DW_TAG_subprogram)
    <522>   DW_AT_external    : 1
    <522>   DW_AT_name        : (indirect string, offset: 0x517f): SystemInit
    <526>   DW_AT_decl_file   : 1
    <527>   DW_AT_decl_line   : 10
    <528>   DW_AT_decl_column : 6
    <529>   DW_AT_prototyped  : 1
    <529>   DW_AT_low_pc      : 0x8000598
    <52d>   DW_AT_high_pc     : 0x2
    <531>   DW_AT_frame_base  : 1 byte block: 9c    (DW_OP_call_frame_cfa)
    <533>   DW_AT_call_all_calls: 1
 <1><533>: Abbrev Number: 0
  Compilation Unit @ offset 0x534:
   Length:        0xbe (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0x277
   Pointer Size:  4
 <0><540>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <541>   DW_AT_stmt_list   : 0x5d4
    <545>   DW_AT_low_pc      : 0x80001d8
    <549>   DW_AT_high_pc     : 66
    <54a>   DW_AT_name        : (indirect string, offset: 0x73f2): system/startup_ARMCM4.S
    <54e>   DW_AT_comp_dir    : (indirect string, offset: 0x2b15): /home/oleks/projects/orbmule/examples/simple
    <552>   DW_AT_producer    : (indirect string, offset: 0x740a): GNU AS 2.41.0
    <556>   DW_AT_language    : 32769   (MIPS assembler)
 <1><558>: Abbrev Number: 2 (DW_TAG_subprogram)
    <559>   DW_AT_name        : (indirect string, offset: 0x7418): Reset_Handler
    <55d>   DW_AT_external    : 1
    <55e>   DW_AT_type        : <0x5f4>
    <560>   DW_AT_low_pc      : 0x80001d9
    <564>   DW_AT_high_pc     : 64
 <1><565>: Abbrev Number: 2 (DW_TAG_subprogram)
    <566>   DW_AT_name        : (indirect string, offset: 0x7426): NMI_Handler
    <56a>   DW_AT_external    : 0
    <56b>   DW_AT_type        : <0x5f4>
    <56d>   DW_AT_low_pc      : 0x8000219
    <571>   DW_AT_high_pc     : 2
 <1><572>: Abbrev Number: 2 (DW_TAG_subprogram)
    <573>   DW_AT_name        : (indirect string, offset: 0x7432): HardFault_Handler
    <577>   DW_AT_external    : 0
    <578>   DW_AT_type        : <0x5f4>
    <57a>   DW_AT_low_pc      : 0x8000219
    <57e>   DW_AT_high_pc     : 2
 <1><57f>: Abbrev Number: 2 (DW_TAG_subprogram)
    <580>   DW_AT_name        : (indirect string, offset: 0x7444): MemManage_Handler
    <584>   DW_AT_external    : 0
    <585>   DW_AT_type        : <0x5f4>
    <587>   DW_AT_low_pc      : 0x8000219
    <58b>   DW_AT_high_pc     : 2
 <1><58c>: Abbrev Number: 2 (DW_TAG_subprogram)
    <58d>   DW_AT_name        : (indirect string, offset: 0x7456): BusFault_Handler
    <591>   DW_AT_external    : 0
    <592>   DW_AT_type        : <0x5f4>
    <594>   DW_AT_low_pc      : 0x8000219
    <598>   DW_AT_high_pc     : 2
 <1><599>: Abbrev Number: 2 (DW_TAG_subprogram)
    <59a>   DW_AT_name        : (indirect string, offset: 0x7467): UsageFault_Handler
    <59e>   DW_AT_external    : 0
    <59f>   DW_AT_type        : <0x5f4>
    <5a1>   DW_AT_low_pc      : 0x8000219
    <5a5>   DW_AT_high_pc     : 2
 <1><5a6>: Abbrev Number: 2 (DW_TAG_subprogram)
    <5a7>   DW_AT_name        : (indirect string, offset: 0x747a): SVC_Handler
    <5ab>   DW_AT_external    : 0
    <5ac>   DW_AT_type        : <0x5f4>
    <5ae>   DW_AT_low_pc      : 0x8000219
    <5b2>   DW_AT_high_pc     : 2
 <1><5b3>: Abbrev Number: 2 (DW_TAG_subprogram)
    <5b4>   DW_AT_name        : (indirect string, offset: 0x7486): DebugMon_Handler
    <5b8>   DW_AT_external    : 0
    <5b9>   DW_AT_type        : <0x5f4>
    <5bb>   DW_AT_low_pc      : 0x8000219
    <5bf>   DW_AT_high_pc     : 2
 <1><5c0>: Abbrev Number: 2 (DW_TAG_subprogram)
    <5c1>   DW_AT_name        : (indirect string, offset: 0x7497): PendSV_Handler
    <5c5>   DW_AT_external    : 0
    <5c6>   DW_AT_type        : <0x5f4>
    <5c8>   DW_AT_low_pc      : 0x8000219
    <5cc>   DW_AT_high_pc     : 2
 <1><5cd>: Abbrev Number: 2 (DW_TAG_subprogram)
    <5ce>   DW_AT_name        : (indirect string, offset: 0x74a6): SysTick_Handler
    <5d2>   DW_AT_external    : 0
    <5d3>   DW_AT_type        : <0x5f4>
    <5d5>   DW_AT_low_pc      : 0x8000219
    <5d9>   DW_AT_high_pc     : 2
 <1><5da>: Abbrev Number: 2 (DW_TAG_subprogram)
    <5db>   DW_AT_name        : (indirect string, offset: 0x74b6): Default_Handler
    <5df>   DW_AT_external    : 0
    <5e0>   DW_AT_type        : <0x5f4>
    <5e2>   DW_AT_low_pc      : 0x8000219
    <5e6>   DW_AT_high_pc     : 2
 <1><5e7>: Abbrev Number: 2 (DW_TAG_subprogram)
    <5e8>   DW_AT_name        : (indirect string, offset: 0x74c6): DEF_IRQHandler
    <5ec>   DW_AT_external    : 0
    <5ed>   DW_AT_type        : <0x5f4>
    <5ef>   DW_AT_low_pc      : 0x8000219
    <5f3>   DW_AT_high_pc     : 2
 <1><5f4>: Abbrev Number: 3 (DW_TAG_unspecified_type)
 <1><5f5>: Abbrev Number: 0
compuphase commented 4 months ago

Thanks, I need to update GCC and test. Up to version 12, the line table was still version 3. In the meantime, you will need to compile/link with the "-gdwarf-4" option.

compuphase commented 4 months ago

Can you give me more information on the command line options for GCC?

I use GCC 13.2.1 (like you), and a build a sample program with this:

arm-none-eabi-gcc -gdwarf-5 -mcpu=cortex-m3 -mthumb -o blinky.elf blinky.c -nostartfiles -Wl,-T,STM32F103x8.ld

With objdump, I can confirm that the symbolic information is in DWARF version 5:

arm-none-eabi-objdump --dwarf=info blinky.elf
blinky.elf:     file format elf32-littlearm

Contents of the .debug_info section:

  Compilation Unit @ offset 0:
   Length:        0x9da (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0
   Pointer Size:  4
 <0><c>: Abbrev Number: 21 (DW_TAG_compile_unit)
    <d>   DW_AT_producer    : (indirect string, offset: 0x5b): GNU C++17 13.2.1 20231009 -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -march=armv7-m -gdwarf-5
    <11>   DW_AT_language    : 12   (ANSI C99)
    <12>   DW_AT_name        : (indirect string, offset: 0x366): blinky.c
    <16>   DW_AT_comp_dir    : (indirect string, offset: 0x147): d:\Tools\BlackMagicProbe\blinky\stm32bluepill
    <1a>   DW_AT_low_pc      : 0x8000150
    <1e>   DW_AT_high_pc     : 0xb0
    <22>   DW_AT_stmt_list   : 0
 <1><26>: Abbrev Number: 5 (DW_TAG_base_type)
    <27>   DW_AT_byte_size   : 1
-- More  --

However, the line number table (.debug_line) still uses version 3 in my case:

arm-none-eabi-objdump --dwarf=rawline blinky.elf
blinky.elf:     file format elf32-littlearm

Raw dump of debug contents of section .debug_line:

  Offset:                      0
  Length:                      719
  DWARF Version:               3
  Prologue Length:             606
  Minimum Instruction Length:  2
  Initial value of 'is_stmt':  1
  Line Base:                   -5
  Line Range:                  14
  Opcode Base:                 13

 Opcodes:
  Opcode 1 has 0 args
  Opcode 2 has 1 arg
  Opcode 3 has 1 arg
  Opcode 4 has 1 arg
  Opcode 5 has 1 arg
-- More  --

I have tried compiling in C++ mode, but with the same result (.debug_line table still in version 3). So there appears to be a compiler option that causes GCC to emit the .debug_line table in version 5. I am running these tests on Windows, by the way.

compuphase commented 4 months ago

I found a way to create a version 5 .debug_line table: add the option -Wa,-gdwarf-5. It turns out that the .debug_line table is often created by the assembler.

compuphase commented 4 months ago

Support for DWARF version 5 is added in commit 67feb1954b3f9b8586104c6fc6f75db6ade88161.