mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
qemu-log: cleanup
Don't use global variables directly but via accessor functions. Rename globals. Convert macros to functions, add GCC format attributes. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
5726c27fa9
commit
eeacee4d86
8 changed files with 166 additions and 111 deletions
|
@ -4378,8 +4378,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
|
|||
|
||||
sigsegv:
|
||||
unlock_user_struct(frame, frame_addr, 1);
|
||||
if (logfile)
|
||||
fprintf (logfile, "segfaulting from setup_frame\n");
|
||||
qemu_log("segfaulting from setup_frame\n");
|
||||
force_sig(TARGET_SIGSEGV);
|
||||
}
|
||||
|
||||
|
@ -4447,8 +4446,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
|
|||
|
||||
sigsegv:
|
||||
unlock_user_struct(rt_sf, rt_sf_addr, 1);
|
||||
if (logfile)
|
||||
fprintf (logfile, "segfaulting from setup_rt_frame\n");
|
||||
qemu_log("segfaulting from setup_rt_frame\n");
|
||||
force_sig(TARGET_SIGSEGV);
|
||||
|
||||
}
|
||||
|
@ -4489,8 +4487,7 @@ long do_sigreturn(CPUPPCState *env)
|
|||
sigsegv:
|
||||
unlock_user_struct(sr, sr_addr, 1);
|
||||
unlock_user_struct(sc, sc_addr, 1);
|
||||
if (logfile)
|
||||
fprintf (logfile, "segfaulting from do_sigreturn\n");
|
||||
qemu_log("segfaulting from do_sigreturn\n");
|
||||
force_sig(TARGET_SIGSEGV);
|
||||
return 0;
|
||||
}
|
||||
|
@ -4552,8 +4549,7 @@ long do_rt_sigreturn(CPUPPCState *env)
|
|||
|
||||
sigsegv:
|
||||
unlock_user_struct(rt_sf, rt_sf_addr, 1);
|
||||
if (logfile)
|
||||
fprintf (logfile, "segfaulting from do_rt_sigreturn\n");
|
||||
qemu_log("segfaulting from do_rt_sigreturn\n");
|
||||
force_sig(TARGET_SIGSEGV);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue