Month: April 2014

gdb protocol, “g” command

This is the tcpflow dump for the gdb protocol “g” command, it contains all register values. Let’s parse it:

$g#67

127.000.000.001.01234-127.000.000.001.57495: +

127.000.000.001.01234-127.000.000.001.57495: $0000000000000000630600000000000000000000000000000000000000000000f0ff00000200000000f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000#e8

After the trace:

target.c::debug_print_register
gdbarch.c::gdbarch_register_name
i386-tdep.c::i386_register_names

The register packet can be decode by:

static const char *i386_register_names[] =
{
  "eax",   "ecx",    "edx",   "ebx",
  "esp",   "ebp",    "esi",   "edi",
  "eip",   "eflags", "cs",    "ss",
  "ds",    "es",     "fs",    "gs",
  "st0",   "st1",    "st2",   "st3",
  "st4",   "st5",    "st6",   "st7",
  "fctrl", "fstat",  "ftag",  "fiseg",
  "fioff", "foseg",  "fooff", "fop",
  "xmm0",  "xmm1",   "xmm2",  "xmm3",
  "xmm4",  "xmm5",   "xmm6",  "xmm7",
  "mxcsr"
};

read count : 237

GKD progress 2014/04/14

gkd progress 2014:04:14

gkd progress 2014:04:14 (2)

gkd progress 2014:04:14 (3)

Still working on the stub. Refactor the whole project and adding one more layer (add debugger stub to support different emulators) to the architecture, all are very hard and time consuming, even the whole project is developed by me. But this experience make be serious to the project-initial-design. Architecture is *important* !!!

read count : 308

dot in mac and linux produce different kind of ortho edge

dot in mac and linux produce different kind of ortho edge. I think the dot version affected it.

using dot in mac
using dot in linux
using dot in linux
using dot in mac (I think this look better)

Here is dot version in linux:

dot - graphviz version 2.26.3 (20100126.1600)
Activated plugin library: libgvplugin_pango.so.6
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.6
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
	/usr/lib/graphviz/config6
		was successfully loaded.
    render	:  cairo dot fig gd map ps svg tk vml vrml xdot
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout	:  textlayout
    device	:  canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib
    loadimage	:  (lib) eps gd gd2 gif jpe jpeg jpg png ps svg

Here is dot version in mac:

dot - graphviz version 2.36.0 (20140111.2315)
libdir = "/opt/local/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.6.dylib
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
	/opt/local/lib/graphviz/config6
		was successfully loaded.
    render	:  cairo dot fig gd lasi map pic pov ps quartz svg tk vml vrml xdot
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout	:  textlayout
    device	:  bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gd gd2 gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz vrml wbmp webp x11 xdot xdot1.2 xdot1.4 xlib
    loadimage	:  (lib) bmp eps gd gd2 gif jpe jpeg jpg pdf png ps svg webp xbm

read count : 552

Titan Language Rhapsody

Titan Language Rhapsody

begin tran;

var myCloud as Cloud
var vm=myCloud.createVM(cpu=1, mem=2GB, public_ip=dhcp);
vm.wait(VM.RUNNING);

var trigger1 as Trigger;
trigger1.addSensor(‘cpu>80%, duration>10s’);
trigger1.addSensor(‘memory>80%, duration>10s’);
trigger1.addAction(new Action(ACTION.SCALE_UP, 1));
vm.addTrigger(trigger1;

commit;

read count : 253