remote_gdb.cc revision 8931
13536Sgblack@eecs.umich.edu/*
23536Sgblack@eecs.umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan
33536Sgblack@eecs.umich.edu * All rights reserved.
43536Sgblack@eecs.umich.edu *
53536Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
63536Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
73536Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
83536Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
93536Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
103536Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
113536Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
123536Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
133536Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
143536Sgblack@eecs.umich.edu * this software without specific prior written permission.
153536Sgblack@eecs.umich.edu *
163536Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
173536Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
183536Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
193536Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
203536Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
213536Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
223536Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
233536Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
243536Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
253536Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
263536Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
273536Sgblack@eecs.umich.edu *
283536Sgblack@eecs.umich.edu * Authors: Nathan Binkert
293536Sgblack@eecs.umich.edu */
303536Sgblack@eecs.umich.edu
313536Sgblack@eecs.umich.edu/*
328332Snate@binkert.org * Copyright (c) 1990, 1993 The Regents of the University of California
338332Snate@binkert.org * All rights reserved.
343536Sgblack@eecs.umich.edu *
353536Sgblack@eecs.umich.edu * This software was developed by the Computer Systems Engineering group
363536Sgblack@eecs.umich.edu * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
373536Sgblack@eecs.umich.edu * contributed to Berkeley.
383536Sgblack@eecs.umich.edu *
393536Sgblack@eecs.umich.edu * All advertising materials mentioning features or use of this software
403536Sgblack@eecs.umich.edu * must display the following acknowledgement:
415543Ssaidi@eecs.umich.edu *      This product includes software developed by the University of
425543Ssaidi@eecs.umich.edu *      California, Lawrence Berkeley Laboratories.
433536Sgblack@eecs.umich.edu *
443536Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
453536Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions
463536Sgblack@eecs.umich.edu * are met:
473536Sgblack@eecs.umich.edu * 1. Redistributions of source code must retain the above copyright
483536Sgblack@eecs.umich.edu *    notice, this list of conditions and the following disclaimer.
493536Sgblack@eecs.umich.edu * 2. Redistributions in binary form must reproduce the above copyright
503536Sgblack@eecs.umich.edu *    notice, this list of conditions and the following disclaimer in the
513536Sgblack@eecs.umich.edu *    documentation and/or other materials provided with the distribution.
523536Sgblack@eecs.umich.edu * 3. All advertising materials mentioning features or use of this software
533536Sgblack@eecs.umich.edu *    must display the following acknowledgement:
545543Ssaidi@eecs.umich.edu *      This product includes software developed by the University of
555543Ssaidi@eecs.umich.edu *      California, Berkeley and its contributors.
563536Sgblack@eecs.umich.edu * 4. Neither the name of the University nor the names of its contributors
573536Sgblack@eecs.umich.edu *    may be used to endorse or promote products derived from this software
583536Sgblack@eecs.umich.edu *    without specific prior written permission.
593536Sgblack@eecs.umich.edu *
603536Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
613536Sgblack@eecs.umich.edu * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
623536Sgblack@eecs.umich.edu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
633536Sgblack@eecs.umich.edu * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
643536Sgblack@eecs.umich.edu * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
653536Sgblack@eecs.umich.edu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
663536Sgblack@eecs.umich.edu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
673536Sgblack@eecs.umich.edu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
683536Sgblack@eecs.umich.edu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
693536Sgblack@eecs.umich.edu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
703536Sgblack@eecs.umich.edu * SUCH DAMAGE.
713536Sgblack@eecs.umich.edu *
725543Ssaidi@eecs.umich.edu *      @(#)kgdb_stub.c 8.4 (Berkeley) 1/12/94
733536Sgblack@eecs.umich.edu */
743536Sgblack@eecs.umich.edu
753536Sgblack@eecs.umich.edu/*-
763536Sgblack@eecs.umich.edu * Copyright (c) 2001 The NetBSD Foundation, Inc.
773536Sgblack@eecs.umich.edu * All rights reserved.
783536Sgblack@eecs.umich.edu *
793536Sgblack@eecs.umich.edu * This code is derived from software contributed to The NetBSD Foundation
803536Sgblack@eecs.umich.edu * by Jason R. Thorpe.
813536Sgblack@eecs.umich.edu *
823536Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
833536Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions
843536Sgblack@eecs.umich.edu * are met:
853536Sgblack@eecs.umich.edu * 1. Redistributions of source code must retain the above copyright
863536Sgblack@eecs.umich.edu *    notice, this list of conditions and the following disclaimer.
873536Sgblack@eecs.umich.edu * 2. Redistributions in binary form must reproduce the above copyright
883536Sgblack@eecs.umich.edu *    notice, this list of conditions and the following disclaimer in the
893536Sgblack@eecs.umich.edu *    documentation and/or other materials provided with the distribution.
903536Sgblack@eecs.umich.edu * 3. All advertising materials mentioning features or use of this software
913536Sgblack@eecs.umich.edu *    must display the following acknowledgement:
925543Ssaidi@eecs.umich.edu *      This product includes software developed by the NetBSD
935543Ssaidi@eecs.umich.edu *      Foundation, Inc. and its contributors.
943536Sgblack@eecs.umich.edu * 4. Neither the name of The NetBSD Foundation nor the names of its
953536Sgblack@eecs.umich.edu *    contributors may be used to endorse or promote products derived
963536Sgblack@eecs.umich.edu *    from this software without specific prior written permission.
973536Sgblack@eecs.umich.edu *
983536Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
993536Sgblack@eecs.umich.edu * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1003536Sgblack@eecs.umich.edu * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1013536Sgblack@eecs.umich.edu * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
1023536Sgblack@eecs.umich.edu * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1033536Sgblack@eecs.umich.edu * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1043536Sgblack@eecs.umich.edu * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1053536Sgblack@eecs.umich.edu * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1063536Sgblack@eecs.umich.edu * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1073536Sgblack@eecs.umich.edu * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1083536Sgblack@eecs.umich.edu * POSSIBILITY OF SUCH DAMAGE.
1093536Sgblack@eecs.umich.edu */
1103536Sgblack@eecs.umich.edu
1113536Sgblack@eecs.umich.edu/*
1123536Sgblack@eecs.umich.edu * $NetBSD: kgdb_stub.c,v 1.8 2001/07/07 22:58:00 wdk Exp $
1133536Sgblack@eecs.umich.edu *
1143536Sgblack@eecs.umich.edu * Taken from NetBSD
1153536Sgblack@eecs.umich.edu *
1163536Sgblack@eecs.umich.edu * "Stub" to allow remote cpu to debug over a serial line using gdb.
1173536Sgblack@eecs.umich.edu */
1183536Sgblack@eecs.umich.edu
1193536Sgblack@eecs.umich.edu#include <sys/signal.h>
1205569Snate@binkert.org#include <unistd.h>
1213536Sgblack@eecs.umich.edu
1223536Sgblack@eecs.umich.edu#include <string>
1233536Sgblack@eecs.umich.edu
1243961Sgblack@eecs.umich.edu
1253550Sgblack@eecs.umich.edu#include "arch/alpha/kgdb.h"
1266327Sgblack@eecs.umich.edu#include "arch/alpha/regredir.hh"
1273550Sgblack@eecs.umich.edu#include "arch/alpha/remote_gdb.hh"
1288229Snate@binkert.org#include "arch/alpha/utility.hh"
1298780Sgblack@eecs.umich.edu#include "arch/alpha/vtophys.hh"
1303536Sgblack@eecs.umich.edu#include "base/intmath.hh"
1313536Sgblack@eecs.umich.edu#include "base/remote_gdb.hh"
1323536Sgblack@eecs.umich.edu#include "base/socket.hh"
1333536Sgblack@eecs.umich.edu#include "base/trace.hh"
1348541Sgblack@eecs.umich.edu#include "cpu/decode.hh"
1358229Snate@binkert.org#include "cpu/static_inst.hh"
1363536Sgblack@eecs.umich.edu#include "cpu/thread_context.hh"
1378232Snate@binkert.org#include "debug/GDBAcc.hh"
1388232Snate@binkert.org#include "debug/GDBMisc.hh"
1393536Sgblack@eecs.umich.edu#include "mem/physical.hh"
1403536Sgblack@eecs.umich.edu#include "mem/port.hh"
1413536Sgblack@eecs.umich.edu#include "sim/system.hh"
1428780Sgblack@eecs.umich.edu#include "sim/full_system.hh"
1433536Sgblack@eecs.umich.edu
1443536Sgblack@eecs.umich.eduusing namespace std;
1455567Snate@binkert.orgusing namespace AlphaISA;
1463536Sgblack@eecs.umich.edu
1475569Snate@binkert.orgRemoteGDB::RemoteGDB(System *_system, ThreadContext *tc)
1485569Snate@binkert.org    : BaseRemoteGDB(_system, tc, KGDB_NUMREGS)
1493536Sgblack@eecs.umich.edu{
1503579Sgblack@eecs.umich.edu    memset(gdbregs.regs, 0, gdbregs.bytes());
1513536Sgblack@eecs.umich.edu}
1523536Sgblack@eecs.umich.edu
1535569Snate@binkert.org/*
1545569Snate@binkert.org * Determine if the mapping at va..(va+len) is valid.
1555569Snate@binkert.org */
1563536Sgblack@eecs.umich.edubool
1573536Sgblack@eecs.umich.eduRemoteGDB::acc(Addr va, size_t len)
1583536Sgblack@eecs.umich.edu{
1598806Sgblack@eecs.umich.edu    if (!FullSystem)
1608806Sgblack@eecs.umich.edu        panic("acc function needs to be rewritten for SE mode\n");
1613536Sgblack@eecs.umich.edu
1628806Sgblack@eecs.umich.edu    Addr last_va;
1633536Sgblack@eecs.umich.edu
1648806Sgblack@eecs.umich.edu    va = TruncPage(va);
1658806Sgblack@eecs.umich.edu    last_va = RoundPage(va + len);
1668780Sgblack@eecs.umich.edu
1678806Sgblack@eecs.umich.edu    do  {
1688806Sgblack@eecs.umich.edu        if (IsK0Seg(va)) {
1698931Sandreas.hansson@arm.com            if (va < (K0SegBase + system->memSize())) {
1708806Sgblack@eecs.umich.edu                DPRINTF(GDBAcc, "acc:   Mapping is valid  K0SEG <= "
1718806Sgblack@eecs.umich.edu                        "%#x < K0SEG + size\n", va);
1723536Sgblack@eecs.umich.edu                return true;
1738806Sgblack@eecs.umich.edu            } else {
1748806Sgblack@eecs.umich.edu                DPRINTF(GDBAcc, "acc:   Mapping invalid %#x "
1758806Sgblack@eecs.umich.edu                        "> K0SEG + size\n", va);
1763536Sgblack@eecs.umich.edu                return false;
1773536Sgblack@eecs.umich.edu            }
1788806Sgblack@eecs.umich.edu        }
1793536Sgblack@eecs.umich.edu
1808806Sgblack@eecs.umich.edu        /**
1818806Sgblack@eecs.umich.edu         * This code says that all accesses to palcode (instruction
1828806Sgblack@eecs.umich.edu         * and data) are valid since there isn't a va->pa mapping
1838806Sgblack@eecs.umich.edu         * because palcode is accessed physically. At some point this
1848806Sgblack@eecs.umich.edu         * should probably be cleaned up but there is no easy way to
1858806Sgblack@eecs.umich.edu         * do it.
1868806Sgblack@eecs.umich.edu         */
1878806Sgblack@eecs.umich.edu
1888806Sgblack@eecs.umich.edu        if (PcPAL(va) || va < 0x10000)
1898806Sgblack@eecs.umich.edu            return true;
1908806Sgblack@eecs.umich.edu
1918806Sgblack@eecs.umich.edu        Addr ptbr = context->readMiscRegNoEffect(IPR_PALtemp20);
1928806Sgblack@eecs.umich.edu        PageTableEntry pte =
1938806Sgblack@eecs.umich.edu            kernel_pte_lookup(context->getPhysProxy(), ptbr, va);
1948806Sgblack@eecs.umich.edu        if (!pte.valid()) {
1958806Sgblack@eecs.umich.edu            DPRINTF(GDBAcc, "acc:   %#x pte is invalid\n", va);
1968806Sgblack@eecs.umich.edu            return false;
1978806Sgblack@eecs.umich.edu        }
1988806Sgblack@eecs.umich.edu        va += PageBytes;
1998806Sgblack@eecs.umich.edu    } while (va < last_va);
2008806Sgblack@eecs.umich.edu
2018806Sgblack@eecs.umich.edu    DPRINTF(GDBAcc, "acc:   %#x mapping is valid\n", va);
2028806Sgblack@eecs.umich.edu    return true;
2033536Sgblack@eecs.umich.edu}
2043536Sgblack@eecs.umich.edu
2055569Snate@binkert.org/*
2065569Snate@binkert.org * Translate the kernel debugger register format into the GDB register
2075569Snate@binkert.org * format.
2085569Snate@binkert.org */
2093536Sgblack@eecs.umich.eduvoid
2103536Sgblack@eecs.umich.eduRemoteGDB::getregs()
2113536Sgblack@eecs.umich.edu{
2123579Sgblack@eecs.umich.edu    memset(gdbregs.regs, 0, gdbregs.bytes());
2133536Sgblack@eecs.umich.edu
2147720Sgblack@eecs.umich.edu    gdbregs.regs[KGDB_REG_PC] = context->pcState().pc();
2153536Sgblack@eecs.umich.edu
2163536Sgblack@eecs.umich.edu    // @todo: Currently this is very Alpha specific.
2175568Snate@binkert.org    if (PcPAL(gdbregs.regs[KGDB_REG_PC])) {
2185568Snate@binkert.org        for (int i = 0; i < NumIntArchRegs; ++i) {
2195568Snate@binkert.org            gdbregs.regs[i] = context->readIntReg(reg_redir[i]);
2203536Sgblack@eecs.umich.edu        }
2213536Sgblack@eecs.umich.edu    } else {
2225568Snate@binkert.org        for (int i = 0; i < NumIntArchRegs; ++i) {
2233536Sgblack@eecs.umich.edu            gdbregs.regs[i] = context->readIntReg(i);
2243536Sgblack@eecs.umich.edu        }
2253536Sgblack@eecs.umich.edu    }
2263536Sgblack@eecs.umich.edu
2273536Sgblack@eecs.umich.edu#ifdef KGDB_FP_REGS
2285568Snate@binkert.org    for (int i = 0; i < NumFloatArchRegs; ++i) {
2293536Sgblack@eecs.umich.edu        gdbregs.regs[i + KGDB_REG_F0] = context->readFloatRegBits(i);
2303536Sgblack@eecs.umich.edu    }
2313536Sgblack@eecs.umich.edu#endif
2323536Sgblack@eecs.umich.edu}
2333536Sgblack@eecs.umich.edu
2345569Snate@binkert.org/*
2355569Snate@binkert.org * Translate the GDB register format into the kernel debugger register
2365569Snate@binkert.org * format.
2375569Snate@binkert.org */
2383536Sgblack@eecs.umich.eduvoid
2393536Sgblack@eecs.umich.eduRemoteGDB::setregs()
2403536Sgblack@eecs.umich.edu{
2413536Sgblack@eecs.umich.edu    // @todo: Currently this is very Alpha specific.
2425568Snate@binkert.org    if (PcPAL(gdbregs.regs[KGDB_REG_PC])) {
2435568Snate@binkert.org        for (int i = 0; i < NumIntArchRegs; ++i) {
2445568Snate@binkert.org            context->setIntReg(reg_redir[i], gdbregs.regs[i]);
2453536Sgblack@eecs.umich.edu        }
2463536Sgblack@eecs.umich.edu    } else {
2475568Snate@binkert.org        for (int i = 0; i < NumIntArchRegs; ++i) {
2483536Sgblack@eecs.umich.edu            context->setIntReg(i, gdbregs.regs[i]);
2493536Sgblack@eecs.umich.edu        }
2503536Sgblack@eecs.umich.edu    }
2513536Sgblack@eecs.umich.edu
2523536Sgblack@eecs.umich.edu#ifdef KGDB_FP_REGS
2535568Snate@binkert.org    for (int i = 0; i < NumFloatArchRegs; ++i) {
2543536Sgblack@eecs.umich.edu        context->setFloatRegBits(i, gdbregs.regs[i + KGDB_REG_F0]);
2553536Sgblack@eecs.umich.edu    }
2563536Sgblack@eecs.umich.edu#endif
2577720Sgblack@eecs.umich.edu    context->pcState(gdbregs.regs[KGDB_REG_PC]);
2583536Sgblack@eecs.umich.edu}
2593536Sgblack@eecs.umich.edu
2603536Sgblack@eecs.umich.eduvoid
2613536Sgblack@eecs.umich.eduRemoteGDB::clearSingleStep()
2623536Sgblack@eecs.umich.edu{
2633536Sgblack@eecs.umich.edu    DPRINTF(GDBMisc, "clearSingleStep bt_addr=%#x nt_addr=%#x\n",
2643550Sgblack@eecs.umich.edu            takenBkpt, notTakenBkpt);
2653536Sgblack@eecs.umich.edu
2663550Sgblack@eecs.umich.edu    if (takenBkpt != 0)
2673536Sgblack@eecs.umich.edu        clearTempBreakpoint(takenBkpt);
2683536Sgblack@eecs.umich.edu
2693550Sgblack@eecs.umich.edu    if (notTakenBkpt != 0)
2703536Sgblack@eecs.umich.edu        clearTempBreakpoint(notTakenBkpt);
2713536Sgblack@eecs.umich.edu}
2723536Sgblack@eecs.umich.edu
2733536Sgblack@eecs.umich.eduvoid
2743536Sgblack@eecs.umich.eduRemoteGDB::setSingleStep()
2753536Sgblack@eecs.umich.edu{
2767720Sgblack@eecs.umich.edu    PCState pc = context->pcState();
2777720Sgblack@eecs.umich.edu    PCState bpc;
2783536Sgblack@eecs.umich.edu    bool set_bt = false;
2793536Sgblack@eecs.umich.edu
2803536Sgblack@eecs.umich.edu    // User was stopped at pc, e.g. the instruction at pc was not
2813536Sgblack@eecs.umich.edu    // executed.
2827720Sgblack@eecs.umich.edu    MachInst inst = read<MachInst>(pc.pc());
2838541Sgblack@eecs.umich.edu    StaticInstPtr si = context->getDecoderPtr()->decode(inst, pc.pc());
2843536Sgblack@eecs.umich.edu    if (si->hasBranchTarget(pc, context, bpc)) {
2853536Sgblack@eecs.umich.edu        // Don't bother setting a breakpoint on the taken branch if it
2863536Sgblack@eecs.umich.edu        // is the same as the next pc
2877720Sgblack@eecs.umich.edu        if (bpc.pc() != pc.npc())
2883536Sgblack@eecs.umich.edu            set_bt = true;
2893536Sgblack@eecs.umich.edu    }
2903536Sgblack@eecs.umich.edu
2913536Sgblack@eecs.umich.edu    DPRINTF(GDBMisc, "setSingleStep bt_addr=%#x nt_addr=%#x\n",
2923550Sgblack@eecs.umich.edu            takenBkpt, notTakenBkpt);
2933536Sgblack@eecs.umich.edu
2947720Sgblack@eecs.umich.edu    setTempBreakpoint(notTakenBkpt = pc.npc());
2953536Sgblack@eecs.umich.edu
2963536Sgblack@eecs.umich.edu    if (set_bt)
2977720Sgblack@eecs.umich.edu        setTempBreakpoint(takenBkpt = bpc.pc());
2983536Sgblack@eecs.umich.edu}
2993536Sgblack@eecs.umich.edu
3003536Sgblack@eecs.umich.edu// Write bytes to kernel address space for debugger.
3013536Sgblack@eecs.umich.edubool
3023536Sgblack@eecs.umich.eduRemoteGDB::write(Addr vaddr, size_t size, const char *data)
3033536Sgblack@eecs.umich.edu{
3043536Sgblack@eecs.umich.edu    if (BaseRemoteGDB::write(vaddr, size, data)) {
3053536Sgblack@eecs.umich.edu#ifdef IMB
3063536Sgblack@eecs.umich.edu        alpha_pal_imb();
3073536Sgblack@eecs.umich.edu#endif
3083536Sgblack@eecs.umich.edu        return true;
3093536Sgblack@eecs.umich.edu    } else {
3103536Sgblack@eecs.umich.edu        return false;
3113536Sgblack@eecs.umich.edu    }
3123536Sgblack@eecs.umich.edu}
3133536Sgblack@eecs.umich.edu
3148700Ssteve.reinhardt@amd.com
3158700Ssteve.reinhardt@amd.combool
3168700Ssteve.reinhardt@amd.comRemoteGDB::insertHardBreak(Addr addr, size_t len)
3178700Ssteve.reinhardt@amd.com{
3188700Ssteve.reinhardt@amd.com    warn_once("Breakpoints do not work in Alpha PAL mode.\n"
3198700Ssteve.reinhardt@amd.com              "      See PCEventQueue::doService() in cpu/pc_event.cc.\n");
3208700Ssteve.reinhardt@amd.com    return BaseRemoteGDB::insertHardBreak(addr, len);
3218700Ssteve.reinhardt@amd.com}
322