4 ms·
Graphviz has been the old standby forever. I had an internship in 1999 where my mentor used graphviz to debug the compiler he was working on. Everyone should ha
by seanmcdirmid 7y ago
Graphviz has been the old standby forever. I had an internship in 1999 where my mentor used graphviz to debug the compiler he was working on. Everyone should have this tool in their debugging tricks library.
- jjice 7y agoI'm actually doing the same thing right now. I had been using a textual output to make sure my AST was correct, but that is a real pain. Graphviz made it extremely easy it is so much easier to read.
- zoomablemind 7y agoCould you expand on the graphviz use in dbg context (or ref it)? Is it to draw the call graph? How it's actualy done, with printfs or some lib?
- tmh88j 7y agoI use it with kcachegrind for profiling, the source being output from xdebug. https://xdebug.org/docs/profiler https://xdebug.org/docs/profiler http://kcachegrind.sourceforge.net/html/Home.html http://kcachegrind.sourceforge.net/html/Home.html
- seanmcdirmid 7y agoYou can use it for whatever you want. Instead of dumping text to a log file, you can dump out graph nodes and connection info to a dot file instead, to then be laid out and rendered into a graph by dotty or whatever else you want to use. It doesn’t require any extra libraries.
- TeMPOraL 7y agoI googled for "dotty" mentioned downthread (didn't know about this tool) and found this PDF: https://www.graphviz.org/pdf/dottyguide.pdf https://www.graphviz.org/pdf/dottyguide.pdf. Section 3.2.2 ldbx, on page 19, (21 in PDF), gives an example of using graphs for debugging a C application.