Difference between revisions of "User:Oldman"

From ReactOS Wiki
Jump to: navigation, search
m (Correct an omission.)
 
(233 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<span style="font-size:130%;">'''NOTE''': The layman's guides have been migrated and separated into [[Index to the layman's guides|Individual Layman's guides]]</span>
  
== <big>A layman's guide - How to get a debug log.</big> ==
+
This one page of all the guides has now been removed
  
This is a layman's guide to using the Ros debugger to get a debug log.
+
<hr>
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. ===
+
==Links==
There are some vital settings in Putty which need to be set so that Putty can capture a debug log.
+
More tutorials can be found at:  
In putty go to '''Category''' and select '''Session''' then set the following to these values:
 
<br />
 
'''Serial line = COM1'''
 
<br />
 
'''Speed = 115200'''
 
<br />
 
'''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.
+
https://www.reactos.org/forum/viewforum.php?f=22
  
See in '''Screenshots''' below for visual information.
+
https://www.reactos.org/wiki/Category:Tutorial
  
Save the above changes in putty with a name of your choice (there is an input box for this), it can then be loaded the next time.
+
https://www.reactos.org/wiki/Subversion/Using_TortoiseSVN
  
=== The ReactOS debugger ===
+
https://www.reactos.org/wiki/Testing_Introduction
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: ====
+
https://www.reactos.org/wiki/Build_Environment
'''Alt+k''' - this command halts the system so you can enter commands into the debugger.
 
<br />
 
'''bt''' - this command gives a backtrace; use it when the ROS enters the debugger (see below).
 
<br />
 
'''cont''' - this is short for continue.
 
<br />
 
'''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:
+
[[Category:Users]]
<br />
 
'''<span style="color:blue">Entered debugger on last-chance exception (Exception Code: 0xc0000001) (Unknown/User defined exception)<br />kdb></span>'''
 
 
 
=== 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
 
<br />
 
'''--- Press q to abort, any other key to continue ---'''
 
<br />
 
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(<span style="color:red">1</span>), 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'''.
 
 
 
(<span style="color:red">1</span>) 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 ===
 
 
 
<gallery widths="456px" heights="435px" paddings="0px">
 
PuttyConf-1.png|Caption1: PuTTY Configuration - Session
 
PuttyConf-2.png|Caption2: PuTTY Configuration - Logging
 
</gallery>
 

Latest revision as of 11:59, 5 May 2021