偵錯程式的實現《控制台版》 第五章 函式名稱解析

2022-08-19 00:21:10 字數 839 閱讀 6057

1.相關函式  相關結構,與主要成員

//匯出表結構

struct exportfuninfor

;struct exporttableinfor //匯出函式表

;//儲存解析dll的所有函式

clistm_exporttablelist;

2.設計思路

進入startdebugdll時,傳來乙個引數,此引數儲存了當前載入dll的資訊,可以通過此資訊解析出匯出表在檔案中的位置,然後可以定位到匯出函式的位置,把函式用類成員m_exporttablelist儲存。

3.關鍵**部分

exportfuninfor peptfuninfor;

zeromemory(&peptfuninfor,sizeof(exportfuninfor));

for ( i = 0; i <= (int)m_dllexporttable.numberoffunctions; i++ )

for( j = 0; j <= (int)m_dllexporttable.numberofnames; j++)

}

4.顯示解析函式部分

主要對call, mov, jmp, 6個暫存器的函式名稱顯示進行解析。

處理函式:void cmydebuginfor::showexportfun(char *szbuf)

注意:當call/jmp乙個指令位址時,又jmp/call另乙個位址或更深層次的巢狀解析情況下,採用遞迴來處理這種特殊情況。

附件:偵錯程式源**.rar

控制台版五子棋實現

using system using system.collections.generic using system.linq using system.text using system.threading.tasks namespace 五子棋 操作記錄 public static listcz...

2048 控制台版 c實現

這是效果圖 用c 寫的,其實就是用了c 的輸入輸出,剩下全是c的內容 中有詳解,很簡單,歡迎借鑑和交流 include include include include include 為了讀取方向鍵 include 設定控制台填充字元等 using namespace std int score 0...

C 實現掃雷小遊戲(控制台版)

程式功能 提供三種模式 初級 中級 高階 操作模式 wsad控制游標移動,空格鍵開啟方塊 提供掃雷地圖的類 map.h ifndef map h define map h define max length 32 可以提供的地圖最大長度 define max width 18 可以提供的地圖最大寬度...