thoth icon indicating copy to clipboard operation
thoth copied to clipboard

[CFG] [DISAS] implement label in disassembly & cfg

Open pventuzelo opened this issue 3 years ago • 1 comments

we can find all label by looking at relative jump offset (JUMP_REL 9) and relative CALL (CALL rel 3145)

once done we should have an output like:

offset 2458:  ADD            AP, 1          
offset 2459:  ASSERT_EQ      [AP], [FP]     
offset 2459:  ADD            AP, 1          
offset 2460:  CALL           rel 4870       
offset 2460:  ADD            AP, 2          

label_2462:

offset 2462:  ASSERT_EQ      [AP], [FP-4] + [FP]
offset 2462:  ADD            AP, 1          
offset 2463:  ASSERT_EQ      [FP-3], [[AP-1]]
offset 2464:  ASSERT_EQ      [AP], [FP] + 1 
offset 2464:  ADD            AP, 1          
offset 2466:  ASSERT_EQ      [AP], [FP] + 1 
offset 2466:  ADD            AP, 1          
offset 2468:  ASSERT_EQ      [AP], [AP-4]   
offset 2468:  ADD            AP, 1          

pventuzelo avatar Jul 16 '22 11:07 pventuzelo

image

Still need to add it to the CFG

raefko avatar Jul 29 '22 13:07 raefko