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

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

?? kdbreak.c

?? wince3.0的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*++

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

Module Name:

    kdbreak.c

Abstract:

    This module implements machine dependent functions to add and delete
    breakpoints from the kernel debugger breakpoint table.

Revision History:

--*/

#include "kdp.h"

extern PROCESS *kdProcArray;

#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGEKD, KdpAddBreakpoint)
#pragma alloc_text(PAGEKD, KdpDeleteBreakpoint)
#pragma alloc_text(PAGEKD, KdpDeleteBreakpointRange)
#endif

// The following variables are global for a reason.  Do not move them to the stack or bad things happen
// when flushing instructions.
KDP_BREAKPOINT_TYPE Content;
KDP_BREAKPOINT_TYPE KContent;


ULONG KdpAddBreakpoint(IN PVOID Address)

/*++

Routine Description:

    This routine adds an entry to the breakpoint table and returns a handle
    to the breakpoint table entry.

Arguments:

    Address - Supplies the address where to set the breakpoint.

Return Value:

    A value of zero is returned if the specified address is already in the
    breakpoint table, there are no free entries in the breakpoint table, the
    specified address is not correctly aligned, or the specified address is
    not valid. Otherwise, the index of the assigned breakpoint table entry
    plus one is returned as the function value.

--*/

{
    ULONG Handle = 0;
    ULONG Index;
    BOOLEAN Accessible = FALSE;
#ifdef ARM
    BOOLEAN Mode16Bit = FALSE;                          // used for ARM/Thumb
#endif
    BOOLEAN KAccessible = FALSE;
    PVOID KAddress = NULL;
    KDP_BREAKPOINT_TYPE KdpBreakpointInstruction = KDP_BREAKPOINT_VALUE;
    ULONG Length = sizeof(KDP_BREAKPOINT_TYPE);

#if defined(THUMBSUPPORT)

    //
    //  update the breakpoint Instruction and Length if stopped within
    //  16-bit code. (16-bit code indicated by LSB of Address)
    //

    if (((ULONG)Address & 1) != 0) {
        DEBUGGERMSG( KDZONE_BREAK,(L"16 Bit breakpoint %8.8lx\r\n", Address));
        Length = sizeof(KDP_BREAKPOINT_16BIT_TYPE);
        KdpBreakpointInstruction = KDP_BREAKPOINT_16BIT_VALUE;
        Address = (PVOID) ((ULONG)Address & ~1);
        Mode16Bit = TRUE;
    }
        
#endif

    Content = 0;
    KContent = 0;

    //
    // If the specified address is not properly aligned, then return zero.
    //

    DEBUGGERMSG(KDZONE_BREAK,(L"Trying to set BP at %8.8lx\r\n", Address));

    if (((ULONG)Address & (Length-1)) != 0) {
        DEBUGGERMSG(KDZONE_BREAK, (L"Address not aligned\r\n"));
        return 0;
    }

    if ( (((ulong)Address & 0x80000000) == 0) && ZeroPtr(Address) >= (ULONG)DllLoadBase)
    { // If Addr is not physical and Address is in DLL shared space then Get Kernel Address (slot 0)
        DEBUGGERMSG( KDZONE_BREAK,(L"Is Dll %8.8lx ", Address));
        KAddress = (PVOID)(ZeroPtr(Address) + kdProcArray[0].dwVMBase); // Get Slot 0 (current process) address based       
        DEBUGGERMSG( KDZONE_BREAK,(L"converted to %8.8lx \r\n", KAddress));
    }

    //
    // Get the instruction to be replaced. If the instruction cannot be read,
    // then mark breakpoint as not accessible.
    //

    if (KdpMoveMemory(
            (PCHAR)&Content,
            (PCHAR)Address,
            Length ) != Length) {
        Accessible = FALSE;
    } else {
        DEBUGGERMSG(KDZONE_BREAK,(L"Successfully read %8.8lx at %8.8lx \r\n",
            Content, Address));
        Accessible = TRUE;
    }

    // if we got a Kernel Address: try to get its instruction
    if (KAddress != NULL) {
        if (KdpMoveMemory(
                (PCHAR)&KContent,
                (PCHAR)KAddress,
                Length ) != Length) {
            KAccessible = FALSE;
        } else {
            DEBUGGERMSG(KDZONE_BREAK,(L"Successfully read %8.8lx at %8.8lx \r\n",
                Content, KAddress));
            KAccessible = TRUE;
        }
        if (Content != KContent) {
            // assert(FALSE);
            // if contents are different
            DEBUGGERMSG(KDZONE_BREAK,(L"Content %8.8lx != KContent at %8.8lx \r\n",
                Content, KContent, KAddress));
            if (!Content) {
                Content = KContent;
                DEBUGGERMSG(KDZONE_BREAK,(L"Set Content to %8.8lx \r\n", KContent));
            }
        }
    }

    //
    // Search the breakpoint table for a free entry and check if the specified
    // address is already in the breakpoint table.
    //

    if (Content == KdpBreakpointInstruction) {
        DEBUGGERMSG( KDZONE_BREAK,(L"Already found a BP %8.8lx \r\n",Address));

        for (Index = 0; Index < BREAKPOINT_TABLE_SIZE; Index += 1) {
            if (KdpBreakpointTable[Index].Address == Address ||
               (KAddress != NULL && KdpBreakpointTable[Index].KAddress == KAddress)) {
                Handle = Index + 1;
                DEBUGGERMSG( KDZONE_BREAK,(L"return Handle %d\r\n", Handle));
                return Handle;
            }
        }
    }

#if 0
	NKOtherPrintfW(L"Add, Before\r\n");
    for (Index = 0; Index < 3; Index += 1) {
        NKOtherPrintfW(L"table[%i].flags = %i, Addr = %x, KAddr = %x, Content = %x\r\n", 
		Index, 
		KdpBreakpointTable[Index].Flags,
 		KdpBreakpointTable[Index].Address,
 		KdpBreakpointTable[Index].KAddress,
 		KdpBreakpointTable[Index].Content);
        }
#endif

    for (Index = 0; Index < BREAKPOINT_TABLE_SIZE; Index += 1) {
        if (KdpBreakpointTable[Index].Flags == 0 ) {
            Handle = Index + 1;
            break;
        }
    }

    //
    // If a free entry was found, then write breakpoint and return the handle
    // value plus one. Otherwise, return zero.
    //

    if (Handle) {
        if ( Accessible || KAccessible) {
            //
            // If the specified address is not write accessible, then return zero.
            //
            if (!DbgVerify(Address, DV_SETBP)) {
                DEBUGGERMSG(KDZONE_BREAK, (L"Addresses not writable %8.8lx %8.8lx\r\n", 
                    Address, KAddress));
                Address = NULL;
            }
            if (KAddress != NULL && !DbgVerify(KAddress, DV_SETBP)) {
                DEBUGGERMSG(KDZONE_BREAK, (L"Addresses not writable %8.8lx %8.8lx\r\n", 
                    Address, KAddress));
                KAddress = NULL;
            }

            KdpBreakpointTable[Handle - 1].Address = Address;
            KdpBreakpointTable[Handle - 1].KAddress = KAddress;
            KdpBreakpointTable[Handle - 1].Content = Content;
            KdpBreakpointTable[Handle - 1].Flags = KD_BREAKPOINT_IN_USE;

#if defined(THUMBSUPPORT)
            if (Mode16Bit){
                KdpBreakpointTable[Handle-1].Flags |= KD_BREAKPOINT_16BIT;
            }
#endif

//jvp
#if 0
        NKOtherPrintfW(L"Add, After\r\n");
    for (Index = 0; Index < 3; Index += 1) {
        NKOtherPrintfW(L"table[%i].flags = %i, Addr = %x, KAddr = %x, Content = %x\r\n", 
		Index, 
		KdpBreakpointTable[Index].Flags,
 		KdpBreakpointTable[Index].Address,
 		KdpBreakpointTable[Index].KAddress,
 		KdpBreakpointTable[Index].Content);
        }
#endif
            if (!bGlobalBreakPoint)
                KdpBreakpointTable[Handle - 1].pThrd = pCurThread;
            else
                KdpBreakpointTable[Handle - 1].pThrd = 0;

            if (Address != NULL) {
                if (KdpMoveMemory(
                        (PCHAR)Address,
                        (PCHAR)&KdpBreakpointInstruction,
                        Length
                        ) == Length) {
                    DEBUGGERMSG(KDZONE_BREAK,(L"Successfully Set BP Handle %x %8.8lx\r\n", 
                        Handle - 1, Address));
                } else {
                    DEBUGGERMSG(KDZONE_BREAK,(L"Failed to Set BP Handle %x %8.8lx\r\n", 
                        Handle - 1, Address));
                }
            }
            if (KAddress != NULL) {
                if (KdpMoveMemory(
                        (PCHAR)KAddress,
                        (PCHAR)&KdpBreakpointInstruction,
                        Length
                        ) == Length
                ) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国精产品一区一区三区mba视频| 国产视频一区二区在线观看| 国产高清无密码一区二区三区| 亚洲成人精品一区二区| 日韩理论电影院| 国产精品福利一区二区| 日韩高清不卡一区二区三区| 亚洲成人资源在线| 日韩av一区二| 人人爽香蕉精品| 久热成人在线视频| 国产一区999| gogogo免费视频观看亚洲一| 99视频有精品| 欧美日韩一区二区三区在线看| 风间由美中文字幕在线看视频国产欧美 | 日本亚洲三级在线| 奇米一区二区三区| 国产精品一级在线| 亚洲欧洲性图库| 一区二区三区日韩在线观看| 中文字幕亚洲不卡| 亚洲男同性恋视频| 美女一区二区久久| 日本丰满少妇一区二区三区| 中文字幕亚洲在| 成人理论电影网| 色综合一个色综合亚洲| 欧美色精品在线视频| 欧美大黄免费观看| 国产精品久久综合| 日韩在线一二三区| 国产aⅴ精品一区二区三区色成熟| 色综合天天综合在线视频| 欧美日韩一区二区三区在线| 久久综合九色综合欧美就去吻| 一色桃子久久精品亚洲| 青青草91视频| 91视频.com| 精品国产免费人成电影在线观看四季| 欧美激情中文不卡| 男人的天堂久久精品| av成人免费在线| 日韩一区二区三区视频在线观看| 欧美国产丝袜视频| 奇米一区二区三区av| 99re免费视频精品全部| 欧美大片日本大片免费观看| 玉足女爽爽91| 大胆亚洲人体视频| 欧美一二三区在线| 亚洲欧美日韩久久| 国产suv精品一区二区6| 欧美精品三级日韩久久| 亚洲女同一区二区| 国产99一区视频免费 | 日韩午夜激情av| 亚洲色图视频网站| 国产xxx精品视频大全| 精品国产伦一区二区三区观看方式| 日韩一区中文字幕| 91视频精品在这里| 精品日韩一区二区三区| 日本不卡中文字幕| 欧美性生活一区| 亚洲已满18点击进入久久| 91亚洲精品久久久蜜桃网站| 国产亚洲欧洲997久久综合| 精品亚洲国产成人av制服丝袜 | 精品一二三四区| 日韩欧美一区二区不卡| 午夜久久久影院| 欧美午夜精品久久久久久超碰 | 精品久久久三级丝袜| 五月激情综合婷婷| 欧美无人高清视频在线观看| 亚洲免费毛片网站| 99re热这里只有精品免费视频| 国产精品福利影院| 99re免费视频精品全部| 最好看的中文字幕久久| 91丨九色丨蝌蚪富婆spa| 国产精品卡一卡二卡三| 99在线精品免费| 自拍av一区二区三区| 99久久精品情趣| 一区二区三区国产精华| 欧美日韩亚洲综合一区二区三区| 亚洲国产精品久久久久婷婷884| 精品视频一区 二区 三区| 日日夜夜免费精品| 精品播放一区二区| 丁香网亚洲国际| 亚洲日本丝袜连裤袜办公室| 色婷婷国产精品| 石原莉奈在线亚洲二区| 欧美一级日韩一级| 国内外成人在线| 国产精品久久久久aaaa樱花| 在线观看国产一区二区| 美女一区二区视频| 国产精品久久久久永久免费观看| 91麻豆6部合集magnet| 午夜久久久久久久久 | 99精品热视频| 亚洲专区一二三| 精品国产一区二区三区忘忧草| 国产夫妻精品视频| 亚洲一卡二卡三卡四卡无卡久久| 4438x亚洲最大成人网| 国产成人免费在线观看不卡| 亚洲午夜在线电影| 久久久久久久久蜜桃| 91美女福利视频| 精品一区二区三区影院在线午夜| 中文字幕二三区不卡| 在线不卡免费av| 成人精品视频一区| 日本欧美一区二区三区| **欧美大码日韩| 337p日本欧洲亚洲大胆精品| 在线亚洲高清视频| 国产福利一区在线| 婷婷亚洲久悠悠色悠在线播放| 国产欧美一区二区精品性| 91麻豆精品久久久久蜜臀| av一区二区不卡| 韩国欧美国产1区| 天天综合色天天| 一区二区在线电影| 欧美经典一区二区| www日韩大片| 在线播放视频一区| 欧美日韩在线一区二区| 粉嫩av一区二区三区在线播放 | 色久综合一二码| 国产伦精一区二区三区| 午夜电影网亚洲视频| 日韩毛片一二三区| 国产精品一区专区| 欧美激情一区二区三区在线| 国产福利电影一区二区三区| 国产资源精品在线观看| 亚洲免费观看高清| 国产视频视频一区| 色婷婷一区二区三区四区| 午夜成人免费电影| 日韩一级片在线观看| 成人一区在线观看| 伊人开心综合网| 国产日产亚洲精品系列| 在线看一区二区| 精品无人区卡一卡二卡三乱码免费卡| 久久国产麻豆精品| 日韩高清在线电影| 久久亚洲精精品中文字幕早川悠里 | 亚洲女同一区二区| 欧美妇女性影城| 欧美日韩三级一区| 国产一区二区三区高清播放| 国产精品国产三级国产| 精品视频1区2区| 国产精品高潮呻吟| 欧美精品第一页| 波多野结衣中文一区| 亚洲综合激情网| 欧美日本一区二区在线观看| 国产一区二区三区日韩| 日本一不卡视频| 日韩成人dvd| 免费观看在线综合| 日韩福利电影在线观看| 亚洲高清不卡在线观看| 亚洲一区二区在线免费观看视频| 亚洲欧美国产毛片在线| 日韩理论片一区二区| 日韩av电影天堂| 成人午夜电影久久影院| 精品一区二区成人精品| 亚洲欧美日韩中文播放| 日韩精品五月天| 美女精品一区二区| 国产不卡视频在线播放| 欧美色老头old∨ideo| 日韩欧美三级在线| 国产精品久久久久久久久快鸭| 国产精品少妇自拍| 亚洲午夜精品久久久久久久久| 日本中文字幕一区二区视频| 国产一区二区三区不卡在线观看| 成人精品在线视频观看| 91麻豆精品久久久久蜜臀| 久久香蕉国产线看观看99| 一区二区在线电影| 国产高清无密码一区二区三区| 欧美日韩在线播放一区| 欧美极品aⅴ影院| 另类小说综合欧美亚洲| 91麻豆国产自产在线观看| 精品国产青草久久久久福利|