Search Posts

Defining Scalable OS Requirements for Exascale and Beyond

Defining Scalable OS Requirements for Exascale and Beyond Robert W. Wisniewski, Chief Software Architect for Extreme Scale Computing, Intel Defining Scalable OS Requirements for Exascale and Beyond Over the past couple of decades two primary trends have driven system software for supercomputers to become significantly more complex. First, hardware has become more complex. Massive inter-node […]

newlib linker script summary for you own executable

After i build my newlib by “../newlib-2.1.0/configure –target=$TARGET –prefix=$PREFIX”, except the libc.a and crt0.o, i got these linker scripts. I am still thinking which one i should use for my own executables in my OS. elf_i386.x Default linker script, for normal executables elf_i386.xbn Script for -N: mix text and data on same page; don’t align […]

Tutorial : import svn with all history into github

Tutorial : import svn with all history into github Step 1) Create a project on github Step 2) Init the github project by : Step 3) git clone https://github.com/mcheung63/GKD.git <— replace your project url Step 4) cd to that directory Step 5)  user https://github.com/nirvdrum/svn2git and run: Step 6) svn2git –rebase Step 7) git pull Step […]

Netbeans – Maven Runner

Eclipse has a great plugin call “Eclipse runner” https://marketplace.eclipse.org/content/eclipse-runner , i found out netbeans doesn’t have any similar one. So i develop one for netbeans. You can add maven goals under the tree node of any project. Double click the goal name will run maven in netbeans. You can download it from http://plugins.netbeans.org/plugin/60381/?show=true, or search “Maven […]

Enhancement of the OS debug format, support scripting

OS debug format https://code.google.com/p/peter-bochs/wiki/OSDebugStandard is a xml based document stays in memory of the emulator, brining out the debug information in real time to the debugger, make the debugger understand what data structure they want to debug. In the early stage of kernel debugger, people rely on printk to dump out the debug information. At that […]

http://www.kaizou.org/2015/01/linux-libraries/

Originally from http://www.kaizou.org/2015/01/linux-libraries/ , it is a super professional article that explain the LD process. 08 Jan 2015 by David Corvoysier A few months ago I stumbled upon a linking problem with secondary dependencies I couldn’t solved without overlinking the corresponding libraries. I only realized today in a discussion with my friend Yann E. Morin that not only did I use the […]

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

In the original GKD design, it works with bochs instrumentation. Being helped (https://sourceforge.net/p/bochs/discussion/39593/thread/d960fe94/?limit=50) 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. Every code surrounded by PREFETCHT0 and PREFETCHT1 instruction, GKD will record jumping instruction […]

hard to theme netbeans perfectly

It is hard to theme netbeans using traditional swing look & feel. The reason is netbean’s tab container is not traditional swing JTabbedPane. See the post https://netbeans.org/bugzilla/show_bug.cgi?id=150393 Netbeans use a AbstractViewTabDisplayerUI to support only few “default look & feel”, such as Metal, Nimbus, Aqua. see below: The problem is : This default look & feel tab container […]

gcc can’t handle too much #if macro

gcc can’t handle too much macro (#if, #define), the output dwarf will have wrong line number. So when you disassemble the assembly with c/c++ source, everything are wrong, including wrong line number, wrong assembly code to c source code, duplicated c/c++ line. https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c   In GKD, i add an on/off button to filter out those […]

How to lookup the value of each parameter from dwarf and memory location

Here are the steps to lookup the parameter value 1) Look into the “info” section from dwarf, “objdump –dwarf=info”. There is a die DW_AT_LOCATION (DW_OP_freg:0), telling you the offset to the frame register. 2) Look at the CIE from .eh_frames section, “objdump –dwarf=frames”. It will tell you the formula of calculating the CFA, such as […]

I finally understand why “DW_OP_fbreg: 0” is possible

In the following function kmalloc2, take a look the first parameter, the memory location of that parameter is stated by dwarf “DW_AT_location : 2 byte block: 91 0 (DW_OP_fbreg: 0)”, where “DW_OP_fbreg: 0” means stack+0. I was thinking why it is possible. Because when cpu executed call instruction, it already pushed 4 bytes into the […]

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

Next Page » « Previous Page