如何用Rosdbg调试Reactos的代码?

Moderators: Lone_Rifle, unlinux

Post Reply
poppig
Posts: 7
Joined: Mon Aug 31, 2009 5:15 am

如何用Rosdbg调试Reactos的代码?

Post by poppig » Mon Aug 31, 2009 9:13 am

请问下如何用Rosdbg调试Reactos的代码?
我已经用工具编译了最新版本的ReactOs
参考了http://www.reactos.org/wiki/ReactOS_Remote_Debugger部分
make ROS_BUILDNOSTRIP=yes bootcd

然后在vmware下面安装了系统,选择支持rosdbg的选择项.然后用最新版本(ver 1.0.3.82)的Rosdbg连接
也已经成功的显示了信息:

(ntoskrnl\kd\kdio.c:220) -----------------------------------------------------
(ntoskrnl\kd\kdio.c:221) ReactOS 0.4-SVN (Build 20090829-r42959)
(ntoskrnl\kd\kdio.c:222) Command Line: DEBUG DEBUGPORT=COM1 BAUDRATE=115200 SOS KDSERIAL BREAK
(ntoskrnl\kd\kdio.c:223) ARC Paths: multi(0)disk(0)rdisk(0)partition(1) \ multi(0)disk(0)rdisk(0)partition(1) \ReactOS\
[7hEntered debugger on embedded INT3 at 0x0008:0x808bf34e.regs
CS:EIP 0x0008:0x808bf34f
SS:ESP 0x0010:0x80933b6c
EAX 0x8095bec7 EBX 0x8095be90
ECX 0x80b48148 EDX 0x8095be90
ESI 0x8095ccd0 EDI 0x808e9643
EBP 0x80933b74
EFLAGS 0x00200082 SF IOPL0 ID
kdb:> sregs
CS 0x0008 Index 0x0001 GDT RPL0
DS 0x0023 Index 0x0004 GDT RPL3
ES 0x0023 Index 0x0004 GDT RPL3
FS 0x0030 Index 0x0006 GDT RPL0
GS 0x0000 Index 0x0000 GDT RPL0
SS 0x0010 Index 0x0002 GDT RPL0
kdb:> proc list
No processes in the system!
kdb:> mod

但是现在我要切换到源码的方式进行调试不知道应该怎么做,应该如何查看???
还有个问题就是,我如何对特定的Api下断点,然后观察其流程??比如CreateProcessA
在调试WRK的时候选择源文件然后直接在上面下断点就可以了,不知道Rosdbg要怎么操作??




En:
How To Debug ReactOs Source with the RosDbg??
I have build the latest ReactOs source with the tools.
And also build the latest the RosDbg source with VC2008.
Then Install the system on the vmware and config the Named Pipe as the URL(http://www.reactos.org/wiki/ReactOS_Remote_Debugger) said.
It do well.It Connect with the RosDbg.Some Informations that displayed on the Rosdbg you can see up.


But what the next to do if I want to debug the RecatOs with the source???

EDIT by Mod: However, I want to switch to source view and commence debugging. How do I do that? (ie, how would I determine which line of code the debugger is currently on)

Another question is that How Can I set a special breakpoint such as CreateProcessA????
I debug the WRK source with the windbg,If select the source and set the breakpoint and then if the programe excute the Api,it will break.
But how do that with the rosdbg???


kdb:> bpx CreateProcessA
^ Operand expected

Lone_Rifle
Test Team
Posts: 802
Joined: Thu Apr 03, 2008 2:17 pm
Contact:

Re: How To Debug ReactOs Source with the RosDbg?????

Post by Lone_Rifle » Mon Aug 31, 2009 9:44 am

poppig wrote:但是现在我要切换到源码的方式进行调试不知道应该怎么做,应该如何查看???
不知道这个网页会不会帮你。。。
http://www.reactos.org/wiki/Kdbg

poppig
Posts: 7
Joined: Mon Aug 31, 2009 5:15 am

Re: 如何用Rosdbg调试Reactos的代码?

Post by poppig » Tue Sep 01, 2009 10:43 am

bpx 不支持函数名字
所以老外怎么调试的还真不知道.

难道他们都不用源码调试的吗?那他们是如何针对他们想要的位置下断点?

最好有个简单的例子解释下如何调试Api.

当然还有就是如何切换到源码调试,而不只是在Rosdbg上面仅仅显示哪个cpp的哪一行
那样最多也就算个打印消息

poppig
Posts: 7
Joined: Mon Aug 31, 2009 5:15 am

Re: 如何用Rosdbg调试Reactos的代码?

Post by poppig » Wed Sep 02, 2009 3:30 am

好象老外就是真的只实现打印消息.
要等MSVC能够编译的版本了,不知道会等多久? :?:

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests