Deleted Added
sdiff udiff text old ( 8706:b1838faf3bcc ) new ( 8783:8cd08c045cab )
full compact
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;

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

117 */
118
119#include <sys/signal.h>
120#include <unistd.h>
121
122#include <cstdio>
123#include <string>
124
125#include "config/full_system.hh"
126
127#if FULL_SYSTEM
128#include "arch/vtophys.hh"
129#include "mem/fs_translating_port_proxy.hh"
130#endif
131
132#include "base/intmath.hh"
133#include "base/remote_gdb.hh"
134#include "base/socket.hh"
135#include "base/trace.hh"
136#include "config/the_isa.hh"
137#include "cpu/static_inst.hh"
138#include "cpu/thread_context.hh"
139#include "debug/GDBAll.hh"
140#include "mem/port.hh"
141#include "mem/se_translating_port_proxy.hh"
142#include "sim/system.hh"
143
144using namespace std;
145using namespace Debug;
146using namespace TheISA;
147
148#ifndef NDEBUG
149vector<BaseRemoteGDB *> debuggers;

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

459
460 if (vaddr < 10) {
461 DPRINTF(GDBRead, "read: reading memory location zero!\n");
462 vaddr = lastaddr + lastsize;
463 }
464
465 DPRINTF(GDBRead, "read: addr=%#x, size=%d", vaddr, size);
466
467#if FULL_SYSTEM
468 FSTranslatingPortProxy *port = context->getVirtProxy();
469#else
470 SETranslatingPortProxy *port = context->getMemProxy();
471#endif
472 port->readBlob(vaddr, (uint8_t*)data, size);
473
474#if TRACING_ON
475 if (DTRACE(GDBRead)) {
476 if (DTRACE(GDBExtra)) {
477 char buf[1024];
478 mem2hex(buf, data, size);
479 DPRINTFNR(": %s\n", buf);
480 } else

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

501 DPRINTFN("write: addr=%#x, size=%d", vaddr, size);
502 if (DTRACE(GDBExtra)) {
503 char buf[1024];
504 mem2hex(buf, data, size);
505 DPRINTFNR(": %s\n", buf);
506 } else
507 DPRINTFNR("\n");
508 }
509#if FULL_SYSTEM
510 FSTranslatingPortProxy *port = context->getVirtProxy();
511#else
512 SETranslatingPortProxy *port = context->getMemProxy();
513#endif
514 port->writeBlob(vaddr, (uint8_t*)data, size);
515#if !FULL_SYSTEM
516 delete port;
517#endif
518
519 return true;
520}
521
522PCEventQueue *BaseRemoteGDB::getPcEventQueue()
523{
524 return &system->pcEventQueue;
525}

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

643 bool ret;
644
645 if (!attached)
646 return false;
647
648 bufferSize = gdbregs.bytes() * 2 + 256;
649 buffer = (char*)malloc(bufferSize);
650
651 DPRINTF(GDBMisc, "trap: PC=%s\n", context->pcState());
652
653 clearSingleStep();
654
655 /*
656 * The first entry to this function is normally through
657 * a breakpoint trap in kgdb_connect(), in which case we
658 * must advance past the breakpoint because gdb will not.
659 *

--- 365 unchanged lines hidden ---