From: G Helffrich <ghfbsd@gmail.com>
To: "Heckel, Bernhard" <bernhard.heckel@intel.com>
Cc: gdb-patches@sourceware.org, Luis Machado <lgustavo@codesourcery.com>
Subject: Re: [PATCH v2] gdb: dwarf2read: implement handling of variables in Fortran common block
Date: Tue, 12 Apr 2016 08:02:00 -0000 [thread overview]
Message-ID: <14BA18F0-9D4B-4E12-8C46-BD3B6A29DC9B@gmail.com> (raw)
In-Reply-To: <570C9D13.50307@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4226 bytes --]
Bernhard & Luis -
Here is the dump of the analogous parts of the DWARF for my environment for this testcase:
0x00000155: TAG_common_block [3] *
AT_name( "fo_o" )
AT_decl_file( "gdb.fortran/common-block.f90" )
AT_decl_line( 31 )
AT_MIPS_linkage_name( "fo_o_" )
AT_location( [0x0000000000000000] )
AT_sibling( {0x000001b2} )
0x00000171: TAG_variable [4]
AT_name( "ix" )
AT_decl_file( "gdb.fortran/common-block.f90" )
AT_decl_line( 23 )
AT_type( {0x00000230} ( integer(kind=4) ) )
AT_external( 0x01 )
AT_location( [0x0000000000000000] )
0x00000186: TAG_variable [4]
AT_name( "iy2" )
AT_decl_file( "gdb.fortran/common-block.f90" )
AT_decl_line( 24 )
AT_type( {0x00000243} ( real(kind=4) ) )
AT_external( 0x01 )
AT_location( [0x0000000000000004] )
On 12 Apr 2016, at 16:00, Heckel, Bernhard <bernhard.heckel@intel.com> wrote:
> On 12/04/2016 02:31, G Helffrich wrote:
>> This patch allows the gdb DWARF reader to handle variables located in Fortran common blocks. This fixes 20 unexpected failures in the gdb.fortran testsuite with host, target and build triplet x86_64-apple-darwin13.4.0 with gfortran 4.9.2.
>> Re-posted as requested with patch file attached. Revised from original post to prevent double relocation.
>> 2015-04-12 George Helffrich <ghfbsd@gmail.com>
>>
>> * dwarf2read.c (read_common_block): Relocate symbols in Fortran common
>> blocks properly, and avoid double relocation.
>> (read_new_symbol_full): Don't discard zero-offset symbols in Fortran
>> common blocks.
>> (_initialize_dwarf2_read): Add debug diagnostic print for common
>> symbols.
>> * psymtab.c (print_partial_symbols): Recognize and print
>> COMMON_BLOCK_DOMAIN.
>> * symmisc.c (print_symbol): Recognize and dump LOC_COMMON_BLOCK.
>>
>>
> Hi George, Luis,
>
> I manually patched last week and got 16 fails in the common block testcase.
> Just adding a base-address to the variables lead to failing tests.
> From what I have seen, all the child's of the common block have their own fix (DW_OP_addr) location.
> At least in my environment when I check the DWARF of the compiled testcase.
>
> Here an excerpt of my DWARF
> <2><4a>: Abbrev Number: 3 (DW_TAG_common_block)
> <4b> DW_AT_name : (indirect string, offset: 0x0): fo_o
> <4f> DW_AT_decl_file : 1
> <50> DW_AT_decl_line : 31
> <51> DW_AT_linkage_name: (indirect string, offset: 0x5): fo_o_
> <55> DW_AT_location : 9 byte block: 3 60 10 60 0 0 0 0 0 (DW_OP_addr: 601060)
> <5f> DW_AT_sibling : <0xa1>
> <3><63>: Abbrev Number: 4 (DW_TAG_variable)
> <64> DW_AT_name : ix
> <67> DW_AT_decl_file : 1
> <68> DW_AT_decl_line : 23
> <69> DW_AT_type : <0x116>
> <6d> DW_AT_external : 1
> <6d> DW_AT_location : 9 byte block: 3 60 10 60 0 0 0 0 0 (DW_OP_addr: 601060)
> <3><77>: Abbrev Number: 4 (DW_TAG_variable)
> <78> DW_AT_name : iy2
> <7c> DW_AT_decl_file : 1
> <7d> DW_AT_decl_line : 24
> <7e> DW_AT_type : <0x11d>
> <82> DW_AT_external : 1
> <82> DW_AT_location : 9 byte block: 3 64 10 60 0 0 0 0 0 (DW_OP_addr: 601064)
>
> May George can sent the important part of the DWARF
>
>
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de
> Managing Directors: Christin Eisenschmid, Christian Lamprechter
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
>
G Helffrich
ghfbsd@gmail.com
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4056 bytes --]
prev parent reply other threads:[~2016-04-12 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 0:31 G Helffrich
2016-04-12 7:00 ` Heckel, Bernhard
2016-04-12 8:02 ` G Helffrich [this message]
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=14BA18F0-9D4B-4E12-8C46-BD3B6A29DC9B@gmail.com \
--to=ghfbsd@gmail.com \
--cc=bernhard.heckel@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
/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: link
Be 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