public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/26813] DW_FORM_rnglistx and DW_FORM_loclistx not fully supported Date: Tue, 02 Feb 2021 15:42:59 +0000 [thread overview] Message-ID: <bug-26813-4717-fGgUK1tREf@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26813-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26813 --- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Simon Marchi <simark@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1829e1bf2ee1c973694c802afaa3b7da2ffb4de commit b1829e1bf2ee1c973694c802afaa3b7da2ffb4de Author: Simon Marchi <simon.marchi@efficios.com> Date: Tue Feb 2 10:40:51 2021 -0500 gdb/dwarf: few fixes for handling DW_FORM_{rng,loc}listx We hit an assertion when loading the binary from PR 26813. When fixing it, execution goes a up bit further but then hits another assert, and another, and another. With these fours fixes, I am able to load the binary and get to the prompt. An error is shown (index pointing outside of the section), because the DW_FORM_rnglistx attribute is not read correctly, but that one is taken care of by the next patch. The four fixes are: - attribute::form_requires_reprocessing needs to handle forms DW_FORM_rnglistx and DW_FORM_loclistx, because set_unsigned_reprocess is called for them in read_attribute_value. - read_attribute_reprocess must call set_unsigned for them, not set_address. The parameter of set_address is a CORE_ADDR, meaning it's for program addresses. Post-reprocess, DW_FORM_rnglistx and DW_FORM_loclistx are offsets into their respective sections (.debug_rnglists and .debug_loclists). set_unsigned is the current attribute value setter that fits the best. But perhaps we should have a setter that takes a sect_offset? - read_attribute_process must call as_unsigned_reprocess instead of as_unsigned to get the pre-reprocess value, otherwise we hit the assert inside as_unsigned that makes sure the attribute doesn't need reprocessing. - attribute::set_unsigned needs to clear the requires_reprocessing flag, otherwise it stays set when reprocessing DW_FORM_rnglistx and DW_FORM_loclistx attributes. There's another assert that we hit once the next patch is applied, but since it's in the same vein as the changes in this patch, I included it in this patch: - attribute::form_is_unsigned must handle form DW_FORM_loclistx, otherwise we hit the assert when trying to call set_unsigned for an attribute of this form. DW_FORM_rnglistx is already handled. gdb/ChangeLog: PR gdb/26813 * dwarf2/attribute.h (struct attribute) <set_unsigned>: Clear requires_reprocessing flag. * dwarf2/attribute.c (attribute::form_is_unsigned): Handle DW_FORM_loclistx. (attribute::form_requires_reprocessing): Handle DW_FORM_rnglistx and DW_FORM_loclistx. * dwarf2/read.c (read_attribute_reprocess): Use set_unsigned instead of set_address for DW_FORM_loclistx and DW_FORM_rnglistx. Change-Id: I06c156fa3913ca98e4e39085f4ef171645b4bc1e -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-02-02 15:42 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-29 17:30 [Bug symtab/26813] New: " zoran.zaric at amd dot com 2020-10-29 17:33 ` [Bug symtab/26813] " zoran.zaric at amd dot com 2020-10-29 18:08 ` simark at simark dot ca 2020-10-30 14:22 ` tromey at sourceware dot org 2020-10-30 15:03 ` zoran.zaric at amd dot com 2020-10-30 18:21 ` simark at simark dot ca 2020-10-30 18:22 ` simark at simark dot ca 2020-10-30 19:03 ` simark at simark dot ca 2020-10-30 21:19 ` simark at simark dot ca 2020-11-02 15:57 ` simark at simark dot ca 2021-01-20 9:26 ` mliska at suse dot cz 2021-02-02 15:42 ` cvs-commit at gcc dot gnu.org [this message] 2021-02-02 15:43 ` cvs-commit at gcc dot gnu.org 2021-02-02 15:43 ` cvs-commit at gcc dot gnu.org 2021-02-02 15:43 ` cvs-commit at gcc dot gnu.org 2021-02-02 15:43 ` simark at simark dot ca 2021-02-03 19:17 ` cvs-commit at gcc dot gnu.org 2021-02-03 19:17 ` cvs-commit at gcc dot gnu.org 2021-02-03 19:17 ` cvs-commit at gcc dot gnu.org 2022-05-15 12:13 ` jeanmichael.celerier at gmail dot com 2022-05-15 14:33 ` tromey at sourceware dot org 2022-05-15 14:55 ` jeanmichael.celerier at gmail dot com 2022-05-15 15:09 ` tromey at sourceware dot org 2022-05-16 1:12 ` simark at simark dot ca
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26813-4717-fGgUK1tREf@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).