Skip to content

Cannot run view control-flow graph on main(int, char**) function #44

@Kazhuu

Description

@Kazhuu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions