Community
Participate
Working Groups
With GCC 11.2 a user gets a binary with DWARF info like this (from objdump): DW_AT_stmt_list DW_FORM_sec_offset DW_AT_low_pc DW_FORM_addr DW_AT_high_pc DW_FORM_udata DW_AT_name DW_FORM_strp DW_AT_comp_dir DW_FORM_strp DW_AT_producer DW_FORM_strp DW_AT_language DW_FORM_data2 DW_AT value: 0 DW_FORM value: 0 But this does not work in TCF, an error, "FORM_DATA or FORM_SEC_OFFSET was expected", is reported. I found that in dio_ReadAttribute for AT_high_pc, DW_FORM_udata is not handled: if (sSection->relocate && (Attr == AT_stmt_list || Attr == AT_ranges || (Attr == AT_high_pc && Form != FORM_ADDR && Form != FORM_UDATA))) { U4_T Size = 0; switch (Form) { case FORM_DATA2 : Size = 2; break; case FORM_DATA4 : Size = 4; break; case FORM_DATA8 : Size = 8; break; case FORM_SEC_OFFSET: Size = sSectionRefSize; break; default: str_exception(ERR_INV_DWARF, "FORM_DATA or FORM_SEC_OFFSET was expected"); I assume this is a too strict limitation in the TCF agent, and that it should be supported. Unfortunately I cannot attach the failing binary, but if necessary I could try to create a new one.
Yes, the code is unnecessary restrictive. I reworked the code to make is more generic. Fixed. Thanks!
Thanks for the quick fix!