From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id 391CC385DC0A for ; Sat, 4 Apr 2020 22:55:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 391CC385DC0A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x444.google.com with SMTP id h15so12955225wrx.9 for ; Sat, 04 Apr 2020 15:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+ToEQBMyWjsDGWSj1sx/os1L6eYrhPZUcGcZ0cZsVDE=; b=A2XC6D5rAp8txuDz/4J8XEcY2BhmqLgOUore1uw/5mqY+yjrY7efFRsC+GxPMvvd7f yaGGhjBTnad2l/L86sLsROOzgr47UUHf6+We9LFzdP3bbyUGAlHfaDQLLql8NCzSgLve cx165+xqx8Q3fCTEISxJBu6m9vLgQTQGQZhuvVlfOy9BqLr9pW+SOuOhFCJdlTfPSlki e6X1kodELEW1TicgoC/NZ8TZsj5OtvoGmVx0d11gxCP+m7Zj1vGbSFt1tc44C2anZGI6 EynwzK4mjBS39Mt/oeBdbmyw85CncPfFA0oAUibtyQVbF0RAh4RZTScU+Dy5VqdIWQnd bl2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+ToEQBMyWjsDGWSj1sx/os1L6eYrhPZUcGcZ0cZsVDE=; b=MvZwVODMMEWvXYdDwsPdIdcUhKDj3L+aLLbZEQvNsgeA8rrxn/lPcyGsNQnggTGsw/ lJc1pHGGyXg1yxDjR4kbZOlsOUJDL1ulMuOf1LbZ9h0R8YBd62D1uzP1bawPsaAY2eV2 Hb86QU7nN4kXskaGJBWB1scUToJqzuO25/sRvr+MSuBtWsSUuotnMn7hX1FBLhxAc9mx AuHiYqgZNCj8nxZrPoNn2qkH5eDkHSTQqfxQFjLCyKXC5R4sZjTrYQpDAWOxh+dMCxof yKYWrK3i66FVJzbL+T4L5KvZ+cNGLJlZ7VtrbhFUWxgyz1Yc3aaQZJBBQahuh8nlnlvG Kyhg== X-Gm-Message-State: AGi0PuY+6L37SBJgWnvSGzzPZ5bbkYPKwXN5a56AcHZUNWLA5dh3wnZ7 EbyowAynIwFMdU9zkU9DxKK+vg== X-Google-Smtp-Source: APiQypJCf5k9lUhDJsfm1Twk1iC4bRg90IdHIiypce40h8+S8cW4d9dKSlWGcc9kf0BytdJgA2629w== X-Received: by 2002:a5d:6044:: with SMTP id j4mr15285161wrt.232.1586040934378; Sat, 04 Apr 2020 15:55:34 -0700 (PDT) Received: from localhost (host86-186-80-207.range86-186.btcentralplus.com. [86.186.80.207]) by smtp.gmail.com with ESMTPSA id h2sm1986515wrp.50.2020.04.04.15.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 15:55:33 -0700 (PDT) Date: Sat, 4 Apr 2020 23:55:32 +0100 From: Andrew Burgess To: Bernd Edlinger Cc: Luis Machado , "gdb-patches@sourceware.org" Subject: Re: [PATCH v3 2/2] Fix an undefined behavior in record_line Message-ID: <20200404225532.GC3917@embecosm.com> References: <3a407c0c-e63b-4c3f-dec2-57ff7470164b@linaro.org> <37b43cd4-de96-7e5c-7c17-09e5887af5d0@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.5.13-200.fc31.x86_64 (x86_64) X-Uptime: 23:49:30 up 6:53, 1 X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 22:55:36 -0000 * Bernd Edlinger [2020-04-04 18:34:07 +0200]: > Okay, I think I see what is wrong. > > Line Number Statements: > [0x000000b4] Extended opcode 2: set Address to 0x73c > [0x000000bf] Advance Line by 75 to 76 > [0x000000c2] Copy > > .... > > [0x00000129] Extended opcode 2: set Address to 0x73c > [0x00000134] Advance Line by 1 to 73 > [0x00000136] Copy > [0x00000137] Extended opcode 1: End of Sequence > > so the second line was previously deleted, > but now it is a non-is-stmt line. > The address is the same, > > There was previously a discussion that two consecutive line-entries are a > rogue method to notify the debugger of where the end of header is. > I don't recall in the moment where this code is located. > But if someone could point out the place to me, I could > probably add code to ignore non-is-stmt lines, It's in symtab.c:skip_prologue_using_sal. > > Andrew, are you already on that target, with one of your patches from > yesterday? Not really. The other aarch64 issue only required me to get a target started, so I was using the gdbsim. But this is known to be pretty iffy, you'd probably have more luck building QEMU and running against that. Thanks, Andrew > > > Thanks > Bernd.