mistaken as non existant operator byte.
SCCS-vsn: old/adb/adb.vax/opset.c 4.4
-static char sccsid[] = "@(#)opset.c 4.3 %G%";
+static char sccsid[] = "@(#)opset.c 4.4 %G%";
#endif lint
/*
* UNIX debugger
#endif lint
/*
* UNIX debugger
extern int ty_nlg[];
extern char *ty_string[];
extern int ty_nlg[];
extern char *ty_string[];
-short ioptab[3][256]; /* two level index by opcode into insttab */
+short ioptab[3][256]; /* two level 1-based index by opcode into insttab */
int mapescbyte(byte)
u_char byte;
int mapescbyte(byte)
u_char byte;
mapchar = mapescbyte(p->eopcode);
if (ioptab[mapchar][p->popcode])
continue;
mapchar = mapescbyte(p->eopcode);
if (ioptab[mapchar][p->popcode])
continue;
- ioptab[mapchar][p->popcode] = p - insttab;
+ ioptab[mapchar][p->popcode] = (p - insttab) + 1;
printf("<undefined operator byte>: %x", ins);
goto ret;
}
printf("<undefined operator byte>: %x", ins);
goto ret;
}
- ip = &insttab[ioptab[mapchar][ins]];
+ ip = &insttab[ioptab[mapchar][ins] - 1];
printf("%s\t", ip->iname);
for (ap = ip->argtype, argno = 0; argno < ip->nargs; argno++, ap++) {
printf("%s\t", ip->iname);
for (ap = ip->argtype, argno = 0; argno < ip->nargs; argno++, ap++) {