DebugGraph: refactoring debuggraph_rel.c