-
Notifications
You must be signed in to change notification settings - Fork 2
/
akgviz.c
48 lines (42 loc) · 1.21 KB
/
akgviz.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* akgviz.c - AKB GraphViz dumper
*
* Copyright (c) 2006,2012 Sampo Kellomaki ([email protected]), All Rights Reserved.
* This is unpublished proprietary source code. All dissemination
* prohibited. Contains trade secrets. NO WARRANTY. See file COPYING.
* Special grant: akgviz.h may be used with zxid open source project under
* same licensing terms as zxid itself.
*
* Dump session and PDU datastructures to a gviz (dot) graph.
* To visualize the graph you must have graphviz as well as
* ghostscript installed.
*
* See also: http://www.research.att.com/sw/tools/graphviz/download.html
* /apps/graphviz/std/bin/dot -Tps <a.dot |gv
*/
#include <string.h>
#include <pthread.h>
#include <stdarg.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
#include <time.h>
#include <sys/ptrace.h> /* see also /proc/pid */
#include <bfd.h> /* -lbfd */
#include "errmac.h"
#include "akbox.h"
void die(char* why);
char* amap(char* x);
/* Called by: */
void ak_gviz(char* filename)
{
FILE* dot = fopen(filename, "w");
if (!dot) die(filename);
fclose(dot);
}
/* EOF - akgviz.c */