ReactOS远程调试器是一个调试壳可以协议模块(目前只聊天吗KDBG),.nostrip文件从ReactOS构建和聚合信息的方式在KDBG有点不切实际。 这是一个Windows窗体应用程序(c#)类型的窗口,一个简单的穷人的dockability,选项卡。

它有一个局部变量窗口,回溯、调试交互,线程和进程。 它可以显示大量的信息,并将成为更有用的特性是充实的。



源代码

svn://svn.reactos.org/project-tools/trunk/reactosdbg

二进制文件

非官方的下载链接:牧师- 42955

设置

你需要一个完整的构建ROS_BUILDNOSTRIP = yes。 清洁大楼前第一次已经建立(最新)模块不会重建。 这样做:

make ROS_BUILDNOSTRIP=yes bootcd

现在你有符号,选择您的源目录和输出目录的配件|设置… ReactOS远程调试器的菜单。 将源目录设置为“reactos”目录,其中包含你的创意来源。 设置输出目录output-i386目录构建。

确保你的freeldr.ini靴子ReactOS是这样的:

Options=/DEBUG /DEBUGPORT=COM1 /KDSERIAL /BAUDRATE=115200

实际上,您可以使用任何你想要的波特率,只要你的电缆允许相对较低的错误率。 可选地添加/月初打破打破。

新构建的ReactOS已经ReactOS(RosDbg)选项揩油的人(/ KDSERIAL只)。

使用调试器

真正的硬件

com端口之间的连接零调制解调器电缆在你的两台电脑和使用串行接口连接。

虚拟机

虚拟机可以找到具体的调试细节在VM页面:

TCP / IP(仅QEMU)

添加

-serial tcp::1235,server

QEMU命令行。

串行连接(QEMU,VMware VirtualBox)

使用串口输出一起com0com司机(更多在这里)。 ReactOS远程调试器是应用在这种情况下您的终端。

命名管道(QEMU,VMware VirtualBox)

在VMWARE串口配置:

Vmware-pipe-cfg.png

闯入

如 果一切顺利,连接到一个运行ReactOS实例和事故(或按Tab键+ K),你会在在调试器中。 ReactOS远程调试器将请求更新数量从KDBG看到东西在哪里,检查堆栈,等等。如果你看不到这个流量,最可能的原因是你没有/ KDSERIAL引导,和KDBG输入来自键盘。 与“ReactOS引导ReactOS(RosDbg) 在这种情况下”选项。

如果你看到垃圾和你在一个串行端口,最可能的原因是,你有ReactOS远程调试器和ReactOS设置为不同的波特率。 我们还不支持自动传输设置,虽然有人可能会很容易地去实现它。 它也可能是危险的在早期/休息。

如果一切顺利,ReactOS将打破,ReactOSDbg闲逛,并显示一个回溯的行数(地址之后,源文件和行号),并将填充当地人和线程+进程数据网格。

你可以检查你的当地人将出现一个__asm__(“int3”);在你的代码。 您应该看到所有局部变量和它们的值在当地人窗口当ReactOS分解。

不 像KDBG,ReactOS远程调试器使用dbghelp。 dll(酒版,读取刺穿了)阅读的本地副本。 nostrip文件ROS_BUILDNOSTRIP = yes的副产品。 canoncal二进制文件与缩写rossym部分(只适合行号信息),这些包含所有的信息通常使用GDB检查值在一个运行的进程。 因为它不依赖KDBG查找调试信息,我们仍然可以运行一个完全剥夺了构建和调试信息在主机(即,调试一个版本构建以明智的方式),最终,它会切换到kd协 议当ReactOS支持它。 之后,可以使用它调试真实窗户,当给予适当pdb文件和可再发行的dbghelp.dll。

笔记和麻烦

最常见的抱怨是,通道回到ReactOS没有回应。 你必须开始ReactOS“ReactOS(RosDbg) “FreeLDR选项。 如果没有这样的选项,你必须添加/ KDSERIAL freeldr。 ini手动引导选项。

KDBG,作为人机交互的协议,不支持重发。 幸运的是,ReactOSDbg大多是无状态和响应报告从KDBG变得可用。 有疑问时,输入“规则”并触及返回到命令提示符应该得到必要的更新流动。 它会有一个更好的自动机制,在将来的某个时候。






ReactOS Remote Debugger is a debugging shell that can take protocol modules (currently only for talking to KDBG), .nostrip files from the ReactOS build, and aggregate information in a way that is a bit impractical in KDBG. It is a Windows forms application (C#) with a number of window types, a simple poor man's dockability, and tabs.

It has a local variables window, backtrace, debug interaction, threads and processes. It can display a lot of info, and will become more useful as features are fleshed out.

Contents

1 Source code

2 Binaries

3 Setting it up

4 Using the debugger

4.2.1 TCP/IP (QEMU only)

4.2.2 Serial connection (QEMU, VMware, VirtualBox)

4.2.3 Named pipe (QEMU, VMware, VirtualBox)

4.1 Real hardware

4.2 Virtual machines

5 Breaking in

6 Notes and troubles

Source code

svn://svn.reactos.org/project-tools/trunk/reactosdbg

Binaries

Unofficial download link: Rev-42955.

Setting it up

You need a full build with ROS_BUILDNOSTRIP=yes. Clean before building it the first time as already built (and up to date) modules will not be rebuilt. Do it like this:

make ROS_BUILDNOSTRIP=yes bootcd

Now that you've got symbols, select your source directory and output directory in the 'Extras|Settings...' menu of ReactOS Remote Debugger. Set the source directory to the 'reactos' directory that contains your sources. Set the output directory to the output-i386 directory you build into.

Make sure your freeldr.ini boots ReactOS like this:

Options=/DEBUG /DEBUGPORT=COM1 /KDSERIAL /BAUDRATE=115200

Actually, you can use any baud rate you want as long as your cabling allows a relatively low error rate. Optionally add /BREAK to break in early.

Newer builds of ReactOS already have a ReactOS (RosDbg) option in FreeLoader (/KDSERIAL only).

Using the debugger

Real hardware

Connect your null modem cable between com ports on your two computers and connect using the serial interface.

Virtual machines

Virtual machine specific debugging details can be found on the VM pages:

QEMU

VirtualBox

VMware

TCP/IP (QEMU only)

Add

-serial tcp::1235,server

to your QEMU command line.

Serial connection (QEMU, VMware, VirtualBox)

Use the serial port output together with the com0com driver (more here). The ReactOS Remote Debugger is your terminal application in this case.

Named pipe (QEMU, VMware, VirtualBox)

Serial port configuration in VMWARE:

Breaking in

If all goes well, connect to a running ReactOS instance and crash it (or hit Tab+K) and you'll break in in the debugger.  The ReactOS Remote Debugger will request a number of updates from KDBG to see where things are, examine the stack, etc.  If you don't see this traffic, the most likely reason is that you've booted without /KDSERIAL, and KDBG input is coming from the keyboard.  Boot ReactOS with the "ReactOS (RosDbg)" option in this case.

If you see garbage and you're on a serial port, the most likely reason is that you've got ReactOS Remote Debugger and ReactOS set to different baud rates.  We don't support auto baud setting yet, although somebody might be able to implement it fairly easily.  It could also be dangerous at early /BREAK.

If all goes well, ReactOS will break in, ReactOSDbg will poke around, and display a number of line in backtrace (addresses followed by source file and line number), and will populate the locals and threads+processes data grids.

You can check that your locals appear by putting an __asm__("int3"); in your code.  You should see all locally scoped variables and their values in the locals window when ReactOS breaks in.

Unlike KDBG, ReactOS Remote Debugger uses dbghelp.dll (the wine version, that reads stabs) to read the local copy of the .nostrip files that are the byproduct of the ROS_BUILDNOSTRIP=yes build. Unlike the abbreviated rossym sections in the canoncal binaries (suitable only for line number information), these contain all the information that's normally used by GDB to examine values in a running process.  Since it doesn't rely on KDBG to lookup debug info, we could run a fully stripped build and still get debug info on the host (that is; debug a release build in a sensible way), and eventually, it'll be switched to kd protocol when ReactOS supports it.  After that, it could be used to debug real windows, when given appropriate pdb files and the redistributable dbghelp.dll.

Notes and troubles

The most common complaint is that the channel back to ReactOS doesn't respond. You have to start ReactOS with the "ReactOS (RosDbg)" FreeLDR option. If there is no such option, you have to add /KDSERIAL to your freeldr.ini boot options manually.

KDBG, being a human interaction protocol, doesn't support retransmission.  Luckily, ReactOSDbg is mostly stateless and responds to reports from KDBG as they become available.  When in doubt, typing 'regs' and hitting return into the command prompt should get the essential updates flowing. It'll have a better automatic mechanism for that at some point in the future.