From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AB2MFXFmhGADLgAAWB0awg (envelope-from ) for ; Sat, 24 Apr 2021 14:41:53 -0400 Received: by simark.ca (Postfix, from userid 112) id 49A9D1F149; Sat, 24 Apr 2021 14:41:53 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 5E1451EE74 for ; Sat, 24 Apr 2021 14:41:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9482E396B40B; Sat, 24 Apr 2021 18:41:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9482E396B40B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619289711; bh=037N/MU7EhbuspDjV9ehIvRCsrI2kCNVsiJXkSx35dU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=DFVL/ghg4jGd8qHq1TRsgND8I7dGqkQ3UOBiwhfiHV8eCbCbjnX9FbxRGdd7Oh2/8 KaVRxB1Pxd2iWZ3o4HO7OoVpDiEi9SXK5diQUyDge/ubmdmphPw9nEWfbtPLO2hvhN FcM1Md6Lcxi6J+g24FnDyIIl6xWS8fuoTpeLYws0= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 485F639450E5 for ; Sat, 24 Apr 2021 18:41:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 485F639450E5 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 5A314341352 for ; Sat, 24 Apr 2021 18:41:48 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 3/6] gdb: callback: inline PTR define Date: Sat, 24 Apr 2021 14:41:41 -0400 Message-Id: <20210424184144.23736-3-vapier@gentoo.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210424184144.23736-1-vapier@gentoo.org> References: <20210424184144.23736-1-vapier@gentoo.org> MIME-Version: 1.0 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: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" We require C11 now, so no need for these pre-ANSI C hacks. --- include/gdb/callback.h | 6 +++--- sim/common/callback.c | 2 +- sim/common/sim-syscall.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/gdb/callback.h b/include/gdb/callback.h index b981d94505d6..11a941259f64 100644 --- a/include/gdb/callback.h +++ b/include/gdb/callback.h @@ -249,8 +249,8 @@ typedef struct cb_syscall { int errcode; /* Working space to be used by memory read/write callbacks. */ - PTR p1; - PTR p2; + void *p1; + void *p2; long x1,x2; /* Callbacks for reading/writing memory (e.g. for read/write syscalls). @@ -320,7 +320,7 @@ const char *cb_target_str_signal (host_callback *, int); /* Translate host stat struct to target. If stat struct ptr is NULL, just compute target stat struct size. Result is size of target stat struct or 0 if error. */ -int cb_host_to_target_stat (host_callback *, const struct stat *, PTR); +int cb_host_to_target_stat (host_callback *, const struct stat *, void *); /* Translate a value to target endian. */ void cb_store_target_endian (host_callback *, char *, int, long); diff --git a/sim/common/callback.c b/sim/common/callback.c index 2fec2704f3e0..6b7951d2a5ec 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -915,7 +915,7 @@ cb_store_target_endian (host_callback *cb, char *p, int size, long val) or zero if an error occurred during the translation. */ int -cb_host_to_target_stat (host_callback *cb, const struct stat *hs, PTR ts) +cb_host_to_target_stat (host_callback *cb, const struct stat *hs, void *ts) { const char *m = cb->stat_map; char *p; diff --git a/sim/common/sim-syscall.c b/sim/common/sim-syscall.c index e91453d5ba1f..9dbc71ac9fb0 100644 --- a/sim/common/sim-syscall.c +++ b/sim/common/sim-syscall.c @@ -71,8 +71,8 @@ sim_syscall_multi (SIM_CPU *cpu, int func, long arg1, long arg2, long arg3, sc.arg3 = arg3; sc.arg4 = arg4; - sc.p1 = (PTR) sd; - sc.p2 = (PTR) cpu; + sc.p1 = sd; + sc.p2 = cpu; sc.read_mem = sim_syscall_read_mem; sc.write_mem = sim_syscall_write_mem; -- 2.30.2