faults.cc (11793:ef606668d247) faults.cc (12372:fd63af762679)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 30 unchanged lines hidden (view full) ---

39 *
40 * Authors: Gabe Black
41 */
42
43#include "arch/x86/faults.hh"
44
45#include "arch/x86/generated/decoder.hh"
46#include "arch/x86/isa_traits.hh"
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 30 unchanged lines hidden (view full) ---

39 *
40 * Authors: Gabe Black
41 */
42
43#include "arch/x86/faults.hh"
44
45#include "arch/x86/generated/decoder.hh"
46#include "arch/x86/isa_traits.hh"
47#include "base/loader/symtab.hh"
47#include "base/trace.hh"
48#include "cpu/thread_context.hh"
49#include "debug/Faults.hh"
50#include "sim/full_system.hh"
51
52namespace X86ISA
53{
54 void X86FaultBase::invoke(ThreadContext * tc, const StaticInstPtr &inst)

--- 101 unchanged lines hidden (view full) ---

156 PageFaultErrorCode code = errorCode;
157 const char *modeStr = "";
158 if (code.fetch)
159 modeStr = "execute";
160 else if (code.write)
161 modeStr = "write";
162 else
163 modeStr = "read";
48#include "base/trace.hh"
49#include "cpu/thread_context.hh"
50#include "debug/Faults.hh"
51#include "sim/full_system.hh"
52
53namespace X86ISA
54{
55 void X86FaultBase::invoke(ThreadContext * tc, const StaticInstPtr &inst)

--- 101 unchanged lines hidden (view full) ---

157 PageFaultErrorCode code = errorCode;
158 const char *modeStr = "";
159 if (code.fetch)
160 modeStr = "execute";
161 else if (code.write)
162 modeStr = "write";
163 else
164 modeStr = "read";
164 panic("Tried to %s unmapped address %#x.\n", modeStr, addr);
165
166 // print information about what we are panic'ing on
167 if (!inst) {
168 panic("Tried to %s unmapped address %#x.\n", modeStr, addr);
169 } else {
170 panic("Tried to %s unmapped address %#x.\nPC: %#x, Instr: %s",
171 modeStr, addr, tc->pcState().pc(),
172 inst->disassemble(tc->pcState().pc(), debugSymbolTable));
173 }
165 }
166 }
167
168 std::string
169 PageFault::describe() const
170 {
171 std::stringstream ss;
172 ccprintf(ss, "%s at %#x", X86FaultBase::describe(), addr);

--- 141 unchanged lines hidden ---
174 }
175 }
176
177 std::string
178 PageFault::describe() const
179 {
180 std::stringstream ss;
181 ccprintf(ss, "%s at %#x", X86FaultBase::describe(), addr);

--- 141 unchanged lines hidden ---