Open Boryotto opened 4 years ago
This sounds like a useful feature. My first inclination would be to present the results as a graph of the program, only showing the direct ancestors and the two selected functions. This would allow you to explore ways to navigate the various paths to the ancestors. Using the Function Call Tree plugin for this seems like it could be a bit clunky. I guess it ultimately depends on how you wish to interact with the results of the search.
A graph would also be great! Generally, I think it would be cool to be able to query Ghidra's analyzed call tree using a query language like xpath.
FunctionReachabilityPlugin
plugin has similar functionality, but works very unstable.
The Function Reachability Plugin was meant to allow uses to find paths between two functions. It is very much a prototype that never seemed to gain much traction.
Is your feature request related to a problem? Please describe.
A nice addition to the Function Call Tree will be to select another function, beside the one that the call tree is displayed for, and find a common ancestor(s). This will really help in finding the possible path the program takes. For example: If you know that a program opens a file and checks a certain value inside it, And a file selection dialog is showing. And you've found a function that xref's the value (let's call it
A
), but it's called by many functions (maybe because the file data can also be acquired from the network). The feature will let you find function(s) that lead to callingGetOpenFileName
and then lead to callingA
. This will narrow the code paths to follow and help when debugging.Describe the solution you'd like I imagine it as a button in the Function Call Trees window that will let you name another function (maybe with a popup) and will display the common ancestor function in a third window (other than
Incoming Calls
orOutgoing Calls
). It will display a list of ancestor functions, and clicking each one will open them in a separate Function Call Tree window.I don't know exactly how Function Call Trees are stored in Ghidra but I guess it's a tree-like structure, so I'm aiming at finding the first ancestor node and links the two selected function, and of course there might be more than one.
Describe alternatives you've considered This can also be a part of the function comparison feature