aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-06-06 14:49:32 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-06-06 14:49:32 +0000
commit5c172b4bfde5f6aab86afa5441ef849b3e95ab2e (patch)
tree612d3d66e31db365085450971abdd2f898457517 /gdb
parent4a442536378bd8a91aef82fb33f294c4e602c5d2 (diff)
downloadgdb-5c172b4bfde5f6aab86afa5441ef849b3e95ab2e.zip
gdb-5c172b4bfde5f6aab86afa5441ef849b3e95ab2e.tar.gz
gdb-5c172b4bfde5f6aab86afa5441ef849b3e95ab2e.tar.bz2
Fix some little endian problems
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog28
-rw-r--r--gdb/config/rs6000/tm-rs6000.h9
-rw-r--r--gdb/rs6000-tdep.c19
3 files changed, 48 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e0390fb..47db053 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 5e63f82..c01e278 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -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
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index e6e31aa..89c3ddd 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -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