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

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

?? lion-tutorial28.htm

?? 內有一些代碼
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
      structure.<br>
      dwContinueStatus specifies how to continue the thread that reported the 
      debug event. There are two possible values:<b> DBG_CONTINUE</b> and <b>DBG_EXCEPTION_NOT_HANDLED</b>. 
      For all other debug events, those two values do the same thing: resume the 
      thread. The exception is the <b>EXCEPTION_DEBUG_EVENT</b>. If the thread 
      reports an exception debug event, it means an exception occurred in the 
      debuggee thread. If you specify <b>DBG_CONTINUE</b>, the thread will ignore 
      its own exception handling and continue with the execution. In this scenario, 
      your program must examine and resolve the exception itself before resuming 
      the thread with <b>DBG_CONTINUE</b> else the exception will occur again 
      and again and again.... If you specify <b>DBG_EXCEPTION_NOT_HANDLED</b>, 
      your program is telling Windows that it didn't handle the exception: Windows 
      should use the default exception handler of the debuggee to handle the exception. 
      <br>
      In conclusion, if the debug event refers to an exception in the debuggee 
      process, you should call <b>ContinueDebugEvent</b> with <b>DBG_CONTINUE</b> 
      flag if your program already removed the cause of exception. Otherwise, 
      your program must call <b>ContinueDebugEvent</b> with <b>DBG_EXCEPTION_NOT_HANDLED</b> 
      flag. Except in one case which you must always use <b>DBG_CONTINUE</b> flag: 
      the first <b>EXCEPTION_DEBUG_EVENT</b> which has the value <b>EXCEPTION_BREAKPOINT</b> 
      in the ExceptionCode member. When the debuggee is going to execute its very 
      first instruction, your program will receive the exception debug event. 
      It's actually a debug break (int 3h). If you respond by calling <b>ContinueDebugEvent 
      </b>with <b>DBG_EXCEPTION_NOT_HANDLED</b> flag, Windows NT will refuse to 
      run the debuggee (because no one cares for it). You must always use <b>DBG_CONTINUE</b> 
      flag in this case to tell Windows that you want the thread to go on.</p>
  </li>
  <li><b>Continue this cycle in an infinite loop until the debuggee process exits</b>. 
    Your program must be in an infinite loop much like a message loop until the 
    debuggee exits. The loop looks like this: 
    <p><b>.while TRUE<br>
      &nbsp;&nbsp;&nbsp; invoke WaitForDebugEvent, addr DebugEvent, INFINITE<br>
      &nbsp;&nbsp;&nbsp;.break .if DebugEvent.dwDebugEventCode==EXIT_PROCESS_DEBUG_EVENT<br>
      &nbsp;&nbsp;&nbsp;&lt;Handle the debug events&gt;<br>
      &nbsp;&nbsp;&nbsp;invoke ContinueDebugEvent, DebugEvent.dwProcessId, DebugEvent.dwThreadId, 
      DBG_EXCEPTION_NOT_HANDLED <br>
      .endw </b><br>
    </p>
    <p>Here's the catch: Once you start debugging a program, you just can't detach 
      from the debuggee until it exits.</p>
  </li>
</ol>
<p>Let's summarize the steps again:</p>
<ol>
  <li><b>Create a process or attach your program to a running process</b>.</li>
  <li><b>Wait for debugging events</b></li>
  <li><b>Do whatever your program want to do in response to the debug event</b>.</li>
  <li><b>Let the debuggee continues execution</b>.</li>
  <li><b>Continue this cycle in an infinite loop until the debuggee process exits</b></li>
</ol>
<h3>Example:</h3>
<p>This example debugs a win32 program and shows important information such as 
  the process handle, process Id, image base and so on.</p>
<p>.386 <br>
  .model flat,stdcall <br>
  option casemap:none <br>
  include \masm32\include\windows.inc <br>
  include \masm32\include\kernel32.inc <br>
  include \masm32\include\comdlg32.inc <br>
  include \masm32\include\user32.inc <br>
  includelib \masm32\lib\kernel32.lib <br>
  includelib \masm32\lib\comdlg32.lib <br>
  includelib \masm32\lib\user32.lib <br>
  .data <br>
  AppName db "Win32 Debug Example no.1",0 <br>
  ofn OPENFILENAME <> <br>
  FilterString db "Executable Files",0,"*.exe",0 <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db 
  "All Files",0,"*.*",0,0 <br>
  ExitProc db "The debuggee exits",0 <br>
  NewThread db "A new thread is created",0 <br>
  EndThread db "A thread is destroyed",0 <br>
  ProcessInfo db "File Handle: %lx ",0dh,0Ah <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db "Process 
  Handle: %lx",0Dh,0Ah <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db "Thread 
  Handle: %lx",0Dh,0Ah <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db "Image 
  Base: %lx",0Dh,0Ah <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db "Start 
  Address: %lx",0 <br>
  .data? <br>
  buffer db 512 dup(?) <br>
  startinfo STARTUPINFO <> <br>
  pi PROCESS_INFORMATION <> <br>
  DBEvent DEBUG_EVENT <> <br>
  .code <br>
  start: <br>
  mov ofn.lStructSize,sizeof ofn <br>
  mov ofn.lpstrFilter, offset FilterString <br>
  mov ofn.lpstrFile, offset buffer <br>
  mov ofn.nMaxFile,512 <br>
  mov ofn.Flags, OFN_FILEMUSTEXIST or OFN_PATHMUSTEXIST or OFN_LONGNAMES or OFN_EXPLORER 
  or OFN_HIDEREADONLY <br>
  invoke GetOpenFileName, ADDR ofn <br>
  .if eax==TRUE <br>
  invoke GetStartupInfo,addr startinfo <br>
  invoke CreateProcess, addr buffer, NULL, NULL, NULL, FALSE, DEBUG_PROCESS+ DEBUG_ONLY_THIS_PROCESS, 
  NULL, NULL, addr startinfo, addr pi <br>
  .while TRUE <br>
  &nbsp;&nbsp;&nbsp;invoke WaitForDebugEvent, addr DBEvent, INFINITE <br>
  &nbsp;&nbsp;&nbsp;.if DBEvent.dwDebugEventCode==EXIT_PROCESS_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox, 0, addr ExitProc, addr 
  AppName, MB_OK+MB_ICONINFORMATION <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .break <br>
  &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==CREATE_PROCESS_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke wsprintf, addr buffer, addr ProcessInfo, 
  DBEvent.u.CreateProcessInfo.hFile, DBEvent.u.CreateProcessInfo.hProcess, DBEvent.u.CreateProcessInfo.hThread, 
  DBEvent.u.CreateProcessInfo.lpBaseOfImage, DBEvent.u.CreateProcessInfo.lpStartAddress 
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox,0, addr buffer, addr 
  AppName, MB_OK+MB_ICONINFORMATION &nbsp;&nbsp;&nbsp;<br>
  &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==EXCEPTION_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .if DBEvent.u.Exception.pExceptionRecord.ExceptionCode==EXCEPTION_BREAKPOINT 
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;invoke ContinueDebugEvent, 
  DBEvent.dwProcessId, DBEvent.dwThreadId, DBG_CONTINUE <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.continue <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .endif <br>
  &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==CREATE_THREAD_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox,0, addr NewThread, addr 
  AppName, MB_OK+MB_ICONINFORMATION <br>
  &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==EXIT_THREAD_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox,0, addr EndThread, addr 
  AppName, MB_OK+MB_ICONINFORMATION <br>
  &nbsp;&nbsp; .endif <br>
  &nbsp;&nbsp; invoke ContinueDebugEvent, DBEvent.dwProcessId, DBEvent.dwThreadId, 
  DBG_EXCEPTION_NOT_HANDLED <br>
  .endw <br>
  invoke CloseHandle,pi.hProcess <br>
  invoke CloseHandle,pi.hThread <br>
  .endif <br>
  invoke ExitProcess, 0 <br>
  end start </p>
<h3>Analysis:</h3>
<p>The program fills the OPENFILENAME structure and then calls GetOpenFileName 
  to let the user choose a program to be debugged.</p>
<p>invoke GetStartupInfo,addr startinfo <br>
  invoke CreateProcess, addr buffer, NULL, NULL, NULL, FALSE, DEBUG_PROCESS+ DEBUG_ONLY_THIS_PROCESS, 
  NULL, NULL, addr startinfo, addr pi </p>
<p>When the user chose one, it calls <b>CreateProcess</b> to load the program. 
  It calls <b>GetStartupInfo</b> to fill the <b>STARTUPINFO</b> structure with 
  its default values. Note that we use <b>DEBUG_PROCESS</b> combined with <b>DEBUG_ONLY_THIS_PROCESS</b> 
  flags in order to debug only this program, not including its child processes.</p>
<p>.while TRUE <br>
  &nbsp;&nbsp;&nbsp;invoke WaitForDebugEvent, addr DBEvent, INFINITE <br>
</p>
<p>When the debuggee is loaded, we enter the infinite debug loop, calling <b>WaitForDebugEvent.</b> 
  <b>WaitForDebugEvent</b> will not return until a debug event occurs in the debuggee 
  because we specify <b>INFINITE</b> as its second parameter. When a debug event 
  occurred, <b>WaitForDebugEvent </b>returns and DBEvent is filled with information 
  about the debug event.</p>
<p>&nbsp;&nbsp;&nbsp;.if DBEvent.dwDebugEventCode==EXIT_PROCESS_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox, 0, addr ExitProc, addr 
  AppName, MB_OK+MB_ICONINFORMATION <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .break </p>
<p>We first check the value in <b>dwDebugEventCode</b>. If it's<b> EXIT_PROCESS_DEBUG_EVENT,</b> 
  we display a message box saying &quot;The debuggee exits&quot; and then get 
  out of the debug loop.</p>
<p> &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==CREATE_PROCESS_DEBUG_EVENT 
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke wsprintf, addr buffer, addr ProcessInfo, 
  DBEvent.u.CreateProcessInfo.hFile, DBEvent.u.CreateProcessInfo.hProcess, DBEvent.u.CreateProcessInfo.hThread, 
  DBEvent.u.CreateProcessInfo.lpBaseOfImage, DBEvent.u.CreateProcessInfo.lpStartAddress 
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox,0, addr buffer, addr 
  AppName, MB_OK+MB_ICONINFORMATION &nbsp;&nbsp;&nbsp;</p>
<p>If the value in <b>dwDebugEventCode</b> is <b>CREATE_PROCESS_DEBUG_EVENT</b>, 
  then we display several interesting information about the debuggee in a message 
  box. We obtain those information from <b>u.CreateProcessInfo</b>. CreateProcessInfo 
  is a structure of type <b>CREATE_PROCESS_DEBUG_INFO</b>. You can get more info 
  about this structure from Win32 API reference. </p>
<p> &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==EXCEPTION_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .if DBEvent.u.Exception.pExceptionRecord.ExceptionCode==EXCEPTION_BREAKPOINT 
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;invoke ContinueDebugEvent, 
  DBEvent.dwProcessId, DBEvent.dwThreadId, DBG_CONTINUE <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.continue <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .endif </p>
<p>If the value in <b>dwDebugEventCode</b> is <b>EXCEPTION_DEBUG_EVENT</b>, we 
  must check further for the exact type of exception. It's a long line of nested 
  structure reference but you can obtain the kind of exception from <b>ExceptionCode</b> 
  member. If the value in <b>ExceptionCode</b> is <b>EXCEPTION_BREAKPOINT</b> 
  and it occurs for the first time (or if we are sure that the debuggee has no 
  embedded int 3h), we can safely assume that this exception occured when the 
  debuggee was going to execute its very first instruction. When we are done with 
  the processing, we must call <b>ContinueDebugEvent</b> with <b>DBG_CONTINUE</b> 
  flag to let the debuggee run. Then we go back to wait for the next debug event.</p>
<p> &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==CREATE_THREAD_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox,0, addr NewThread, addr 
  AppName, MB_OK+MB_ICONINFORMATION <br>
  &nbsp;&nbsp; .elseif DBEvent.dwDebugEventCode==EXIT_THREAD_DEBUG_EVENT <br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke MessageBox,0, addr EndThread, addr 
  AppName, MB_OK+MB_ICONINFORMATION <br>
  &nbsp;&nbsp; .endif </p>
<p>If the value in <b>dwDebugEventCode</b> is <b>CREATE_THREAD_DEBUG_EVENT</b> 
  or <b>EXIT_THREAD_DEBUG_EVENT</b>, we display a message box saying so.</p>
<p> &nbsp;&nbsp; invoke ContinueDebugEvent, DBEvent.dwProcessId, DBEvent.dwThreadId, 
  DBG_EXCEPTION_NOT_HANDLED <br>
  .endw </p>
<p>Except for the<b> EXCEPTION_DEBUG_EVENT</b> case above, we call <b>ContinueDebugEvent</b> 
  with <b>DBG_EXCEPTION_NOT_HANDLED</b> flag to resume the debuggee.</p>
<p>invoke CloseHandle,pi.hProcess <br>
  invoke CloseHandle,pi.hThread </p>
<p>When the debuggee exits, we are out of the debug loop and must close both process 
  and thread handles of the debuggee. Closing the handles doesn't mean we are 
  killing the process/thread. It just means we don't want to use those handles 
  to refer to the process/thread anymore. <strong> </strong></p>
<hr size="1">
<div align="center"> This article come from Iczelion's asm page, Welcom to <a href="http://asm.yeah.net">http://asm.yeah.net</a></div>

</body>
</html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品成人一区二区三区| 欧美日韩在线直播| 精品国免费一区二区三区| 亚洲高清在线精品| 91麻豆福利精品推荐| 国产精品久久久久影院色老大| 久久99精品国产91久久来源| 欧美日韩日日夜夜| 亚洲午夜电影网| 国产激情一区二区三区| 精品国产区一区| 午夜精品国产更新| 欧洲精品在线观看| 亚洲一区视频在线| 色综合天天综合| 亚洲色图20p| 91碰在线视频| 亚洲欧美另类图片小说| 色综合天天视频在线观看| 国产精品久久久久四虎| 成人综合婷婷国产精品久久免费| 久久久青草青青国产亚洲免观| 精品综合久久久久久8888| 欧美日韩一区高清| 中文字幕在线不卡| 成人免费高清视频| 国产精品久久影院| www.色综合.com| 国产精品沙发午睡系列990531| 国产成人a级片| 国产色一区二区| 成人一级视频在线观看| 国产精品进线69影院| 97se亚洲国产综合在线| 亚洲精品乱码久久久久久久久| 欧洲亚洲精品在线| 亚洲h在线观看| 91麻豆精品91久久久久久清纯| 亚洲国产精品久久一线不卡| 欧美日韩精品一区视频| 日韩精品午夜视频| 精品美女被调教视频大全网站| 极品尤物av久久免费看| 国产清纯在线一区二区www| 国产91丝袜在线观看| 中文字幕一区二区三区av| 91在线精品一区二区三区| 国产成人综合精品三级| 国产精品免费视频网站| 一本到一区二区三区| 亚洲成a人片在线不卡一二三区| 欧美精品高清视频| 韩国毛片一区二区三区| 国产精品污污网站在线观看| 成人夜色视频网站在线观看| 亚洲男同性恋视频| 欧美精品99久久久**| 久久99久国产精品黄毛片色诱| 国产亚洲一区二区三区在线观看 | 一本一道久久a久久精品| 久久精品免费在线观看| 99精品国产热久久91蜜凸| 亚洲午夜羞羞片| 欧美成人精品二区三区99精品| 国产伦精品一区二区三区免费 | 色婷婷国产精品| 五月天久久比比资源色| 欧美性猛片aaaaaaa做受| 蜜桃视频一区二区三区在线观看| 91亚洲国产成人精品一区二三| 国产日韩欧美精品在线| av福利精品导航| 亚洲国产中文字幕| 这里是久久伊人| 国产一区美女在线| 最新欧美精品一区二区三区| 欧美老人xxxx18| 狠狠色丁香婷婷综合| 国产精品看片你懂得| 欧美中文字幕一区二区三区 | 国产呦萝稀缺另类资源| 亚洲欧洲精品天堂一级| 久久久精品人体av艺术| 亚洲免费在线观看| 精品国产凹凸成av人网站| 一本久久综合亚洲鲁鲁五月天 | 久久99国产精品尤物| 中文字幕不卡的av| 91精品国产美女浴室洗澡无遮挡| 国产91在线看| 美国av一区二区| 亚洲同性gay激情无套| 精品日韩在线观看| 色94色欧美sute亚洲线路一ni| 免费在线视频一区| 日韩精品中文字幕一区二区三区| 国产精品久久久久一区二区三区 | 精品视频在线看| 国产原创一区二区| 亚洲欧美一区二区久久| 精品sm捆绑视频| 欧美亚洲日本国产| 国产老妇另类xxxxx| 香蕉久久夜色精品国产使用方法 | 国产不卡在线一区| 日韩高清在线一区| 欧美国产视频在线| 精品国产一区二区亚洲人成毛片| 色综合久久久久网| 久久99精品视频| 亚洲成人av在线电影| 亚洲欧美另类在线| 国产色一区二区| 日韩欧美中文字幕一区| 欧美视频自拍偷拍| 91在线观看免费视频| 国产成人夜色高潮福利影视| 蜜臀va亚洲va欧美va天堂| 亚洲一区二区三区小说| 日韩毛片精品高清免费| 欧美成人精品二区三区99精品| 成人激情图片网| 国产毛片精品视频| 国产拍揄自揄精品视频麻豆| 日本伊人色综合网| 制服丝袜中文字幕亚洲| 中文字幕中文字幕一区二区| 91 com成人网| 91亚洲国产成人精品一区二三| 国产在线乱码一区二区三区| 天堂在线亚洲视频| 亚洲综合免费观看高清在线观看| 国产精品福利av| 国产欧美精品一区二区色综合| 日韩一级免费一区| 在线观看不卡一区| 91网址在线看| 91亚洲精品久久久蜜桃| 99久久精品免费| 99免费精品视频| 99久久国产综合精品女不卡| 国产一区二区三区av电影| 精品一区免费av| 日日夜夜精品免费视频| 亚洲综合精品自拍| 亚洲一区在线电影| 亚瑟在线精品视频| 亚洲成人免费影院| 亚洲国产视频网站| 亚洲成在线观看| 亚洲美女偷拍久久| 亚洲欧美精品午睡沙发| 亚洲免费在线看| 中文字幕一区在线观看| 中日韩免费视频中文字幕| 日日摸夜夜添夜夜添精品视频| 免费高清在线一区| 久久精品国产**网站演员| 日韩avvvv在线播放| 日本成人在线网站| 欧美一级在线免费| 91久久线看在观草草青青| 成人午夜免费电影| 色诱视频网站一区| 在线不卡中文字幕| 精品三级在线看| 国产日韩v精品一区二区| 国产精品女上位| 亚洲免费电影在线| 亚洲一区二区在线免费看| 久久99蜜桃精品| 国产成人av影院| 成人app下载| 欧美性极品少妇| 欧美一级日韩不卡播放免费| 日韩免费视频一区二区| 欧美高清在线视频| 亚洲综合精品久久| 麻豆精品在线看| 国产成人鲁色资源国产91色综| 成人av资源站| 欧美另类高清zo欧美| 欧美美女激情18p| 日韩一区二区视频在线观看| 日韩三级免费观看| 国产精品麻豆久久久| 亚洲国产sm捆绑调教视频| 蜜臀av一级做a爰片久久| 懂色av噜噜一区二区三区av | 国产精品传媒在线| 亚洲自拍欧美精品| 国产综合久久久久久久久久久久 | 久久成人免费日本黄色| 成人深夜福利app| 欧美日韩中文字幕一区二区| 精品久久人人做人人爰| 亚洲天堂2014| 美腿丝袜亚洲三区| 91小视频在线| 日韩精品中文字幕一区|