]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix some little endian problems
authorMichael Meissner <gnu@the-meissners.org>
Tue, 6 Jun 1995 14:49:32 +0000 (14:49 +0000)
committerMichael Meissner <gnu@the-meissners.org>
Tue, 6 Jun 1995 14:49:32 +0000 (14:49 +0000)
gdb/ChangeLog
gdb/config/rs6000/tm-rs6000.h
gdb/rs6000-tdep.c

index e0390fb0003b3a838f8da123727641054c7fd3de..47db0537237fad93fb0a5d1700242f6445c7bf31 100644 (file)
@@ -1,3 +1,31 @@
+Tue Jun  6 10:44:25 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
+
+       From Andrew Cagney <cagney@highland.com.au>
+       * rs6000-tdep.c (single_step): Handle both little and big endian
+       breakpoints.
+       (gdb_print_insn_powerpc): Deal with disassembling both little and
+       big endian PowerPC systems.
+       (_initialize_rs6000_tdep): Use gdb_print_insn_powerpc to handle
+       disassembly, rather that assuming big endian order.
+
+       * config/rs6000/tm-rs6000.h (BREAKPOINT): Delete.
+       (BIG_BREAKPOINT): Define, big endian breakpoint instruction.
+       (LITTLE_BREAKPOINT): Define, little endian breakpoint instruction.
+
+Sat Jun  3 01:54:56 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
+
+       * README:  Add note about Unixware 2.x.
+
+       * dbxread.c (process_one_symbol):  Check for exact symbol name
+       match when fixing up N_GSYM and N_STSYM symbols from Sun acc.
+
+       * valprint.c (value_print_array_elements):  Use
+       fprintf_filtered to put out `<repeats %u times>',
+       from schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
+
+       * value.h (struct value):  Change `repetitions' field from
+       `short' to `int' type.
+
 start-sanitize-arc
 Fri Jun  2 11:17:23 1995  Doug Evans  <dje@canuck.cygnus.com>
 
index 5e63f826988912261a722809ec4c50d1e3d3070c..c01e2783c084c896dea07e23714412f2e13932f2 100644 (file)
@@ -43,10 +43,6 @@ extern char *corefile;
 #endif
 extern int inferior_pid;
 
-/* setpgrp() messes up controling terminal. The other version of it
-   requires libbsd.a. */
-#define        setpgrp(XX,YY)          setpgid (XX, YY)
-
 /* We are missing register descriptions in the system header files. Sigh! */
 
 struct regs {
@@ -153,7 +149,8 @@ function_frame_info PARAMS ((CORE_ADDR, struct aix_framedata *));
 
 /* Sequence of bytes for breakpoint instruction.  */
 
-#define BREAKPOINT {0x7d, 0x82, 0x10, 0x08}
+#define BIG_BREAKPOINT { 0x7d, 0x82, 0x10, 0x08 }
+#define LITTLE_BREAKPOINT { 0x08, 0x10, 0x82, 0x7d }
 
 /* Amount PC must be decremented by after a breakpoint.
    This is often the number of bytes in BREAKPOINT
@@ -405,7 +402,7 @@ CORE_ADDR rs6000_frame_chain PARAMS ((struct frame_info *));
     /* We're in get_prev_frame_info */ \
     /* and this is a special signal frame.  */ \
     /* (fi->pc will be some low address in the kernel, */ \
-    /*  to which the signal handler returns).  */
+    /*  to which the signal handler returns).  */ \
     fi->signal_handler_caller = 1;
 
 /* If the kernel has to deliver a signal, it pushes a sigcontext
index e6e31aa5433eaf531e7e22ba9c33b70653b706d9..89c3ddd54d2b4a59f6312a10a7a2ff82c7980ec9 100644 (file)
@@ -126,7 +126,9 @@ single_step (signal)
 {
 #define        INSNLEN(OPCODE)  4
 
-  static char breakp[] = BREAKPOINT;
+  static char le_breakp[] = LITTLE_BREAKPOINT;
+  static char be_breakp[] = BIG_BREAKPOINT;
+  char *breakp = TARGET_BYTE_ORDER == BIG_ENDIAN ? be_breakp : le_breakp;
   int ii, insn;
   CORE_ADDR loc;
   CORE_ADDR breaks[2];
@@ -1221,12 +1223,25 @@ find_toc_address (pc)
   return loadinfo[toc_entry].dataorg + loadinfo[toc_entry].toc_offset;
 }
 
+#ifdef GDB_TARGET_POWERPC
+int
+gdb_print_insn_powerpc (memaddr, info)
+     bfd_vma memaddr;
+     disassemble_info *info;
+{
+  if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+    return print_insn_big_powerpc (memaddr, info);
+  else
+    return print_insn_little_powerpc (memaddr, info);
+}
+#endif
+
 void
 _initialize_rs6000_tdep ()
 {
   /* FIXME, this should not be decided via ifdef. */
 #ifdef GDB_TARGET_POWERPC
-  tm_print_insn = print_insn_big_powerpc;
+  tm_print_insn = gdb_print_insn_powerpc;
 #else
   tm_print_insn = print_insn_rs6000;
 #endif