From: deuling Date: Fri, 16 Nov 2007 04:56:44 +0000 (+0000) Subject: 2007-11-16 Markus Deuling X-Git-Tag: EOL_registry_mounts~1611 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=18b06b7cb48dbce971e6c32bcffbec9674c8eef3;p=pf3gnuchains%2Fpf3gnuchains4x.git 2007-11-16 Markus Deuling * gdbarch.sh (cannot_fetch_register, cannot_store_register): Add gdbarch as parameter. * gdbarch.{c,h}: Regenerate. * alpha-tdep.c (alpha_cannot_fetch_register) (alpha_cannot_store_register): Add gdbarch as parameter. Replace current_gdbarch by gdbarch. * cris-tdep.c (cris_cannot_fetch_register, cris_cannot_store_register) (crisv32_cannot_fetch_register) (crisv32_cannot_store_register): Likewise. * arch-utils.c (cannot_register_not): Likewise. * arch-utils.h (cannot_register_not): Likewise. * hppa-tdep.c (hppa32_cannot_store_register) (hppa32_cannot_store_register, hppa64_cannot_store_register) (hppa64_cannot_fetch_register): Likewise. * mipsnbsd-tdep.c (mipsnbsd_cannot_fetch_register) (mipsnbsd_cannot_store_register): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a4a3bc52e..75a52da78b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,25 @@ 2007-11-16 Markus Deuling + * gdbarch.sh (cannot_fetch_register, cannot_store_register): Add gdbarch + as parameter. + * gdbarch.{c,h}: Regenerate. + + * alpha-tdep.c (alpha_cannot_fetch_register) + (alpha_cannot_store_register): Add gdbarch as parameter. Replace + current_gdbarch by gdbarch. + * cris-tdep.c (cris_cannot_fetch_register, cris_cannot_store_register) + (crisv32_cannot_fetch_register) + (crisv32_cannot_store_register): Likewise. + * arch-utils.c (cannot_register_not): Likewise. + * arch-utils.h (cannot_register_not): Likewise. + * hppa-tdep.c (hppa32_cannot_store_register) + (hppa32_cannot_store_register, hppa64_cannot_store_register) + (hppa64_cannot_fetch_register): Likewise. + * mipsnbsd-tdep.c (mipsnbsd_cannot_fetch_register) + (mipsnbsd_cannot_store_register): Likewise. + +2007-11-16 Markus Deuling + * m32r-rom.c (m32r_supply_register): Use get_regcache_arch to get at the current architecture by regcache. * ppcnbsd-nat.c (ppcnbsd_supply_pcb): Likewise. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index d3bc0c840a..cf3bd7d790 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -77,17 +77,17 @@ alpha_register_name (struct gdbarch *gdbarch, int regno) } static int -alpha_cannot_fetch_register (int regno) +alpha_cannot_fetch_register (struct gdbarch *gdbarch, int regno) { return (regno == ALPHA_ZERO_REGNUM - || strlen (alpha_register_name (current_gdbarch, regno)) == 0); + || strlen (alpha_register_name (gdbarch, regno)) == 0); } static int -alpha_cannot_store_register (int regno) +alpha_cannot_store_register (struct gdbarch *gdbarch, int regno) { return (regno == ALPHA_ZERO_REGNUM - || strlen (alpha_register_name (current_gdbarch, regno)) == 0); + || strlen (alpha_register_name (gdbarch, regno)) == 0); } static struct type * diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 52f4e7487a..c56b983bce 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -125,7 +125,7 @@ default_coff_make_msymbol_special (int val, struct minimal_symbol *msym) } int -cannot_register_not (int regnum) +cannot_register_not (struct gdbarch *gdbarch, int regnum) { return 0; } diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index ee04ad5af3..8d87fbf9ce 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -54,7 +54,7 @@ void default_coff_make_msymbol_special (int val, struct minimal_symbol *msym); /* Version of cannot_fetch_register() / cannot_store_register() that always fails. */ -int cannot_register_not (int regnum); +int cannot_register_not (struct gdbarch *gdbarch, int regnum); /* Legacy version of target_virtual_frame_pointer(). Assumes that there is an gdbarch_deprecated_fp_regnum and that it is the same, cooked or diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 4cbde584be..9e560cfac9 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -1590,9 +1590,9 @@ cris_register_size (int regno) for unimplemented (size 0) and non-existant registers. */ static int -cris_cannot_fetch_register (int regno) +cris_cannot_fetch_register (struct gdbarch *gdbarch, int regno) { - return ((regno < 0 || regno >= gdbarch_num_regs (current_gdbarch)) + return ((regno < 0 || regno >= gdbarch_num_regs (gdbarch)) || (cris_register_size (regno) == 0)); } @@ -1600,7 +1600,7 @@ cris_cannot_fetch_register (int regno) reasons. */ static int -cris_cannot_store_register (int regno) +cris_cannot_store_register (struct gdbarch *gdbarch, int regno) { /* There are three kinds of registers we refuse to write to. 1. Those that not implemented. @@ -1609,7 +1609,7 @@ cris_cannot_store_register (int regno) */ if (regno < 0 - || regno >= gdbarch_num_regs (current_gdbarch) + || regno >= gdbarch_num_regs (gdbarch) || cris_register_size (regno) == 0) /* Not implemented. */ return 1; @@ -1632,9 +1632,9 @@ cris_cannot_store_register (int regno) for unimplemented (size 0) and non-existant registers. */ static int -crisv32_cannot_fetch_register (int regno) +crisv32_cannot_fetch_register (struct gdbarch *gdbarch, int regno) { - return ((regno < 0 || regno >= gdbarch_num_regs (current_gdbarch)) + return ((regno < 0 || regno >= gdbarch_num_regs (gdbarch)) || (cris_register_size (regno) == 0)); } @@ -1642,7 +1642,7 @@ crisv32_cannot_fetch_register (int regno) reasons. */ static int -crisv32_cannot_store_register (int regno) +crisv32_cannot_store_register (struct gdbarch *gdbarch, int regno) { /* There are three kinds of registers we refuse to write to. 1. Those that not implemented. @@ -1651,7 +1651,7 @@ crisv32_cannot_store_register (int regno) */ if (regno < 0 - || regno >= gdbarch_num_regs (current_gdbarch) + || regno >= gdbarch_num_regs (gdbarch) || cris_register_size (regno) == 0) /* Not implemented. */ return 1; diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index c5e1649812..88862c44c8 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -291,8 +291,8 @@ struct gdbarch startup_gdbarch = 0, /* print_float_info */ 0, /* print_vector_info */ 0, /* register_sim_regno */ - 0, /* cannot_fetch_register */ - 0, /* cannot_store_register */ + cannot_register_not, /* cannot_fetch_register */ + cannot_register_not, /* cannot_store_register */ 0, /* get_longjmp_target */ 0, /* believe_pcc_promotion */ generic_convert_register_p, /* convert_register_p */ @@ -1830,7 +1830,7 @@ gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) gdb_assert (gdbarch->cannot_fetch_register != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); - return gdbarch->cannot_fetch_register (regnum); + return gdbarch->cannot_fetch_register (gdbarch, regnum); } void @@ -1847,7 +1847,7 @@ gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) gdb_assert (gdbarch->cannot_store_register != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); - return gdbarch->cannot_store_register (regnum); + return gdbarch->cannot_store_register (gdbarch, regnum); } void diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 355054ae59..5e39512f93 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -300,11 +300,11 @@ typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr); extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr); extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno); -typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum); +typedef int (gdbarch_cannot_fetch_register_ftype) (struct gdbarch *gdbarch, int regnum); extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum); extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register); -typedef int (gdbarch_cannot_store_register_ftype) (int regnum); +typedef int (gdbarch_cannot_store_register_ftype) (struct gdbarch *gdbarch, int regnum); extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum); extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index c8af60a08f..010268aae9 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -445,8 +445,8 @@ M:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const c # MAP a GDB RAW register number onto a simulator register number. See # also include/...-sim.h. f:int:register_sim_regno:int reg_nr:reg_nr::legacy_register_sim_regno::0 -f:int:cannot_fetch_register:int regnum:regnum::cannot_register_not::0 -f:int:cannot_store_register:int regnum:regnum::cannot_register_not::0 +m:int:cannot_fetch_register:int regnum:regnum::cannot_register_not::0 +m:int:cannot_store_register:int regnum:regnum::cannot_register_not::0 # setjmp/longjmp support. F:int:get_longjmp_target:struct frame_info *frame, CORE_ADDR *pc:frame, pc # diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index cbdcd90d92..a484ac885d 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2632,7 +2632,7 @@ hppa64_register_type (struct gdbarch *gdbarch, int regnum) through ptrace/ttrace. */ static int -hppa32_cannot_store_register (int regnum) +hppa32_cannot_store_register (struct gdbarch *gdbarch, int regnum) { return (regnum == 0 || regnum == HPPA_PCSQ_HEAD_REGNUM @@ -2641,17 +2641,17 @@ hppa32_cannot_store_register (int regnum) } static int -hppa32_cannot_fetch_register (int regnum) +hppa32_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) { /* cr26 and cr27 are readable (but not writable) from userspace. */ if (regnum == HPPA_CR26_REGNUM || regnum == HPPA_CR27_REGNUM) return 0; else - return hppa32_cannot_store_register (regnum); + return hppa32_cannot_store_register (gdbarch, regnum); } static int -hppa64_cannot_store_register (int regnum) +hppa64_cannot_store_register (struct gdbarch *gdbarch, int regnum) { return (regnum == 0 || regnum == HPPA_PCSQ_HEAD_REGNUM @@ -2660,13 +2660,13 @@ hppa64_cannot_store_register (int regnum) } static int -hppa64_cannot_fetch_register (int regnum) +hppa64_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) { /* cr26 and cr27 are readable (but not writable) from userspace. */ if (regnum == HPPA_CR26_REGNUM || regnum == HPPA_CR27_REGNUM) return 0; else - return hppa64_cannot_store_register (regnum); + return hppa64_cannot_store_register (gdbarch, regnum); } static CORE_ADDR diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c index f4805a63f6..dd55f95360 100644 --- a/gdb/mipsnbsd-tdep.c +++ b/gdb/mipsnbsd-tdep.c @@ -309,17 +309,17 @@ mipsnbsd_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) } static int -mipsnbsd_cannot_fetch_register (int regno) +mipsnbsd_cannot_fetch_register (struct gdbarch *gdbarch, int regno) { return (regno == MIPS_ZERO_REGNUM - || regno == mips_regnum (current_gdbarch)->fp_implementation_revision); + || regno == mips_regnum (gdbarch)->fp_implementation_revision); } static int -mipsnbsd_cannot_store_register (int regno) +mipsnbsd_cannot_store_register (struct gdbarch *gdbarch, int regno) { return (regno == MIPS_ZERO_REGNUM - || regno == mips_regnum (current_gdbarch)->fp_implementation_revision); + || regno == mips_regnum (gdbarch)->fp_implementation_revision); } /* Shared library support. */