remote_gdb.cc (2665:a124942bacb8) remote_gdb.cc (2680:246e7104f744)
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;

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

123
124#include "arch/vtophys.hh"
125#include "base/intmath.hh"
126#include "base/kgdb.h"
127#include "base/remote_gdb.hh"
128#include "base/socket.hh"
129#include "base/trace.hh"
130#include "config/full_system.hh"
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;

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

123
124#include "arch/vtophys.hh"
125#include "base/intmath.hh"
126#include "base/kgdb.h"
127#include "base/remote_gdb.hh"
128#include "base/socket.hh"
129#include "base/trace.hh"
130#include "config/full_system.hh"
131#include "cpu/exec_context.hh"
131#include "cpu/thread_context.hh"
132#include "cpu/static_inst.hh"
133#include "mem/physical.hh"
134#include "mem/port.hh"
135#include "sim/system.hh"
136
137using namespace std;
138using namespace TheISA;
139

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

247RemoteGDB::Event::process(int revent)
248{
249 if (revent & POLLIN)
250 gdb->trap(ALPHA_KENTRY_IF);
251 else if (revent & POLLNVAL)
252 gdb->detach();
253}
254
132#include "cpu/static_inst.hh"
133#include "mem/physical.hh"
134#include "mem/port.hh"
135#include "sim/system.hh"
136
137using namespace std;
138using namespace TheISA;
139

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

247RemoteGDB::Event::process(int revent)
248{
249 if (revent & POLLIN)
250 gdb->trap(ALPHA_KENTRY_IF);
251 else if (revent & POLLNVAL)
252 gdb->detach();
253}
254
255RemoteGDB::RemoteGDB(System *_system, ExecContext *c)
255RemoteGDB::RemoteGDB(System *_system, ThreadContext *c)
256 : event(NULL), listener(NULL), number(-1), fd(-1),
257 active(false), attached(false),
258 system(_system), pmem(_system->physmem), context(c)
259{
260 memset(gdbregs, 0, sizeof(gdbregs));
261}
262
263RemoteGDB::~RemoteGDB()

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

699RemoteGDB::HardBreakpoint::HardBreakpoint(RemoteGDB *_gdb, Addr pc)
700 : PCEvent(_gdb->getPcEventQueue(), "HardBreakpoint Event", pc),
701 gdb(_gdb), refcount(0)
702{
703 DPRINTF(GDBMisc, "creating hardware breakpoint at %#x\n", evpc);
704}
705
706void
256 : event(NULL), listener(NULL), number(-1), fd(-1),
257 active(false), attached(false),
258 system(_system), pmem(_system->physmem), context(c)
259{
260 memset(gdbregs, 0, sizeof(gdbregs));
261}
262
263RemoteGDB::~RemoteGDB()

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

699RemoteGDB::HardBreakpoint::HardBreakpoint(RemoteGDB *_gdb, Addr pc)
700 : PCEvent(_gdb->getPcEventQueue(), "HardBreakpoint Event", pc),
701 gdb(_gdb), refcount(0)
702{
703 DPRINTF(GDBMisc, "creating hardware breakpoint at %#x\n", evpc);
704}
705
706void
707RemoteGDB::HardBreakpoint::process(ExecContext *xc)
707RemoteGDB::HardBreakpoint::process(ThreadContext *tc)
708{
709 DPRINTF(GDBMisc, "handling hardware breakpoint at %#x\n", pc());
710
708{
709 DPRINTF(GDBMisc, "handling hardware breakpoint at %#x\n", pc());
710
711 if (xc == gdb->context)
711 if (tc == gdb->context)
712 gdb->trap(ALPHA_KENTRY_INT);
713}
714
715bool
716RemoteGDB::insertSoftBreak(Addr addr, size_t len)
717{
718 if (len != sizeof(MachInst))
719 panic("invalid length\n");

--- 458 unchanged lines hidden ---
712 gdb->trap(ALPHA_KENTRY_INT);
713}
714
715bool
716RemoteGDB::insertSoftBreak(Addr addr, size_t len)
717{
718 if (len != sizeof(MachInst))
719 panic("invalid length\n");

--- 458 unchanged lines hidden ---