Search Posts

objdump has bug

objdump command has bug, i tried to use this command “objdump -dS kernel” to display mixed assembly and c code. But objdump has bug, it dump the same piece of c source code in two different memory locations. I double checked the dwarf data, nothing wrong. On more prove the dwarf is correct, my GKD […]

I finally understand why same parameter even has multiple locations

I finally understand why same parameter even has multiple locations. My pass concept is parameter stay in the stack. But after hacking the dwarf, it show me same parameter have multiple location during execution. Take a look below image, I wrote a function call kmalloc2 (blue arrow), the third parameter “size” has three locations (yellow […]

Finally can dump out the parameter type from dwarf standard

Finally can dump out the parameter type from dwarf standard. Some parameter is store recursively, so need to read out DW_AT_type and get the right die and decode again. Personally I think dwarf is just too hard to parse. Here is the code https://sourceforge.net/p/peter-dwarf/code/254/tree//trunk/src/main/java/com/peterdwarf/dwarf/DwarfLib.java https://sourceforge.net/p/peter-dwarf/code/254/tree//trunk/src/main/java/com/peterdwarf/dwarf/Dwarf.java

Java has bug again

Java has bug again. After you installed idk 1.8u25 in your mac, open Eclipse.app/Contents/MacOS/eclipse.ini, you will see: -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home But actually this line has no effect, when you run eclipse with -console -debug, you still see it is running use idk 1.6 “-vm /System/Library/Frameworks/JavaVM.framework”. To fix it, change that line to -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java Peter.

Tutorial : Add a debug command in bochs

This tutorial teach you how to add a debug command in boots, you need to touch these files only: debug.h dbg_main.cc lexer.l parser.y Step 1) First of all, you need to add your command (see below) to lexer.l, don’t add anything below the line “[A-Za-z_][A-Za-z0-9_]* { bxlval.sval = strdup(bxtext); return(BX_TOKEN_GENERIC); }”, because it will eat […]

Mac has no mkfs.vfat

I have to package my kernel into a fat partition and load it up using grub, but mac doesn’t has a mkfs.vfat and “mount loopback” command. So I am creating a small programing using https://github.com/waldheinz/fat32-lib/ to manipulate the fat image by myself. So far these two small program can read & write a fat image: Read […]

Next Page » « Previous Page