This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [Patch] Fix variable type glitch in inf-ptrace.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=28f1c60507ad4ca2252cebada30d2f63ec3b772f

commit 28f1c60507ad4ca2252cebada30d2f63ec3b772f
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Thu Mar 16 09:55:18 2017 +0000

    [Patch] Fix variable type glitch in inf-ptrace.c
    
    gdb/
    	* inf-ptrace.c (inf_ptrace_peek_poke): Change the type to "ULONGEST"
    	for "skip".

Diff:
---
 gdb/ChangeLog    | 5 +++++
 gdb/inf-ptrace.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2658d917..9010d6f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-16  Jiong Wang  <jiong.wang@arm.com>
+
+	* inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
+	"ULONGEST" for "skip".
+
 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
 	PR gdb/21220
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 32794ec..431a36b 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -462,7 +462,7 @@ inf_ptrace_peek_poke (pid_t pid, gdb_byte *readbuf,
   /* We transfer aligned words.  Thus align ADDR down to a word
      boundary and determine how many bytes to skip at the
      beginning.  */
-  unsigned int skip = addr & (sizeof (PTRACE_TYPE_RET) - 1);
+  ULONGEST skip = addr & (sizeof (PTRACE_TYPE_RET) - 1);
   addr -= skip;
 
   for (n = 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]