diff --git a/README.md b/README.md index 4ff964f..ea9565e 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,19 @@ And `atoi.cfg.svg` looks like: ~~The operand in instruction is represented by its SSA name, it means that if two operands in the same block have the same SSA name, they are the same operand.~~ -And we will attempt to generate more meaningful expression for edge constructed by Jcc(JE, JNE, etc.) instruction, such as that the expression for the edge constructed by the 'je(0x400590)' after 'cmp(dl_1,0x9)' is `dl_1 == 0x9` and `dl_1 != 0x9`, not just `ZF = 1` and `ZF = 0`. +And we will attempt to generate more meaningful expression for edge constructed by Jcc(JE, JNE, etc.) instruction, such as that the expression for the edge constructed by the 'jbe 0x400500' after 'cmp cl,0x9' is `cl > 0x9` and `cl <= 0x9`, not just `CF = 1 or ZF = 1`. + +Instructions marked with an '=>' will be more prominent when displayed: + +``` + 0x00000000004004f8 <+56>: ja 0x40051a + 0x00000000004004fa <+58>: nop WORD PTR [rax+rax*1+0x0] +=> 0x0000000000400500 <+64>: lea ecx,[rax+rax*4] + 0x0000000000400503 <+67>: add rdi,0x1 + 0x0000000000400507 <+71>: lea eax,[rdx+rcx*2-0x30] +``` + +![atoi.cfg.mark.jpg](https://github.com/hidva/as2cfg/blob/master/atoi.cfg.mark.jpg) + ![h](https://blog.hidva.com/assets/followme.gif?f=GITHUBas2cfg) diff --git a/atoi.cfg.mark.jpg b/atoi.cfg.mark.jpg new file mode 100644 index 0000000..e146944 Binary files /dev/null and b/atoi.cfg.mark.jpg differ diff --git a/src/render.rs b/src/render.rs index 3553a9d..c9a4e54 100644 --- a/src/render.rs +++ b/src/render.rs @@ -12,7 +12,7 @@ fn insts2label(cfgnode: &cfg::Node, cfggraph: &cfg::Graph) -> (String, bool) { let mut interested = false; let mut labelline = vec![ "<".to_string(), - "".to_string(), + "
".to_string(), ]; for &inst_id in &cfgnode.insts { let inst = &cfggraph.insts[inst_id]; @@ -24,7 +24,7 @@ fn insts2label(cfgnode: &cfg::Node, cfggraph: &cfg::Graph) -> (String, bool) { }; let font_end = if inst.interested { "" } else { "" }; let linestr = format!( - "", + "", font_begin, inst.addr, font_end,
{}{:#x}{}{}
{}{:#x}{}{}