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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? vunwind.c

?? windows ce 3.00 嵌入式操作系統(tǒng)源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*++

Copyright (c) 1993-2000 Microsoft Corporation.  All rights reserved.

Module Name:

    vunwind.c

Abstract:

    This module contains the instruction classifying and virtual
    unwinding routines for structured exception handling on PowerPC.

    Virtual Unwind was moved to this file from exdsptch.c so that it
    can be used directly in the kernel debugger.

 --*/

#include "kernel.h"

typedef double *PDOUBLE;

#define READ_ULONG(addr,dest) ((dest) = (*(PULONG)(addr)))
#define READ_DOUBLE(addr,dest) ((dest) = (*(PDOUBLE)(addr)))

#if 0 ///ifdef _IMAGEHLP_SOURCE_
#define FUNCTION_ENTRY_IS_IMAGE_STYLE
#define NOT_IMAGEHLP(E)
#else
#define NOT_IMAGEHLP(E) E
#endif

extern PRUNTIME_FUNCTION NKLookupFunctionEntry(
    IN PPROCESS pProc,
    IN ULONG ControlPc,
    PRUNTIME_FUNCTION prf);

//
// The `ClassifyInstruction' function returns an enum that identifies
// the type of processing needed for an instruction.
//

typedef enum _INSTR_CLASS {
    InstrIgnore,        // Do not process
    InstrMFLR,          // Move from Link Register
    InstrMFCR,          // Move from Condition Register
    InstrSTW,           // Store word
    InstrSTWU,          // Store word with update
    InstrSTWUr12,       // Store word with update during UnwindR12
    InstrSTFD,          // Store float double
    InstrMR,            // Move register
    InstrMRr12,         // Move register during UnwindR12
    InstrMRfwd,         // Move register during UnwindForward
    InstrADDIr12,       // Add immediate during UnwindR12
    InstrADDIfwd,       // Add immediate during UnwindForward
    InstrSaveCode,      // Branch and link to GPR or FPR saving millicode
    InstrRestoreCode,   // Branch to GPR or FPR saving millicode
    InstrGlue,          // Branch or Branch and link to glue code
    InstrBLR,           // Branch to Link Register
    InstrSetEstablisher // Special instruction used to set establisher frame
} INSTR_CLASS;

//
// If `ClassifyInstruction' returns `InstrSaveCode' or `InstrRestoreCode',
// the following information is completed.
//

typedef struct _MILLICODE_INFO {
    ULONG  TargetPc;    // Millicode entry point
    PRUNTIME_FUNCTION FunctionEntry; // Millicode function table entry
    RUNTIME_FUNCTION  FETemp;       // storage to hold FE if using compressed PData
} MILLICODE_INFO, *PMILLICODE_INFO;

//
// `ClassifyInstruction' interprets the instruction based on the intent.
//

typedef enum _UNWIND_INTENT {
    UnwindForward,      // Performing a forward execution
    UnwindR12,          // Performing a reverse execution to get r.12
    UnwindReverse,      // Performing a reverse execution
    UnwindReverseR12    // Performing a reverse execution allowing r.12
} UNWIND_INTENT;

//
// The simulated execution by `RtlVirtualUnwind' is controlled by this
// data type.
//

typedef struct _ITERATOR {
    ULONG BeginPc;      // Address of first instruction to simulate
    ULONG EndPc;        // Address after the last instruction to simulate
    LONG  Increment;    // Simulation direction
    UNWIND_INTENT Intent; // Simulation intent
} ITERATOR, *PITERATOR;

#define GPR1     1      // GPR 1 in an RA, RB, RT, etc. field
#define GPR2     2      // GPR 2 in an RA, RB, RT, etc. field
#define GPR12    12     // GPR 12 in an RA, RB, RT, etc. field
#define LINKREG  0x100  // Link Reg in a MFSPR instruction

static INSTR_CLASS
ClassifyInstruction (PPC_INSTRUCTION *I,
                     UNWIND_INTENT Intent,
                     ULONG Pc,
                     PMILLICODE_INFO Info)
/*++

Routine description:
    This function inspects the instruction identified by the "Pc"
    argument and determines what sort of processing is needed in order
    to simulate its execution.  Some instructions can be safely
    ignored altogether, in which case "InstrIgnore" is returned.  For
    others, a value is returned indicating what kind of instruction
    was found.  The interpreation depends on the value of "Intent".

Arguments:
    I - Address of a struct containing the instruction to be examined.
    Intent - Type of unwinding being performed.
    Pc - Address of the instruction, used for computing relative branch
        addresses.
    Info - Address to store a description of the register save/restore
        millicode.

Return value:
    One of the enum values defined above is returned.

 --*/

{
// Unique value combining an opcode and an UNWIND_INTENT value.
#define OP_INTENT(OP,INTENT) ((OP) << 2 | (INTENT))

    switch (OP_INTENT (I->Primary_Op, Intent)) {

      //
      // Store word: recognize "stw r.n, disp(r.1)".  Allow a base of
      // r.12 if we have computed its value.
      //
      case OP_INTENT (STW_OP, UnwindReverseR12):
        if (I->Dform_RA == GPR12)
            return InstrSTW;
        // fall thru
      case OP_INTENT (STW_OP, UnwindReverse):
        if (I->Dform_RA == GPR1)
            return InstrSTW;
        break;

      //
      // Load word:  recognize "lwz r.n, disp(r.x)" in epilogue millicode.
      //
      case OP_INTENT (LWZ_OP, UnwindForward):
        return InstrSTW;

      //
      // Store word with update:  recognize "stwu r.1, r.1, disp"
      //
      case OP_INTENT (STWU_OP, UnwindReverse):
      case OP_INTENT (STWU_OP, UnwindReverseR12):
      case OP_INTENT (STWU_OP, UnwindR12):
        if (I->Dform_RS == GPR1 &&
            I->Dform_RA == GPR1)
            return (Intent == UnwindR12 ? InstrSTWUr12 : InstrSTWU);
        break;

      //
      // Store float double: recognize "stfd f.n, disp(r.1)".  Allow a
      // base of r.12 if we have computed its value.
      //
      case OP_INTENT (STFD_OP, UnwindReverseR12):
        if (I->Dform_RA == GPR12)
            return InstrSTFD;
        // fall thru
      case OP_INTENT (STFD_OP, UnwindReverse):
        if (I->Dform_RA == GPR1)
            return InstrSTFD;
        break;

      //
      // Load float double:  recognize "lfd f.n, disp(r.x)"
      //
      case OP_INTENT (LFD_OP, UnwindForward):
        return InstrSTFD;

      //
      // Add immediate:  recognize "addi r.12, r.1, delta"
      //
      case OP_INTENT (ADDI_OP, UnwindR12):
        if (I->Dform_RS == GPR12 &&
            I->Dform_RA == GPR1)
            return InstrADDIr12;
        break;
      case OP_INTENT (ADDI_OP, UnwindForward):
        return InstrADDIfwd;

      //
      // Branch (long form):  recognize "bl[a] saveregs"and "b[a] restregs"
      //
      case OP_INTENT (B_OP, UnwindReverse):
        //
        // Compute branch target address, allowing for branch-relative
        // and branch-absolute.
        //
        Pc = ((LONG)(I->Iform_LI) << 2) + (I->Iform_AA ? 0 : Pc);

        //
        // Determine whether the target address is part of a register
        // save or register restore sequence or is a direct branch out
        // by checking it's function table entry.
        //
        if ((Info->FunctionEntry = NKLookupFunctionEntry(pCurProc, Pc, &Info->FETemp)) != NULL
                && Info->FunctionEntry->ExceptionHandler == 0) {
            Info->TargetPc = Pc;
            switch ((ULONG)Info->FunctionEntry->HandlerData) {
            case 1:
                if (I->Iform_LK)
                    return InstrSaveCode;
                break;
            case 2:
                if (!I->Iform_LK)
                    return InstrRestoreCode;
                break;
            case 3:
                return InstrGlue;
            }
        }
        break; // unrecognized entry point

      //
      // Extended ops -- primary opcode 19
      //
      case OP_INTENT (X19_OP, UnwindForward):
        //
        // BLR: recognized "bclr 20,0".
        //
        if (I->Long == RETURN_INSTR)
            return InstrBLR;
        break;

      case OP_INTENT (X19_OP, UnwindR12):
      case OP_INTENT (X19_OP, UnwindReverse):
      case OP_INTENT (X19_OP, UnwindReverseR12):
        //
        // RFI: this instruction is used in special kernel fake prologues
        //      to indicate that the establisher frame address should be
        //      updated using the current value of sp.
        //
        if (I->Xform_XO == RFI_OP)
            return InstrSetEstablisher;
        break;

      //
      // Extended ops -- primary opcode 31
      //
      case OP_INTENT (X31_OP, UnwindForward):
      case OP_INTENT (X31_OP, UnwindR12):
      case OP_INTENT (X31_OP, UnwindReverse):
      case OP_INTENT (X31_OP, UnwindReverseR12):
        switch (OP_INTENT (I->Xform_XO, Intent)) {

          //
          // OR register: recognize "or r.x, r.y, r.y" as move-reg
          //
          case OP_INTENT (OR_OP, UnwindReverse):

            if (I->Xform_RS == I->Xform_RB)
                return InstrMR;
            break;

          case OP_INTENT (OR_OP, UnwindForward):
            if (I->Xform_RS == I->Xform_RB)
                return InstrMRfwd;
            break;

          //
          // Store word with update indexed:  recognize "stwux r.1, r.1, r.x"
          //
          case OP_INTENT (STWUX_OP, UnwindReverse):
          case OP_INTENT (STWUX_OP, UnwindReverseR12):
          case OP_INTENT (STWUX_OP, UnwindR12):
            if (I->Xform_RS == GPR1 && I->Xform_RA == GPR1)
                return (Intent == UnwindR12 ? InstrSTWUr12 : InstrSTWU);
            break;

          //
          // Move to/from special-purpose reg:  recognize "mflr", "mtlr"
          //
          case OP_INTENT (MFSPR_OP, UnwindReverse):
          case OP_INTENT (MTSPR_OP, UnwindForward):
            if (I->XFXform_spr == LINKREG)
                return InstrMFLR;
            break;

          //
          // Move from Condition Register:  "mfcr r.x"
          //
          case OP_INTENT (MFCR_OP, UnwindReverse):
          case OP_INTENT (MFCR_OP, UnwindReverseR12):
            return InstrMFCR;

          //
          // Move to Condition Register:  "mtcrf 255,r.x"
          //
          case OP_INTENT (MTCRF_OP, UnwindForward):
            if (I->XFXform_FXM == 255)
                return InstrMFCR;
            break;

          default:              // unrecognized
            break;
        }

      default:                  // unrecognized
        break;
    }

    //
    // Instruction not recognized; just ignore it and carry on
    //
    return InstrIgnore;
#undef OP_INTENT
}

ULONG
RtlVirtualUnwind(
    IN ULONG ControlPc,
    IN PRUNTIME_FUNCTION FunctionEntry,
    IN OUT PCONTEXT ContextRecord,
    OUT PBOOLEAN InFunction,
    OUT PULONG EstablisherFrame)
/*++

Routine Description:
    This function virtually unwinds the specfified function by executing its
    prologue code backwards.

    If the function is a leaf function, then the address where control left
    the previous frame is obtained from the context record. If the function
    is a nested function, but not an exception or interrupt frame, then the
    prologue code is executed backwards and the address where control left
    the previous frame is obtained from the updated context record.

    If the function is register save millicode, it is treated as a leaf
    function.  If the function is register restore millicode, the remaining
    body is executed forwards and the address where control left the
    previous frame is obtained from the final blr instruction.

    If the function was called via glue code and is not that glue code,
    the prologe of the glue code is executed backwards in addition to the
    above actions.

    Otherwise, an exception or interrupt entry to the system is being
    unwound and a specially coded prologue restores the return address
    twice. Once from the fault instruction address and once from the saved
    return address register. The first restore is returned as the function
    value and the second restore is place in the updated context record.

    If a context pointers record is specified, then the address where each
    nonvolatile registers is restored from is recorded in the appropriate
    element of the context pointers record.

Arguments:
    ControlPc - Supplies the address where control left the specified
        function.

    FunctionEntry - Supplies the address of the function table entry for the

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产普通话99| 欧美精品在线观看一区二区| 国产亚洲精品精华液| 久国产精品韩国三级视频| 精品国产一二三区| 国产盗摄女厕一区二区三区 | 精品一区精品二区高清| 精品久久久久久久久久久久久久久久久| 日本不卡中文字幕| 久久亚洲精精品中文字幕早川悠里| 国产精品影视在线| 日韩毛片在线免费观看| 欧美日韩精品一二三区| 精品亚洲免费视频| 亚洲欧洲成人av每日更新| 欧美日韩一卡二卡| 精品一区二区三区免费毛片爱| 久久久久久久久蜜桃| 99v久久综合狠狠综合久久| 亚洲成av人影院| 精品成人一区二区三区四区| 成人动漫视频在线| 亚洲a一区二区| 久久久99精品久久| 欧美午夜影院一区| 狠狠色综合播放一区二区| 国产精品每日更新在线播放网址| 在线国产电影不卡| 国产一区二区美女诱惑| 亚洲黄色小说网站| 久久久久久黄色| 欧美日韩一级黄| 国产精品77777| 国产一区二区美女| 亚洲男人都懂的| 欧美成人高清电影在线| 欧美性一区二区| 国产精品亚洲第一区在线暖暖韩国 | 日本国产一区二区| 国产综合色产在线精品| 亚洲精品国产一区二区精华液 | av在线一区二区| 蜜芽一区二区三区| 亚洲日本免费电影| 久久精品视频免费观看| 精品视频全国免费看| 国产不卡视频在线播放| 日韩精品亚洲专区| 亚洲精品视频在线看| 国产欧美一区二区精品久导航| 欧美美女bb生活片| 91麻豆国产精品久久| 国产精一品亚洲二区在线视频| 亚洲图片一区二区| 亚洲欧洲韩国日本视频| 久久精品一区二区三区不卡牛牛| 欧美色网一区二区| 色94色欧美sute亚洲线路二| 成人综合激情网| 国产老肥熟一区二区三区| 美女一区二区视频| 婷婷夜色潮精品综合在线| 亚洲激情图片qvod| 亚洲人成在线观看一区二区| 日本一区二区视频在线| 国产欧美一区二区精品婷婷| 久久精子c满五个校花| 久久综合999| 久久久久青草大香线综合精品| 日韩欧美国产1| 欧美一区二区黄色| 欧美一级片免费看| 日韩欧美色综合网站| 日韩一区二区三区在线视频| 欧美夫妻性生活| 91精品国产一区二区三区蜜臀| 欧美日韩国产高清一区二区三区| 欧美日韩一区 二区 三区 久久精品| 欧美综合一区二区| 欧美三级视频在线观看| 欧美日韩国产乱码电影| 欧美精品自拍偷拍| 日韩精品一区二区三区在线播放| 日韩一区二区免费在线电影| 日韩一二三四区| www日韩大片| 国产精品久久久久久久久搜平片| 中文在线免费一区三区高中清不卡| 欧美精品一区二区蜜臀亚洲| 精品88久久久久88久久久| 久久久亚洲精品一区二区三区| 久久色中文字幕| 自拍偷自拍亚洲精品播放| 玉足女爽爽91| 天天色综合成人网| 美脚の诱脚舐め脚责91| 高清不卡一区二区在线| av成人动漫在线观看| 欧美三级日韩在线| 精品蜜桃在线看| 国产精品国模大尺度视频| 亚洲一区在线观看免费| 免费av成人在线| 成人av在线观| 欧美性受xxxx| 精品av久久707| 1区2区3区精品视频| 亚洲午夜久久久久久久久电影网 | 精品一区精品二区高清| 国产 欧美在线| 欧美视频中文一区二区三区在线观看| 欧美日韩五月天| 国产欧美中文在线| 亚洲一区二区av在线| 国产一区不卡在线| 91久久免费观看| 久久久久久久电影| 亚洲一级二级在线| 国产高清不卡二三区| 欧美主播一区二区三区美女| 日韩精品一区二区在线观看| 亚洲欧美一区二区三区孕妇| 日本欧美一区二区三区乱码| 大陆成人av片| 日韩一区二区三区观看| 亚洲女与黑人做爰| 韩国v欧美v日本v亚洲v| 日本高清不卡一区| 国产午夜三级一区二区三| 午夜成人在线视频| 成人精品在线视频观看| 欧美一级片在线观看| 一区二区三区成人在线视频| 国产成人午夜电影网| 日韩午夜在线影院| 一区二区免费在线播放| 成人影视亚洲图片在线| 精品少妇一区二区三区在线视频| 一区二区三区蜜桃网| 国产成人综合视频| 91麻豆精品国产91久久久久久| 亚洲乱码精品一二三四区日韩在线| 极品美女销魂一区二区三区| 欧美日韩aaaaa| 一区二区成人在线| zzijzzij亚洲日本少妇熟睡| 精品99999| 久久激五月天综合精品| 欧美日韩高清一区| 亚洲一区二区欧美| 色拍拍在线精品视频8848| 中文字幕不卡在线| 国产一区91精品张津瑜| 日韩视频在线永久播放| 午夜视频在线观看一区二区| 91在线观看地址| 亚洲色图丝袜美腿| 国产成人高清视频| 日本一区二区三区在线观看| 狠狠色综合播放一区二区| 亚洲精品一区二区三区福利| 美女视频黄免费的久久| 91精品国产综合久久久久久久久久 | 久久精品日韩一区二区三区| 久草在线在线精品观看| www国产精品av| 经典三级视频一区| 26uuu色噜噜精品一区二区| 国产在线播放一区三区四| 日韩视频免费观看高清在线视频| 日韩高清在线观看| 日韩一级欧美一级| 久久99精品久久久久| 精品国产乱码久久久久久久久 | 国产精品污污网站在线观看| 成人免费看黄yyy456| 综合久久综合久久| 色综合色狠狠天天综合色| 一区二区三区产品免费精品久久75| 日本精品视频一区二区三区| 亚洲综合免费观看高清在线观看| 欧美性受xxxx| 强制捆绑调教一区二区| 精品国产免费一区二区三区香蕉| 狠狠色狠狠色综合系列| 亚洲国产激情av| 91国产丝袜在线播放| 日韩国产精品久久久| 国产无人区一区二区三区| 91免费看片在线观看| 天堂久久一区二区三区| 26uuu亚洲婷婷狠狠天堂| 东方欧美亚洲色图在线| 亚洲一区二区三区激情| 精品国产一区二区三区不卡| av在线不卡电影| 日韩福利电影在线观看| 国产精品污网站| 欧美日本在线看| 国产成人精品免费|