diff options
author | Markus Deuling <deuling@de.ibm.com> | 2007-11-07 06:33:01 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2007-11-07 06:33:01 +0000 |
commit | 67d57894593345f23efe728f00b0a8c72216b962 (patch) | |
tree | e8afe7cf652a46cb92493e2636f547b04a5b9738 /gdb | |
parent | 7a22ecfc4b49af6e821525efa9c2f61bc7a959d8 (diff) | |
download | gdb-67d57894593345f23efe728f00b0a8c72216b962.zip gdb-67d57894593345f23efe728f00b0a8c72216b962.tar.gz gdb-67d57894593345f23efe728f00b0a8c72216b962.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 44 | ||||
-rw-r--r-- | gdb/alpha-tdep.c | 2 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 4 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 2 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 2 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.h | 2 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 3 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 2 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/iq2000-tdep.c | 8 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m32r-tdep.c | 4 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 5 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 3 | ||||
-rw-r--r-- | gdb/m88k-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 4 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 3 | ||||
-rw-r--r-- | gdb/mt-tdep.c | 5 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 8 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/score-tdep.c | 5 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 4 | ||||
-rw-r--r-- | gdb/sh64-tdep.c | 4 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 2 | ||||
-rw-r--r-- | gdb/spu-tdep.c | 2 | ||||
-rw-r--r-- | gdb/v850-tdep.c | 2 | ||||
-rw-r--r-- | gdb/vax-tdep.c | 2 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 3 | ||||
-rw-r--r-- | gdb/xtensa-tdep.c | 9 |
34 files changed, 103 insertions, 49 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e357733..9450432 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,49 @@ 2007-11-07 Markus Deuling <deuling@de.ibm.com> + * gdbarch.sh (breakpoint_from_pc): Add gdbarch parameter. + * gdbarch.{c,h}: Regenerate. + + * xtensa-tdep.c (xtensa_breakpoint_from_pc): Add gdbarch parameter. + Replace current_gdbarch by gdbarch. + * sh-tdep.c (sh_breakpoint_from_pc): Likewise. + * sh64-tdep.c (sh64_breakpoint_from_pc): Likewise. + * score-tdep.c (score_breakpoint_from_pc): Likewise. + * mips-tdep.c (mips_breakpoint_from_pc): Likewise. + * m32r-tdep.c (m32r_breakpoint_from_pc): Likewise. + * iq2000-tdep.c (iq2000_breakpoint_from_pc): Likewise. + * arm-tdep.c (arm_breakpoint_from_pc): Likewise. + + * xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Add gdbarch + parameter. + * vax-tdep.c (vax_breakpoint_from_pc): Likewise. + * v850-tdep.c (v850_breakpoint_from_pc): Likewise. + * spu-tdep.c (spu_breakpoint_from_pc): Likewise. + * sparc-tdep.c (sparc_breakpoint_from_pc): Likewise. + * s390-tdep.c (s390_breakpoint_from_pc): Likewise. + * mn10300-tdep.c (mn10300_breakpoint_from_pc): Likewise. + * mt-tdep.c (mt_breakpoint_from_pc): Likewise. + * mep-tdep.c (mep_breakpoint_from_pc): Likewise. + * m88k-tdep.c (m88k_breakpoint_from_pc): Likewise. + * m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Likewise. + * m32c-tdep.c (m32c_breakpoint_from_pc): Likewise. + * ia64-tdep.c (ia64_breakpoint_from_pc): Likewise. + * i386-tdep.c (i386_breakpoint_from_pc): Likewise. + * hppa-tdep.c (hppa_breakpoint_from_pc): Likewise. + * h8300-tdep.c (h8300_breakpoint_from_pc): Likewise. + * frv-tdep.c (frv_breakpoint_from_pc): Likewise. + * cris-tdep.c (cris_breakpoint_from_pc): Likewise. + * avr-tdep.c (avr_breakpoint_from_pc): Likewise. + * alpha-tdep.c (alpha_breakpoint_from_pc): Likewise. + * m68k-tdep.c (m68k_local_breakpoint_from_pc): Likewise. + + * rs6000-tdep.c (rs6000_breakpoint_from_pc): Add gdbarch parameter. + Replace current_gdbarch by gdbarch. + (rs6000_software_single_step): Use get_frame_arch to get at the + current architecture by frame_info. Add gdbarch to + rs6000_breakpoint_from_pc call. + +2007-11-07 Markus Deuling <deuling@de.ibm.com> + * frv-tdep.c (frv_register_name, frv_check_watch_resources): Replace macro CURRENT_VARIANT by its expression. (CURRENT_VARIANT): Remove. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 6efb85b..a77ad25 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -599,7 +599,7 @@ alpha_return_in_memory_always (struct type *type) } static const gdb_byte * -alpha_breakpoint_from_pc (CORE_ADDR *pc, int *len) +alpha_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static const gdb_byte break_insn[] = { 0x80, 0, 0, 0 }; /* call_pal bpt */ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index b0db482..6f0fea6 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -2068,9 +2068,9 @@ static const char arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT; breakpoint should be inserted. */ static const unsigned char * -arm_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +arm_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (arm_pc_is_thumb (*pcptr)) { diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 22349f9..772c1f4 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -788,7 +788,7 @@ avr_skip_prologue (CORE_ADDR pc) only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */ static const unsigned char * -avr_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) +avr_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR * pcptr, int *lenptr) { static unsigned char avr_break_insn [] = { 0x98, 0x95 }; *lenptr = sizeof (avr_break_insn); diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index ca3b433..4cbde58 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -1490,7 +1490,7 @@ cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) the breakpoint should be inserted. */ static const unsigned char * -cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +cris_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { static unsigned char break8_insn[] = {0x38, 0xe9}; static unsigned char break15_insn[] = {0x3f, 0xe9}; diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index fa88d64..6f49f0a 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -416,7 +416,7 @@ frv_register_sim_regno (int reg) } static const unsigned char * -frv_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenp) +frv_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenp) { static unsigned char breakpoint[] = {0xc0, 0x70, 0x00, 0x01}; *lenp = sizeof (breakpoint); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 1f5993e..d84dca4 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -2106,7 +2106,7 @@ gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenp gdb_assert (gdbarch->breakpoint_from_pc != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); - return gdbarch->breakpoint_from_pc (pcptr, lenptr); + return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr); } void diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 6674159..d27498b 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -372,7 +372,7 @@ typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs); extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs); extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than); -typedef const gdb_byte * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr); +typedef const gdb_byte * (gdbarch_breakpoint_from_pc_ftype) (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); extern const gdb_byte * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 7112b04..f284033 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -473,7 +473,7 @@ M:enum return_value_convention:return_value:struct type *valtype, struct regcach f:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0 f:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0 -f:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0: +m:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0: M:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr f:int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0 f:int:memory_remove_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_remove_breakpoint::0 diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index ee67d4f..b83994a 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1193,7 +1193,8 @@ h8300s_dbg_reg_to_regnum (int regno) } const static unsigned char * -h8300_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +h8300_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, + int *lenptr) { /*static unsigned char breakpoint[] = { 0x7A, 0xFF }; *//* ??? */ static unsigned char breakpoint[] = { 0x01, 0x80 }; /* Sleep */ diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 52b7d55..cbdcd90 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -571,7 +571,7 @@ hppa_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc) } static const unsigned char * -hppa_breakpoint_from_pc (CORE_ADDR *pc, int *len) +hppa_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static const unsigned char breakpoint[] = {0x00, 0x01, 0x00, 0x04}; (*len) = sizeof (breakpoint); diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 736a56e..f385c20 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -278,7 +278,7 @@ static const char *disassembly_flavor = att_flavor; This function is 64-bit safe. */ static const gdb_byte * -i386_breakpoint_from_pc (CORE_ADDR *pc, int *len) +i386_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static gdb_byte break_insn[] = { 0xcc }; /* int 3 */ diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 09fe676..cd2daf8 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -620,7 +620,7 @@ ia64_memory_remove_breakpoint (struct bp_target_info *bp_tgt) /* We don't really want to use this, but remote.c needs to call it in order to figure out if Z-packets are supported or not. Oh, well. */ const unsigned char * -ia64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +ia64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { static unsigned char breakpoint[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c index c7f49de..1e95077 100644 --- a/gdb/iq2000-tdep.c +++ b/gdb/iq2000-tdep.c @@ -490,7 +490,8 @@ static const struct frame_base iq2000_frame_base = { }; static const unsigned char * -iq2000_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +iq2000_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, + int *lenptr) { static const unsigned char big_breakpoint[] = { 0x00, 0x00, 0x00, 0x0d }; static const unsigned char little_breakpoint[] = { 0x0d, 0x00, 0x00, 0x00 }; @@ -500,9 +501,8 @@ iq2000_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) (long) *pcptr); *lenptr = 4; - return (gdbarch_byte_order (current_gdbarch) - == BFD_ENDIAN_BIG) ? big_breakpoint - : little_breakpoint; + return (gdbarch_byte_order (gdbarch) + == BFD_ENDIAN_BIG) ? big_breakpoint : little_breakpoint; } /* Target function return value methods: */ diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 83c97cf..db25f6c 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -976,7 +976,7 @@ make_regs (struct gdbarch *arch) /* Breakpoints. */ static const unsigned char * -m32c_breakpoint_from_pc (CORE_ADDR *pc, int *len) +m32c_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static unsigned char break_insn[] = { 0x00 }; /* brk */ diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index 43c5852..87af759 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -166,14 +166,14 @@ m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt) } static const gdb_byte * -m32r_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +m32r_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { static gdb_byte be_bp_entry[] = { 0x10, 0xf1, 0x70, 0x00 }; /* dpt -> nop */ static gdb_byte le_bp_entry[] = { 0x00, 0x70, 0xf1, 0x10 }; /* dpt -> nop */ gdb_byte *bp; /* Determine appropriate breakpoint. */ - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { if ((*pcptr & 3) == 0) { diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index d02e163..36ddd91 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -387,10 +387,11 @@ m68hc11_register_name (struct gdbarch *gdbarch, int reg_nr) } static const unsigned char * -m68hc11_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +m68hc11_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, + int *lenptr) { static unsigned char breakpoint[] = {0x0}; - + *lenptr = sizeof (breakpoint); return breakpoint; } diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 5523be0..98f048e 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -61,7 +61,8 @@ #endif static const gdb_byte * -m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +m68k_local_breakpoint_from_pc (struct gdbarch *gdbarch, + CORE_ADDR *pcptr, int *lenptr) { static gdb_byte break_insn[] = {0x4e, (0x40 | BPT_VECTOR)}; *lenptr = sizeof (break_insn); diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index e638959..6b96475 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -101,7 +101,7 @@ m88k_addr_bits_remove (CORE_ADDR addr) location for inserting the breakpoint. */ static const gdb_byte * -m88k_breakpoint_from_pc (CORE_ADDR *pc, int *len) +m88k_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { /* tb 0,r0,511 */ static gdb_byte break_insn[] = { 0xf0, 0x00, 0xd1, 0xff }; diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 5ff87e7..b6038cc 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -1913,7 +1913,7 @@ mep_skip_prologue (CORE_ADDR pc) /* Breakpoints. */ static const unsigned char * -mep_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) +mep_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR * pcptr, int *lenptr) { static unsigned char breakpoint[] = { 0x70, 0x32 }; *lenptr = sizeof (breakpoint); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index fa86fa0..1a2b554 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4800,9 +4800,9 @@ gdb_print_insn_mips (bfd_vma memaddr, struct disassemble_info *info) should be inserted. */ static const gdb_byte * -mips_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +mips_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { if (mips_pc_is_mips16 (*pcptr)) { diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index df63d80..3cd2f2f 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -288,7 +288,8 @@ mn10300_write_pc (struct regcache *regcache, CORE_ADDR val) one, so we defined it ourselves. */ const static unsigned char * -mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size) +mn10300_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, + int *bp_size) { static char breakpoint[] = {0xff}; *bp_size = 1; diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c index 2513bdd..aad1351 100644 --- a/gdb/mt-tdep.c +++ b/gdb/mt-tdep.c @@ -451,13 +451,14 @@ mt_skip_prologue (CORE_ADDR pc) The BP for ms2 is defined as 0x69000000 (illegal) */ static const gdb_byte * -mt_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size) +mt_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, + int *bp_size) { static gdb_byte ms1_breakpoint[] = { 0x68, 0, 0, 0 }; static gdb_byte ms2_breakpoint[] = { 0x69, 0, 0, 0 }; *bp_size = 4; - if (gdbarch_bfd_arch_info (current_gdbarch)->mach == bfd_mach_ms2) + if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_ms2) return ms2_breakpoint; return ms1_breakpoint; diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index bf53c42..9cb560a 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -965,12 +965,13 @@ branch_dest (struct frame_info *frame, int opcode, int instr, /* Sequence of bytes for breakpoint instruction. */ const static unsigned char * -rs6000_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size) +rs6000_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, + int *bp_size) { static unsigned char big_breakpoint[] = { 0x7d, 0x82, 0x10, 0x08 }; static unsigned char little_breakpoint[] = { 0x08, 0x10, 0x82, 0x7d }; *bp_size = 4; - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) return big_breakpoint; else return little_breakpoint; @@ -1079,7 +1080,8 @@ rs6000_software_single_step (struct frame_info *frame) { CORE_ADDR dummy; int breakp_sz; - const gdb_byte *breakp = rs6000_breakpoint_from_pc (&dummy, &breakp_sz); + const gdb_byte *breakp + = rs6000_breakpoint_from_pc (get_frame_arch (frame), &dummy, &breakp_sz); int ii, insn; CORE_ADDR loc; CORE_ADDR breaks[2]; diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 0c3f6f6..f8d5ac7 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -2256,7 +2256,7 @@ s390_return_value (struct gdbarch *gdbarch, struct type *type, /* Breakpoints. */ static const gdb_byte * -s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +s390_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { static const gdb_byte breakpoint[] = { 0x0, 0x1 }; diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index 8df499e..d973107 100644 --- a/gdb/score-tdep.c +++ b/gdb/score-tdep.c @@ -321,7 +321,8 @@ score_print_insn (bfd_vma memaddr, struct disassemble_info *info) } static const gdb_byte * -score_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +score_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, + int *lenptr) { gdb_byte buf[SCORE_INSTLEN] = { 0 }; int ret; @@ -334,7 +335,7 @@ score_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) } raw = extract_unsigned_integer (buf, SCORE_INSTLEN); - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { if (!(raw & 0x80008000)) { diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index d9b7304..1e04a8f 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -382,7 +382,7 @@ sh_sh4al_dsp_register_name (struct gdbarch *gdbarch, int reg_nr) } static const unsigned char * -sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +sh_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { /* 0xc3c3 is trapa #c3, and it works in big and little endian modes */ static unsigned char breakpoint[] = { 0xc3, 0xc3 }; @@ -393,7 +393,7 @@ sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) static unsigned char big_remote_breakpoint[] = { 0xc3, 0x20 }; static unsigned char little_remote_breakpoint[] = { 0x20, 0xc3 }; - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { *lenptr = sizeof (big_remote_breakpoint); return big_remote_breakpoint; diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index d26b82c..2b01c19 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -252,7 +252,7 @@ pc_is_isa32 (bfd_vma memaddr) } static const unsigned char * -sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +sh64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { /* The BRK instruction for shmedia is 01101111 11110101 11111111 11110000 @@ -264,7 +264,7 @@ sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) which translates in big endian mode to 0x0, 0x3b and in little endian mode to 0x3b, 0x0*/ - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { if (pc_is_isa32 (*pcptr)) { diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 60eccd2..6b8d852 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -528,7 +528,7 @@ sparc32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, location for inserting the breakpoint. */ static const gdb_byte * -sparc_breakpoint_from_pc (CORE_ADDR *pc, int *len) +sparc_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static const gdb_byte break_insn[] = { 0x91, 0xd0, 0x20, 0x01 }; diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 7fb99a4..f5d0081 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -1247,7 +1247,7 @@ spu_return_value (struct gdbarch *gdbarch, struct type *type, /* Breakpoints. */ static const gdb_byte * -spu_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) +spu_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR * pcptr, int *lenptr) { static const gdb_byte breakpoint[] = { 0x00, 0x00, 0x3f, 0xff }; diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 742db7a..eb07350 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -804,7 +804,7 @@ v850_return_value (struct gdbarch *gdbarch, struct type *type, } const static unsigned char * -v850_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +v850_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) { static unsigned char breakpoint[] = { 0x85, 0x05 }; *lenptr = sizeof (breakpoint); diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index c1ff3a0..346a59d 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -255,7 +255,7 @@ vax_return_value (struct gdbarch *gdbarch, struct type *type, location for inserting the breakpoint. */ static const gdb_byte * -vax_breakpoint_from_pc (CORE_ADDR *pc, int *len) +vax_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static gdb_byte break_insn[] = { 3 }; diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 7cd6410..42d8546 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -490,7 +490,8 @@ xstormy16_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc) } const static unsigned char * -xstormy16_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +xstormy16_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, + int *lenptr) { static unsigned char breakpoint[] = { 0x06, 0x0 }; *lenptr = sizeof (breakpoint); diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 52aa7be..1653d3b 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -1788,7 +1788,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, #define DENSITY_LITTLE_BREAKPOINT { 0x2d, 0xf0 } static const unsigned char * -xtensa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) +xtensa_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, + int *lenptr) { static unsigned char big_breakpoint[] = BIG_BREAKPOINT; static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT; @@ -1797,9 +1798,9 @@ xtensa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) DEBUGTRACE ("xtensa_breakpoint_from_pc (pc = 0x%08x)\n", (int) *pcptr); - if (gdbarch_tdep (current_gdbarch)->isa_use_density_instructions) + if (gdbarch_tdep (gdbarch)->isa_use_density_instructions) { - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { *lenptr = sizeof (density_big_breakpoint); return density_big_breakpoint; @@ -1812,7 +1813,7 @@ xtensa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr) } else { - if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { *lenptr = sizeof (big_breakpoint); return big_breakpoint; |