diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2002-05-17 14:36:46 +0000 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@embecosm.com> | 2002-05-17 14:36:46 +0000 |
commit | 1c509ca8216de106f508b463a13ceea60ccce878 (patch) | |
tree | b99f4a21d27157edf9e92d959e57c8e72c4a8a29 /gdb | |
parent | ef60b7ff0e85790141643fc60f82d8d6e86ae014 (diff) | |
download | gdb-1c509ca8216de106f508b463a13ceea60ccce878.zip gdb-1c509ca8216de106f508b463a13ceea60ccce878.tar.gz gdb-1c509ca8216de106f508b463a13ceea60ccce878.tar.bz2 |
print_insn_sh cleanup:
include:
* dis-asm.h (print_insn_shl, print_insn_sh64l): Remove prototype.
gdb:
* sh-tdep.c (gdb_print_insn_sh64): Delete.
(gdb_print_insn_sh): Just set info->endian and use print_insn_sh.
(sh_gdbarch_init): Always use gdb_print_insn_sh.
opcodes:
* disassemble.c (disassembler): Just use print_insn_sh for bfd_arch_sh.
* sh-dis.c (LITTLE_BIT): Delete.
(print_insn_sh, print_insn_shl): Deleted.
(print_insn_shx): Renamed to
(print_insn_sh). No longer static. Handle SHmedia instructions.
Use info->endian to determine endianness.
* sh64-dis.c (print_insn_sh64, print_insn_sh64l): Delete.
(print_insn_sh64x): No longer static. Renamed to
(print_insn_sh64). Removed pfun_compact and endian arguments.
If we got an uneven address to indicate SHmedia, adjust it.
Return -2 for SHcompact instructions.
sim/sh64:
* sim-if.c (sh64_disassemble_insn): Use print_insn_sh instead of
print_insn_shl.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 26 |
2 files changed, 8 insertions, 24 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 94a91e7..f6d1231 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Fri May 17 14:26:19 2002 J"orn Rennecke <joern.rennecke@superh.com> + + * sh-tdep.c (gdb_print_insn_sh64): Delete. + (gdb_print_insn_sh): Just set info->endian and use print_insn_sh. + (sh_gdbarch_init): Always use gdb_print_insn_sh. + 2002-05-17 Corinna Vinschen <vinschen@redhat.com> * NEWS: Add section for multi-arched targets. Add v850 to that section. diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 4f5a251..55909e2 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -908,29 +908,8 @@ sh_store_struct_return (CORE_ADDR addr, CORE_ADDR sp) static int gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info) { - if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) - return print_insn_sh (memaddr, info); - else - return print_insn_shl (memaddr, info); -} - -/* Disassemble an instruction. */ -static int -gdb_print_insn_sh64 (bfd_vma memaddr, disassemble_info *info) -{ - if (pc_is_isa32 (memaddr)) - { - /* Round down the instruction address to the appropriate boundary - before disassembling it. */ - return print_insn_sh64x_media (UNMAKE_ISA32_ADDR (memaddr), info); - } - else - { - if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) - return print_insn_sh (memaddr, info); - else - return print_insn_shl (memaddr, info); - } + info->endian = TARGET_BYTE_ORDER; + return print_insn_sh (memaddr, info); } /* Given a GDB frame, determine the address of the calling function's frame. @@ -4684,7 +4663,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) sh_store_return_value = sh64_store_return_value; skip_prologue_hard_way = sh64_skip_prologue_hard_way; do_pseudo_register = sh64_do_pseudo_register; - set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh64); set_gdbarch_register_raw_size (gdbarch, sh_sh64_register_raw_size); set_gdbarch_register_virtual_size (gdbarch, sh_sh64_register_raw_size); set_gdbarch_register_byte (gdbarch, sh_sh64_register_byte); |