remote_gdb.hh revision 4138:373dae42897c
14120Sgblack@eecs.umich.edu/* 24120Sgblack@eecs.umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan 34120Sgblack@eecs.umich.edu * All rights reserved. 44120Sgblack@eecs.umich.edu * 57087Snate@binkert.org * Redistribution and use in source and binary forms, with or without 67087Snate@binkert.org * modification, are permitted provided that the following conditions are 77087Snate@binkert.org * met: redistributions of source code must retain the above copyright 87087Snate@binkert.org * notice, this list of conditions and the following disclaimer; 97087Snate@binkert.org * redistributions in binary form must reproduce the above copyright 107087Snate@binkert.org * notice, this list of conditions and the following disclaimer in the 117087Snate@binkert.org * documentation and/or other materials provided with the distribution; 127087Snate@binkert.org * neither the name of the copyright holders nor the names of its 134120Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 147087Snate@binkert.org * this software without specific prior written permission. 157087Snate@binkert.org * 167087Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 177087Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 187087Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 197087Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 207087Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 217087Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 224120Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 237087Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 244120Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 254120Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 264120Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 274120Sgblack@eecs.umich.edu * 284120Sgblack@eecs.umich.edu * Authors: Nathan Binkert 294120Sgblack@eecs.umich.edu */ 304120Sgblack@eecs.umich.edu 314120Sgblack@eecs.umich.edu#ifndef __ARCH_SPARC_REMOTE_GDB_HH__ 324120Sgblack@eecs.umich.edu#define __ARCH_SPARC_REMOTE_GDB_HH__ 334120Sgblack@eecs.umich.edu 344120Sgblack@eecs.umich.edu#include <map> 354120Sgblack@eecs.umich.edu 364120Sgblack@eecs.umich.edu#include "arch/sparc/types.hh" 374120Sgblack@eecs.umich.edu#include "base/remote_gdb.hh" 384120Sgblack@eecs.umich.edu#include "cpu/pc_event.hh" 394120Sgblack@eecs.umich.edu#include "base/pollevent.hh" 404120Sgblack@eecs.umich.edu 414120Sgblack@eecs.umich.educlass System; 424120Sgblack@eecs.umich.educlass ThreadContext; 435086Sgblack@eecs.umich.educlass PhysicalMemory; 444120Sgblack@eecs.umich.edu 455086Sgblack@eecs.umich.edunamespace SparcISA 465086Sgblack@eecs.umich.edu{ 475086Sgblack@eecs.umich.edu class RemoteGDB : public BaseRemoteGDB 485086Sgblack@eecs.umich.edu { 495086Sgblack@eecs.umich.edu protected: 505086Sgblack@eecs.umich.edu enum RegisterConstants 515086Sgblack@eecs.umich.edu { 525086Sgblack@eecs.umich.edu RegG0 = 0, RegO0 = 8, RegL0 = 16, RegI0 = 24, 535086Sgblack@eecs.umich.edu RegF0 = 32, 545086Sgblack@eecs.umich.edu RegPc = 64, RegNpc, RegState, RegFsr, RegFprs, RegY, 555086Sgblack@eecs.umich.edu /*RegState contains data in same format as tstate */ 565086Sgblack@eecs.umich.edu Reg32Y = 64, Reg32Psr = 65, Reg32Tbr = 66, Reg32Pc = 67, 575086Sgblack@eecs.umich.edu Reg32Npc = 68, Reg32Fsr = 69, Reg32Csr = 70, 584120Sgblack@eecs.umich.edu NumGDBRegs = RegY 594120Sgblack@eecs.umich.edu }; 605086Sgblack@eecs.umich.edu 615086Sgblack@eecs.umich.edu public: 625086Sgblack@eecs.umich.edu RemoteGDB(System *system, ThreadContext *context); 635086Sgblack@eecs.umich.edu 645086Sgblack@eecs.umich.edu bool acc(Addr addr, size_t len); 655086Sgblack@eecs.umich.edu 665086Sgblack@eecs.umich.edu protected: 675086Sgblack@eecs.umich.edu void getregs(); 685086Sgblack@eecs.umich.edu void setregs(); 695086Sgblack@eecs.umich.edu 705086Sgblack@eecs.umich.edu void clearSingleStep(); 715086Sgblack@eecs.umich.edu void setSingleStep(); 724120Sgblack@eecs.umich.edu 73 Addr nextBkpt; 74 }; 75} 76 77#endif /* __ARCH_SPARC_REMOTE_GDB_H__ */ 78