remote_gdb.cc (3550:515e876568b4) remote_gdb.cc (3579:e9976b62c259)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

136#include "sim/system.hh"
137
138using namespace std;
139using namespace TheISA;
140
141RemoteGDB::RemoteGDB(System *_system, ThreadContext *c)
142 : BaseRemoteGDB(_system, c, KGDB_NUMREGS)
143{
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

136#include "sim/system.hh"
137
138using namespace std;
139using namespace TheISA;
140
141RemoteGDB::RemoteGDB(System *_system, ThreadContext *c)
142 : BaseRemoteGDB(_system, c, KGDB_NUMREGS)
143{
144 memset(gdbregs.regs, 0, gdbregs.size);
144 memset(gdbregs.regs, 0, gdbregs.bytes());
145}
146
147///////////////////////////////////////////////////////////
148// RemoteGDB::acc
149//
150// Determine if the mapping at va..(va+len) is valid.
151//
152bool

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

196///////////////////////////////////////////////////////////
197// RemoteGDB::getregs
198//
199// Translate the kernel debugger register format into
200// the GDB register format.
201void
202RemoteGDB::getregs()
203{
145}
146
147///////////////////////////////////////////////////////////
148// RemoteGDB::acc
149//
150// Determine if the mapping at va..(va+len) is valid.
151//
152bool

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

196///////////////////////////////////////////////////////////
197// RemoteGDB::getregs
198//
199// Translate the kernel debugger register format into
200// the GDB register format.
201void
202RemoteGDB::getregs()
203{
204 memset(gdbregs.regs, 0, gdbregs.size);
204 memset(gdbregs.regs, 0, gdbregs.bytes());
205
206 gdbregs.regs[KGDB_REG_PC] = context->readPC();
207
208 // @todo: Currently this is very Alpha specific.
209 if (AlphaISA::PcPAL(gdbregs.regs[KGDB_REG_PC])) {
210 for (int i = 0; i < TheISA::NumIntArchRegs; ++i) {
211 gdbregs.regs[i] = context->readIntReg(AlphaISA::reg_redir[i]);
212 }

--- 97 unchanged lines hidden ---
205
206 gdbregs.regs[KGDB_REG_PC] = context->readPC();
207
208 // @todo: Currently this is very Alpha specific.
209 if (AlphaISA::PcPAL(gdbregs.regs[KGDB_REG_PC])) {
210 for (int i = 0; i < TheISA::NumIntArchRegs; ++i) {
211 gdbregs.regs[i] = context->readIntReg(AlphaISA::reg_redir[i]);
212 }

--- 97 unchanged lines hidden ---