* [PATCH obv] Replace long int * cast with PTRACE_TYPE_RET *
@ 2015-11-11 20:19 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2015-11-11 20:19 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
FYI, I pushed this as obvious.
These casts use the typedef target type (long int *) instead of the
typedef name. This was a little mistake in one of the big C++ cast
patches.
gdb/ChangeLog:
* inf-ptrace.c (inf_ptrace_fetch_register): Change long int *
cast to PTRACE_TYPE_RET *.
(inf_ptrace_store_register): Likewise.
---
gdb/ChangeLog | 6 ++++++
gdb/inf-ptrace.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 604ec4d..cd5b9e7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-11-11 Simon Marchi <simon.marchi@ericsson.com>
+
+ * inf-ptrace.c (inf_ptrace_fetch_register): Change long int *
+ cast to PTRACE_TYPE_RET *.
+ (inf_ptrace_store_register): Likewise.
+
2015-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
* avr-tdep.c (_initialize_avr_tdep): Switch to 'add_info' for creating
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index c98de4a..55abd82 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -728,7 +728,7 @@ inf_ptrace_fetch_register (struct regcache *regcache, int regnum)
size = register_size (gdbarch, regnum);
gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
- buf = (long int *) alloca (size);
+ buf = (PTRACE_TYPE_RET *) alloca (size);
/* Read the register contents from the inferior a chunk at a time. */
for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
@@ -786,7 +786,7 @@ inf_ptrace_store_register (const struct regcache *regcache, int regnum)
size = register_size (gdbarch, regnum);
gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0);
- buf = (long int *) alloca (size);
+ buf = (PTRACE_TYPE_RET *) alloca (size);
/* Write the register contents into the inferior a chunk at a time. */
regcache_raw_collect (regcache, regnum, buf);
--
2.5.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-11 20:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11 20:19 [PATCH obv] Replace long int * cast with PTRACE_TYPE_RET * Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).