Author Archives: admin
Fixed ubuntu vnc keymap problem
ubuntu 12.04 vnc keymap has trouble, D become minimize all windows and S become start menu, run these to fix it. 2015/03/19
compile dwarfdump in mac
CFLAGS='-I /opt/local/include -L /opt/local/lib' CXXFLAGS='-I /opt/local/include -L /opt/local/lib' ./configure --prefix=/peter-dwarfdump make make install Because mac gcc doesn't search for the /opt/local, so need to specific the path manually. 2015/03/07
Peter-dwarf library can show hierarchy data for compile unit now

Peter-dwarf library can show hierarchy data for compile unit now 2015/02/15
Thinkaholic open source event 2015/2/10

Thinkaholic open source event 2015/2/10 2015/02/15
I should look at this
I should look at this printf -> _fstat -> _sbrk -> write 2015/02/07
now is good enough
now is good enough, can focus on library things 2015/01/22
tomcat auto startup script
just save this to /etc/init.d/tomcat and link to /etc/rc5.d/S99tomcat 2015/01/21
disable gnome "unable to mount..." dialog
gsettings set org.gnome.desktop.media-handling automount false ...and enable it again: gsettings set org.gnome.desktop.media-handling automount true 2015/01/14
Elf is having duplicate compile unit, why ld doesn't clear it out?
Elf is having duplicate compile unit, why ld doesn't clear it out? 2015/01/09
why i receive zero in my socket
I have two programs, one written in c++, the other is in java. C++ keep sending bytes to java, overtime write out 400KB. Java keep receiving the data using the readBytes function, this function returns an integer which is the number of byte it actually read for the function call. For every send (400kb) in […] 2015/01/08
The jump profiling is little bit enhanced
The jump profiling is little bit enhanced. After load up the ELF kernel, it can read out all symbols and display it in the jump profiling window. It helps people to tracing where the EIP jumping to which c++ function. 2015/01/03
Empty bochs instrument crash in linux, but not in mac
Empty bochs instrument crash in linux, but not in mac. My instrument code is nearly empty. core dump: configure: run by: bochsrcSDL.bxrc: instrument.h: instrument.cc: 2014/12/25
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. 2014/12/22
make bochs runs faster
Without "CXXFLAGS=-O3", boots can only runs 20M ips on my i5 mbpr. With that, now is 57M ips. 2014/12/14
volatile keyword is not everything to prevent compiler optimization
When you add the keyword "volatile" in front of variable declaration, it prevents compiler to optimize the line that are using that variable. But if the line is completely useless, compiler will still optimized it out, prevent to generate any byte code for it. 2014/12/10
bochs problem again
I am unable to get the “” from the input stream. Please help. In command line, when i start bochs, I saw “”, which is very normal. But if i use java to read it out, i never got the . I tried different classes (BufferedReader, InputStream), none of them success. 2014/11/22
My proposal to Bochs team
Dear Bochs Team My name is Peter, the author of GKD, prior call peter-bochs. Peter-Bochs parses the bochs debugger output. During the last 3 years, I am busy to support each version of bochs because the output of bochs debug command is different. I want to format the bochs debugger command output to xml, so […] 2014/11/16
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 […] 2014/11/15
bochs can't compile in mac (solved)
bochs can't compile in mac because the configure always set gui_debugger=1, just set this variable to 0 in line 22459. Bochs can be compile in mac with "./configure --enable-disasm --with-sdl --enable-debugger" 2014/11/15
${new} will cause error in old tomcat 7
Below code has error, because the ${new} will crash old tomcat 7. JSTL has bug. 2014/11/14
Sharepoint online bug
Sharepoint online bug - If you place an html-email-address to it and click "check" button, it crash. Even you delete all text and the check button can't resume normal. 2014/11/11
GKD 20141011 released
Fixed a serious bug using windows bochs. In java, the function String::matched will return false when it has a '\r'. Download here https://www.dropbox.com/s/7nf2swf1exkisna/GKD-20141011.jar?dl=0 2014/10/11
(solved) install .net 3.5 to azure windows 2012
Install the below fix will resolve this issue http://support2.microsoft.com/kb/3005628 2014/10/11
sharepoint 2013 deploy app hang up
In visual studio, when you deploy your sharepoint app, if t hang up in "Installation is in progress". Make sure your "SharePoint Timer Service" is running, this problem will be solved 2014/10/09
GKD with windows is working
Someone comlpaint GKD dosen't work with Bochs in windows. Because the bochs path has space. I just tested it in windows 7, this issue doesn't exist. 2014/10/09
command to connect sharepoint 2013 to office web apps server
First, do these in office web apps server Second, do these in sharepoint server 2014/10/09
openocd with arm is working
openocd with arm is working 2014/10/05
openjtag + openocd + smartarm 2200
Finally connect my openjtag usb device to my old smartarm 2200 development board using openocd. The next step is buy a x86 dev board (intel galileo) and try to use openocd with it. Then port peter-bochs to support openocd, finally i will have a hardware debug platform for os dev. http://www.zlgmcu.com is a development board […] 2014/10/01
find out what's wrong in your page table
People always ask me why their virtual address is not pointing to the right physical address. Almost every time is the page table get wrong. But there are few possibilities, such as PD, CR address and etc.. You can use these step to find out. 1) First, set the physical point and run until the […] 2014/09/20
Kendo with asp.net MVC ScriptBundle issue
Kendo with asp.net MVC, need to be careful this link in your web.config You have to turn off debug="true", otherwise the ScriptBundle includes will not working. 2014/08/28
[solved] usb wireless mouse freeze periodically in ubuntu 12.04 lts
usb wireless mouse freeze periodically in ubuntu 12.04 lts, edit /boot/grub/grub.cfg, add a boot option irqpoll will fix it 2014/08/24
Add tabIndex to all tag incrementally
in VI, there is a command to add tabIndex to all tag incrementally :let i=200 | g/ 2014/08/23
libelf.h has bug, it includes a missing header file

I cross compile the libel 0.8.13 on my ubuntu 12.04lts. I used the below command to configure it. The compile process is success and installed it correct. But inside the include/libelf/sys_elf.h, it includes a missing header file (elf.h). Just comment it out, and it will works. 2014/08/23
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 […] 2014/08/17
Adding file to newlib's sys folder and make it compile

Adding file to newlib's sys folder and make it compile, you need to modify the Makefile.in, see below 2014/08/16
newlib sys/*.h will not be copied to output directory

All the .h file in the sys directory will be included when compiling the files in your sys/XXX. They (sys/*.h) will not be copied to the output directoy, that mean they are just used for compile only. 2014/08/09
A little bit better - Showing the MBR

A little bit better - Showing the MBR Here is the java code to read MBR out: 2014/07/28
We should mix 4K and 4M Page

I was fixing the PSE and PAE page table display for GKD, I found out Linux using 4M page to map large address space and it uses 4K page to map broken space. So advance OS should mix use of 4K and 4M page. Now GKD supports PSE=1 (4M page) 2014/07/27
I think i am under dns attack
I think i am under dns attack, in my /var/log/message i keep seeing these. Someone is using over 2000 ip to lookup my dns server. 2014/07/12
GKD dependency tree graph

GKD dependency tree graph 2014/07/11