aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1993-02-18 10:01:36 +0000
committerJohn Gilmore <gnu@cygnus>1993-02-18 10:01:36 +0000
commitec4bf6a089c1c3b478194b32d4d8664c0690003b (patch)
treee2fec389c26aee63c05d8b50e10aec7e74ed4ae3 /gdb
parentaea94564cac71dd37285764375fabcb2d5122d1d (diff)
downloadgdb-ec4bf6a089c1c3b478194b32d4d8664c0690003b.zip
gdb-ec4bf6a089c1c3b478194b32d4d8664c0690003b.tar.gz
gdb-ec4bf6a089c1c3b478194b32d4d8664c0690003b.tar.bz2
* nm-hp300bsd.h (ATTACH_DETACH, PTRACE_ATTACH, PTRACE_DETACH): define.
* m68k-pinsn.c (BREAK_UP_BIG_DECL, AND_OTHER_PART): #if __GNUC__, define to kludge the large opcode table into two smaller tables, since GCC take exponential space to build the table. Lint. (NOPCODES): Remove, use "numopcodes" from opcode/m68k.h instead.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/m68k-pinsn.c26
2 files changed, 28 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a8a1b3b..4e1dfb0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+Thu Feb 18 01:56:06 1993 John Gilmore (gnu@cygnus.com)
+
+ * nm-hp300bsd.h (ATTACH_DETACH, PTRACE_ATTACH, PTRACE_DETACH): define.
+ * config/hp300bsd.mh (REGEX, REGEX1): Define.
+ * m68k-pinsn.c (BREAK_UP_BIG_DECL, AND_OTHER_PART): #if __GNUC__,
+ define to kludge the large opcode table into two smaller tables,
+ since GCC take exponential space to build the table. Lint.
+ (NOPCODES): Remove, use "numopcodes" from opcode/m68k.h instead.
+
Wed Feb 17 19:24:40 1993 John Gilmore (gnu@cygnus.com)
* Makefile.in (VERSION): Roll to 4.7.9.
diff --git a/gdb/m68k-pinsn.c b/gdb/m68k-pinsn.c
index 60c6c59..b67f5cc 100644
--- a/gdb/m68k-pinsn.c
+++ b/gdb/m68k-pinsn.c
@@ -1,5 +1,5 @@
/* Print Motorola 68k instructions for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,10 +19,24 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "defs.h"
#include "symtab.h"
-#include "opcode/m68k.h"
#include "gdbcore.h"
#include "ieee-float.h"
+/* Opcode/m68k.h is a massive table. As a kludge, break it up into
+ two pieces. This makes nonportable C -- FIXME -- it assumes that
+ two data items declared near each other will be contiguous in
+ memory. This kludge can be removed, FIXME, when GCC is fixed to not
+ be a hog about initializers. */
+
+#ifdef __GNUC__
+#define BREAK_UP_BIG_DECL }; \
+ struct m68k_opcode m68k_opcodes_2[] = {
+#define AND_OTHER_PART sizeof (m68k_opcodes_2)
+#endif
+
+#include "opcode/m68k.h"
+
+
/* Local function prototypes */
static int
@@ -41,9 +55,6 @@ print_insn_arg PARAMS ((char *, unsigned char *, unsigned char *, CORE_ADDR,
/* 68k instructions are never longer than this many bytes. */
#define MAXLEN 22
-/* Number of elements in the opcode table. */
-#define NOPCODES (sizeof m68k_opcodes / sizeof m68k_opcodes[0])
-
const char * const fpcr_names[] = {
"", "fpiar", "fpsr", "fpiar/fpsr", "fpcr",
"fpiar/fpcr", "fpsr/fpcr", "fpiar/fpsr/fpcr"};
@@ -92,7 +103,7 @@ print_insn (memaddr, stream)
bestmask = 0;
best = -1;
- for (i = 0; i < NOPCODES; i++)
+ for (i = 0; i < numopcodes; i++)
{
register unsigned int opcode = m68k_opcodes[i].opcode;
register unsigned int match = m68k_opcodes[i].match;
@@ -500,7 +511,8 @@ print_insn_arg (d, buffer, p, addr, stream)
#ifdef HAVE_68881
case 'x':
- ieee_extended_to_double (&ext_format_68881, p, &flval);
+ ieee_extended_to_double (&ext_format_68881,
+ (char *)p, &flval);
p += 12;
break;
#endif