User:Oldman

From ReactOS Wiki
Revision as of 13:18, 19 December 2014 by Oldman (talk | contribs)
Jump to: navigation, search

A layman's guide - How to get a debug log.

This is a layman's guide to using the Ros debugger to get a debug log. This guide assumes that you have got the relevant hardware (cable, second computer with Putty installed) and that you know to start ReactOS in (Debug) mode.

Setting up Putty.

There are some vital settings in Putty which need to be set so that Putty can capture a debug log. In putty go to Category and select Session then set the following to these values:
Serial line = COM1
Speed = 115200
Connection type = Serial

Back to Category and select Logging, in Session logging: check All session output. Note where Putty saves the log file and change if required; use the Browse button for the destination folder.

See in Screenshots below for visual information.

Save the above changes in putty with a name of your choice in Saved Sessions, then use the Save button. It can then be loaded the next time you use Putty, by using the Load button. Note: logging is started by using the Open button.

The ReactOS debugger

The ReactOS debugger has some commands that can be used from the command line, they are typed into the ReactOS test computer, but will be viewed in the terminal window (i.e putty) on the second computer, with the exception of Alt+k, which gives you the command prompt and looks like this: kdb:>

Commands:

Alt+k - this command halts the system so you can enter commands into the debugger.
bt - this command gives a backtrace; use it when the ROS enters the debugger (see below).
cont - this is short for continue.
set condition * first always - this command tells the ROS to enter the debugger on the first exception.

The following is an example of when the ROS enters the debugger:
Entered debugger on last-chance exception (Exception Code: 0xc0000001) (Unknown/User defined exception)
kdb>

Getting a backtrace:

When ROS enters the debugger, then enter bt at the command prompt, like so: kdb:> bt and press enter on the keyboard. You may see this
--- Press q to abort, any other key to continue ---
If you do see it, then just press any key other than q, it may show again, just repeat until you are back at the command prompt of kdb:>

Getting a more detailed backtrace:

When you see debug info streaming into putty(1), then press Alt+k on your keyboard, then type set condition * first always at the command prompt, then type cont. This will make the ROS enter the debugger on every exception, which it will do many times, and each time you will have to type bt then cont.

(1) If you are testing an app, then it is best to wait until you are ready to run the app before doing this, else you will be overwhelmed with the ROS entering the debugger.

Advice:

Don't use Alt+k and bt to get a backtrace, when the ROS does not automatically enter the debugger, thinking you are going to get some more useful info for the dev's to work with, which I have done in the past; the info is useless!

Putty names the file putty.log, it would be a good idea to re-name it, because the next time that putty is run, it will over-write the file called "putty.log". I use something descriptive, in this format "app name-Ros revision number", for example "gimp-1.0.4-R65099".

Screenshots


A layman's guide - How to create a Jira Issue for your bug.

Go to the jira page (https://jira.reactos.org/secure/Dashboard.jspa), there you should see a login form (there is also a login link in the top right of the page), just use your forum username and password.

When you have logged in, click on the "+ Create Issue" on the links bar at the top, which will open a Create Issue form.

Give a short description of the problem in Summary (this with be the title of the report).

Put your computer specification (or VM) in Environment.

In Description describe what happens and how to replicate the problem and the revision number where it occurred (include the down-load link to any software) .

If you get a debug log or take a photo, use the [b]Browse[/b] button in Attachment to upload it.

That is all you need to fill in, leave the rest to the devs.