From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9148 invoked by alias); 13 May 2013 17:30:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 9137 invoked by uid 89); 13 May 2013 17:29:59 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 13 May 2013 17:29:59 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4DHTvQG025894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 May 2013 13:29:57 -0400 Received: from barimba (ovpn-113-133.phx2.redhat.com [10.3.113.133]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4DHTume017909 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 13 May 2013 13:29:57 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: implptrconst.exp error on 32-bit targets [Re: [3/4] fix DW_OP_GNU_implicit_pointer pointing to a constant] References: <87vc7ukvl0.fsf@fleche.redhat.com> <87a9o7yk11.fsf@fleche.redhat.com> <20130512151434.GA7026@host2.jankratochvil.net> Date: Mon, 13 May 2013 17:30:00 -0000 In-Reply-To: <20130512151434.GA7026@host2.jankratochvil.net> (Jan Kratochvil's message of "Sun, 12 May 2013 17:14:34 +0200") Message-ID: <87li7ibxf0.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00450.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> runtest CC_FOR_TARGET="gcc -m32" gdb.dwarf2/implptrconst.exp Jan> gdb compile failed, .../gdb/testsuite/gdb.dwarf2/implptrconst-dw.S: Jan> Assembler messages: Jan> .../gdb/testsuite/gdb.dwarf2/implptrconst-dw.S:42: Error: cannot Jan> represent relocation type BFD_RELOC_64 Jan> Fedora 19 x86_64 Jan> So it should be either made 32-bit clean or it should be skipped for 32-bit Jan> targets. Let me know what you think of this. I tested it on x86-64 Fedora 18, both ways. Tom b/gdb/testsuite/ChangeLog: 2013-05-13 Tom Tromey * gdb.dwarf2/implptrconst.exp: Create a CU with 4 byte address size and change type sizes to 4 bytes. diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp index 4ce1713..7eca600 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp @@ -27,7 +27,9 @@ standard_testfile .c implptrconst-dw.S # Make some DWARF for the test. set asm_file [standard_output_file $srcfile2] Dwarf::assemble $asm_file { - cu 0 2 8 { + # Creating a CU with 4-byte addresses lets this test link on both + # 32- and 64-bit machines. + cu 0 2 4 { compile_unit {} { declare_labels byte_label size_type_label array_label declare_labels var_label ptr_label @@ -41,7 +43,7 @@ Dwarf::assemble $asm_file { size_type_label: base_type { {name sizetype} {encoding @DW_ATE_unsigned} - {byte_size 8 DW_FORM_sdata} + {byte_size 4 DW_FORM_sdata} } array_label: array_type { @@ -60,7 +62,7 @@ Dwarf::assemble $asm_file { } ptr_label: pointer_type { - {byte_size 8 DW_FORM_sdata} + {byte_size 4 DW_FORM_sdata} {type :$byte_label} }