Deleted Added
sdiff udiff text old ( 10598:3d7653a2538b ) new ( 10599:910fc5624d68 )
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

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

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"
142
143using namespace std;
144using namespace Debug;
145using namespace TheISA;
146
147#ifndef NDEBUG
148vector<BaseRemoteGDB *> debuggers;
149
150void
151debugger()
152{

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

243
244BaseRemoteGDB::InputEvent::InputEvent(BaseRemoteGDB *g, int fd, int e)
245 : PollEvent(fd, e), gdb(g)
246{}
247
248void
249BaseRemoteGDB::InputEvent::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);

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

531 return true;
532}
533
534PCEventQueue *BaseRemoteGDB::getPcEventQueue()
535{
536 return &system->pcEventQueue;
537}
538
539bool
540BaseRemoteGDB::checkBpLen(size_t len)
541{
542 return len == sizeof(MachInst);
543}
544
545BaseRemoteGDB::HardBreakpoint::HardBreakpoint(BaseRemoteGDB *_gdb, Addr pc)
546 : PCEvent(_gdb->getPcEventQueue(), "HardBreakpoint Event", pc),

--- 497 unchanged lines hidden ---