remote_gdb.hh revision 10595:25ecfc14f73f
12810SN/A/*
212724Snikos.nikoleris@arm.com * Copyright 2014 Google, Inc.
38856Sandreas.hansson@arm.com * Copyright (c) 2007 The Regents of The University of Michigan
48856Sandreas.hansson@arm.com * All rights reserved.
58856Sandreas.hansson@arm.com *
68856Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without
78856Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are
88856Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright
98856Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer;
108856Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright
118856Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the
128856Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution;
138856Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its
142810SN/A * contributors may be used to endorse or promote products derived from
152810SN/A * this software without specific prior written permission.
162810SN/A *
172810SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182810SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192810SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202810SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212810SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222810SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232810SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242810SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252810SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262810SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272810SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282810SN/A *
292810SN/A * Authors: Nathan Binkert
302810SN/A */
312810SN/A
322810SN/A#ifndef __ARCH_MIPS_REMOTE_GDB_HH__
332810SN/A#define __ARCH_MIPS_REMOTE_GDB_HH__
342810SN/A
352810SN/A#include "arch/mips/registers.hh"
362810SN/A#include "base/bitfield.hh"
372810SN/A#include "base/remote_gdb.hh"
382810SN/A
392810SN/Aclass System;
402810SN/Aclass ThreadContext;
4112724Snikos.nikoleris@arm.com
422810SN/Anamespace MipsISA
432810SN/A{
442810SN/A
452810SN/A    // The number of special regs depends on gdb.
462810SN/A    const int GdbIntArchRegs = NumIntArchRegs;
472810SN/A    const int GdbIntSpecialRegs = 6;
482810SN/A    const int GdbFloatArchRegs = NumFloatArchRegs;
4911486Snikos.nikoleris@arm.com    const int GdbFloatSpecialRegs = 2;
5011486Snikos.nikoleris@arm.com
5112724Snikos.nikoleris@arm.com    const int GdbIntRegs = GdbIntArchRegs + GdbIntSpecialRegs;
5212724Snikos.nikoleris@arm.com    const int GdbFloatRegs = GdbFloatArchRegs + GdbFloatSpecialRegs;
538232Snate@binkert.org    const int GdbNumRegs = GdbIntRegs + GdbFloatRegs;
5412724Snikos.nikoleris@arm.com
5513222Sodanrc@yahoo.com.br    class RemoteGDB : public BaseRemoteGDB
5612724Snikos.nikoleris@arm.com    {
5711486Snikos.nikoleris@arm.com      protected:
5812724Snikos.nikoleris@arm.com        Addr notTakenBkpt;
5912724Snikos.nikoleris@arm.com        Addr takenBkpt;
6012724Snikos.nikoleris@arm.com
6113352Snikos.nikoleris@arm.com      public:
6212724Snikos.nikoleris@arm.com        RemoteGDB(System *_system, ThreadContext *tc);
6312724Snikos.nikoleris@arm.com
6412724Snikos.nikoleris@arm.com      protected:
6512724Snikos.nikoleris@arm.com        bool acc(Addr addr, size_t len);
662810SN/A
672810SN/A        void getregs();
682810SN/A        void setregs();
698856Sandreas.hansson@arm.com
708856Sandreas.hansson@arm.com        void clearSingleStep();
718856Sandreas.hansson@arm.com        void setSingleStep();
728922Swilliam.wang@arm.com    };
7312084Sspwilson2@wisc.edu}
7412084Sspwilson2@wisc.edu
758856Sandreas.hansson@arm.com#endif /* __ARCH_MIPS_REMOTE_GDB_H__ */
768856Sandreas.hansson@arm.com