From ae3e2ccfe75e5c62749c15ead5c95e052aad21ca Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 17 Jun 2017 23:19:08 +0200 Subject: linux-low: Remove usage of "register" keyword AFAIK, the register keyword is not relevant today, and clang complains about it: /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-low.c:5873:3: error: 'register' storage class specifier is deprecated and incompatible with C++1z [-Werror,-Wdeprecated-register] register PTRACE_XFER_TYPE *buffer; ^~~~~~~~~ I think we can safely remove it. gdb/gdbserver/ChangeLog: * linux-low.c (linux_read_memory, linux_write_memory): Remove usage of "register" keyword. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/linux-low.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a90a562..c190fce 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,10 @@ 2017-06-17 Simon Marchi + * linux-low.c (linux_read_memory, linux_write_memory): Remove + usage of "register" keyword. + +2017-06-17 Simon Marchi + * configure: Re-generate. 2017-06-17 Simon Marchi diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 7fbf744..c8e8d08 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -5870,11 +5870,11 @@ static int linux_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) { int pid = lwpid_of (current_thread); - register PTRACE_XFER_TYPE *buffer; - register CORE_ADDR addr; - register int count; + PTRACE_XFER_TYPE *buffer; + CORE_ADDR addr; + int count; char filename[64]; - register int i; + int i; int ret; int fd; @@ -5958,16 +5958,16 @@ linux_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) static int linux_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) { - register int i; + int i; /* Round starting address down to longword boundary. */ - register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE); + CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE); /* Round ending address up; get number of longwords that makes. */ - register int count + int count = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1) / sizeof (PTRACE_XFER_TYPE); /* Allocate buffer of that many longwords. */ - register PTRACE_XFER_TYPE *buffer = XALLOCAVEC (PTRACE_XFER_TYPE, count); + PTRACE_XFER_TYPE *buffer = XALLOCAVEC (PTRACE_XFER_TYPE, count); int pid = lwpid_of (current_thread); -- cgit v1.1