wdbdbgarchlib.c

来自「VxWorks BSP框架源代码包含头文件和驱动」· C语言 代码 · 共 80 行

C
80
字号
/* wdbDbgArchLib.c - 68k specific callouts for the debugger *//* Copyright 1988-1998 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01d,08jan98,dbt  modified for new breakpoint scheme.01c,15jun95,ms	 removed _sigCtxIntLock. Made traceModeSet/Clear use intRegsLock01b,17may95,ms   cleaned up.01a,03oct94,rrr  written.*//*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 + -
显示快捷键?