Category: GKD

Custom memory panel

GKD (General kernel debugger) now supports “custom panel”, you can define many memory areas with the interrupted rules, every time bochs got paused, it will show you the values of the memory areas that you have defined.




read count : 18

dwarf is too much for c++

One side effect about changing the kernel from c to c++ is that: in the kernel file, the number of dwarf information will increase dramatically from 1,000 to 1,550,000. This let the peter-dwarf parser work slowing to build a tree to display it (But the dwarf parsing still fast). I added the parameter in PeterDwarfPanel constructor to disable to display too much abbrev list in every compilation unit. This make GKD about to start in 5 seconds, before doing this, it take me 25 seconds to popup the GKD main screen.

dwarf too much for c++

read count : 37

Amazing recording feature by specific which code-block you want to record

In the original GKD design, it works with bochs instrumentation. Being helped ( by the author of bochs (Mr Stanislav Shwartsman ) emulator, now we can use the prefetch instruction to specific which code-block you want to record, it becomes even more useful now.

__asm__ __volatile__("PREFETCHT0 0x12345678");
char *buffer = (char *) malloc(fileSize);
fread(buffer, 1, fileSize, file);
printf("username :");
char username[101];
__asm__ __volatile__("PREFETCHT0 0x87654321");

Every code surrounded by PREFETCHT0 and PREFETCHT1 instruction, GKD will record jumping instruction (jmp/call/iret). In my kernel, if it crash in the gets() function, i just do:

__asm__ __volatile__("PREFETCHT0 0x12345678");
__asm__ __volatile__("PREFETCHT0 0x87654321");

Then GKD will give you this


read count : 178

GKD is running fast with bochs instrumentation stub now

GKD is running fast with bochs instrumentation stub now, it captures all jmp/call/int/ret, all instructions that change you EIP. I am using H2 as the backbone database, every second can records over 100,000 instruction, which is pretty fast.

Turn on subtitle when you are watching it:

read count : 114