plot_ CFG cannot draw disassembly code
Opened this issue · 8 comments
I ran the sample code, but I didn't get an image of the disassembly code,image as below:
parameter "format='raw'" then "dot -Tpng -o out.png ais3_cfg.raw" as same as above.
the "ais3_cfg.raw" file's content as below:
The node description of the "ais3_cfg. Raw" file does not seem to contain disassembly content. I don't know whether this is an angr problem or an angr utils problem.
could you give me some help? Thanks
Did you call it with an 'asminst=True' parameter?
Did you call it with an 'asminst=True' parameter?
yes, I follow the example in readme as it is
Just for a smoketest, I've tried with the latest version of angr, and it is working for me.
Could you try what happens with 'vexinst=True'?
Do you see vex instructions in the plotted graph?
This is where the assembly instructions are generated:
https://github.com/axt/bingraphvis/blob/master/bingraphvis/angr/content.py#L258-L263
Could you try to run this
self.project.factory.block(addr=0x4005c5, num_inst=1).capstone.insns
and check if it gives back any instruction.
If not, I would suspect something is wrong with your capstone installation. If that's the case, probably the angr community can help.
Could you solve it? I'm curious what was/is the problem.
I'm sorry, i can't solve it,I don't know where is the problem.
I'm sorry to hear that. Not sure how to help.
Did you check that the codes I linked above were executed?
If yes, then you should check the 'n.content' map here:
https://github.com/axt/bingraphvis/blob/master/bingraphvis/output.py#L120
If no, then you should check the 'self.content' map here:
https://github.com/axt/bingraphvis/blob/master/bingraphvis/base.py#L285
In both cases it should have a 'head' and an 'asm' key in it.
If you install the libs in an editable way, 'pip install -e ./bingraphvis' then you simply just can add some print functions to those lines.
I am running into the same issue. I added the print statements in both places. Both locations have a head and asm key.
Any other obvious things to check?