Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1905687 - Backport "Fortran dynamic type related fixes"
Summary: Backport "Fortran dynamic type related fixes"
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 32
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Keith Seitz
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1905701 1905702 1905704
TreeView+ depends on / blocked
Reported: 2020-12-08 20:25 UTC by Keith Seitz
Modified: 2020-12-21 01:35 UTC (History)
5 users (show)

Fixed In Version: gdb-9.1-7.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1905701 1905702 1905704 (view as bug list)
Last Closed: 2020-12-21 01:35:11 UTC
Type: Bug

Attachments (Terms of Use)
GDB test/reproducer (1.94 KB, application/x-xz)
2020-12-08 20:30 UTC, Keith Seitz
no flags Details

Description Keith Seitz 2020-12-08 20:25:44 UTC
Originally reported/triaged by Andrew Dinn:

I have run up against a problem with the versions of gdb that are out in the field that relates to the use of data_location properties on DWARF class/struct info records. I need to use this DWARF feature in order to fully implement Java debuginfo for GraalVM native Java apps. The data_location attribute is needed to ensure that Java oops (typed as DWARF pointer types which reference the underlying class/struct data) are adjusted from a Java-specific encoding of the address to a direct memory pointer before gdb dereferences the oop to locate the underlying data.

 - In one mode of image generation oops are addresses modulo extra tag info in the bottom 3 bits so a locexpr describes how to mask off the relevant bits.

 - In another mode of image generation oops are offsets from a heap base held in a register so a locexpr describes how to fetch the relevant register value and add it to the oop (offset).

The data_location attribute on the target object provides the necessary locexpr.

My problem is not to do with the conversion itself. That all works fine. It goes wrong when I ask gdb to print the relevant object data (see example after sig). The value that gets inserted into the history has an unresolved dynamic type and this trips an assert .

This problem should be caught and dealt with before the value is passed to the print code and indeed it has been fixed in gdb 10.1. The patch is detailed in the asssociated ChangeLog as follows:

2020-07-25  Andrew Burgess  <andrew.burgess>

    PR fortran/23051
    PR fortran/26139
    * valops.c (value_ind): Pass address to
    * value.c (readjust_indirect_value_type): Make parameter
    non-const, and add extra address parameter.  Resolve original type
    before using it.
    * value.h (readjust_indirect_value_type): Update function
    signature and comment.

Comment 1 Keith Seitz 2020-12-08 20:30:10 UTC
Created attachment 1737710 [details]
GDB test/reproducer

Comment 2 Keith Seitz 2020-12-08 20:31:00 UTC
Testing patch.

Comment 3 Fedora Update System 2020-12-10 21:08:27 UTC
FEDORA-2020-7a59e08355 has been submitted as an update to Fedora 32.

Comment 4 Fedora Update System 2020-12-11 00:42:04 UTC
FEDORA-2020-7a59e08355 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-7a59e08355`
You can provide feedback for this update here:

See also for more information on how to test updates.

Comment 5 Fedora Update System 2020-12-21 01:35:11 UTC
FEDORA-2020-7a59e08355 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.