From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id 465483851C2D for ; Sat, 16 May 2020 11:33:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 465483851C2D Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-238-XzbCvU6YNYKWGHCX0kVgKw-1; Sat, 16 May 2020 07:33:30 -0400 X-MC-Unique: XzbCvU6YNYKWGHCX0kVgKw-1 Received: by mail-wr1-f71.google.com with SMTP id e14so2562210wrv.11 for ; Sat, 16 May 2020 04:33:30 -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:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZwdEfIirfeeeoerrm4nALDOLq8hXTf2RH3kRH+jq4FQ=; b=G21NikklSUDjygQjsKiRJXHKnpCF3kPqRBrGoFg1vKLIQ4mYBWfZMoEBGdiabzYAdL ouAJpEFwcHvi2UYKF7agJPeXvfDKybWgk0S3F8OxIVxw/3mrdDtAk2+caCA0QW95Y1Ku MsDK5WcRuSWqXB8KqR7lusJb4LGPTkN29eEYLVlffdHhJLpYXXQXWB3APhrTyXUiUXii dt3nT1JbX4hCpmAVH0ec9lXBTLbzoz6pJFX6zTP1bTyuks+Hz3d5DzzRT3ZX2+iZh4CG HHx7zknAe0BAY9gnwuNY3DBkz5rDNr6j26A35c1cHeFt3girILLEU5Rg26tfffEntU1o ZAMQ== X-Gm-Message-State: AOAM5306pb/KfUgHfptOW5nxXW6HO/nDqZK6ihFq6GBWc9omxN8+vLcz mVx0rKREjV1deFM0OdLRAo/f6up9Izoh4LXIE1k/b/HIrXr1og42NMKITECi73vAa6kjBBURktm U71W1fs2IodaCCo1k+bMd4g== X-Received: by 2002:a1c:388:: with SMTP id 130mr9599674wmd.117.1589628808983; Sat, 16 May 2020 04:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOyagUE7fZmNFMJEZeBOrOkN2ErfVKgfcU7cUDMSVOe7j2GUYbo9XXyytj+W1YF6Pqtdj8pQ== X-Received: by 2002:a1c:388:: with SMTP id 130mr9599648wmd.117.1589628808687; Sat, 16 May 2020 04:33:28 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:4eeb:42ff:feef:f164? ([2001:8a0:f909:7b00:4eeb:42ff:feef:f164]) by smtp.gmail.com with ESMTPSA id t129sm8509253wmg.27.2020.05.16.04.33.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 May 2020 04:33:28 -0700 (PDT) Subject: Fix IA-64 GNU/Linux build (Re: [PATCH v2 18/24] Multi-target support) To: Andreas Schwab References: <20191017225026.30496-1-palves@redhat.com> <20191017225026.30496-19-palves@redhat.com> <87ftc0uwf7.fsf@linux-m68k.org> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <3c650470-4fe4-e31a-c6e9-5acbf00a8ef5@redhat.com> Date: Sat, 16 May 2020 12:33:25 +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: <87ftc0uwf7.fsf@linux-m68k.org> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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, 16 May 2020 11:33:34 -0000 On 5/16/20 9:16 AM, Andreas Schwab wrote: > ../../gdb/ia64-linux-nat.c: In function ‘void enable_watchpoints_in_psr(ptid_t)’: > ../../gdb/ia64-linux-nat.c:535:56: error: no matching function for call to ‘get_thread_regcache(ptid_t&)’ > struct regcache *regcache = get_thread_regcache (ptid); > ^ > In file included from ../../gdb/ia64-linux-nat.c:25:0: > ../../gdb/regcache.h:35:25: note: candidate: regcache* get_thread_regcache(process_stratum_target*, ptid_t) > extern struct regcache *get_thread_regcache (process_stratum_target *target, > ^ > ../../gdb/regcache.h:35:25: note: candidate expects 2 arguments, 1 provided > ../../gdb/regcache.h:39:25: note: candidate: regcache* get_thread_regcache(thread_info*) > extern struct regcache *get_thread_regcache (thread_info *thread); > ^ > ../../gdb/regcache.h:39:25: note: no known conversion for argument 1 from ‘ptid_t’ to ‘thread_info*’ I don't have an IA-64 cross compiler handy, but I believe the below should fix it. I went ahead and merged it. >From 9bf058f09457de5efd094b87081b7d031ce96cbc Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sat, 16 May 2020 12:26:56 +0100 Subject: [PATCH] Fix IA64 GNU/Linux build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit should fix: ../../gdb/ia64-linux-nat.c: In function ‘void enable_watchpoints_in_psr(ptid_t)’: ../../gdb/ia64-linux-nat.c:535:56: error: no matching function for call to ‘get_thread_regcache(ptid_t&)’ struct regcache *regcache = get_thread_regcache (ptid); ^ In file included from ../../gdb/ia64-linux-nat.c:25:0: ../../gdb/regcache.h:35:25: note: candidate: regcache* get_thread_regcache(process_stratum_target*, ptid_t) extern struct regcache *get_thread_regcache (process_stratum_target *target, ^ ../../gdb/regcache.h:35:25: note: candidate expects 2 arguments, 1 provided ../../gdb/regcache.h:39:25: note: candidate: regcache* get_thread_regcache(thread_info*) extern struct regcache *get_thread_regcache (thread_info *thread); ^ ../../gdb/regcache.h:39:25: note: no known conversion for argument 1 from ‘ptid_t’ to ‘thread_info*’ gdb/ChangeLog: 2020-05-16 Pedro Alves * ia64-linux-nat.c (ia64_linux_nat_target) : Declare method. (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target. --- gdb/ChangeLog | 7 +++++++ gdb/ia64-linux-nat.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0e8e47d8d22..1c4dc5c94c2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2020-05-16 Pedro Alves + + * ia64-linux-nat.c + (ia64_linux_nat_target) : + Declare method. + (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target. + 2020-05-15 Simon Marchi * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct). diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index 01cfa0decd5..8f36ea78e76 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -80,6 +80,8 @@ class ia64_linux_nat_target final : public linux_nat_target /* Override linux_nat_target low methods. */ void low_new_thread (struct lwp_info *lp) override; bool low_status_is_event (int status) override; + + void enable_watchpoints_in_psr (ptid_t ptid); }; static ia64_linux_nat_target the_ia64_linux_nat_target; @@ -529,10 +531,10 @@ fill_fpregset (const struct regcache *regcache, #define IA64_PSR_DB (1UL << 24) #define IA64_PSR_DD (1UL << 39) -static void -enable_watchpoints_in_psr (ptid_t ptid) +void +ia64_linux_nat_target::enable_watchpoints_in_psr (ptid_t ptid) { - struct regcache *regcache = get_thread_regcache (ptid); + struct regcache *regcache = get_thread_regcache (this, ptid); ULONGEST psr; regcache_cooked_read_unsigned (regcache, IA64_PSR_REGNUM, &psr); base-commit: 8bbf03947dd594262e672c1fbc3462a81c811b6f -- 2.14.5