openpic: don't crash on a register access without a CPU context
commitc3203fa5b2c17a1c446e44c87788fef21b4af5f4
authorScott Wood <scottwood@freescale.com>
Thu, 13 Dec 2012 16:12:02 +0000 (13 16:12 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 7 Jan 2013 16:37:09 +0000 (7 17:37 +0100)
tree59917bb41d525abe83acc3e41e60a93840645fa7
parenta26a7b38331dc14893a66fbe78f34afab153d6b2
openpic: don't crash on a register access without a CPU context

If we access a register via the QEMU memory inspection commands (e.g.
"xp") rather than from guest code, we won't have a CPU context.
Gracefully fail to access the register in that case, rather than
crashing.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/openpic.c