3

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

1

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

| improve this answer | |
2

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)

handle_function(address_of_your_function)
| improve this answer | |
1

View | Open subviews | Function calls.

IDA Function calls view

| improve this answer | |
  • 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 '14 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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