亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wdbdbgarchlib.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* wdbDbgArchLib.c - MIPS architecture-dependent debugger library *//* Copyright 1988-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * This file has been developed or significantly modified by the * MIPS Center of Excellence Dedicated Engineering Staff. * This notice is as per the MIPS Center of Excellence Master Partner * Agreement, do not remove this notice without checking first with * WR/Platforms MIPS Center of Excellence engineering management. *//*modification history--------------------01p,18jul01,sru  add wdbTool variable01o,16jul01,ros  add CofE comment01n,02may01,dxc  SPR 64101: Add check for jump delay slot in wdbNpc16Get01m,16apr01,dxc  SPR 64275: Fix break exception handling01m,21dec00,pes  Adapt to MIPS32/MIPS64 CPU architectures01l,30mar00,dra  Fix MIPS16 merge errors.01k,23sep99,myz  reworked last mod.01j,08sep99,myz  added mips16 support.  01h,19jan99,dra  added CW4000, CW4011, VR4100, VR5000 and VR5400 support.		 protected fpscr checks with #ifndef SOFT_FLOAT.01h,14jan99,elg  made breakpoints on delay slot work (SPR 24356).01g,12mar98,dbt  return corresponding error if the hardware breakoint                 registers are full or if the hardware breakpoint is invalid.01f,08jan98,dbt  modified for new breakpoint scheme. Added hardware		 breakpoints support01e,12dec96,tam  set fpcsr field in wdbArchBreakpoint if necessary (spr #7631).01d,14nov96,mem  corrected mask of pc used in J and JAL calculations.01c,20nov96,kkk  added R4650 support.01b,14jun96,kkk  changed dbg_trap_hander to wdbTrap, fixed wdbGetNpc.01a,04dec95,mem  written.*//*DESCRIPTIONThis module contains the architecture specific calls needed by the WDBdebug agent.*//* includes */#include "vxWorks.h"#include "regs.h"#include "iv.h"#include "intLib.h"#include "ioLib.h"#include "esf.h"#include "fppLib.h"#include "wdb/wdbDbgLib.h"/* external functions */extern void	wdbDbgTrap();extern void	excExcHandle(int vecNum, ESFMIPS * pEsf, REG_SET * pRegs);extern uint16_t excBreakTypeGet(ESFMIPS *pEsf);#if     (DBG_HARDWARE_BP)extern void	wdbDbgRegsGet (DBG_REGS * pDbgReg);#endif  /* (DBG_HARDWARE_BP) *//* forward declarations */LOCAL void wdbDbgArchBreakpoint (int vecNum, ESFMIPS * pInfo, REG_SET * pRegs);LOCAL void wdbDbgBpStub (int vecNum, ESFMIPS * pInfo, REG_SET * pRegs);#if     (DBG_HARDWARE_BP)LOCAL void wdbDbgArchHwBreakpoint (int vecNum, ESFMIPS * pInfo, 						REG_SET * pRegs);#endif  /* (DBG_HARDWARE_BP) *//**  This function allows the user to dynamically bind a breakpoint*  handler to  breakpoints of type 0 - 7.  By default only breakpoints*  of type zero are handled with the function dbgBreakpoint (see dbgLib).*  Other types may be used for Ada stack overflow or other such functions.*  Use the function dbgBpTypeBind to bind a handler for the corresponding*  breakpoint type.  The installed handler must take the same parameters as*  excExcHandle (see excLib).*/FUNCPTR wdbDbgArchHandler [] =    {    (FUNCPTR) wdbDbgArchBreakpoint,    (FUNCPTR) excExcHandle,    (FUNCPTR) excExcHandle,    (FUNCPTR) excExcHandle,    (FUNCPTR) excExcHandle,    (FUNCPTR) excExcHandle,    (FUNCPTR) excExcHandle,    (FUNCPTR) excExcHandle,    };#define NUM_WDB_DBG_ARCH_HANDLERS (sizeof(wdbDbgArchHandler)/sizeof(FUNCPTR))#ifdef _WRS_MIPS16/* mips16 register index to 32 bit mode register index conversion array */LOCAL int reg32Inx[8] = {16,17,2,3,4,5,6,7};LOCAL INSTR * wdbNpc32Get (REG_SET *);LOCAL void * wdbNpc16Get (REG_SET *);#endif/******************************************************************************* wdbDbgArchInit - set exception handlers for the break and the trace.** RETURNS: N/A** NOMANUAL*/void wdbDbgArchInit(void)    {    intVecSet ((FUNCPTR *) INUM_TO_IVEC(IV_BP_VEC),	       (FUNCPTR) wdbDbgBpStub);#if 	(DBG_HARDWARE_BP)    intVecSet ((FUNCPTR *) INUM_TO_IVEC (IV_WATCH_VEC), 		(FUNCPTR) wdbDbgArchHwBreakpoint);#endif	/* (DBG_HARDWARE_BP) */    }/********************************************************************************* wdbDbgBpStub - breakpoint handling** Called from "excStub" exception vector handler upon decoding a BREAK* exception in the CAUSE register.  Upon entry, `a0' contains the exception* code number, `a1' the exception stack frame pointer, and `a2' points to * the saved task registers.** The code value in the actual BREAK instruction hit determines whether* this exception should be processed by the native debugger or the* remote (i.e., VME backplane) debugger. A code of zero (0) means native.** NOMANUAL*/LOCAL void wdbDbgBpStub     (    int		vecNum,	/* exception vector number */    ESFMIPS *	pEsf,	/* pointer to exception stack frame */    REG_SET *	pRegs	/* pointer to buf containing saved regs */    )    {    uint16_t breakType;	/* type of break point */        breakType = excBreakTypeGet(pEsf);    if (breakType < NUM_WDB_DBG_ARCH_HANDLERS)	(wdbDbgArchHandler[breakType]) (vecNum, pEsf, pRegs);    #ifdef _WRS_MIPS16#endif /* _WRS_MIPS16 */    }/******************************************************************************** wdbDbgArchBreakpoint - setup to call breakpoint handler.** RETURNS: N/A** NOMANUAL*/LOCAL void wdbDbgArchBreakpoint    (    int		vecNum,		/* exception vector number */    ESFMIPS *	pInfo,		/* pointer to esf info saved on stack */    REG_SET *	pRegs		/* pointer to buf containing saved regs */    )    {#if     (DBG_HARDWARE_BP)    /* clear debug registers */    wdbDbgRegsClear ();#endif	/* (DBG_HARDWARE_BP) */    /* Provide the cause register value for wdbDbgGetNpc() */    pRegs->cause = pInfo->cause;    /*     * If the breaked instruction is a branch delay slot then the PC is the     * address of the branch instruction immadiately preceding the delay slot.     * It must be changed to match with the breakpoint address.     */    /* mips16 code does not have branch delay slots.     * It only has delay slots for jump instructions.     *      * BUG: There are both 32-bit and 16 bit jump instructions on mips16.     * This code is oversimplified.     * Should place code here to implement table 6.6 P. 6-31 in TR4101 Technical     * Manual. This logic is also needed in excArchLib.c (excBreakTypeGet)     * to retrieve the break instruction correctly.      */    if (pRegs->cause & CAUSE_BD)        /* Branch Delay Slot */	pRegs->pc++;		#ifdef SOFT_FLOAT    pRegs->fpcsr = 0;#else   /* SOFT_FLOAT */    /* Provide the FPCSR register value for wdbDbgGetNpc() */			         if (fppProbe() == OK)	pRegs->fpcsr = pInfo->fpcsr;    else	pRegs->fpcsr = 0;#endif   /* SOFT_FLOAT */			      #ifdef _WRS_R3K_EXC_SUPPORT     /* restore old sr so it looks like an rfe occured      * thus allowing interrupts.      */     pRegs->sr = (pRegs->sr & ~(SR_KUP|SR_IEP|SR_KUC|SR_IEC)) |       ((pRegs->sr & (SR_KUO|SR_IEO|SR_KUP|SR_IEP|SR_KUC|SR_IEC)) >> 2);#else    /* restore old sr so it looks like an eret occured */     pRegs->sr &= ~SR_EXL;#endif    wdbDbgTrap (pRegs->pc, pRegs, (void *) NULL, (void *) NULL, FALSE);    }#if	(DBG_HARDWARE_BP)/******************************************************************************** wdbDbgArchHwBreakpoint - setup to call breakpoint handler.** RETURNS: N/A** NOMANUAL*/LOCAL void wdbDbgArchHwBreakpoint    (    int		vecNum,		/* exception vector number */    ESFMIPS	*pInfo,		/* pointer to esf info saved on stack */    REG_SET 	*pRegs		/* pointer to buf containing saved regs */    )    {    DBG_REGS 	dbgRegs;    void *	pDbgRegs = &dbgRegs;#ifdef _WRS_R4650    UINT32	causeReg;#endif	/* _WRS_R4650 */    /* read the debug registers */    wdbDbgRegsGet (pDbgRegs);    /* Clear debug registers */    wdbDbgRegsClear ();    /* Provide the cause register value for hardware breakpoints handling */    dbgRegs.cause = pInfo->cause;#ifdef _WRS_R4650    /* Clean watch bits in the cause register */    causeReg = intCRGet ();    causeReg &= ~0x03000000;    intCRSet (causeReg);#endif	/* _WRS_R4650 */    /* Provide the cause register value for wdbDbgGetNpc() */    pRegs->cause = pInfo->cause;    /*     * If the breaked instruction is a branch delay slot then the PC is the     * address of the branch instruction immadiately preceding the delay slot.     * It must be changed to match with the breakpoint address.     */    if (pRegs->cause & CAUSE_BD)	/* Branch Delay Slot */	pRegs->pc++;    /* Provide the FPCSR register value for wdbDbgGetNpc() */    if (fppProbe() == OK)	pRegs->fpcsr = pInfo->fpcsr;    else	pRegs->fpcsr = 0;#ifndef _WRS_R3K_EXC_SUPPORT    /* Restore old sr so it looks like an eret occured */     pRegs->sr &= ~SR_EXL;#endif    wdbDbgTrap(pRegs->pc, pRegs, (void *) NULL, (void *) pDbgRegs, TRUE);    }#endif	/* DBG_HARDWARE_BP *//******************************************************************************** wdbDbgTraceModeSet - lock interrupts and set the trace bit.** Because MIPS has no trace mode, all this routine needs to do is* lock interrupts for the reg set.** RETURNS: the old int level** NOMANUAL*/ int wdbDbgTraceModeSet    (    REG_SET *pRegs    )    {    return intRegsLock (pRegs);    }/******************************************************************************** wdbDbgTraceModeClear - restore old int lock level and clear the trace bit.** Because MIPS has no trace mode, all this routine needs to do is* restore the int mask from the last wdbDbgTraceModeSet().** RETURNS: N/A** NOMANUAL*/ void wdbDbgTraceModeClear    (    REG_SET *pRegs,    int oldSr    )    {    intRegsUnlock (pRegs, oldSr);    }#ifdef _WRS_MIPS16/***************************************************************************** wdbNpcSizeGet - Get the next breakpoint instruction size** Usually the size is 2 in 16 bit mode, and 4 in 32 bit mode. But when program* jumps from 16 bit mode to 32 bit mode,or other way around, the size should* be either 4 or 2.**/int wdbNpcSizeGet    (    REG_SET *pRegs              /* pointer to task registers */    )    {    ULONG pc;    int npcSize;    pc = (ULONG)(pRegs->pc);    if (pc & 0x1)        {	/* in mips16 mode */        UINT16 instr16;	/* defalut size is 2 */        npcSize = 2;        pc &= ~0x1;        instr16 = *(UINT16 *)pc;        if ( (instr16 & 0xfc00) == 0x1c00)  /* jalx */          	    /* jumping to a 32 bit function */            npcSize = 4;        else if ( (instr16 & 0xf81f) == 0xe800)            {            /* J(AL)R */            if ((instr16 & 0x7e0) == 0x20)                {                /* JR ra instr */                if ( !((ULONG)(pRegs->gpreg[31]) & 0x1) )				    /* jumping to a 32 bit function */                    npcSize = 4;                }            else                {                /* JR rx or JALR ra,rx */                if (!((pRegs->gpreg[reg32Inx[M16_RX(instr16)]]) & 0x1))		    /* jumping to a 32 bit function */                    npcSize = 4;                }            }        }  /* if (pc & 0x1)*/    else        {        /* 32 bit mode */        ULONG machInstr;        machInstr = *(ULONG *)pc;        npcSize = 4;        if (((machInstr & 0xfc1f07ff) == 0x00000009) ||            ((machInstr & 0xfc1fffff) == 0x00000008))            {            if ( (pRegs->gpreg[(machInstr >> 21) & 0x1f]) & 0x1)		/* jumping to a 16 bit function */                npcSize = 2;            }        }    return (npcSize);    }/******************************************************************************** wdbGetNpc - get the next pc** If not in the delay slot of a jump or branch instruction,* the next instruction is always pc+4 (all branch and jump instructions* have 1 delay slot). Otherwise the npc is the target of the jump or branch.** For branch and jump instructions, the instruction in the delay slot is* never reported.  The expectation is that a breakpoint will be set on* the instruction that is returned.  When a resuming from a breakpoint* hit in a delay slot, execution restarts at the branch or jump.** RETURNS: The next instruction** NOMANUAL*/INSTR * wdbDbgGetNpc    (    REG_SET *pRegs              /* pointer to task registers */    )    {    INSTR * ret;    if ((ULONG)(pRegs->pc) & 0x1)        ret = (INSTR *)wdbNpc16Get(pRegs);    else        ret = wdbNpc32Get(pRegs);    return (ret);    }/**************************************************************************** wdbNpc16Get - Get next instruction address running in mips16 mode.**/LOCAL void * wdbNpc16Get    (    REG_SET *pRegs    )    {    UINT16      instr16;    ULONG       npc;    ULONG       disp;    ULONG       extImm;    ULONG       pc;    /* mips16 code does not have branch delay slots. If a branch is taken,     * the instruction that immediately follows the branch(the delay slot     * instruction) is cancelled.     * However there is a delay slot for jump instructions. Branch,jump     * or extended instructions must not be placed in the jump delay slot     */    pc = (ULONG)(pRegs->pc) & EPC_PC;    instr16 = *(UINT16 *)pc;    extImm  = 0;    /* if it is a extend instruction, extract the immediate field     * and advance to the next instruction. The M16_EXTEND_IMM macro     * works for all extended instructions ***EXCEPT*** EXT-RRI-A     * format (ADDIU) and EXT-SHIFT format (SHIFT). Since neither     * of these instructions branch or jump, they are a "don't-care".     */    if (M16_INSTR_OPCODE(instr16) == M16_EXTEND_INSTR)        {        extImm = M16_EXTEND_IMM(instr16);        pc += 2;        instr16 = *(UINT16 *)pc;        }    /* default next pc */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区影院在线午夜| 欧美在线观看一二区| 色综合久久久久| 亚洲欧美自拍偷拍| 久久99国产精品久久99果冻传媒| 99国内精品久久| 精品国产免费人成电影在线观看四季 | 免费观看91视频大全| 欧美精品1区2区3区| 国产婷婷色一区二区三区| 天堂蜜桃91精品| 色综合网站在线| proumb性欧美在线观看| 欧美人妖巨大在线| 一区二区三区四区国产精品| 国产不卡高清在线观看视频| 91精品国产美女浴室洗澡无遮挡| 亚洲欧美日韩在线| 高清beeg欧美| 久久久久99精品国产片| 人人精品人人爱| 欧美精品久久久久久久久老牛影院 | 国产精品国产精品国产专区不片| 看片网站欧美日韩| 日韩精品一区二区三区四区| 亚洲电影一级黄| 91久久一区二区| 亚洲欧洲美洲综合色网| 国产.欧美.日韩| 久久精品免视看| 国产成人综合网站| 久久久久88色偷偷免费| 国产激情视频一区二区三区欧美| 精品日本一线二线三线不卡| 美女精品一区二区| 精品精品国产高清a毛片牛牛 | 欧美一区三区四区| 日韩精品乱码免费| 日韩一级二级三级精品视频| 青青草国产成人av片免费| 欧美日韩大陆在线| 美腿丝袜在线亚洲一区| 精品国产麻豆免费人成网站| 国产精品一区二区果冻传媒| 国产日本欧洲亚洲| 菠萝蜜视频在线观看一区| 欧美三级视频在线| 亚洲超丰满肉感bbw| 91精品在线观看入口| 蜜臀精品一区二区三区在线观看| 精品三级av在线| 国产成人aaaa| 一区二区三区日韩在线观看| 欧美亚日韩国产aⅴ精品中极品| 香蕉乱码成人久久天堂爱免费| 日韩午夜激情av| 国产一区二区在线观看免费| 国产欧美精品区一区二区三区| 99国产一区二区三精品乱码| 日韩高清中文字幕一区| 久久综合九色综合欧美就去吻| 成人午夜短视频| 亚洲国产一区在线观看| 欧美精品一区二区蜜臀亚洲| 一本久道中文字幕精品亚洲嫩 | 亚洲精品第一国产综合野| 欧美欧美欧美欧美首页| 激情久久五月天| 亚洲欧洲日本在线| 日韩久久久精品| 日本韩国一区二区三区视频| 麻豆精品一区二区三区| 自拍偷拍亚洲综合| 日韩三级免费观看| 99精品一区二区三区| 青青草国产成人av片免费| 国产精品久久久99| 欧美一区二区三级| 91在线观看免费视频| 日本不卡一区二区| 最新热久久免费视频| 日韩免费高清av| 欧美性感一区二区三区| 成人性生交大合| 蜜桃av一区二区| 亚洲一区二区三区不卡国产欧美| 亚洲制服丝袜一区| 国产欧美一区二区三区在线老狼| 91麻豆精品久久久久蜜臀 | 亚洲欧洲日韩在线| 久久亚洲私人国产精品va媚药| 欧美无砖专区一中文字| 成人午夜又粗又硬又大| 久久99国产精品成人| 亚洲成人免费在线观看| 日韩伦理av电影| 国产午夜亚洲精品不卡| 日韩一区二区高清| 91精品国产综合久久小美女| 在线免费观看日本一区| 成人美女视频在线观看18| 久久99精品国产.久久久久久| 亚洲一二三区在线观看| 亚洲毛片av在线| 日韩一区欧美小说| 中文字幕欧美日韩一区| 久久精品一区二区三区不卡| 亚洲精品一区二区精华| 欧美一级片在线观看| 欧美日本高清视频在线观看| 欧美亚洲综合网| 91看片淫黄大片一级| 一本色道久久综合亚洲aⅴ蜜桃| 成人福利在线看| 成人免费av网站| 99国产精品久久久久久久久久| 国产成人综合在线观看| 亚洲一区在线观看免费 | 26uuu精品一区二区在线观看| 51精品秘密在线观看| 欧美精品久久久久久久多人混战| 欧美亚洲一区三区| 欧美精品高清视频| 日韩亚洲电影在线| 精品国产百合女同互慰| 精品少妇一区二区三区免费观看| 欧美精品一区二区高清在线观看| 欧美不卡视频一区| 久久久av毛片精品| 国产精品视频一二| 亚洲欧美日韩综合aⅴ视频| 亚洲黄色录像片| 天天免费综合色| 91久久精品网| 欧美嫩在线观看| 精品国产百合女同互慰| 国产精品视频在线看| 亚洲精品va在线观看| 天天综合日日夜夜精品| 九色|91porny| 国产不卡在线视频| 一道本成人在线| 日韩一区二区在线观看视频| 久久人人爽人人爽| 亚洲精品日韩综合观看成人91| 日本欧美大码aⅴ在线播放| 精品亚洲成a人| 91浏览器打开| 精品国产乱码久久久久久浪潮 | 天堂蜜桃一区二区三区| 国产一区二区在线免费观看| 色婷婷久久久亚洲一区二区三区 | 色综合天天狠狠| 日韩精品一区二区三区在线| 中文字幕不卡一区| 午夜精品在线看| 成人午夜av电影| 欧美日韩的一区二区| 中文天堂在线一区| 奇米精品一区二区三区在线观看 | 欧美偷拍一区二区| 日韩视频永久免费| 亚洲综合免费观看高清完整版在线| 石原莉奈在线亚洲三区| 国产成人亚洲综合a∨婷婷图片| 欧美在线综合视频| 国产欧美日韩另类一区| 亚洲无线码一区二区三区| 国产成人aaa| 日韩精品一区二区三区在线播放| 亚洲精品写真福利| 国产福利一区在线观看| 91麻豆精品国产91久久久久久| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产精品1区二区.| 91精品国产品国语在线不卡 | 国产精品系列在线| 老司机精品视频导航| 欧美美女网站色| 亚洲激情成人在线| 不卡的av中国片| 国产日韩精品视频一区| 理论电影国产精品| 日韩一区二区免费视频| 亚洲国产成人av| 欧亚洲嫩模精品一区三区| 国产精品人成在线观看免费| 国产乱码字幕精品高清av | 国产成人午夜电影网| 欧美成人伊人久久综合网| 日韩国产精品久久久久久亚洲| 在线免费av一区| 一区二区三区日韩欧美| 色综合天天性综合| 亚洲精品欧美专区| 日本乱人伦一区| 亚洲一区在线观看视频| 精品视频色一区| 午夜欧美在线一二页| 欧美视频一区二|