From 4463ce244d595312be683e7df686eea59a4a1987 Mon Sep 17 00:00:00 2001 From: Aleksandar Ristovski Date: Mon, 22 Jun 2009 19:33:41 +0000 Subject: [PATCH] * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0. * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers. * regcache.c (get_regcache): Likewise. * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion. * win32-low.c (child_fetch_inferior_registers): Remove check for regno 0. --- gdb/gdbserver/ChangeLog | 9 +++++++++ gdb/gdbserver/linux-low.c | 2 +- gdb/gdbserver/proc-service.c | 2 +- gdb/gdbserver/regcache.c | 2 +- gdb/gdbserver/spu-low.c | 4 ---- gdb/gdbserver/win32-low.c | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index b973d55a679..f2d55c45daf 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,12 @@ +2009-06-22 Aleksandar Ristovski + + * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0. + * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers. + * regcache.c (get_regcache): Likewise. + * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion. + * win32-low.c (child_fetch_inferior_registers): Remove check for + regno 0. + 2009-06-19 Aleksandar Ristovski Pedro Alves diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 21bf523a9e0..7ff112e5c77 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -2054,7 +2054,7 @@ error_exit:; static void usr_fetch_inferior_registers (int regno) { - if (regno == -1 || regno == 0) + if (regno == -1) for (regno = 0; regno < the_low_target.num_regs; regno++) fetch_register (regno); else diff --git a/gdb/gdbserver/proc-service.c b/gdb/gdbserver/proc-service.c index 7999f4ad96a..76eb424888e 100644 --- a/gdb/gdbserver/proc-service.c +++ b/gdb/gdbserver/proc-service.c @@ -110,7 +110,7 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset) save_inferior = current_inferior; current_inferior = reg_inferior; - the_target->fetch_registers (0); + the_target->fetch_registers (-1); gregset_info()->fill_function (gregset); current_inferior = save_inferior; diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c index 9b9330740cb..c61a6052420 100644 --- a/gdb/gdbserver/regcache.c +++ b/gdb/gdbserver/regcache.c @@ -53,7 +53,7 @@ get_regcache (struct thread_info *inf, int fetch) /* FIXME - fetch registers for INF */ if (fetch && regcache->registers_valid == 0) { - fetch_inferior_registers (0); + fetch_inferior_registers (-1); regcache->registers_valid = 1; } diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index 8307c4edba0..89d80c25918 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -471,10 +471,6 @@ spu_fetch_registers (int regno) int fd; CORE_ADDR addr; - /* ??? Some callers use 0 to mean all registers. */ - if (regno == 0) - regno = -1; - /* We must be stopped on a spu_run system call. */ if (!parse_spufs_run (&fd, &addr)) return; diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index f3943abfd90..869a1cdba79 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -331,7 +331,7 @@ child_fetch_inferior_registers (int r) { int regno; win32_thread_info *th = thread_rec (current_inferior_ptid (), TRUE); - if (r == -1 || r == 0 || r > NUM_REGS) + if (r == -1 || r > NUM_REGS) child_fetch_inferior_registers (NUM_REGS); else for (regno = 0; regno < r; regno++) -- 2.30.2