Kernel, Virus and Programming

Professor Terence Parr replied

Professor Terence Parr (Antlr creator) replied, this is a major different between foreigner professor and Hong Kong professor. Professor from Hong Kong never reply any technical question from public.


2017/09/19 0

Netbeans antlr can real time compile your g4 and test it using the selected target file

Netbeans antlr can real time compile your g4 and test it using the selected target file. If something goes wrong, it display the error messages at bottom window.


2017/09/17 0

My netbeans antlr plugin will do this: select the file you want to compile (see the combo box above), when you editing the .g4 file, it keep using the latest g4 to compile to file you have selected, and see the result in the bottom window. Is it a good design?


2017/09/17 0

Code to get all TopComponents and EditorPanes in netbeans

Code to get all TopComponents in netbeans, here is very useful link http://wiki.netbeans.org/DevFaqGetOpenEditorWindows


2017/09/16 0

Very good introduction to netbeans lookup

Very nice http://www.ssw.uni-linz.ac.at/Teaching/Lectures/KompTech/Netbeans_Platform_Introduction.pdf


2017/09/15 0

The fundamental function of our soul

This book is funny from shatin library, it talks about the the fundamental functions of our soul. So…


2017/09/11 0

crt{0,i,n}.o

crt{0,i,n}.o


2016/06/07 0

a super skill to help you understand .init and .fini

a super skill to help you understand .init and .fini, just do “LD_DEBUG=libs ./a.out”, read detail http://www.bnikolic.co.uk/blog/linux-ld-debug.html One thing need to remind you, loader pass control to a.out *BEFORE* it calls the fini.


2016/06/03 0

discovered something about .init and .fini sections

discovered something about .init and .fini sections, if you compile your source file into .o, no .init and .fini sections exist. But if you compile your code into target exe, .init and .fini are there. My question is: where does those .init and .fini come from the .o?


2016/06/02 0

i guess this is the reason i die in exception #0

I die in “divide by zero” exception, when i back trace, it was the destructor of class Vector, i guess the root cause is that: my newlib stub failed to work for the free() function.


2016/05/25 0

finally able to print out the fault address in exception 0 handler

finally able to print out the fault address in exception 0 handler, great step tonight


2016/05/25 0

gcc -O3 will auto remove frame pointer

gcc -O3 will auto remove frame pointer


2016/05/25 0

Pure c exception handler

Pure c exception handler


2016/05/22 0

export a function from gnu assembly to c++

export a function from gnu assembly to c++ then you are free to use it in cpp :


2016/05/22 0

linux elf dependency graph

linux elf dependency graph


2016/05/18 0

In shit again, c++ built-in function got divide by zero exception

In shit again, c++ built-in function got divide by zero exception


2016/05/16 0

A working tutorial to support jsp in spring-boot

https://www.javacodegeeks.com/2014/06/spring-boot-fast-mvc-start.html


2016/05/10 0

Linux创始人畅谈开源操作系统

http://www.infoq.com/cn/news/2015/08/LinuxCon2015 Linux创始人林纳斯·托瓦兹(Linus Torvalds)在今年LinuxCon2015会议上的…


2016/04/28 0

Having a exe in a java project is trouble when you have AVG anti-virus

I have 3 exe files in my java project, those exe are develop by me but AVG think one of them is virus and block my file. So my eclipse is not able to compile it by maven and my project that depend on it got fail compile too. You can’t white list that files,…
Read more


2016/04/26 0

spring-boot with restful api get 406

spring-boot with restful api get 406, follow these steps to fix it: Add this to pom.xml Create WebConfig.java in your project


2016/04/24 0

Hibernate is trying to fetch table meta from different database

Hibernate is trying to fetch table meta from different database, why? It is very trouble because the tables in my databases have the same name, but why can’t?


2016/04/24 1

GKD symbol parsing engine failed to parse c++ symbol

GKD symbol parsing engine failed to parse c++ symbol


2016/04/05 0

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.


2016/04/02 0

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…
Read more


2016/03/28 0

Maven Runner update – now it reads nbactions.xml

now it reads nbactions.xml added a button (with star icon) to hide default maven goals.  


2016/02/12 0

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.


2016/02/10 0

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…
Read more


2016/02/06 0

Flashing bin file to nucleo-L476RG

This command works!!! /root/Desktop>st-flash –reset write Nucleo_blink_led_NUCLEO_L476RG.bin 0x8000000 2016-01-17T15:53:54 INFO src/stlink-common.c: Loading device parameters…. 2016-01-17T15:53:54 INFO src/stlink-common.c: Device connected is: L4 device, id 0x10076415 2016-01-17T15:53:54 INFO src/stlink-common.c: SRAM size: 0x18000 bytes (96 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 2048 bytes 2016-01-17T15:53:54 INFO src/stlink-common.c: Attempting to write 16544 (0x40a0) bytes to stm32 address:…
Read more


2016/01/17 0

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…
Read more


2016/01/17 0

I use this script to check all projects for outdated maven dependency

I use this script to check all projects for outdated maven dependency


2016/01/12 0

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…
Read more


2016/01/10 1

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.


2016/01/03 1

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”…
Read more


2016/01/03 0

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…
Read more


2016/01/02 0

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…
Read more


2015/12/16 0

peter-dwarf has bug to decode c++ dwarf file

peter-dwarf has bug to decode c++ dwarf file


2015/12/15 0

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?


2015/11/30 1

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.…
Read more


2015/11/27 0

GKD debugger shortcut

GKD debugger shortcut


2015/11/22 0