From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114236 invoked by alias); 17 Dec 2019 16:12:16 -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 113892 invoked by uid 89); 17 Dec 2019 16:12:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Dec 2019 16:12:14 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D755D1E059; Tue, 17 Dec 2019 11:12:12 -0500 (EST) Subject: Re: [PATCHv2] Fix skip.exp test failure observed with gcc-9.2.0 To: Bernd Edlinger , "gdb-patches@sourceware.org" References: <505a3a3a-37e8-bdae-cd4e-3ab691270d59@simark.ca> From: Simon Marchi Message-ID: <37efc3bf-8775-05a6-14b7-aa327a86b34d@simark.ca> Date: Tue, 17 Dec 2019 16:12:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00746.txt.bz2 On 2019-12-17 9:56 a.m., Bernd Edlinger wrote: > On 12/17/19 3:44 AM, Simon Marchi wrote: >> On 2019-12-15 1:12 p.m., Bernd Edlinger wrote: >>> On 12/15/19 2:05 PM, Simon Marchi wrote: >>>> On 2019-12-15 6:30 a.m., Bernd Edlinger wrote: >>>>> Hi, >>>>> >>>>> this is the split out patch on skip.exp which fixes a pre-existing >>>>> compatibilty issue with that test case and gcc-9.2.0 (and gcc-10 from >>>>> trunk of a few weeks ago at least, likely other versions too). >>>>> >>>>> >>>>> Is it OK for trunk? >>>>> >>>>> >>>>> Thanks >>>>> Bernd. >>>>> >>>>> >>>> >>>> Hi Bernd, >>>> >>>> Just wondering, were you able to figure out which change in debug info lead >>>> to this behavior change? The behavior with gcc 9.2.0 seems better to be me, >>>> I think your patch is ok. >>>> >>> >>> Yes indeed. The change started with gcc-8.1.0 when -gcolumn-info was enabled >>> by default. -gcolumn-info was first implemented in gcc-7.1.0 but default-disabled, >>> so you can get the altered behavior already with gcc-7 if you manually enable >>> -gcolumn-info. >>> >>> So previously there was just one point where line line 30 (of skip.c) started: >>> >>> [0x00000032] Advance Line by 27 to 28 >>> [0x00000034] Copy >>> [0x00000035] Special opcode 63: advance Address by 4 to 0x4004cb and Line by 2 to 30 >>> [0x00000036] Advance PC by constant 17 to 0x4004dc >>> [0x00000037] Special opcode 7: advance Address by 0 to 0x4004dc and Line by 2 to 32 >>> >>> with column-info we have line 30 three times with different column: >>> >>> [0x00000034] Advance Line by 27 to 28 >>> [0x00000036] Copy >>> [0x00000037] Set column to 9 >>> [0x00000039] Special opcode 63: advance Address by 4 to 0x4004c6 and Line by 2 to 30 >>> [0x0000003a] Set column to 17 >>> [0x0000003c] Special opcode 75: advance Address by 5 to 0x4004cb and Line by 0 to 30 >>> [0x0000003d] Set column to 3 >>> [0x0000003f] Special opcode 75: advance Address by 5 to 0x4004d0 and Line by 0 to 30 >>> [0x00000040] Special opcode 105: advance Address by 7 to 0x4004d7 and Line by 2 to 32 >>> >>> >>> That could probably be filtered in dwarf2read.c to keep the old behavior, but I agree >>> that the new behavior makes still sense, even if we cannot really use the column info >>> in the line number info. >> >> That is actually some very good info for anyone wondering why this change was introduced! >> >> Could you please put it in the commit message for posterity? >> > > Sure, good point. > > Attached is the new, reworded version of the patch. > When I looked at it again, I stumbled over two wrong comments nearby, > telling "# Return from foo()" when we actually return from bar(), > and "# Return from bar()" when we actually return from foo()... :) > >>>> I would just remove the unrelated whitespace fix before merging. >>>> >>> >>> Okay, I just replicated you advice regarding 8-space tab columns on >>> skip-inline.exp in the other patch. Exactly those 2 lines were copied >>> where the tabs were not used correctly. >> >> Great thanks. Note that we can also fix skip.exp, just in another, obvious patch. >> > > Okay, will send a separate patch for the whitespace. > > > Thanks > Bernd. > Thanks, I pushed it. Simon