Michael Snyder wrote: >josef ezra wrote: > >>Hello >> >>I'm trying to debug a symbol file that has no '.text' section. Unlike 5.0 >>version, the new SECT_OFF_TEXT(objfile) macro calls (no-return) internal >>error and prevent the read. >> >>Should gdb work that way (requiring '.text' and '.data' sections)? >> >>If not, can we consider the first sections flagged 'SEC_CODE'/'SEC_DATA' as >>substitutes? Or maybe better have a default 0/1 values (like 5.0)? Both >>should work in my case. >> > >I agree, gdb should not require .text and .data. For one thing, >a simple embedded assembler program might have no initialized data. >For another, those segments might be called something else. > This patch will set objfile->sect_index_code/data index to the first section that contains CODE/DATA flag when no section was named '.text'/'.data'. - jezra bfd/ChangeLog: * section.c (bfd_get_first_code_section): new function. * section.c (bfd_get_first_data_section): new function. * bfd-in2.h: Regenerated via 'make headers'. gdb/ChangeLog: * symfile.c ( default_symfile_offsets): default index for '.text' and '.data' sections.