From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/6] gdb: callback: inline PTR define
Date: Sat, 24 Apr 2021 14:41:41 -0400 [thread overview]
Message-ID: <20210424184144.23736-3-vapier@gentoo.org> (raw)
In-Reply-To: <20210424184144.23736-1-vapier@gentoo.org>
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
next prev parent reply other threads:[~2021-04-24 18:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-24 18:41 [PATCH 1/6] gdb: callback: always include necessary headers Mike Frysinger via Gdb-patches
2021-04-24 18:41 ` [PATCH 2/6] gdb: callback: use ATTRIBUTE_NORETURN Mike Frysinger via Gdb-patches
2021-04-24 18:41 ` Mike Frysinger via Gdb-patches [this message]
2021-04-24 18:41 ` [PATCH 4/6] sim: callback: inline wrap helper Mike Frysinger via Gdb-patches
2021-04-24 18:41 ` [PATCH 5/6] sim: callback: convert time interface to 64-bit Mike Frysinger via Gdb-patches
2021-04-24 21:11 ` Tom Tromey
2021-04-24 22:36 ` Mike Frysinger via Gdb-patches
2021-05-14 5:39 ` [PATCH 5/6 v2] " Mike Frysinger via Gdb-patches
2021-05-14 14:00 ` Tom Tromey
2021-04-24 18:41 ` [PATCH 6/6] sim: callback: convert FS interfaces " Mike Frysinger via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210424184144.23736-3-vapier@gentoo.org \
--to=gdb-patches@sourceware.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox