Month: November 2014

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.

bochs parse error 1

But if i use java to read it out, i never got the . I tried different classes (BufferedReader, InputStream), none of them success.

bochs parse error 2

read count : 207

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 that I can end this. Here is the zip file of my source, I just added a “gkd_r” command to dump out registers into xml format. Please see if I added my code correctly. Search “gkd” you will see all my changes, so far my code are in:

  • lexer.l
  • parser.y
  • debug.h
  • dbg_main.cc

Can we add my code into the trunk? so that people can use it by default.

Here is the image of the gkd_r command:

gkd_r command
gkd_r command

thanks
from Peter

read count : 218

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 up anything, although you can compile but your command won’t work. The “gkd” is my own boots command, you can place any command name you like.

gkd			{ bxlval.sval = strdup(bxtext); return(BX_TOKEN_GKD); }

Step 2) I created my own token “BX_TOKEN_GKD” for my command, you need to add it to parser.y, so please add “%token BX_TOKEN_GKD_R” to it. You also need a handler for your command in the parser, add these to parser.y

gkd_command:
      BX_TOKEN_GKD '\n'
      {
        printf("GKD\n");
        some_function();
        free($1);
      }
    ;

Step 3) In the handler, i called “some_function”. You need to add the prototype to debug.h and add the function body to dbg_main.cc

So in debug.h, add “void some_function();”

And in dbg_main.cc, add these:

void some_function(int which_regs_mask)
{
printf(“my boots debug command\n”);
}

!!! Thats all

read count : 276

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”

read count : 220

${new} will cause error in old tomcat 7

Below code has error, because the ${new} will crash old tomcat 7. JSTL has bug.

<c:forEach var="new" items="${news}">
	<tr style="padding-top:10px;">
		<td><fmt:formatDate pattern="yyyy-MM-dd h:m" value="${new.publishedDate}" /></td>
	</tr>
	<tr>
		<td style="border-bottom: 1px solid #dfdfdf; padding-bottom:10px;"><a href="${new.link}" target="_blank">${new.title }</a></td>
	</tr>
</c:forEach>

read count : 284

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.

Sharepoint online bug
Sharepoint online bug

read count : 223