I want to generate all xrefs from function just to check what api it uses in its call-tree. I know I can generate call tree graph by right clicking on function name and "Xrefs from", but I would like to have this functions listed just as text or something like that, so I could read it easily.

Reading it from WinGraph is pretty hard, and I have trouble with this nasty colors.. I mean, how is it readable? It is really hard to read white text on cyan background. And I dont see any way to configure it. My eyes just cant stand looking at it.

So how can I get this xrefs in some friendly format? I am sure it is possible.. I am using IDA 6.1

Thanks in advance

3 Answers 3


The MyNav plugin will show you calls from a function recursively, as shown below: enter image description here


I didn't check it, use carefully, beware the errors in this code, good luck

import idautils
import idc
import idaapi

def handle_function(func_start):
    for h in idautils.FuncItems(func_start):
        for r in idautils.XrefsFrom(h, 0):
            if r.type == fl_CF or r.type == fl_CN:
                print hex(h), "--calls-->", hex(r.to)


View | Open subviews | Function calls.

IDA Function calls view

  • Thanks for this, but what I really want is call-tree like this i.imgur.com/rQvraS8.png . (which includes more than 0 level calls) I think I have to write script like user w s proposed me, but edit it so its search deeper..
    – larw
    May 6, 2014 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.