remote_gdb.cc (3579:e9976b62c259) remote_gdb.cc (3961:42374ae36922)
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
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
124#include "arch/alpha/kgdb.h"
129#include "arch/alpha/kgdb.h"
130#include "arch/alpha/utility.hh"
125#include "arch/alpha/remote_gdb.hh"
131#include "arch/alpha/remote_gdb.hh"
126#include "arch/vtophys.hh"
127#include "base/intmath.hh"
128#include "base/remote_gdb.hh"
129#include "base/socket.hh"
130#include "base/trace.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"
132#include "cpu/thread_context.hh"
133#include "cpu/static_inst.hh"
134#include "mem/physical.hh"
135#include "mem/port.hh"
136#include "sim/system.hh"
137
138using namespace std;
139using namespace TheISA;

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

147///////////////////////////////////////////////////////////
148// RemoteGDB::acc
149//
150// Determine if the mapping at va..(va+len) is valid.
151//
152bool
153RemoteGDB::acc(Addr va, size_t len)
154{
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
155 Addr last_va;
156
157 va = TheISA::TruncPage(va);
158 last_va = TheISA::RoundPage(va + len);
159
160 do {
161 if (TheISA::IsK0Seg(va)) {
162 if (va < (TheISA::K0SegBase + pmem->size())) {

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

186 DPRINTF(GDBAcc, "acc: %#x pte is invalid\n", va);
187 return false;
188 }
189 va += TheISA::PageBytes;
190 } while (va < last_va);
191
192 DPRINTF(GDBAcc, "acc: %#x mapping is valid\n", va);
193 return true;
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
194}
195
196///////////////////////////////////////////////////////////
197// RemoteGDB::getregs
198//
199// Translate the kernel debugger register format into
200// the GDB register format.
201void

--- 108 unchanged lines hidden ---
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 ---