diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-04-21 15:00:23 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-04-21 15:00:23 -0700 |
commit | 29329e61b7ca28e14173fb01fdc21396a5507b5d (patch) | |
tree | bd49960b8920181e649c1f21df38f7882a87609c | |
parent | 7aa57ac882507f00fded32539dc1adb6998e89ad (diff) | |
download | gem5-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.
-rw-r--r-- | src/arch/x86/system.cc | 3 |
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"); |