Skip to content
Snippets Groups Projects
Commit cfe94c2e authored by dtc's avatar dtc
Browse files

Fix the printing of context registers and the parsing of register

names for the x86 port; the 32 bits registers have SC offsets that are a
multiple of two.
parent f326ff0b
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/monitor.c,v 1.6 1997/01/21 00:28:13 ram Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/monitor.c,v 1.7 1997/11/23 08:52:51 dtc Exp $ */
#include <stdio.h>
#include <sys/types.h>
......@@ -336,7 +336,11 @@ static void print_context(struct sigcontext *context)
for (i = 0; i < NREGS; i++) {
printf("%s:\t", lisp_register_names[i]);
#ifdef i386
brief_print((lispobj) SC_REG(context, i*2));
#else
brief_print((lispobj) SC_REG(context, i));
#endif
}
printf("PC:\t\t 0x%08lx\n", SC_PC(context));
}
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/parse.c,v 1.3 1997/01/21 00:28:13 ram Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/parse.c,v 1.4 1997/11/23 08:52:52 dtc Exp $ */
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
......@@ -291,7 +291,11 @@ parse_regnum(char *s)
for (i = 0; i < NREGS ; i++)
if (strcasecmp(s + 1, lisp_register_names[i]) == 0)
#ifdef i386
return i*2;
#else
return i;
#endif
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment