[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 24/72] Avoid segfault in cpu_dump_state
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 24/72] Avoid segfault in cpu_dump_state |
Date: |
Sun, 24 Jun 2012 01:06:48 +0200 |
From: Fabien Chouteau <address@hidden>
Do not call cpu_dump_state if logfile is NULL.
Signed-off-by: Fabien Chouteau <address@hidden>
[agraf: adjust to inline functions]
Signed-off-by: Alexander Graf <address@hidden>
---
qemu-log.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/qemu-log.h b/qemu-log.h
index 40f8b7b..2ed19d1 100644
--- a/qemu-log.h
+++ b/qemu-log.h
@@ -69,7 +69,9 @@ void GCC_FMT_ATTR(2, 3) qemu_log_mask(int mask, const char
*fmt, ...);
/* cpu_dump_state() logging functions: */
static inline void log_cpu_state(CPUArchState *env1, int flags)
{
- cpu_dump_state(env1, qemu_logfile, fprintf, flags);
+ if (qemu_log_enabled()) {
+ cpu_dump_state(env1, qemu_logfile, fprintf, flags);
+ }
}
static inline void log_cpu_state_mask(int mask, CPUArchState *env1, int flags)
--
1.6.0.2
- [Qemu-ppc] [PATCH 15/72] ppc: Split off timebase helpers, (continued)
- [Qemu-ppc] [PATCH 15/72] ppc: Split off timebase helpers, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 22/72] ppc: Make hbrev table const, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 03/72] ppc: Avoid AREG0 for exception helpers, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 16/72] ppc: Avoid AREG0 for timebase helpers, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 14/72] ppc: Cleanup MMU merge, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 09/72] ppc: Avoid AREG0 for integer and vector helpers, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 17/72] ppc: Split off misc helpers, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 04/72] ppc: Fix coding style in helper.c, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 25/72] booke_206_tlbwe: Discard invalid bits in MAS2, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 23/72] PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 24/72] Avoid segfault in cpu_dump_state,
Alexander Graf <=
- [Qemu-ppc] [PATCH 28/72] spapr_vscsi: Error handling fixes, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 20/72] ppc: Move load and store helpers, switch to AREG0 free mode, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 31/72] dt: allow add_subnode to create root subnodes, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 34/72] dt: temporarily disable subtree creation failure check, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 37/72] dt: add helper for phandle allocation, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 38/72] dt: add helper for 64bit cell adds, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 41/72] PPC: e500: dt: create /cpus node dynamically, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 26/72] ppc64: Rudimentary Support for extra page sizes on server CPUs, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 40/72] PPC: e500: dt: create memory node dynamically, Alexander Graf, 2012/06/23
- [Qemu-ppc] [PATCH 27/72] pseries: Correctly create ibm, segment-page-sizes property, Alexander Graf, 2012/06/23