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

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

?? vunwind.c

?? windows ce 3.00 嵌入式操作系統(tǒng)源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
        specified function or NULL if the function is a leaf function.

    ContextRecord - Supplies the address of a context record.

    InFunction - Supplies a pointer to a variable that receives whether the
        control PC is within the current function.

    EstablisherFrame - Supplies a pointer to a variable that receives the
        the establisher frame pointer value.

Return Value:
    The address where control left the previous frame is returned as the
    function value.

 --*/
{
    ITERATOR Iterator[8];
    PITERATOR Piterator;
    ULONG Address;
    PDOUBLE FloatingRegister;
    PPC_INSTRUCTION I;
    PULONG IntegerRegister;
    ULONG NextPc, Pc;
    BOOLEAN RestoredLr = FALSE;
    BOOLEAN RestoredSp = FALSE;
    BOOLEAN ComputedSp = FALSE;
    ULONG Rt;
    MILLICODE_INFO Info;
    INSTR_CLASS InstrClass;
    ULONG EstablisherFrameValue;

	//
    // Set the base address of the integer and floating register arrays.
    //

    FloatingRegister = &ContextRecord->Fpr0;
    IntegerRegister = &ContextRecord->Gpr0;

    //
    // If the function is a leaf function, perform the default unwinding
    // action and check to see if the function was called via glue.
    //
    if (FunctionEntry == NULL) {
        //
        // Set point at which control left the previous routine.
        //

        return( ContextRecord->Lr - 4 );
    }
    //
    // Set initial values for EstablisherFrame and Offset.
    // (this may need more careful planning IBMPLJ).
    //

    NOT_IMAGEHLP (*EstablisherFrame =
                  EstablisherFrameValue = ContextRecord->Gpr1);

    READ_ULONG (ControlPc, I.Long);
    if (I.Long == RETURN_INSTR) {
        //
        // If the instruction at the point where control left the specified
        // function is a return, then any saved registers have been restored
        // and the control PC is not considered to be in the function
        // (i.e., in an epilogue).
        //
        NOT_IMAGEHLP(*InFunction = FALSE);
        return( ContextRecord->Lr );
    }
    InstrClass = ClassifyInstruction(&I, UnwindReverse, ControlPc, &Info);
    if (InstrClass == InstrRestoreCode) {
        //
        // If the instruction at the point where control left the
        // specified function is a branch to register restore
        // millicode, the state is restored by simulating the
        // execution of the restore millicode.  The control PC is in
        // an epilogue.
        //
        Iterator[0].BeginPc = Info.TargetPc;
        Iterator[0].EndPc = Info.FunctionEntry->EndAddress;
        Iterator[0].Increment = 4;
        Iterator[0].Intent = UnwindForward;
        NOT_IMAGEHLP(*InFunction = FALSE);

    } else if (FunctionEntry->ExceptionHandler == 0 &&
               (ULONG)FunctionEntry->HandlerData == 2) {
        //
        // If the address is in register restore millicode, the state
        // is restored by completing the execution of the restore
        // millicode.  The control PC is in an epilogue.
        //
        Iterator[0].BeginPc = ControlPc;
        Iterator[0].EndPc = FunctionEntry->EndAddress;
        Iterator[0].Increment = 4;
        Iterator[0].Intent = UnwindForward;
        NOT_IMAGEHLP(*InFunction = FALSE);

    } else {

        //
        // If the address where control left the specified function is
        // outside the limits of the prologue, then the control PC is
        // considered to be within the function and the control
        // address is set to the end of the prologue. Otherwise, the
        // control PC is not considered to be within the function
        // (i.e., in the prologue).
        //
        Iterator[0].EndPc = FunctionEntry->BeginAddress - 4;
        Iterator[0].Increment = -4;
        Iterator[0].Intent = UnwindReverse;
        if (ControlPc < FunctionEntry->BeginAddress
                || ControlPc >= (FunctionEntry->PrologEndAddress & ~3)) {
            NOT_IMAGEHLP(*InFunction = TRUE);
            Iterator[0].BeginPc = ((FunctionEntry->PrologEndAddress & ~3) - 4);
        } else {
            NOT_IMAGEHLP(*InFunction = FALSE);
            Iterator[0].BeginPc = ControlPc - 4;
        }
    }

    //
    // Scan through the given instructions and reload callee registers
    // as indicated.
    //
    NextPc = ContextRecord->Lr - 4;
    for (Piterator = Iterator; Piterator >= Iterator; Piterator--) {

        for (Pc = Piterator->BeginPc;
             Pc != Piterator->EndPc;
             Pc += Piterator->Increment) {

            READ_ULONG (Pc, I.Long);
            Address = IntegerRegister[I.Dform_RA] + I.Dform_D;
            Rt = I.Dform_RT;
            switch (ClassifyInstruction (&I, Piterator->Intent, Pc, &Info)) {

              //
              // Move from Link Register (save LR in a GPR)
              //
              // In the usual case, the link register gets set by a call
              // instruction so the PC value should point to the
              // instruction that sets the link register.  In an interrupt
              // or exception frame, the link register and PC value are
              // independent.  By convention, fake prologues for these
              // frames store the link register twice: once to the link
              // register location, once to the faulting PC location.
              //
              // If this is the first time that RA is being restored,
              // then set the address of where control left the previous
              // frame. Otherwise, this is an interrupt or exception and
              // the return PC should be biased by 4 and the link register
              // value should be updated.
              //
              case InstrMFLR:

                ContextRecord->Lr = IntegerRegister[Rt];
                if ( RestoredLr == FALSE ) {
                    NextPc = ContextRecord->Lr - 4;
                    RestoredLr = TRUE;
                } else {
                    NextPc += 4;
                }
                continue; // Next PC

              //
              // Branch to Link Register (forward execution).
              //
              case InstrBLR:
                NextPc = ContextRecord->Lr - 4;
                break; // Terminate simulation--start next iterator.

              //
              // Move from Condition Register (save CR in a GPR)
              //
              case InstrMFCR:
                ContextRecord->Cr = IntegerRegister[Rt];
                continue; // Next PC

              //
              // Store word (save a GPR)
              //
              case InstrSTW:
              //
              // Even though a stw  r.sp, xxxx in general is an invalid
              // proloque instruction there are places in the kernel
              // fake prologues (KiExceptionExit) where we must use this,
              // so handle it.
              //
				READ_ULONG (Address, IntegerRegister[Rt]);
				// Check for an SP update
				if ( Rt == GPR1 )
					RestoredSp = TRUE;
                continue; // Next PC

              //
              // Store word with update, Store word with update indexed
              // (buy stack frame, updating stack pointer and link
              // cell in storage)
              //
              case InstrSTWU:
				// STWU should only be used for updating SP
				DEBUGCHK(I.Dform_RT == GPR1);
				DEBUGCHK(I.Dform_RA == GPR1);
				  
				// Do not update SP twice.  CaptureContext is an example of 
				// a prolog where only the last sp update (the first one the 
				// unwinder encounters) should be unwound.
				if ( RestoredSp == FALSE )
				{
					Address = IntegerRegister[GPR1];
					READ_ULONG(Address,IntegerRegister[GPR1]);
					
                    *EstablisherFrame = ContextRecord->Gpr1;
					EstablisherFrameValue = ContextRecord->Gpr1;
                    RestoredSp = TRUE;
				}
                continue; // Next PC

              //
              // Store floating point double (save an FPR)
              //
              case InstrSTFD:
                READ_DOUBLE (Address, FloatingRegister[Rt]);
                continue; // Next PC

              //
              // Move register.  Certain forms are ignored based on the intent.
              //
              case InstrMR:
                IntegerRegister[Rt] = IntegerRegister[I.Xform_RA];
                continue; // Next PC
              case InstrMRfwd:
                IntegerRegister[I.Xform_RA] = IntegerRegister[Rt];
                continue; // Next PC

              //
              // Add immediate.  Certain forms are ignored based on the intent.
              //
              case InstrADDIfwd:
                IntegerRegister[Rt] = Address;
                continue; // Next PC
              case InstrADDIr12:
                if (!ComputedSp) {
                  // No intervening instruction changes r.1, so compute
                  // addi r.12,r.1,N instead of addi r.12,r.12,N.
                  IntegerRegister[Rt] = IntegerRegister[GPR1];
                }
                IntegerRegister[Rt] += I.Dform_SI;
                break; // Terminate search--start next iterator.

              //
              // Store with update while searching for the value of r.12
              //
              case InstrSTWUr12:
                ComputedSp = TRUE;
                Address = IntegerRegister[GPR1];
                READ_ULONG(Address,IntegerRegister[GPR12]);
                continue; // Next PC

              //
              // A call to a register save millicode.
              //
              case InstrSaveCode:

                //
                // Push an iterator to incorporate the actions of the
                // millicode.
                //
                Piterator++;
                Piterator->BeginPc = Info.FunctionEntry->EndAddress - 4;
                Piterator->EndPc = Info.TargetPc - 4;
                Piterator->Increment = -4;
                Piterator->Intent = UnwindReverseR12;
                //
                // Push an iterator to determine the current value of r.12
                //
                Piterator++;
                Piterator->BeginPc = Pc - 4;
                Piterator->EndPc = Piterator[-2].EndPc;
                Piterator->Increment = -4;
                Piterator->Intent = UnwindR12;
                ComputedSp = FALSE;
                //
                // Update the start of the original iterator so it can later
                // resume where it left off.
                //
                Piterator[-2].BeginPc = Pc - 4;
                Piterator++;
                break; // Start the next iterator.

              //
              // A branch was encountered in the prologue to a routine
              // identified as glue code.  This should only happen from
              // fake prologues such as those in the system exception
              // handler.
              //
              // We handle it by pushing an iterator to incorporate
              // the actions of the glue code prologue.
              //
             case InstrGlue:
                //
                // Check that we don't nest too deeply.  Verify that
                // we can push this iterator and the iterators for a
                // glue sequence.  There's no need to make this check
                // elsewhere because B_OP is only recognized during
                // UnwindReverse.  Returing zero is the only error action
                // we have.
                //

                if (Piterator - Iterator + 4
                    > sizeof (Iterator) / sizeof (Iterator[0]))
                    return 0;
                //
                // Push an iterator to incorporate the actions of the glue
                // code's prologue.  Check that we don't nest too deeply.
                // Verify that we can push this iterator and the iterators
                // for a glue sequence.
                //
                Piterator++;
                Piterator->BeginPc
                  = (Info.FunctionEntry->PrologEndAddress & ~3) - 4;
                Piterator->EndPc = Info.FunctionEntry->BeginAddress - 4;
                Piterator->Increment = -4;
                Piterator->Intent = UnwindReverse;
                //
                // Update the start of the original iterator so it can later
                // resume where it left off.
                //
                Piterator[-1].BeginPc = Pc - 4;
                Piterator++;
                break; // Start the next iterator.

              //
              // Special "set establisher" instruction (rfi).
              //
              // Kernel fake prologues that can't use stwu (KiExceptionExit,
              // KiAlternateExit) use an rfi instruction to tell the
              // unwinder to update the establisher frame pointer using
              // the current value of sp.
              //
              case InstrSetEstablisher:
                NOT_IMAGEHLP (*EstablisherFrame =
                                  EstablisherFrameValue = ContextRecord->Gpr1);
                continue; // Next PC

              //
              // None of the above.  Just ignore the instruction.  It
              // is presumed to be non-prologue code that has been
              // merged into the prologue for scheduling purposes.  It
              // may also be improper code in a register save/restore
              // millicode routine or unimportant code when
              // determining the value of r.12.
              //
              case InstrIgnore:
              default:
                continue; // Next PC
            }
            break; // Start the next iterator.
        } // end foreach Pc
    } // end foreach Iterator

    return NextPc;
}

#undef NOT_IMAGEHLP

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲自拍都市欧美小说| 亚洲美女免费在线| 色婷婷精品久久二区二区蜜臂av| 日韩影院精彩在线| 国产日韩欧美麻豆| 91精品国产黑色紧身裤美女| 99精品视频中文字幕| 免费欧美在线视频| 亚洲香蕉伊在人在线观| 国产精品视频麻豆| 欧美成人国产一区二区| 国产盗摄一区二区三区| 日韩经典一区二区| 一区二区三区四区在线| 国产午夜亚洲精品不卡| 欧美变态tickle挠乳网站| 欧美亚洲尤物久久| 91免费视频观看| www.综合网.com| 国产精品亚洲午夜一区二区三区| 日韩精品一级二级| 亚洲五月六月丁香激情| 亚洲视频电影在线| 国产精品国产三级国产三级人妇| 精品国产污污免费网站入口| 91精品午夜视频| 在线不卡欧美精品一区二区三区| 一本久久a久久精品亚洲| 成人网在线免费视频| 国产在线视视频有精品| 蜜臀av性久久久久蜜臀av麻豆| 亚洲午夜精品网| 亚洲成av人影院在线观看网| 亚洲在线视频一区| 午夜伊人狠狠久久| 天堂精品中文字幕在线| 亚洲成人免费观看| 日韩不卡免费视频| 轻轻草成人在线| 美女一区二区三区| 精品午夜久久福利影院| 国产呦精品一区二区三区网站| 天堂精品中文字幕在线| 日韩成人av影视| 久久超碰97中文字幕| 久久精品二区亚洲w码| 国产乱码字幕精品高清av | 欧美二区三区的天堂| 9191久久久久久久久久久| 欧美高清一级片在线| 日韩欧美激情四射| 久久午夜电影网| 中文字幕制服丝袜成人av| 亚洲欧洲精品一区二区三区| 一区二区三区精品视频| 午夜伦理一区二区| 激情偷乱视频一区二区三区| 丁香六月久久综合狠狠色| 99视频一区二区| 久久婷婷成人综合色| 精品国产精品一区二区夜夜嗨| 精品精品国产高清a毛片牛牛| 久久久久久久网| 亚洲三级视频在线观看| 亚洲成人免费在线| 国内精品免费在线观看| 99天天综合性| 欧美另类z0zxhd电影| 精品久久久久久久久久久久包黑料| 久久久不卡网国产精品二区| 亚洲人成电影网站色mp4| 日本不卡一二三| 国产99久久久精品| 欧美日韩专区在线| 精品国产乱码久久久久久免费| 中文字幕在线视频一区| 亚洲国产视频一区| 国产精品一区专区| 欧美日韩国产综合一区二区三区 | 欧美色国产精品| 久久这里都是精品| 亚洲永久免费av| 国产精品资源在线看| 欧美天天综合网| 国产人伦精品一区二区| 亚洲成av人片| 99精品在线免费| 2020国产精品久久精品美国| 亚洲免费资源在线播放| 国产麻豆视频精品| 欧美日韩五月天| 综合欧美亚洲日本| 国产综合成人久久大片91| 欧美视频一区二| 国产精品另类一区| 久久福利视频一区二区| 欧美三级韩国三级日本三斤| 久久久久久久久一| 日韩影院精彩在线| 欧美最猛性xxxxx直播| 国产校园另类小说区| 蜜臀久久99精品久久久久宅男| 一本到不卡免费一区二区| 久久午夜色播影院免费高清| 日韩av电影一区| 欧美日韩黄视频| 国产在线麻豆精品观看| 精品污污网站免费看| 亚洲欧美日韩小说| 成人99免费视频| 久久久精品人体av艺术| 青青国产91久久久久久| 欧美日韩美女一区二区| 亚洲精品欧美专区| av福利精品导航| 欧美国产精品一区二区| 国内精品写真在线观看| 91精品国产综合久久久久久久久久| 亚洲精品国产一区二区精华液 | 国精产品一区一区三区mba视频 | 亚洲www啪成人一区二区麻豆| av在线不卡电影| 欧美激情一区二区三区全黄 | 一本一道综合狠狠老| 国产精品欧美一级免费| 韩国成人在线视频| 欧美精品一区男女天堂| 青青草原综合久久大伊人精品优势| 欧美人狂配大交3d怪物一区| 亚洲第一综合色| 欧美精品少妇一区二区三区| 亚洲综合视频在线观看| 97久久精品人人澡人人爽| 亚洲欧洲日产国码二区| av电影天堂一区二区在线 | 亚洲大片精品永久免费| 精品视频在线免费看| 香蕉乱码成人久久天堂爱免费| 欧美精品在线视频| 久久精品在线观看| 国产裸体歌舞团一区二区| 精品日韩一区二区三区 | 国产精品自拍av| 日本一区二区久久| 不卡视频一二三四| 亚洲在线中文字幕| 欧美福利视频导航| 久久精品国产77777蜜臀| 久久亚洲欧美国产精品乐播 | 欧美精品一级二级三级| 日本va欧美va瓶| 久久久久久久久99精品| 成人不卡免费av| 亚洲网友自拍偷拍| 91精品国产色综合久久| 国产一区高清在线| 中文字幕日韩欧美一区二区三区| 91一区二区在线观看| 三级不卡在线观看| 国产欧美一区二区精品秋霞影院| 成年人国产精品| 天堂久久一区二区三区| 国产性色一区二区| 日本韩国一区二区三区视频| 日韩av一区二| 中文字幕一区二区5566日韩| 欧美亚州韩日在线看免费版国语版| 麻豆精品视频在线| 日韩美女久久久| 日韩欧美一级二级三级久久久| 国产在线一区观看| 亚洲精品国产无套在线观| 日韩欧美久久久| 色综合视频一区二区三区高清| 视频精品一区二区| 国产精品日产欧美久久久久| 欧美日韩国产综合久久| 在线观看亚洲成人| 麻豆久久久久久| 亚洲伦理在线精品| 精品日韩欧美一区二区| 99久久99精品久久久久久| 免费久久精品视频| 亚洲免费视频成人| xvideos.蜜桃一区二区| 91热门视频在线观看| 日产国产高清一区二区三区| 中文字幕一区二区在线观看| 日韩一区二区视频| 日本二三区不卡| 国产成人av一区二区三区在线| 亚洲va国产va欧美va观看| 国产精品女主播在线观看| 日韩一区二区中文字幕| 色婷婷久久久久swag精品| 国产精品自拍毛片| 欧美aaaaaa午夜精品| 一区二区三区蜜桃| 国产精品入口麻豆原神| 精品国免费一区二区三区|