wdbdbgarchlib.c
来自「VxWorks BSP框架源代码包含头文件和驱动」· C语言 代码 · 共 77 行
C
77 行
/* wdbDbgArchLib.c - ColdFire specific callouts for the debugger *//* Copyright 1988-2000 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01a,17mar00,dra Created from T1.0.1 ColdFire and T2 m68k ports.*//*DESCRIPTIONThis module contains the architecture specific calls needed by theWDB debug agent and the target shell debugger.*/#include "vxWorks.h"#include "regs.h"#include "iv.h"#include "intLib.h"#include "wdb/wdbDbgLib.h"#define TRACE_BIT 0x8000 /* trace bit in 68K SR */extern void wdbDbgBpStub();extern void wdbDbgTraceStub();/********************************************************************************* wdbDbgArchInit - set exception handlers for the break and the trace.** This routine set exception handlers for the break and the trace.* And also make a break instruction.*/void wdbDbgArchInit(void) { intVecSet ((FUNCPTR *) TRAPNUM_TO_IVEC (DBG_TRAP_NUM), (FUNCPTR) wdbDbgBpStub); intVecSet ((FUNCPTR *) IV_TRACE, (FUNCPTR) wdbDbgTraceStub); }/******************************************************************************** wdbDbgTraceModeSet - lock interrupts and set the trace bit.*/ int wdbDbgTraceModeSet ( REG_SET *pRegs ) { int oldSr; oldSr = intRegsLock (pRegs); pRegs->sr |= TRACE_BIT; return (oldSr); }/******************************************************************************** wdbDbgTraceModeClear - restore old int lock level and clear the trace bit.*/ void wdbDbgTraceModeClear ( REG_SET *pRegs, int oldSr ) { intRegsUnlock (pRegs, oldSr); pRegs->sr &= ~TRACE_BIT; }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?