Hi, On Sun, 2024-05-05 at 00:15 +0200, Mark Wielaard wrote: > print_form_data didn't take the offset_len (4 or 8 bytes) into account > causing the wrong entry to be read from .debug_str_offsets. > print_debug_macro_section did sanity checking before calling > print_form_data, which does sanity checking itself. The sanity check > for DW_FORM_strx was wrong in print_debug_macro_section (but correct > in print_form_data). > > Add a new testfile for run-readelf-macro.sh, this one compiled with > clang -gdwarf-5 -fdebug-macro. > > * src/readelf.c (print_form_data): Multiply by offset_len for > strx_val. > (print_debug_macro_section): Remove sanity checks before calling > print_form_data. > * tests/testfileclangmacro.bz2: New testfile. > * tests/Makefile.am (EXTRA_DIST): Add testfileclangmacro.bz2. > * tests/run-readelf-macro.sh: Add testfileclangmacro output.
Pushed to main. Cheers, Mark