From 96ee5bc6657c3bbf70d2b14bc4060c5ab2a7b84c Mon Sep 17 00:00:00 2001 From: Joseph Poirier Date: Wed, 17 Jun 2015 16:12:42 -0500 Subject: [PATCH] rewrap debugger functions --- debug.c | 4 ++-- interpreter.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debug.c b/debug.c index 632584e..ccd26c3 100644 --- a/debug.c +++ b/debug.c @@ -1,10 +1,9 @@ /* picoc interactive debugger */ #include "interpreter.h" - #define BREAKPOINT_HASH(p) (((unsigned long)(p)->FileName) ^ (((p)->Line << 16) | ((p)->CharacterPos << 16))) - +#ifdef DEBUGGER /* initialise the debugger by clearing the breakpoint table */ void DebugInit(Picoc *pc) { @@ -125,3 +124,4 @@ void DebugCheckStatement(struct ParseState *Parser) void DebugStep(void) { } +#endif /* DEBUGGER */ diff --git a/interpreter.h b/interpreter.h index 68c527c..725f9de 100644 --- a/interpreter.h +++ b/interpreter.h @@ -664,13 +664,15 @@ extern void IncludeFile(Picoc *pc, char *Filename); /* the following is defined in picoc.h: * void PicocIncludeAllSystemHeaders(); */ +#ifdef DEBUGGER /* debug.c */ extern void DebugInit(Picoc *pc); extern void DebugCleanup(Picoc *pc); extern void DebugCheckStatement(struct ParseState *Parser); extern void DebugSetBreakpoint(struct ParseState *Parser); extern int DebugClearBreakpoint(struct ParseState *Parser); -extern void DebugStep(void); +extern void DebugStep(void) +#endif /* stdio.c */ extern const char StdioDefs[];