Skip to content
Snippets Groups Projects
Commit c3946c92 authored by ch's avatar ch
Browse files

Added backtrace.

parent 571cdb62
No related branches found
No related tags found
No related merge requests found
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/Makefile.orig,v 1.7 1990/03/29 21:17:49 ch Exp $
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/Makefile.orig,v 1.8 1990/04/04 18:26:15 ch Exp $
CFLAGS = -g
OBJS = ldb.o egets.o coreparse.o alloc.o monitor.o print.o \
os.o vars.o assem.o parse.o interrupt.o test.o \
search.o validate.o gc.o globals.o dynbind.o \
regnames.o
regnames.o backtrace.o
ldb.map: ldb
echo -n 'Map file for ldb version ' > ldb.map
......
......@@ -16,6 +16,7 @@
static void call_cmd(), dump_cmd(), print_cmd(), quit(), help();
static void flush_cmd(), search_cmd(), regs_cmd(), exit_cmd(), throw_cmd();
static void timed_call_cmd(), gc_cmd(), print_context_cmd();
static void backtrace_cmd();
static struct cmd {
char *cmd, *help;
......@@ -23,6 +24,7 @@ static struct cmd {
} Cmds[] = {
{"help", "Display this info", help},
{"?", NULL, help},
{"backtrace", "backtrace up to N frames", backtrace_cmd},
{"call", "call FUNCTION with ARG1, ARG2, ...", call_cmd},
{"context", "print interrupt context number I.", print_context_cmd},
{"dump", "dump memory starting at ADDRESS for COUNT words.", dump_cmd},
......@@ -376,12 +378,13 @@ struct sigcontext *context;
static void print_context_cmd(ptr)
char **ptr;
{
int index;
int free;
free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX)>>2;
if (more_p(ptr)) {
int index;
index = parse_number(ptr);
if ((index >= 0) && (index < free)) {
......@@ -403,6 +406,21 @@ char **ptr;
}
}
static void backtrace_cmd(ptr)
char **ptr;
{
void backtrace();
int n;
if (more_p(ptr))
n = parse_number(ptr);
else
n = 100;
printf("Backtrace:\n");
backtrace(n);
}
static void sub_monitor(csp, bsp)
lispobj *csp, *bsp;
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment