| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Looking for a tool that will help me understand a large body of C code which must be ported to a new OS/platform. In the past what I would do is an editor with dynamic grep and start walking thru each file, adding my own comments and creating my own reports, xrefs and flow diagrams. No doubt there is a tool or tool combo that does all of this now - perhaps something open source? Ideally it would list a report on each C file showing calls to, calls from and all internal vars too, and stick that info into the header (or a report) for me. And while I'm asking, is there an open source file editor comparable to brief/slick edit/codewright? |
|
#2
| |||
| |||
| tns1 wrote: > Looking for a tool that will help me understand a large body of C code > which must be ported to a new OS/platform. In the past what I would do > is an editor with dynamic grep and start walking thru each file, adding > my own comments and creating my own reports, xrefs and flow diagrams. No > doubt there is a tool or tool combo that does all of this now - perhaps > something open source? > > Ideally it would list a report on each C file showing calls to, calls > from and all internal vars too, and stick that info into the header (or > a report) for me. Check out LLVM and CLang. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com/products/?u |
|
#3
| |||
| |||
| tns1 wrote: > Looking for a tool that will help me understand a large body of C code > which must be ported to a new OS/platform. In the past what I would do > is an editor with dynamic grep and start walking thru each file, adding > my own comments and creating my own reports, xrefs and flow diagrams. No > doubt there is a tool or tool combo that does all of this now - perhaps > something open source? > > Ideally it would list a report on each C file showing calls to, calls > from and all internal vars too, and stick that info into the header (or > a report) for me. > > And while I'm asking, is there an open source file editor comparable to > brief/slick edit/codewright? How about something simple to start - a cross reference report organized by function or by file. I looked at LXR and Doxygen and although they can probably do this, the examples didn't look promising. Rather than abstracted documentation, I'd prefer raw info from the compiler presented in a simple text file like: .... totaler() Called from: file1.c:main(), file2.c:calculate() Calls to: file2.c:average() Local vars: samples[], loopcount, beg, end Global vars: gFormat, gPrecision .... function2() Called from: file1.c:main(), file3.c:estimate() Calls to: none Local vars: loopcount, beg, end Global vars: none .... It looks like many of the modern IDEs such as MS visual studio have improved search or 'code browsing' features. These are great, but can any of these 'auto browse' so as to produce a report? Toolchains such as gcc can produce mapfiles/symbol dumps, and the -cref flag does produce something I can manually work with if I have to. Can I get a xref output from visual studio? Maybe it looks better. |
|
#4
| |||
| |||
| tns1 wrote: > Looking for a tool that will help me understand a large body of C code > which must be ported to a new OS/platform. In the past what I would do > is an editor with dynamic grep and start walking thru each file, adding > my own comments and creating my own reports, xrefs and flow diagrams. No > doubt there is a tool or tool combo that does all of this now - perhaps > something open source? > > Ideally it would list a report on each C file showing calls to, calls > from and all internal vars too, and stick that info into the header (or > a report) for me. > > And while I'm asking, is there an open source file editor comparable to > brief/slick edit/codewright? I tried doxygen and although it isn't what I was originally looking for, it does a great job of generating hyperlinked html docs. Using the wizard it only took a few minutes to produce over 50MB of well-organized docs complete with function call graphs. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.