In order to debug kernel-mode drivers, programers and developers include specific errors messages to be collected each time the program crashes or stops functioning correctly. Hence, they are able to deduct the cause of the issue, as well as come up with ways to improve their code and fix the parts that cause trouble.
View IRP logs and send them to the preferred debugger
IRPTrace is a software utility that enables you to monitor your drivers and detect the problems that might arise during their usage, by watching over the Input/Output request packages sent between them and the operating system. The advantage of using this tool is that you can leave out the aforementioned debug messages from your code, since the application displays complete information about every handled request and its status.
Furthermore, all the activity can be logged and saved to your computer in the form of a text file, which can be used for further analysis. In addition, the data can also be sent directly to a third party debugger and viewed without the need to save it on your system. Among the various pieces of information that can be monitored, you can see the name of the request, completion status and the address code of the IRP.
Choose the communication port and setup the desired hook
In order for the application to receive the required data, it needs to be “hooked” to the driver you need to monitor. If it is part of the operating system, you can simply choose it from the provided list of detected services. Otherwise, if you are trying to debug an external device, you first need to connect it to your computer using one of its available COM ports, which facilitates the data transfer and allows IRPTrace to return the desired information.
As you would expect, you can also analyze the received packages and find any bugs or issues that might cause problems for the operating system. Thanks to the wide array of output parameters and information provided by the application, it is possible to detect almost any kind of code error that can lead to computer halts or other kind of incompatibilities, without having to include debugging techniques in your driver.
All in all, IRPTrace is a useful application for driver developers, although it is unforgiving with beginners and inexperienced users. Despite that, it is able to save you from a lot of code writing and it provides a wide array of precious information regarding the requests and data packets handled by your drivers.