This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

finding recursive calls

Has anyone written a tool to help track down recursive function calls? I'm sure many of us have seen the dreaded C51 linker warning above recursive calls.

My problem: I just spent 30 minutes sifting through someone elses code trying to find the actual culprit that produced the recursive call linker warning (no function pointers in the code, so I was pretty sure the warning was real). It turned out to be about 4 or 5 function calls deep pass the function it warned about. Not a difficult task to do by hand, but....

I'm sure that the map file can be used to create a call tree, but I believe you'd have to create the call tree manually. It seems that that it wouldn't be that difficult to write a program that will parse the map file and tell you all the functions involved in a specified recursively called function. If it doesn't exist, maybe I'll be bored enough to actually write it someday :)

-nelson

Parents
  • >Can you get your code to compile in MSVC, and use the Browser there?

    Yes, MSVC Browser show call tree,
    and recursion looks like:

    test_1()
      |--test_2()
            |-- test_1()
                  |-- test_2()
                       etc...
    


    >What about the "call trees" shown in
    >the Linker's Overlay Map in the mapfile?

    Yes, it work.
    But this is not the same as "visual tree", user forced to study linear represantation of tree.

    I think, Keil can:
    - fix a bug in Source Browser
    - add some features to print call tree
    - add some features for easy navigating via call tree

    and all be Ok.

Reply
  • >Can you get your code to compile in MSVC, and use the Browser there?

    Yes, MSVC Browser show call tree,
    and recursion looks like:

    test_1()
      |--test_2()
            |-- test_1()
                  |-- test_2()
                       etc...
    


    >What about the "call trees" shown in
    >the Linker's Overlay Map in the mapfile?

    Yes, it work.
    But this is not the same as "visual tree", user forced to study linear represantation of tree.

    I think, Keil can:
    - fix a bug in Source Browser
    - add some features to print call tree
    - add some features for easy navigating via call tree

    and all be Ok.

Children
No data