From: Markus Deuling Date: Wed, 7 Nov 2007 06:33:01 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67d57894593345f23efe728f00b0a8c72216b962;p=binutils-gdb.git *** empty log message *** --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e357733c749..945043294e5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,47 @@ +2007-11-07 Markus Deuling + + * 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 * frv-tdep.c (frv_register_name, frv_check_watch_resources): Replace diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 6efb85b6675..a77ad25b49d 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 b0db482edfe..6f0fea6b9cc 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 22349f913c5..772c1f48bd3 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 ca3b433a087..4cbde584be2 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 fa88d64ce56..6f49f0a551d 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 1f5993e9064..d84dca48b16 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 6674159cdad..d27498b9748 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 7112b04c4d6..f2840338f89 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 ee67d4fe0bb..b83994adf11 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 52b7d555f80..cbdcd90d927 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 736a56ec203..f385c20982b 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 09fe676affa..cd2daf8128f 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 c7f49def71d..1e95077eac1 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 83c97cfb2ce..db25f6c86e3 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 43c58526fbc..87af759acde 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 d02e1637fdc..36ddd919eeb 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 5523be04782..98f048ef84a 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 e638959198f..6b9647520f9 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 5ff87e7ec0d..b6038cc4832 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 fa86fa0d927..1a2b55416de 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 df63d80052e..3cd2f2f8db8 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 2513bdd48f4..aad13518d0b 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 bf53c421c7e..9cb560a169e 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 0c3f6f65b4f..f8d5ac752cc 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 8df499e1202..d97310729f5 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 d9b7304430a..1e04a8f65e4 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 d26b82c8c67..2b01c19ad45 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 60eccd2c31b..6b8d8527318 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 7fb99a46314..f5d0081c120 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 742db7a5133..eb07350e91c 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 c1ff3a012de..346a59d1440 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 7cd6410f6a0..42d854605d3 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 52aa7be7ae8..1653d3bbe46 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;