projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added some debug output
[libfirm]
/
ir
/
be
/
tools
/
saveinstr.c
1
/**
2
* Helper code to output instrumentation result (see instrument.cpp)
3
* @author Matthias Braun
4
*/
5
#include <assert.h>
6
#include <stdio.h>
7
8
extern char __instr;
9
extern char __instrend;
10
11
void __saveinstr()
12
{
13
size_t len;
14
FILE* f;
15
16
f = fopen("instr.out", "w");
17
assert(f != NULL);
18
19
len = (&__instrend) - (&__instr);
20
assert(fwrite(&__instr, len, 1, f) == 1);
21
22
fclose(f);
23
}