NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
50.64k stars 5.79k forks source link

API to get PcodeBasicBlocks splitted with both CALL and BRANCH #3210

Closed M4tsuri closed 3 years ago

M4tsuri commented 3 years ago

I'm trying to build interprocedural CFG for a program with the optimized pcode basic blocks from HighFunction.getBasicBlocks.

Screen Shot 2021-07-12 at 18 31 42

However, there are CALL and CALLIND instructions in the middle of a block. I wonder if there are any APIs to get PcodeBasicBlocks splitted with both CALL and BRANCH like instructions. Thanks.

ghidra1 commented 3 years ago

As far as I know, only Instruction-level block models are currently exposed in our API - although I could be wrong. While the Decompiler uses this pcode block model concept internally, its code is written in C and is not exposed.

M4tsuri commented 3 years ago

OK, thank you.