資源簡(jiǎn)介
這是一個(gè)簡(jiǎn)單的調(diào)試器的源碼,沒(méi)有華麗的界面,是一個(gè)控制臺(tái)的調(diào)試器。雖然小巧,但是功能齊全:有查看exe可執(zhí)行程序的匯編代碼,地址跳轉(zhuǎn)、定位等功能一共有十七八個(gè)實(shí)用的功能,每個(gè)功能都值得學(xué)習(xí)。

代碼片段和文件信息
//?Decode2Asm.cpp:?implementation?of?the?CDecode2Asm?class.
//
//////////////////////////////////////////////////////////////////////
#include?“stdafx.h“
#include?“Disasm.h“
#include?“Decode2Asm.h“
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
void
__stdcall
Decode2Asm(IN?PBYTE?pCodeEntry
???????????OUT?char*?strAsmCode
???????????OUT?UINT*?pnCodeSize
???????????UINT?nAddress)
{
??DISASSEMBLY?Disasm;?//?Creates?an?Disasm?Struct
??//?Pointer?to?linear?address
??char?*Linear?=?(char?*)pCodeEntry;//?Points?to?the?address?of?array?to?decode.
??//?Index?of?opcoded?to?decode
??DWORD???????Index?=?0;?
??Disasm.Address?=?nAddress;?//?Common?Entry?Point?(usually?default..)
??FlushDecoded(&Disasm);?????//?reset?all?content
??
??//?Decode?instruction
??Decode(&Disasm
????Linear
????&Index);
??
??strcpy(strAsmCode?Disasm.Assembly);
??if(strstr((char?*)Disasm.Opcode?“:“))
??{
??Disasm.OpcodeSize++;
? ??char?ch?=‘?‘;
? ??strncat(strAsmCode&chsizeof(char));
??}
??strcat(strAsmCodeDisasm.Remarks);
??*pnCodeSize?=?Disasm.OpcodeSize;
??
??//?Clear?all?information
??FlushDecoded(&Disasm);
??
??return;
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????348267??2010-04-27?22:24??MyDebug\Debug\MyDebug.exe
?????文件???????1289??2009-09-08?15:25??MyDebug\Decode2Asm.cpp
?????文件????????600??2009-08-31?22:51??MyDebug\Decode2Asm.h
?????文件??????85448??2010-03-23?17:03??MyDebug\Disasm.cpp
?????文件???????4732??2008-10-07?11:18??MyDebug\Disasm.h
?????文件?????364954??2007-01-15?22:36??MyDebug\Dsasm_Functions.cpp
?????文件????????862??2010-04-13?23:01??MyDebug\MyDebug.cpp
?????文件???????4942??2010-04-25?12:20??MyDebug\MyDebug.dsp
?????文件????????537??2010-03-19?19:21??MyDebug\MyDebug.dsw
?????文件?????377856??2010-04-27?22:25??MyDebug\MyDebug.ncb
?????文件??????49664??2010-04-27?22:25??MyDebug\MyDebug.opt
?????文件????????750??2010-04-27?22:25??MyDebug\MyDebug.plg
?????文件??????72203??2010-04-27?22:24??MyDebug\MyDebugInfor.cpp
?????文件???????7335??2010-04-25?01:39??MyDebug\MyDebugInfor.h
?????文件??????10999??2010-04-13?23:19??MyDebug\MyFileInfor.cpp
?????文件???????2358??2010-04-20?22:13??MyDebug\MyFileInfor.h
?????文件???????1214??2010-03-19?19:21??MyDebug\ReadMe.txt
?????文件?????122880??2010-04-27?22:25??MyDebug\Release\MyDebug.exe
?????文件????????294??2010-03-19?19:21??MyDebug\StdAfx.cpp
?????文件???????1218??2010-03-31?21:43??MyDebug\StdAfx.h
?????文件?????118848??2010-04-01?06:04??測(cè)試程序\FirstMfc.exe
?????文件????????720??2010-03-09?12:45??測(cè)試程序\hello.exe
?????文件???????2048??2010-04-19?13:27??測(cè)試程序\loop3.exe
?????文件?????????72??2010-04-27?21:32??測(cè)試程序\loop3.ini
?????文件?????114768??2010-03-15?01:43??測(cè)試程序\Process.exe
?????文件??????28672??2010-03-09?00:40??測(cè)試程序\SDK.exe
?????文件???????3584??2010-03-09?00:38??測(cè)試程序\Test.exe
?????文件??????28672??2003-04-10?19:01??測(cè)試程序\TraceMe.exe
?????文件??????28672??2010-03-29?11:31??測(cè)試程序\TraceMe_1.exe
?????文件?????????77??2010-04-25?03:46??測(cè)試程序\TraceMe_1.ini
............此處省略12個(gè)文件信息
評(píng)論
共有 條評(píng)論