summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2012-04-21 15:00:23 -0700
committerGabe Black <gblack@eecs.umich.edu>2012-04-21 15:00:23 -0700
commit29329e61b7ca28e14173fb01fdc21396a5507b5d (patch)
treebd49960b8920181e649c1f21df38f7882a87609c /src/arch
parent7aa57ac882507f00fded32539dc1adb6998e89ad (diff)
downloadgem5-29329e61b7ca28e14173fb01fdc21396a5507b5d.tar.xz
X86: Report an error if there's no kernel object, don't blindly use it.
This way the user gets a nice message instead of a less nice segfault.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/system.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/x86/system.cc b/src/arch/x86/system.cc
index effe1e994..87fb61edc 100644
--- a/src/arch/x86/system.cc
+++ b/src/arch/x86/system.cc
@@ -114,6 +114,9 @@ X86System::initState()
{
System::initState();
+ if (!kernel)
+ fatal("No kernel to load.\n");
+
if (kernel->getArch() == ObjectFile::I386)
fatal("Loading a 32 bit x86 kernel is not supported.\n");