mirror of https://github.com/xemu-project/xemu.git
qemu-log: Rename the public-facing cpu_set_log function to qemu_set_log
Rename the public-facing function cpu_set_log to qemu_set_log. This requires us to rename the internal-only qemu_set_log() to do_qemu_set_log(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
4fde1eba0f
commit
24537a0191
|
@ -870,7 +870,7 @@ int main(int argc, char **argv)
|
||||||
qemu_print_log_usage(stdout);
|
qemu_print_log_usage(stdout);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
cpu_set_log(mask);
|
qemu_set_log(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind >= argc) {
|
if (optind >= argc) {
|
||||||
|
|
2
cpus.c
2
cpus.c
|
@ -1184,7 +1184,7 @@ void set_cpu_log(const char *optarg)
|
||||||
qemu_print_log_usage(stdout);
|
qemu_print_log_usage(stdout);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
cpu_set_log(mask);
|
qemu_set_log(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
|
void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
|
||||||
|
|
2
hw/ppc.c
2
hw/ppc.c
|
@ -1189,7 +1189,7 @@ void PPC_debug_write (void *opaque, uint32_t addr, uint32_t val)
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
printf("Set loglevel to %04" PRIx32 "\n", val);
|
printf("Set loglevel to %04" PRIx32 "\n", val);
|
||||||
cpu_set_log(val | 0x100);
|
qemu_set_log(val | 0x100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,14 +143,18 @@ typedef struct CPULogItem {
|
||||||
|
|
||||||
extern const CPULogItem cpu_log_items[];
|
extern const CPULogItem cpu_log_items[];
|
||||||
|
|
||||||
void qemu_set_log(int log_flags, bool use_own_buffers);
|
/* This is the function that actually does the work of
|
||||||
|
* changing the log level; it should only be accessed via
|
||||||
|
* the qemu_set_log() wrapper.
|
||||||
|
*/
|
||||||
|
void do_qemu_set_log(int log_flags, bool use_own_buffers);
|
||||||
|
|
||||||
static inline void cpu_set_log(int log_flags)
|
static inline void qemu_set_log(int log_flags)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_USER_ONLY
|
#ifdef CONFIG_USER_ONLY
|
||||||
qemu_set_log(log_flags, true);
|
do_qemu_set_log(log_flags, true);
|
||||||
#else
|
#else
|
||||||
qemu_set_log(log_flags, false);
|
do_qemu_set_log(log_flags, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3104,7 +3104,7 @@ static void handle_arg_log(const char *arg)
|
||||||
qemu_print_log_usage(stdout);
|
qemu_print_log_usage(stdout);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
cpu_set_log(mask);
|
qemu_set_log(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_arg_log_filename(const char *arg)
|
static void handle_arg_log_filename(const char *arg)
|
||||||
|
|
|
@ -981,7 +981,7 @@ static void do_log(Monitor *mon, const QDict *qdict)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cpu_set_log(mask);
|
qemu_set_log(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_singlestep(Monitor *mon, const QDict *qdict)
|
static void do_singlestep(Monitor *mon, const QDict *qdict)
|
||||||
|
|
|
@ -54,7 +54,7 @@ void qemu_log_mask(int mask, const char *fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable or disable low levels log */
|
/* enable or disable low levels log */
|
||||||
void qemu_set_log(int log_flags, bool use_own_buffers)
|
void do_qemu_set_log(int log_flags, bool use_own_buffers)
|
||||||
{
|
{
|
||||||
const char *fname = logfilename ?: DEFAULT_LOGFILENAME;
|
const char *fname = logfilename ?: DEFAULT_LOGFILENAME;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void qemu_set_log_filename(const char *filename)
|
||||||
fclose(qemu_logfile);
|
fclose(qemu_logfile);
|
||||||
qemu_logfile = NULL;
|
qemu_logfile = NULL;
|
||||||
}
|
}
|
||||||
cpu_set_log(qemu_loglevel);
|
qemu_set_log(qemu_loglevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
const CPULogItem cpu_log_items[] = {
|
const CPULogItem cpu_log_items[] = {
|
||||||
|
|
|
@ -6854,7 +6854,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
|
||||||
#else
|
#else
|
||||||
/* start debug */
|
/* start debug */
|
||||||
tb_flush(env);
|
tb_flush(env);
|
||||||
cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
|
qemu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -888,7 +888,7 @@ static void tcg_target_init(TCGContext *s)
|
||||||
#if defined(CONFIG_DEBUG_TCG_INTERPRETER)
|
#if defined(CONFIG_DEBUG_TCG_INTERPRETER)
|
||||||
const char *envval = getenv("DEBUG_TCG");
|
const char *envval = getenv("DEBUG_TCG");
|
||||||
if (envval) {
|
if (envval) {
|
||||||
cpu_set_log(strtol(envval, NULL, 0));
|
qemu_set_log(strtol(envval, NULL, 0));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue