From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cMwHIG+4bF9+fwAAWB0awg (envelope-from ) for ; Thu, 24 Sep 2020 11:17:03 -0400 Received: by simark.ca (Postfix, from userid 112) id 802A01EE05; Thu, 24 Sep 2020 11:17:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 239541E509 for ; Thu, 24 Sep 2020 11:17:03 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 88F463953C08; Thu, 24 Sep 2020 15:17:02 +0000 (GMT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by sourceware.org (Postfix) with ESMTPS id CCAAA38708A9 for ; Thu, 24 Sep 2020 15:16:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CCAAA38708A9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f42.google.com with SMTP id o5so4186211wrn.13 for ; Thu, 24 Sep 2020 08:16:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9WxhUJyb1t2uukdJlfkdJikqm6s8l4WQo35QTGR8dNs=; b=ZxQ5F7conBv/zCqex4zPQM041GMsnEYYr0SAAfFhBmSjNRyUOsM6jCJX6YOV0JbrV/ DKFJ+kZuZivspHtyRZ9ivVeW+BHYM26RGuTfmHnQNBcGJ7wGyX5cahFVrGfo6Kt7d0KP 9TV05zOU76uTOFzP89ByQ//jMyHgXkgfS5jkIX4lddFDYHgEXFr1H+HQcVPtc+HtmPDn fPypE6oJM+F7DYze7V2ATHyeQtgLZSNnBg+YrIcj5/nTqsHDESeNBlxoR0Xr9p2Qz5bV hC6QxvGrhuX112klq12ECSVoIEiB6ivnV8ukE9YlS9ovVQEn44QSmFcvzTeL9zyTMpzn wCxA== X-Gm-Message-State: AOAM5320SY957S0GflOuKZyvhfu4YYhQ5Wv4WVCoydvw3G0bQYXgzijO dvy6suk3FUiqrkkE1IZNOBNR1Rcv9ogh3g== X-Google-Smtp-Source: ABdhPJzHXleYd0a4Bk7Mljy2nxL+EuwB2loOSDF2LERGDM4dWSsENp3oKSnagZmK7w2s8CFYsdkW2w== X-Received: by 2002:a05:6000:85:: with SMTP id m5mr295994wrx.160.1600960617854; Thu, 24 Sep 2020 08:16:57 -0700 (PDT) Received: from ?IPv6:2001:8a0:f905:5600:eefd:c63:53e0:3e8a? ([2001:8a0:f905:5600:eefd:c63:53e0:3e8a]) by smtp.gmail.com with ESMTPSA id p3sm3524413wmm.40.2020.09.24.08.16.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Sep 2020 08:16:56 -0700 (PDT) Subject: Re: [PATCH] Don't drop static function bp locations w/o debug info To: Luis Machado , Simon Marchi , gdb-patches@sourceware.org References: <20200612192108.11481-1-pedro@palves.net> <22959b69-54bd-012e-4026-feb4f02ac671@simark.ca> <5aea0e8a-2d19-3fa0-5281-86e41be4b8b9@palves.net> <1f254bd1-e75a-cdf3-e7c6-e89d51216635@linaro.org> From: Pedro Alves Message-ID: Date: Thu, 24 Sep 2020 16:16:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1f254bd1-e75a-cdf3-e7c6-e89d51216635@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 9/22/20 9:20 PM, Luis Machado wrote: > The new tests are failing for aarch64-linux-gnu on Ubuntu 18.04 (GCC 7.5.0). > > The breakpoint location patterns don't seem to be matching. Here's what I see... > > info breakpoint^M > Num     Type           Disp Enb Address            What^M > 1       breakpoint     keep y            ^M > 1.1                         y   0x0000000000000794 ^M > 1.2                         y   0x00000000000008bc ^M The test is: test_info_break_2 \ "" \ "" So it should be trivial to adjust with - "" + "" However, I wonder whether we're actually seeing a bug here. It seems like on x86, the breakpoint is set past the prologue (thus the "+$decimal"): Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x0000000000001050 1.2 y 0x0000000000001165 while it is set exactly at the function's address on Aarch64. Why didn't GDB skip the prologue of on Aarch64? Is there really no instruction to skip? Here's what I see on x86-64, without debug info (outputs/gdb.base/msym-bp-shl/msym-bp-shl-0): (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x0000000000001050 1.2 y 0x0000000000001165 and on x86-64, with debug info (outputs/gdb.base/msym-bp-shl/msym-bp-shl-1): (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x0000000000001050 1.2 y 0x0000000000001165 in foo at src/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c:21 Note the location addresses are the same without vs with debug info: 0x1050 and 0x1165. Is that also the case on Aarch64? Pedro Alves