diff options
author | John Gilmore <gnu@cygnus> | 1992-11-06 09:21:13 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-11-06 09:21:13 +0000 |
commit | 8a96d79b70cca5e535ed5f83df0063b8a6d081da (patch) | |
tree | 57213106eece9eb8cbdb0e69cb59bd238b0dbea4 /gdb/i960-pinsn.c | |
parent | a644baaa037aa4b0a1ffeda7371b40c32595f620 (diff) | |
download | gdb-8a96d79b70cca5e535ed5f83df0063b8a6d081da.zip gdb-8a96d79b70cca5e535ed5f83df0063b8a6d081da.tar.gz gdb-8a96d79b70cca5e535ed5f83df0063b8a6d081da.tar.bz2 |
* m68k-stub.c: Remove ansidecl.h and the few uses of it.
Stubs should stand alone as much as possible.
* source.c (show_directories): Avoid printf_filtered length prob
pointed out by Jonathan Stone.
* i960-pinsn.c (MEM_MAX, MEM_SIZ): Set upper limit properly to
avoid accesses beyond end of table. Fix by Lee W. Cooprider,
<Lee_Cooprider@vos.stratus.com>.
Diffstat (limited to 'gdb/i960-pinsn.c')
-rw-r--r-- | gdb/i960-pinsn.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/i960-pinsn.c b/gdb/i960-pinsn.c index 4fee194..85dc5bc 100644 --- a/gdb/i960-pinsn.c +++ b/gdb/i960-pinsn.c @@ -341,8 +341,12 @@ mem( memaddr, word1, word2, noprint ) * -2: 2 operands, store instruction */ static struct tabent *mem_tab = NULL; - static struct { int opcode; char *name; char numops; } mem_init[] = { +/* Opcodes of 0x8X, 9X, aX, bX, and cX must be in the table. */ #define MEM_MIN 0x80 +#define MEM_MAX 0xcf +#define MEM_SIZ ((MEM_MAX-MEM_MIN+1) * sizeof(struct tabent)) + + static struct { int opcode; char *name; char numops; } mem_init[] = { 0x80, "ldob", 2, 0x82, "stob", -2, 0x84, "bx", 1, @@ -363,8 +367,6 @@ mem( memaddr, word1, word2, noprint ) 0xc2, "stib", -2, 0xc8, "ldis", 2, 0xca, "stis", -2, -#define MEM_MAX 0xca -#define MEM_SIZ ((MEM_MAX-MEM_MIN+1) * sizeof(struct tabent)) 0, NULL, 0 }; |