Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 887 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C: Diagramming A Large Library

#1
Is there any tools to assist in diagramming a large C library? I am working on a project to port an existing C library to C++. The C library is largely undocumented with no diagrams. I would like to use a CASE tool to help me understand how the various files interact. There is extern variables in most of the files.

If possible I would prefer a visual diagram to better understand the flow of the code. I am not familiar with a diagramming tool for procedual lanagues (or if it even exists). I remember in college we use to use hierarchy and data flow diagrams for procedual languages.

I know there exists many tools for diagramming OO lanaguages, but I would like one for C. Any help would be appreciated.

**Suggestions**:

----------

**[doxygen][1]**

- [CodeProject Tutorial][2]
- [Doxygen Official Tutorial][3]
- [Stackoverflow Force Undocumented C code][4]
- **[Remember to download Graphviz if you want a graphical representation and set the dot path ie:"C:\Program Files\Graphviz2.26.3\bin\"][5]**

> It can help you in three ways:
>
> It can generate an on-line
> documentation browser (in HTML) and/or
> an off-line reference manual (in )
> from a set of documented source files.
> There is also support for generating
> output in RTF (MS-Word), PostScript,
> hyperlinked PDF, compressed HTML, and
> Unix man pages. The documentation is
> extracted directly from the sources,
> which makes it much easier to keep the
> documentation consistent with the
> source code. You can configure doxygen
> to extract the code structure from
> undocumented source files. This is
> very useful to quickly find your way
> in large source distributions. You can
> also visualize the relations between
> the various elements by means of
> include dependency graphs, inheritance
> diagrams, and collaboration diagrams,
> which are all generated automatically.
> You can even `abuse' doxygen for
> creating normal documentation.

----------

**[cppdepend][6]**

- opensource/academic and commercial licence (MSVS plugin)

> Improve your code base quality.
> CppDepend is a tool that simplifies
> managing a complex C\C++ (Native,Mixed
> and COM) code base. Architects and
> developers can analyze code structure,
> specify design rules, do effective
> code reviews and master evolution by
> comparing different versions of the
> code. These Cases Studies shows the
> utility of CppDepend to have a deep
> view of your architecture, design and
> implementation. Refactor and Improve
> your design and architecture.
> CppDepend provides useful graphs to
> analyze your design and architecture.
> CQL language gives you a flexibility
> to create your custom queries and have
> a deep view of your code base. here's
> a sample of using CppDepend to assist
> your refactoring. Assist your
> migration. Understanding the existing
> migration. CppDepend helps you in your
> migration process, you can find here
> the advantages of using CppDepend in
> your migration process.

----------

**[ctag][7]**

- (nedit, vim, emacs) [VIM TUTORIAL][8]
- class names
- macro definitions
- enumeration names
- enumerators
- function definitions
- function prototypes/declarations
- class, interface, struct, and union data members
- structure names
- typedefs
- union names
- variables (definitions and external declarations)

----------

**[csope][9]**

- (cmd line, vim) [VIM TUTORIAL][10]
- Allows searching code for:
- all references to a symbol
- global definitions
- functions called by a function
- functions calling a function
- text string
- regular expression pattern
- a file
- files including a file


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

[4]:

[To see links please register here]

[5]:

[To see links please register here]

[6]:

[To see links please register here]

[7]:

[To see links please register here]

[8]:

[To see links please register here]

[9]:

[To see links please register here]

[10]:

[To see links please register here]

Reply

#2
Doxygen as mentioned by Nick Meyer is probably a good bet. You can also try the classic cross-referencing tools ctags and cscope, that you can use as standalone tools or integrated with your text editor.
Reply

#3
[CppDepend][1], if you work on Windows, extends Doxygen with a query language and ability to move in the dependency graph.


[1]:

[To see links please register here]

Reply

#4
[Doxygen][1] can generate various types of interaction diagrams - files, function calls, etc. With the EXTRACT_ALL configuration variable set, it will generate diagrams and cross-referenced documentation even for code without documentation comments.

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through