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;

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

116 * "Stub" to allow remote cpu to debug over a serial line using gdb.
117 */
118
119#include <sys/signal.h>
120
121#include <string>
122#include <unistd.h>
123
124#include "config/full_system.hh"
125#if FULL_SYSTEM
126#include "arch/alpha/vtophys.hh"
127#endif
128
129#include "arch/alpha/kgdb.h"
130#include "arch/alpha/utility.hh"
131#include "arch/alpha/remote_gdb.hh"
126#include "arch/vtophys.hh"
132#include "base/intmath.hh"
133#include "base/remote_gdb.hh"
134#include "base/socket.hh"
135#include "base/trace.hh"
131#include "config/full_system.hh"
136#include "cpu/thread_context.hh"
137#include "cpu/static_inst.hh"
138#include "mem/physical.hh"
139#include "mem/port.hh"
140#include "sim/system.hh"
141
142using namespace std;
143using namespace TheISA;

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

151///////////////////////////////////////////////////////////
152// RemoteGDB::acc
153//
154// Determine if the mapping at va..(va+len) is valid.
155//
156bool
157RemoteGDB::acc(Addr va, size_t len)
158{
159#if !FULL_SYSTEM
160 panic("acc function needs to be rewritten for SE mode\n");
161#else
162 Addr last_va;
163
164 va = TheISA::TruncPage(va);
165 last_va = TheISA::RoundPage(va + len);
166
167 do {
168 if (TheISA::IsK0Seg(va)) {
169 if (va < (TheISA::K0SegBase + pmem->size())) {

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

193 DPRINTF(GDBAcc, "acc: %#x pte is invalid\n", va);
194 return false;
195 }
196 va += TheISA::PageBytes;
197 } while (va < last_va);
198
199 DPRINTF(GDBAcc, "acc: %#x mapping is valid\n", va);
200 return true;
201#endif
202}
203
204///////////////////////////////////////////////////////////
205// RemoteGDB::getregs
206//
207// Translate the kernel debugger register format into
208// the GDB register format.
209void

--- 108 unchanged lines hidden ---