projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aa57ac
)
X86: Report an error if there's no kernel object, don't blindly use it.
author
Gabe Black
<gblack@eecs.umich.edu>
Sat, 21 Apr 2012 22:00:23 +0000
(15:00 -0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Sat, 21 Apr 2012 22:00:23 +0000
(15:00 -0700)
This way the user gets a nice message instead of a less nice segfault.
src/arch/x86/system.cc
patch
|
blob
|
history
diff --git
a/src/arch/x86/system.cc
b/src/arch/x86/system.cc
index effe1e99466f5a3ab3c9e2121fe9f28979fba9eb..87fb61edc1aa5f247ff7824c9896c5cd9a927a60 100644
(file)
--- 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");