Deleted Added
sdiff udiff text old ( 10589:5962812f80fe ) new ( 10597:bd68c6838b9f )
full compact
1/*
2 * Copyright 2014 Google, Inc.
3 * Copyright (c) 2002-2005 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright

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

125#include <string>
126
127#include "arch/vtophys.hh"
128#include "base/intmath.hh"
129#include "base/remote_gdb.hh"
130#include "base/socket.hh"
131#include "base/trace.hh"
132#include "config/the_isa.hh"
133#include "cpu/base.hh"
134#include "cpu/static_inst.hh"
135#include "cpu/thread_context.hh"
136#include "debug/GDBAll.hh"
137#include "mem/port.hh"
138#include "mem/fs_translating_port_proxy.hh"
139#include "mem/se_translating_port_proxy.hh"
140#include "sim/full_system.hh"
141#include "sim/system.hh"

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

243
244BaseRemoteGDB::Event::Event(BaseRemoteGDB *g, int fd, int e)
245 : PollEvent(fd, e), gdb(g)
246{}
247
248void
249BaseRemoteGDB::Event::process(int revent)
250{
251 BaseCPU *cpu = gdb->context->getCpuPtr();
252 EventQueue *eq = cpu->comInstEventQueue[gdb->context->threadId()];
253 if (revent & POLLIN) {
254 gdb->trapEvent.type(SIGILL);
255 // Here "ticks" aren't simulator ticks which measure time, they're
256 // instructions committed by the CPU.
257 eq->schedule(&gdb->trapEvent, eq->getCurTick());
258 } else if (revent & POLLNVAL) {
259 if (gdb->trapEvent.scheduled())
260 eq->deschedule(&gdb->trapEvent);
261 gdb->detach();
262 }
263}
264
265void
266BaseRemoteGDB::TrapEvent::process()
267{
268 gdb->trap(_type);
269}
270
271BaseRemoteGDB::BaseRemoteGDB(System *_system, ThreadContext *c, size_t cacheSize)
272 : event(NULL), trapEvent(this), listener(NULL), number(-1), fd(-1),
273 active(false), attached(false),
274 system(_system), context(c),
275 gdbregs(cacheSize)
276{
277 memset(gdbregs.regs, 0, gdbregs.bytes());
278}
279
280BaseRemoteGDB::~BaseRemoteGDB()

--- 763 unchanged lines hidden ---