VC中的debug processes怎么使用?!

lostlander 2006-01-01 07:36:25
tools->debug processes
vs2003(当然这方面和vc6没多大区别)
//////////////////////////////////////////////////
有没有专门的文章介绍?
我没有搜到有.

//////////////////////////////////////////////////
1, 我尝试了调msn messenger, 出现提示:
Disassembly cannot be displayed in run mode

2, 调javascript(google的搜索)的时候, 设了断点, 我点击搜索后, 没有在断点处停止,反而打开了新的文档....

3, 尝试调控制台应用程序, 说是was deadlocked.......
//////////////////////////////////////////////////
...全文
236 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lostlander 2006-01-08
  • 打赏
  • 举报
回复
谢谢, 揭帖.
xing_xing_xing 2006-01-06
  • 打赏
  • 举报
回复
没用过
DrSmart 2006-01-06
  • 打赏
  • 举报
回复
msn的新live版有process保护反调试器,你换一个内核的dbg,用softice
lostlander 2006-01-06
  • 打赏
  • 举报
回复
这个大家用得多不多?
一般在什么情况下用得多点?
lostlander 2006-01-02
  • 打赏
  • 举报
回复
自顶.
菜牛 2006-01-02
  • 打赏
  • 举报
回复
你运行自己的DEBUG编译的程序,就可以Attach Process了,其余程序没有调试信息。
Contents Chapter 1: The Microsoft Developer Studio The Microsoft Developer Studio The Project Workspace Project Workspace Window Project Configurations Managing Complex Projects Project Settings Converting Projects Source Code Files Resource Scripts ResourceView Creating New Resources Identifying Resources Dialog Boxes String Tables Accelerator Tables Menus Icons, Bitmaps and Cursors Version Resources Custom Resources The Visual C++ Compiler Compiling on the Command Line The Foundation Classes MFC Source Code Header Files MFC Libraries Summary Chapter 2: The Wizards and The Gallery AppWizard Starting AppWizard Choosing Your Application's User Interface Selecting Database Support Adding Compound Document Support Embellishing Your User Interface Adding Advanced Features Miscellaneous Options Class Names One More Step Other Application Interfaces Choose Carefully! Compiling Your Application Precompiled Header Files ClassWizard Creating a New Class The .clw File The Browser Browser Files Browsing Shortcuts Components and Controls Gallery Summary Chapter 3: The Application Architecture Hierarchy The Application Framework Generating an Application with AppWizard Understanding the Generated Code CDocument and CView CWinApp CWinThread Locating Threads CCmdTarget Commands for Classes About Message Maps How are Message Maps Created? The BEGIN_MESSAGE_MAP() Macro Inside the Message Map Filling the Holes The END_MESSAGE_MAP() Macro Unfolding the Map There's No Sense of Obligation CObject Memory Management Debugging Support Serialization Run-time Type Information Your Own Classes and CObject The Big Picture: A New Life The WinMain() Function MFC's Message Pump Application Termination Summary Chapter 4: The Document/View Architecture Documents and Views Document/View Designs The Different Views Types of Document Document/View Consciousness What are Document Templates? CSingleDocTemplate S
Detours是微软开发的一个函数库, 用于修改运行的程序在内存的影像,从而即使没有源代码也能改变程序的行为。具体用途是: 拦截WIN32 API调用,将其引导到自己的子程序,从而实现WIN32 API的定制。 为一个已在运行的进程创建一新线程,装入自己的代码并运行。 ---- 本文将简介Detours的原理,Detours库函数的用法, 并利用Detours库函数在Windows NT上编写了一个程序,该程序能使有“调试程序”的用户权限的用户成为系统管理员,附录利用Detours库函数修改该程序使普通用户即可成为系统管理员 (在NT4 SP3上)。 一. Detours的原理 ---- 1. WIN32进程的内存管理 ---- 总所周知,WINDOWS NT实现了虚拟存储器,每一WIN32进程拥有4GB的虚存空间, 关于WIN32进程的虚存结构及其操作的具体细节请参阅WIN32 API手册, 以下仅指出与Detours相关的几点: ---- (1) 进程要执行的指令也放在虚存空间 ---- (2) 可以使用QueryProtectEx函数把存放指令的页面的权限更改为可读可写可执行,再改写其内容,从而修改正在运行的程序 ---- (3) 可以使用VirtualAllocEx从一个进程为另一正运行的进程分配虚存,再使用 QueryProtectEx函数把页面的权限更改为可读可写可执行,并把要执行的指令以二进制机器码的形式写入,从而为一个正在运行的进程注入任意的代码 ---- 2. 拦截WIN32 API的原理 ---- Detours定义了三个概念: ---- (1) Target函数:要拦截的函数,通常为Windows的API。 ---- (2) Trampoline函数:Target函数的复制品。因为Detours将会改写Target函数,所以先把Target函数复制保存好,一方面仍然保存Target函数的过程调用语义,另一方面便于以后的恢复。 ---- (3) Detour 函数:用来替代Target函数的函数。 ---- Detours在Target函数的开头加入JMP Address_of_ Detour_ Function指令(共5个字节)把对Target函数的调用引导到自己的Detour函数, 把Target函数的开头的5个字节加上JMP Address_of_ Target _ Function+5作为Trampoline函数。例子如下: 拦截前:Target _ Function: ;Target函数入口,以下为假想的常见的子程序入口代码 push ebp mov ebp, esp push eax push ebx Trampoline: ;以下是Target函数的继续部分 …… 拦截后: Target _ Function: jmp Detour_Function Trampoline: ;以下是Target函数的继续部分 …… Trampoline_Function: ; Trampoline函数入口, 开头的5个字节与Target函数相同 push ebp mov ebp, esp push eax push ebx ;跳回去继续执行Target函数 jmp Target_Function+5 ---- 3. 为一个已在运行的进程装入一个DLL ---- 以下是其步骤: ---- (1) 创建一个ThreadFuction,内容仅是调用LoadLibrary。 ---- (2) 用VirtualAllocEx为一个已在运行的进程分配一片虚存,并把权限更改为可读可写可执行。 ---- (3) 把ThreadFuction的二进制机器码写入这片虚存。 ---- (4) 用CreateRemoteThread在该进程上创建一个线程,传入前面分配的虚存的起始地址作为线程函数的地址,即可为一个已在运行的进程装入一个DLL。通过DllMain 即可在一个已在运行的进程运行自己的代码。 二. Detours库函数的用法 ---- 因为Detours软件包并没有附带帮助文件,以下接口仅从剖析源代码得出。 ---- 1. PBYTE WINAPI DetourFindFunction(PCHAR pszModule, PCHAR pszFunction) ---- 功能:从一DLL找出一函数的入口地址 ---- 参数:pszModule是DLL名,pszFunction是函数名。 ---- 返回:名为pszModule的DLL的名为pszFunction的函数的入口地址 ---- 说明:DetourFindFunctio
1,01.zipOutput显示所有的调试信息(5KB)2,02.zipSome general debugging tips一般的调试技巧(11KB)3,03.zipDebugging ISAPI extension调试ISAPI扩展(4KB)4,04.zipLibDump类似DumpBin的工具(10KB)5,05.zipFinding memory leaks发现内存的泄漏(6KB)6,06.zipConvert message ID to a string将消息标志符转换成字符串(4KB)7,07.zipMessage Tracer消息跟踪(5KB)8,08.zipA simple profiler class一个简单的轮廓类(5KB)9,09.zipTerminator断应用程序(5KB)10,10.zipTranslate Window Style转换窗口风格(5KB)11,11.zipLong String Debugging Macro调试宏(5KB)12,12.zipCheck for loaded DLLs检查装入的动态链接库(4KB)13,13.zipAutoincreasing build number自动增加版本信息的宏(5KB)14,14.zipFile Dialog Macro文件对话框宏(6KB)15,15.zipCode Template add-in for Visual C++ 5.0在VC5可增加的代码模板(5KB)16,16.zipComment / Uncomment macros命令/反命令宏(5KB)17,17.zipCustom built files自定义生成的文件(5KB)18,18.zipDefine Method定义方法(5KB)19,19.zipExport Makefile输出工程制作文件(5KB)20,20.zipJump to Next/Previous Function Definition跳转到下一个/上一个功能定义(4KB)21,21.zipInverting Assignment Operations转化操作任务(5KB)22,22.zipVC4.2 style keyboard macro recorder for DevStudio 97在DevStudio 97使用VC4.2风格的键盘宏记录(4KB)23,23.zipApplication Launcher程序发射器, 能够在Word, Excel, Access, Power Point, Visio和Html连接网站(6KB)24,24.zipOpen current header file打开当前文件头(7KB)25,25.zipOpen header file打开文件头(4KB)26,26.zipSequentially Renumber Resource ID's重新对资源标识符编号(5KB)27,27.zipA secondary clipboard实现第二个剪贴板, 不过它用的热键是Ctrl+Shift+C, Ctrl+Shift+V和Ctrl+Shift+X(4KB)28,28.zipCase switching这个宏实现文字的大小写互换(4KB)29,29.zipWM_COMMAND user message macroWM_COMMAND用户消息宏(5KB)30,30.zipBetter caret movement by words在IDE移动快速单词的宏(5KB)

16,551

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧