summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'cpu')
-rw-r--r--cpu/base_cpu.cc4
-rw-r--r--cpu/base_cpu.hh2
-rw-r--r--cpu/exetrace.cc14
3 files changed, 15 insertions, 5 deletions
diff --git a/cpu/base_cpu.cc b/cpu/base_cpu.cc
index 367662f25..73fb3e7fa 100644
--- a/cpu/base_cpu.cc
+++ b/cpu/base_cpu.cc
@@ -202,7 +202,7 @@ BaseCPU::post_interrupt(int int_num, int index)
if (int_num < 0 || int_num >= NumInterruptLevels)
panic("int_num out of bounds\n");
- if (index < 0 || index >= sizeof(uint8_t) * 8)
+ if (index < 0 || index >= sizeof(uint64_t) * 8)
panic("int_num out of bounds\n");
AlphaISA::check_interrupts = 1;
@@ -218,7 +218,7 @@ BaseCPU::clear_interrupt(int int_num, int index)
if (int_num < 0 || int_num >= NumInterruptLevels)
panic("int_num out of bounds\n");
- if (index < 0 || index >= sizeof(uint8_t) * 8)
+ if (index < 0 || index >= sizeof(uint64_t) * 8)
panic("int_num out of bounds\n");
interrupts[int_num] &= ~(1 << index);
diff --git a/cpu/base_cpu.hh b/cpu/base_cpu.hh
index 648035732..0041ecc99 100644
--- a/cpu/base_cpu.hh
+++ b/cpu/base_cpu.hh
@@ -48,7 +48,7 @@ class BaseCPU : public SimObject
#ifdef FULL_SYSTEM
protected:
Tick frequency;
- uint8_t interrupts[NumInterruptLevels];
+ uint64_t interrupts[NumInterruptLevels];
uint64_t intstatus;
public:
diff --git a/cpu/exetrace.cc b/cpu/exetrace.cc
index 3e8877e93..4d3a70f37 100644
--- a/cpu/exetrace.cc
+++ b/cpu/exetrace.cc
@@ -48,11 +48,12 @@ using namespace std;
//
-const SymbolTable *debugSymbolTable = NULL;
+SymbolTable *debugSymbolTable = NULL;
void
Trace::InstRecord::dump(ostream &outs)
{
+
if (flags[PRINT_CYCLE])
ccprintf(outs, "%7d: ", cycle);
@@ -64,7 +65,16 @@ Trace::InstRecord::dump(ostream &outs)
if (flags[PRINT_THREAD_NUM])
outs << "T" << thread << " : ";
- outs << "0x" << hex << PC << " : ";
+
+ std::string str;
+ if(debugSymbolTable->findSymbol(PC, str))
+ outs << "@" << setw(17) << str << " : ";
+ else if(debugSymbolTable->findSymbol(PC - 4, str))
+ outs << "@" << setw(15) << str << "+4 : ";
+ else if(debugSymbolTable->findSymbol(PC - 8, str))
+ outs << "@" << setw(15) << str << "+8 : ";
+ else
+ outs << "0x" << hex << PC << " : ";
//
// Print decoded instruction