07-27-2023, 11:37 AM
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]:
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]