From 28f1c60507ad4ca2252cebada30d2f63ec3b772f Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Thu, 16 Mar 2017 09:55:18 +0000 Subject: [PATCH] [Patch] Fix variable type glitch in inf-ptrace.c gdb/ * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to "ULONGEST" for "skip". --- gdb/ChangeLog | 5 +++++ gdb/inf-ptrace.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2658d91764d..9010d6fcd08 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-03-16 Jiong Wang + + * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to + "ULONGEST" for "skip". + 2017-03-14 Andreas Arnez PR gdb/21220 diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 32794ec132f..431a36b8c72 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; -- 2.30.2