Author Archives: admin
GKD symbol parsing engine failed to parse c++ symbol

GKD symbol parsing engine failed to parse c++ symbol
My netbeans plugin finally appears on official plugin portal

My netbeans plugin finally appears on official plugin portal , thanks to Mr Markiewb for helping out https://github.com/markiewb . This plugins show a tree view of all maven goals of all projects, you can double click the goal name on tree to execute it, helping people to save time.
Nodejs is very fast, at least faster than java and c#

Nodejs is very fast, at least faster than java and c#, here is my test case: JMeter send rest api request from Tai Wai to Mong Kok, below is the trace route /Users/peter>traceroute 210.5.164.14 traceroute to 210.5.164.14 (210.5.164.14), 64 hops max, 52 byte packets 1 192.168.10.1 (192.168.10.1) 2.463 ms 3.169 ms 0.995 ms 2 058176102001.ctinets.com […]
Maven Runner update – now it reads nbactions.xml

now it reads nbactions.xml added a button (with star icon) to hide default maven goals.  
finally made it: installed the resolver address in GOT[2]

finally made it: installed the resolver address in GOT[2], now i am able to load up elf binary to memory, execute it, during dynamic loading, it jump to GOT[2]. What i have to do is to make my own resolver works.
Description of the first few entries in GOT table

Description of the first few entries in GOT table GOT[0] : The table’ s entry zero is reserved to hold the address of the dynamic structure, referenced with the symbol _DYNAMIC . This allows a program, such as the dynamic linker, to fi nd its own dynamic structure without having yet processed its relocation entries. This is especially […]
Flashing bin file to nucleo-L476RG

This command works!!!
Nucleo STM32F103 dev board with built in STlinkV2-1 programmer

http://openenergymonitor.org/emon/node/6189   1. GNU ARM Tool Chain 2. IDE Eclipse 3. STmicro libraries 4. GDB Server 1. GNU ARM Tool Chain https://launchpad.net/gcc-arm-embedded $ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded (if using 14.04 follow extras steps when adding PPA) $ sudo apt-get update $ sudo apt-get install gcc-arm-none-eabi if 64bit, we need 32-bit libs $ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 2. Eclipse […]
I use this script to check all projects for outdated maven dependency

I use this script to check all projects for outdated maven dependency
My kernel crashed after changed from c to c++

My kernel crashed after changed from c to c++, for this bug, a variable value accidentally changed its value, i was not about to know which code changed it. In previous version of GKD, i can turn on the profiling feature to see which memory address has been accessed, but this is not enough because […]
Buddhism & Coding

I think the starting point to match buddhism and coding is that: prove any logic is combine from more than one logic, so no logic can be independently exist.
Running peter-dwarf tutorial

This is the tutorial for running testing program for peter-dwarf, there are two programs inside the jar, first one is a command-line program to test peter-dwarf functions, the second one is a program with GUI. 1) Running the command line program This will print out the function name contain the address 0x1600300 in file “kernel” […]
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 […]
bug that super hard to fix, but i fixed it

!!! Nobody can read the dwarf specification and write the dwarf parser without hacking the binutils lab. Dwarf is just too complex and lots of algorithms in it. Now i can use peter-dwarf to parse out my c++ kernel. The dwarf stub that generated by c++ is *MUCH* more complex the c. https://sourceforge.net/p/peter-dwarf/code/358/ fixed these […]
peter-dwarf has bug to decode c++ dwarf file

peter-dwarf has bug to decode c++ dwarf file
my way to compile binutils in mac

Is it a bochs bug? bochs forgets to translate linear addr to physical addr?

Is it a bochs bug? bochs forgets to translate linear addr to physical addr?
describe how to exact bytes from memory

my colleague suggested me to use this method to describe how to exact bytes from memory: using pairs of 2-numbers. The formula is that: So if the formula is “1,2”, then x1 is 1, y1 is 2 . That mean it will exact 1 byte then jump to 2 offset and keep do it repeatedly. […]
GKD debugger shortcut

GKD debugger shortcut
Fixed one important bug in grub

I am doing kernel development in mac, my kernel is loaded up by grub because it relay on multiboot spec. I was unable to install grub in a loopback device on mac, so my mac is running a small linux vm in virtual box, i write a simple php to let me upload my kernel, […]
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 http://www.hpcwire.com/2015/10/05/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 parallelism (100,000+ nodes), increasingly large intra-node parallelism […]
just bought stm32 nucleo

just bought stm32 nucleo, learning Cortex-M. But my final target is Cortex-A, i am more interesting in general-OS than rtos.
libelf example can print out bytes in sections

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 […]
YEAH, page tables is ok now

After 100 times of failure, i finally loaded a exe into an independent address space (independent page tables and LDT). I meet all kind of failures: wrong page directory, wrong page table, wrong virtual address mapping, wrong code selector, wrong LDT, etc…
A guide to how the FreeBSD kernel manages the IA32 processors in Protected Mode

Download : A guide to how the FreeBSD kernel manages the IA32 processors in Protected Mode
Kernel can load up all segments to correct v-addr and p-addr now

Kernel can load up all segments to correct v-addr and p-addr now
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 […]
All svn history for peter-bochs debugger

Its time to keep track of all history, peter-bochs change svn server for a few times. Here are all svn history: peter-bochs-self-host  <– peter-bochs svn history hosted in my own server peter-bochs-google <– peter-bochs svn history hosted in google code gkd <– peter-bochs renamed to GKD, svn history hosted in my own server
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 […]
ported libelf

finally ported libel to my os, my linker script won’t warn me I crossed the kernel boundary. So libelf’s variables becoming exist in a memory area that they shouldn’t be there.
This battery save my apple magic mouse

When you change your mouse from logitech mouse to magic mouse, the first feeling is that magic mouse is much much heavier. This battery save my apple magic mouse, although it has lesser mah, but it is 5 times lighter than normal battery, so i much my magic mouse much lighter weight. And it is only […]
Enable peter-swing theme in netbeans

Edit : /Applications/NetBeans/NetBeans 8.0.2.app/Contents/Resources/NetBeans/etc/netbeans.conf Change the line to:
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 […]
handling exception 7

the easiest way to handle exception 7 is to execute clts then iret. My kernel was crashed because it generated a exception 0x7.
GKD can dump the exceptions now

GKD can dump the exceptions now, it helps me to trace what happened to my kernel
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 […]
Peter-swing java look & feel

https://github.com/mcheung63/peter-swing