From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29797 invoked by alias); 8 Jul 2014 05:48:04 -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 29442 invoked by uid 89); 8 Jul 2014 05:47:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Jul 2014 05:47:56 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1X4OFs-000294-Ii from Luis_Gustavo@mentor.com ; Mon, 07 Jul 2014 22:47:52 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 7 Jul 2014 22:47:52 -0700 Received: from [172.30.72.79] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Mon, 7 Jul 2014 22:47:51 -0700 Message-ID: <53BB8603.6050201@codesourcery.com> Date: Tue, 08 Jul 2014 05:48:00 -0000 From: Luis Machado Reply-To: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Samuel Bronson CC: "'gdb-patches@sourceware.org'" Subject: Re: [PATCH] Fix gdb.base/code_elim.exp failures for PowerPC 32-bit References: <53B28365.1010508@codesourcery.com> <87k37ok45r.fsf@naesten.mooo.com> In-Reply-To: <87k37ok45r.fsf@naesten.mooo.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00140.txt.bz2 On 07/08/2014 02:52 AM, Samuel Bronson wrote: > Luis Machado writes: > >> For PowerPC 32-bit though, the small initialized global int variable >> is sent to the .sdata section as an optimization. Since there is no >> more data to store, the .data section doesn't get created. >> >> GDB complains about the lack of such a section and expect doesn't like >> seeing that warning, which results in a couple failures for powerpc. > > Hmm, seems like a silly thing to complain about ... > >> One of them: >> >> [snip] >> add-symbol-file gdb.base/code_elim2 0x200000 -s .data 0x210000 -s .bss 0x220000^M >> add symbol table from file "gdb.d/gdb.base/code_elim2" at^M >> .text_addr = 0x200000^M >> .data_addr = 0x210000^M >> .bss_addr = 0x220000^M >> (y or n) y^M >> Reading symbols from gdb.base/code_elim2...warning: section .data not >> found in gdb.base/code_elim2^M >> done.^M >> (gdb) FAIL: gdb.base/code_elim.exp: order1: add-symbol-file code_elim2 >> 0x200000 >> >> I have tweaked the testcase sources a little to hold a bigger >> initialized global variable, forcing the linker to create a regular >> .data section in order to prevent GDB's warning. The testcase still >> runs fine, but now PowerPC 32-bit sees full passes on this one. > > Is tweaking the testcase really the best approach here? Shouldn't GDB > just be less picky? > Either solution is fine with me, but the warning is actually somewhat informative since the .data section is relatively common. The testcase, on the other hand, is not designed to behave the same in all architectures. Luis