This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [5/6] Remove macro CANNOT_FETCH / STORE_REGISTERS
- From: Jim Blandy <jimb at codesourcery dot com>
- To: Markus Deuling <deuling at de dot ibm dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 30 May 2007 14:23:49 -0700
- Subject: Re: [rfc] [5/6] Remove macro CANNOT_FETCH / STORE_REGISTERS
- References: <465BD44E.3060103@de.ibm.com>
Markus Deuling <deuling@de.ibm.com> writes:
> ChangeLog:
>
> * gdbarch.sh (CANNOT_FETCH_REGISTER): Replace by
> gdbarch_cannot_fetch_register.
> * alpha-nat.c (fetch_osf_core_registers): Likewise.
> * hppa-linux-nat.c (fetch_register): Likewise.
> * inf-ptrace.c (inf_ptrace_fetch_register): Likewise.
> * m68klinux-nat.c (fetch_register): Likewise.
> * mipsnbsd-tdep.c (mipsnbsd_supply_reg,mipsnbsd_supply_fpreg): Likewise:
> * gdbarch.sh (CANNOT_STORE_REGISTER): Replace by
> gdbarch_cannot_store_register.
> * hppa-linux-nat.c (store_register): Likewise.
> * inf-ptrace.c (inf_ptrace_store_register): Likewise.
> * regcache.c (regcache_raw_write): Likewise.
> * m68klinux-nat.c (store_register): Likewise.
> * mipsnbsd-tdep.c (mipsnbsd_fill_reg, mipsnbsd_fill_fpreg): Likewise.
> * gdbarch.c, gdbarch.h: Regenerate.
>
>
> Is this ok to commit?
Yes, once the copyright assignment issues are sorted out, and the
minor issue noted below is fixed.
> diff -urN src/gdb/inf-ptrace.c dev/gdb/inf-ptrace.c
> --- src/gdb/inf-ptrace.c 2007-05-11 14:04:57.000000000 +0200
> +++ dev/gdb/inf-ptrace.c 2007-05-18 12:41:38.000000000 +0200
> @@ -626,7 +626,8 @@
>
> /* This isn't really an address, but ptrace thinks of it as one. */
> addr = inf_ptrace_register_u_offset (current_gdbarch, regnum, 0);
> - if (addr == (CORE_ADDR)-1 || CANNOT_FETCH_REGISTER (regnum))
> + if (addr == (CORE_ADDR)-1
> + || gdbarch_cannot_fetch_register (current_gdbarch ,regnum))
The comma should come immediately after current_gdbarch.