首页
社区
课程
招聘
怎么用od调试一个多线程的程序?
发表于: 2006-10-20 22:00 10493

怎么用od调试一个多线程的程序?

2006-10-20 22:00
10493
有这样一个程序
a
b
CreateThread()

label:
d
e
goto label:

现在有一点不明白,
如果 在CreateThread() 的线程函数下断点,
那么 
d 和e  是否能够同时执行?

如果
想调试CreateThread()的线程函数的同时
d 和e 还再循环的执行 应该怎么调试?
谢谢!

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (6)
雪    币: 156
活跃值: (48)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
2
不能够实现?
2006-10-21 13:41
0
雪    币: 342
活跃值: (21)
能力值: ( LV12,RANK:730 )
在线值:
发帖
回帖
粉丝
3
不太懂,随便说两句。
不同线程并行,只好各下断点,从CreateThread的入栈参数可以知道各线程对应哪段代码,找到后分析一下。
可能还有信号灯、互斥体的问题。
2006-10-21 14:15
0
雪    币: 229
活跃值: (70)
能力值: ( LV6,RANK:90 )
在线值:
发帖
回帖
粉丝
4
在 OD 里调试则不行,只要被断,只能有一个线程活动,其他的会被挂起,这本来是 OD 的弱点,对付不了多线程
2006-10-21 15:16
0
雪    币: 314
活跃值: (10)
能力值: ( LV12,RANK:570 )
在线值:
发帖
回帖
粉丝
5
又知道了一点,谢谢指导!
2006-10-21 19:30
0
雪    币: 1309
活跃值: (232)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
od 可以单独挂起线程的, 可以单独让一个run 一下, 然后停下, 调试另外一个, 其实也不错, 单cpu 也就是这么工作的. 要求不高的时序模拟可以了.
2006-10-21 19:49
0
雪    币: 156
活跃值: (48)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
7
OllyDbg is a 32-bit assembler level analysing debugger for Microsoft® Windows®. Emphasis on binary code analysis makes it particularly useful in cases where source is unavailable. OllyDbg is a shareware, but you can download and use it for free. Special highlights are:
Intuitive user interface, no cryptical commands
Code analysis - traces registers, recognizes procedures, loops, API calls, switches, tables, constants and strings
Directly loads and debugs DLLs

Object file scanning - locates routines from object files and libraries
Allows for user-defined labels, comments and function descriptions
Understands debugging information in Borland® format
Saves patches between sessions, writes them back to executable file and updates fixups
Open architecture - many third-party plugins are available

No installation - no trash in registry or system directories
Debugs multithread applications
Attaches to running programs
Configurable disassembler, supports both MASM and IDEAL formats
MMX, 3DNow! and SSE data types and instructions, including Athlon extensions
Full UNICODE support
Dynamically recognizes ASCII and UNICODE strings - also in Delphi format!
Recognizes complex code constructs, like call to jump to procedure
Decodes calls to more than 1900 standard API and 400 C functions
Gives context-sensitive help on API functions from external help file
Sets conditional, logging, memory and hardware breakpoints
Traces program execution, logs arguments of known functions
Shows fixups
Dynamically traces stack frames
Searches for imprecise commands and masked binary sequences
Searches whole allocated memory
Finds references to constant or address range
Examines and modifies memory, sets breakpoints and pauses program on-the-fly
Assembles commands into the shortest binary form
Starts from the floppy disk
and much, much more!
2006-10-27 14:20
0
游客
登录 | 注册 方可回帖
返回
//