From 981b99faf208e2c7f6e2b83d73e1b89b669112ee Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 10 Aug 1999 16:41:44 +0000 Subject: Patch from Eric Valette and Emmanuel Raguet : - the dec21140 driver code has been hardened (various bug fixed) Emmanuel, - bug in the mcp750 init code have been fixed (interrupt stack/initial stack initialization), BSS correctly cleared (Eric V) - remote debugging over TCP/IP is nearly complete (berakpoints, backtrace, variables,...) (Eric V), - exception handling code has also been improved in order to fully support RDBG requirements (Eric V), --- c/src/lib/include/rdbg/i386/rdbg_f.h | 46 +++++++++++++----------------------- 1 file changed, 17 insertions(+), 29 deletions(-) (limited to 'c/src/lib/include/rdbg/i386/rdbg_f.h') diff --git a/c/src/lib/include/rdbg/i386/rdbg_f.h b/c/src/lib/include/rdbg/i386/rdbg_f.h index 3fd087f50a..c75cecc7bc 100644 --- a/c/src/lib/include/rdbg/i386/rdbg_f.h +++ b/c/src/lib/include/rdbg/i386/rdbg_f.h @@ -6,6 +6,8 @@ * * Synopsis = Machine-dependent header file * + * $Id$ + * ************************************************************************** */ @@ -17,35 +19,21 @@ #define EFLAGS_TF 0x00100 -typedef struct Exception_context_struct { - struct Exception_context_struct *next; - struct Exception_context_struct *previous; - Objects_Id id; - Objects_Id semaphoreId; - CPU_Exception_frame *ctx; -} Exception_context; - -extern int PushExceptCtx (Objects_Id Id, - Objects_Id semId, - CPU_Exception_frame *ctx); -extern int PopExceptCtx (Objects_Id Id); -extern Exception_context *GetExceptCtx (Objects_Id Id); -extern int Single_Step (CPU_Exception_frame* ctx); -extern int CheckForSingleStep (CPU_Exception_frame* ctx); -extern void BreakPointExcHdl (CPU_Exception_frame *ctx); -extern void CtxToRegs (const CPU_Exception_frame*,xdr_regs*); -extern void RegsToCtx (const xdr_regs*,CPU_Exception_frame*); - -extern void enterRdbg (); -extern void get_ctx_thread (Thread_Control *thread, - CPU_Exception_frame* ctx); -extern void set_ctx_thread (Thread_Control *thread, - CPU_Exception_frame* ctx); - -void copyback_data_cache_and_invalidate_instr_cache(); - -extern int ExitForSingleStep; - +static inline int isRdbgException(Exception_context *ctx) +{ + if ( + ctx->ctx->idtIndex != I386_EXCEPTION_DEBUG && + ctx->ctx->idtIndex != I386_EXCEPTION_BREAKPOINT && + ctx->ctx->idtIndex != I386_EXCEPTION_ENTER_RDBG + ) return 0; + else return 1; +} +static inline int getExcNum(Exception_context *ctx) +{ + return ctx->ctx->idtIndex; +} + +extern void connect_rdbg_exception(); #endif -- cgit v1.2.3