I am wondering if there are any tools that can extract all variables (both public and static) from a set of C files, and then export all the referenced variables to a text file.
Thanks in advance.
Doxygen does this pretty well (here are some examples ). ctags does this too, but I havenβt played much with it other than using it in vim. I am sure that the tag file can be processed.
You can try cscope
More here
Not sure if this will help you, but it would be easy to do with Cil from http://www.eecs.berkeley.edu/~necula/cil/index.html the problem is that you will need to learn OCaml to use his. (Some people may consider this feature.)
Unix nm (1) in binary format may be useful. And I used cxref about 15 years ago.
Source: https://habr.com/ru/post/1309720/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1309715/number-of-simple-mutations-to-change-one-string-to-another&usg=ALkJrhhWwscxOzJ7h5XTd_Q-PeAJkxqn9AConvert XAML to FlowDocument for display in RichTextBox in WPF - c #Creating ubuntu server packages - ubuntuVim (terminal) - copy to clipboard and paste while paused - vimMenu Window from .Net - windowsHow to open the system menu window by code? - winapiHow to create a random number - seleniumWhat to do with CSV after exporting to iPhone? - objective-cRoadmap for HTML5 features in WebKit for Android - androidIs this a bad object oriented design? (derived class used in the base class) - language-agnosticAll Articles