Today we are proud to announce the release of VisualKernel 3.0 Beta 1. The new release introduces a number of usability features and I will give you an overview of them in this post.
Support for Address Space Layout Randomization
Modern Linux kernels come with a security feature called ASLR (Address Space Layout Randomization). Each time a system with ASLR is started, the kernel sections will be loaded at a different memory addresses, making certain types of attacks harder. This also makes debugging harder as the kernel debugging symbols won’t match the loaded kernel anymore.
VisualKernel 3.0 solves this by querying the addresses of key symbols from the running kernel and then automatically adjusting section addresses when loading symbols:This process is completely automatic, so you don’t need to worry about anything. Simply point VisualKernel to your target machine and it will adjust and load the symbols when you press F5.
Debugging without Kernel Symbols
If you were building a custom kernel module for an unmodified stock kernel, the previous versions of VisualKernel still required the symbols for the kernel in order to find your module in memory and load the debugging symbols for it. With the new VisualKernel 3.0 this is optional and can be controlled in the project wizard:If you decide to skip the kernel symbol downloading, you will still be able to build and debug your module:
If you change your mind later, you can always get the missing symbols via VisualKernel Project Properties and the kernel functions will automatically appear in your call stack and source view as if they were a part of your project:
Out-of-the-box Raspberry Pi support
Preparing Raspberry Pi for kernel debugging could be tough task – the stock kernel does not come with debugging symbols or headers, enabling JTAG pins requires extra manual steps, and installing the debug-enabled kernel to your Raspberry Pi is far from trivial. VisualKernel 3.0 completely automates this process: simply select an x64 Linux machine where you want to build the kernel and VisualKernel will automatically install and configure the cross-toolchain, build the kernel and install it on your Raspberry Pi:
VisualKernel 3.0 includes an updated OpenOCD build that supports debugging BCM2837 (the 64-bit chip used in Raspberry Pi 3) and will automatically install the necessary drivers on the Windows machine and configure the GPIO pins on your Raspberry Pi to support JTAG debugging:
Advanced Kernel Project Subsystem
The Linux kernel is huge, so opening it as a regular Visual C++ project results in a noticeable slowdown. VisualKernel 3.0 solves this by introducing a new Advanced Kernel Project Subsystem that can be used instead of the regular Visual C++ project subsystem. Advanced Kernel projects are designed to work fast with the huge Linux kernel codebase and provide accurate IntelliSense information that is queried directly from KBuild:
The Find-all-References database for stock kernels is now shared between all modules based on the same kernel version, so once VisualKernel scans the kernel sources and builds the database, finding references between various kernel functions and exploring it with Code Map will be instant.
Working on customizing the kernel itself is now easier as well. The Advanced Kernel Project Subsystem picks up the precise build flags from the KBuild subsystem, showing the relevant parts of the kernel source tree and getting accurate IntelliSense. It also provides convenient context menu commands for editing the KBuild Makefiles and installing the kernel/modules:
Direct SSH access
VisualKernel 3.0 can access remote source files directly via SSH instead of downloading them to the Windows machine. This is supported for both kernels and kernel modules and requires using an Linux machine for building:
Improved GUI
In VisualKernel 3.0 we have redesigned the critical parts of the user interfaces based on the WPF technology, making them look better on high-resolution displays: As a part of the redesign, we made sure that VisualKernel will now remember commonly entered parameters (e.g. default debug settings for each target machine) and will show hints when it detects common configuration issues, making the development experience easier than before.
Try it out
VisualKernel 3.0 Beta 1 is out. You can get it from the download page. Check it out and don’t hesitate to send us your feedback via the forum or the support form.