summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-07-15 15:09:55 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-07-15 15:09:55 +0000
commit9364a0ef8a5fc684f786116c2768c540eb62ca02 (patch)
treeb2b4f23e6b1643017fe6c86e83ec3a65eab7ce95 /gdb
parent96a94295f264879774c5c1e175439bd1b09010be (diff)
downloadbinutils-9364a0ef8a5fc684f786116c2768c540eb62ca02.tar.gz
binutils-9364a0ef8a5fc684f786116c2768c540eb62ca02.tar.bz2
binutils-9364a0ef8a5fc684f786116c2768c540eb62ca02.zip
2002-07-15 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn and its setting. Set gdbarch instruction printing functions directly. For non-rs6000 case use new function gdb_print_insn_powerpc. (gdb_print_insn_powerpc): New function.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/rs6000-tdep.c17
2 files changed, 19 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f16a91da4cf..48dadddbb32 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2002-07-15 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn
+ and its setting. Set gdbarch instruction printing functions
+ directly. For non-rs6000 case use new function
+ gdb_print_insn_powerpc.
+ (gdb_print_insn_powerpc): New function.
+
2002-07-13 Andrew Cagney <ac131313@redhat.com>
* NEWS: Mention that the d30v has been marked obsolete.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 2372d25a33a..58b1af757cb 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2402,6 +2402,15 @@ find_variant_by_arch (enum bfd_architecture arch, unsigned long mach)
return NULL;
}
+
+static int
+gdb_print_insn_powerpc (bfd_vma memaddr, disassemble_info *info)
+{
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ return print_insn_big_powerpc (memaddr, info);
+ else
+ return print_insn_little_powerpc (memaddr, info);
+}
/* Initialize the current architecture based on INFO. If possible, re-use an
architecture from ARCHES, which is a list of architectures already created
@@ -2423,7 +2432,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
bfd abfd;
int sysv_abi;
enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
- gdbarch_print_insn_ftype *print_insn;
from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
bfd_get_flavour (info.abfd) == bfd_target_xcoff_flavour;
@@ -2558,12 +2566,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Select instruction printer. */
if (arch == power)
- print_insn = print_insn_rs6000;
- else if (info.byte_order == BFD_ENDIAN_BIG)
- print_insn = print_insn_big_powerpc;
+ set_gdbarch_print_insn (gdbarch, print_insn_rs6000);
else
- print_insn = print_insn_little_powerpc;
- set_gdbarch_print_insn (gdbarch, print_insn);
+ set_gdbarch_print_insn (gdbarch, gdb_print_insn_powerpc);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);