Difference between revisions of "Debugging"

From ReactOS Wiki
Jump to: navigation, search
(Forcing a bugcheck)
(Available debugging methods)
Line 16: Line 16:
 
===== Physical serial cable =====
 
===== Physical serial cable =====
 
<add detail>
 
<add detail>
===== Debug Output to file =====
+
==== Debug Output to file ====
 
<add detail>
 
<add detail>
===== Debug Output to screen =====
+
==== Debug Output to screen ====
 
<add detail>
 
<add detail>
  
Line 31: Line 31:
 
==== gdb ====
 
==== gdb ====
 
<add detail>
 
<add detail>
 
  
 
= Knowing what debug output to generate =
 
= Knowing what debug output to generate =

Revision as of 16:24, 17 January 2008

This page describes different methods of debugging ReactOS and the steps necessary to debug ReactOS.

Introduction

To be able to help ReactOS development, whether this be participating in the development of the source code or taking part in crucial testing, you are going to need knowledge of how to generate useful debug logs.

Useful debug logs are essential pieces of information which the developer needs to quickly pinpoint and identify exactly what the operating system is doing. Many people know how to get default debug output from the operating system, but this is generally not particularly useful for locating problems, esspecially bugs.

This article aims to give users knowledge not only on how to generate a debug log, but on how to generate a useful debug log which can be used directly to asses what the operating system is doing.


Available debugging methods

There are various methods to debug ReactOS, some require more knowledge than others. These are listed below.

COM1

<add detail>

Physical serial cable

<add detail>

Debug Output to file

<add detail>

Debug Output to screen

<add detail>

Virtual machines

<add detail>

Named pipe

<add detail>

Riderect to file

<add detail>

kdbg

<add detail>

gdb

<add detail>

Knowing what debug output to generate

<add detail>

Turning on debugging in key modules

<add detail>

Turning on at compile time

<add detail>

Turning on at runtime

<add detail>

Forcing a bugcheck

If you are not using a DBG build, you first need to add the following value in the registry:

Path:    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt
Keyname: CrashOnCtrlScroll
Type:    REG_DWORD
Value:   1

Then, when ReactOS is running, hold down the right CTRL key, and press SCROLL LOCK key twice

Generating a backtrace

<add detail>


















Debugging preparation

One of the first things you need to decide is how to get the debugging output:

Options for debugging reactos: