[PATCH] Fixed issues with processing of DW_FORM_loclistx / DW_FORM_rnglistx
Sharma, Alok Kumar
AlokKumar.Sharma@amd.com
Thu Jan 21 05:49:18 GMT 2021
Hi all,
I request you all to please review the patch. Below are the details.
Problem Description:
GDB produces internal error while processing DW_FORM_loclistx / DW_FORM_rnglistx,
$ make check RUNTESTFLAGS="CXX_FOR_TARGET=/path/to/clang++ " TEST=gdb.dwarf2/dw5-rnglist-test.exp
Below is the snippet from gdb.log file.
---------
(gdb) file /dir/gdb/testsuite/outputs/gdb.dwarf2/dw5-rnglist-test/dw5-rnglist-test
Reading symbols from /dir/gdb/testsuite/outputs/gdb.dwarf2/dw5-rnglist-test/dw5-rnglist-test...
gdb/dwarf2/attribute.h:232: internal-error: void attribute::set_unsigned_reprocess(ULONGEST): Assertion `form_requires_reprocessing ()' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) ERROR: Couldn't load dw5-rnglist-test into GDB (GDB internal error).
Resyncing due to internal error.
---------
This is due to incomplete handling of DW_FORM_loclistx / DW_FORM_rnglistx,
which is available with -gdwarf-5 option for clang compiler.
Resolution:
Forms DW_FORM_loclistx / DW_FORM_rnglistx need two phases of processing.
The required modifications in various routines are added to fix the issue.
gdb/ChangeLog:
2021-01-21 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
* dwarf2/attribute.c (form_is_unsigned): Handle DW_FORM_loclistx.
(form_requires_reprocessing): Handle DW_FORM_loclistx and
DW_FORM_rnglistx.
* dwarf2/attribute.h (set_address): Handle DW_FORM_loclistx and
DW_FORM_rnglistx.
* dwarf2/read.c (read_attribute_reprocess): Replaced as_unsigned with
as_unsigned_reprocess for DW_FORM_loclistx and DW_FORM_rnglistx.
Regards,
Alok
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DWARF5-Fixed-issues-with-processing-of-DW_FORM_locli.patch
Type: application/octet-stream
Size: 4754 bytes
Desc: 0001-DWARF5-Fixed-issues-with-processing-of-DW_FORM_locli.patch
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20210121/3ccbae33/attachment-0001.obj>
More information about the Gdb-patches
mailing list