-
Notifications
You must be signed in to change notification settings - Fork 3
/
trace.h
59 lines (52 loc) · 1.35 KB
/
trace.h
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
49
50
51
52
53
54
55
56
57
58
59
/*
* Copyright: 2013 Xilinx Inc
* Written by Edgar E. Iglesias <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef _TRACE_H
#define _TRACE_H
#include <stdio.h>
#include <stdint.h>
struct sym;
enum trace_format {
TRACE_NONE = 0,
TRACE_ETRACE,
TRACE_HUMAN,
TRACE_VCD,
TRACE_ASCII_HEX,
TRACE_ASCII_HEX_LE16,
TRACE_ASCII_HEX_LE32,
TRACE_ASCII_HEX_LE64,
TRACE_ASCII_HEX_BE16,
TRACE_ASCII_HEX_BE32,
TRACE_ASCII_HEX_BE64,
TRACE_QEMU_SIMPLE,
};
struct tracer {
int fd;
FILE *fp_out;
enum trace_format out_fmt;
void **sym_tree;
struct {
const char *objdump;
const char *machine;
} host, guest;
};
struct trace_backend {
void (*exec)(char *unitname, uint64_t start, uint64_t end,
struct sym *sym);
};
#endif