asm2cfg
asm2cfg copied to clipboard
Cannot run view control-flow graph on main(int, char**) function
When you have a C/C++ project with a source code and you simple break in main function that has a signature of main(int, char**) and run viewcfg. Following is printed and no control-flow graph is displayed:
(gdb) viewcfg
Unexpected assembly at line 1:
Dump of assembler code for function main(int, char**):
Python Exception <class 'SystemExit'>: 1
Error occurred in Python: 1
It seems that the python code cannot handle function names on the fist line of the disassembly and fails. Following disassembly will fail for example:
Dump of assembler code for function main(int, char**):
0x0000555555769de9 <+0>: push %rbp
0x0000555555769dea <+1>: mov %rsp,%rbp
0x0000555555769ded <+4>: push %r13
0x0000555555769def <+6>: push %r12
0x0000555555769df1 <+8>: push %rbx