1#ifndef QEMU_EXEC_LOG_H
2#define QEMU_EXEC_LOG_H
3
4#include "qemu/log.h"
5#include "qom/cpu.h"
6#include "disas/disas.h"
7
8
9
10
11
12
13
14
15
16static inline void log_cpu_state(CPUState *cpu, int flags)
17{
18 if (qemu_log_enabled()) {
19 cpu_dump_state(cpu, qemu_logfile, fprintf, flags);
20 }
21}
22
23
24
25
26
27
28
29
30
31static inline void log_cpu_state_mask(int mask, CPUState *cpu, int flags)
32{
33 if (qemu_loglevel & mask) {
34 log_cpu_state(cpu, flags);
35 }
36}
37
38#ifdef NEED_CPU_H
39
40static inline void log_target_disas(CPUState *cpu, target_ulong start,
41 target_ulong len, int flags)
42{
43 target_disas(qemu_logfile, cpu, start, len, flags);
44}
45
46static inline void log_disas(void *code, unsigned long size)
47{
48 disas(qemu_logfile, code, size);
49}
50
51#if defined(CONFIG_USER_ONLY)
52
53static inline void log_page_dump(void)
54{
55 page_dump(qemu_logfile);
56}
57#endif
58#endif
59
60#endif
61