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
Source Browser in uVision2 have a bug: - when select function in Left window, and switch to "Call Graph" mode, then in Right window instead of full "call tree" only last sub-tree for each function displayed. This is for Keil C51 v6.12 (uVision v2.12), but I think the same problem in v6.14. Who know about C51 v6.14 (uVision2 v2.14) ?
Yes, I think you're right. :-( Can you get your code to compile in MSVC, and use the Browser there? What about the "call trees" shown in the Linker's Overlay Map in the mapfile?
>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...