remote_gdb.hh revision 10601
16019Shines@cs.fsu.edu/* 210595Sgabeblack@google.com * Copyright 2014 Google, Inc. 310037SARM gem5 Developers * Copyright (c) 2013 ARM Limited 410037SARM gem5 Developers * All rights reserved 510037SARM gem5 Developers * 610037SARM gem5 Developers * The license below extends only to copyright in the software and shall 710037SARM gem5 Developers * not be construed as granting a license to any other intellectual 810037SARM gem5 Developers * property including but not limited to intellectual property relating 910037SARM gem5 Developers * to a hardware implementation of the functionality of the software 1010037SARM gem5 Developers * licensed hereunder. You may use the software subject to the license 1110037SARM gem5 Developers * terms below provided that you ensure that this notice is replicated 1210037SARM gem5 Developers * unmodified and in its entirety in all distributions of the software, 1310037SARM gem5 Developers * modified or unmodified, in source code or in binary form. 1410037SARM gem5 Developers * 156019Shines@cs.fsu.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan 166019Shines@cs.fsu.edu * Copyright (c) 2007-2008 The Florida State University 176019Shines@cs.fsu.edu * All rights reserved. 186019Shines@cs.fsu.edu * 196019Shines@cs.fsu.edu * Redistribution and use in source and binary forms, with or without 206019Shines@cs.fsu.edu * modification, are permitted provided that the following conditions are 216019Shines@cs.fsu.edu * met: redistributions of source code must retain the above copyright 226019Shines@cs.fsu.edu * notice, this list of conditions and the following disclaimer; 236019Shines@cs.fsu.edu * redistributions in binary form must reproduce the above copyright 246019Shines@cs.fsu.edu * notice, this list of conditions and the following disclaimer in the 256019Shines@cs.fsu.edu * documentation and/or other materials provided with the distribution; 266019Shines@cs.fsu.edu * neither the name of the copyright holders nor the names of its 276019Shines@cs.fsu.edu * contributors may be used to endorse or promote products derived from 286019Shines@cs.fsu.edu * this software without specific prior written permission. 296019Shines@cs.fsu.edu * 306019Shines@cs.fsu.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 316019Shines@cs.fsu.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 326019Shines@cs.fsu.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 336019Shines@cs.fsu.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 346019Shines@cs.fsu.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 356019Shines@cs.fsu.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 366019Shines@cs.fsu.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 376019Shines@cs.fsu.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 386019Shines@cs.fsu.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 396019Shines@cs.fsu.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 406019Shines@cs.fsu.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 416019Shines@cs.fsu.edu * 426019Shines@cs.fsu.edu * Authors: Nathan Binkert 436019Shines@cs.fsu.edu * Stephen Hines 446019Shines@cs.fsu.edu */ 456019Shines@cs.fsu.edu 466019Shines@cs.fsu.edu#ifndef __ARCH_ARM_REMOTE_GDB_HH__ 476019Shines@cs.fsu.edu#define __ARCH_ARM_REMOTE_GDB_HH__ 486019Shines@cs.fsu.edu 4910595Sgabeblack@google.com#include <algorithm> 5010595Sgabeblack@google.com 516019Shines@cs.fsu.edu#include "base/remote_gdb.hh" 526019Shines@cs.fsu.edu 537752SWilliam.Wang@arm.comclass System; 547752SWilliam.Wang@arm.comclass ThreadContext; 557752SWilliam.Wang@arm.com 566019Shines@cs.fsu.edunamespace ArmISA 576019Shines@cs.fsu.edu{ 5810037SARM gem5 Developers 5910037SARM gem5 Developers// AArch32 registers with vfpv3/neon 6010595Sgabeblack@google.comenum { 6110595Sgabeblack@google.com GDB32_R0 = 0, 6210595Sgabeblack@google.com GDB32_CPSR = 16, 6310595Sgabeblack@google.com GDB32_F0 = 17, 6410595Sgabeblack@google.com GDB32_FPSCR = 81, 6510595Sgabeblack@google.com GDB32_NUMREGS = 82 6610595Sgabeblack@google.com}; 676019Shines@cs.fsu.edu 6810037SARM gem5 Developers// AArch64 registers 6910595Sgabeblack@google.comenum { 7010595Sgabeblack@google.com GDB64_X0 = 0, 7110595Sgabeblack@google.com GDB64_PC = 32, 7210595Sgabeblack@google.com GDB64_CPSR = 33, 7310595Sgabeblack@google.com GDB64_V0 = 34, 7410595Sgabeblack@google.com GDB64_V0_32 = 2 * GDB64_V0, 7510595Sgabeblack@google.com GDB64_NUMREGS = 98 7610595Sgabeblack@google.com}; 7710037SARM gem5 Developers 7810595Sgabeblack@google.comconst int GDB_REG_BYTES = std::max(GDB64_NUMREGS * sizeof(uint64_t), 7910595Sgabeblack@google.com GDB32_NUMREGS * sizeof(uint32_t)); 8010037SARM gem5 Developers 817752SWilliam.Wang@arm.comclass RemoteGDB : public BaseRemoteGDB 827752SWilliam.Wang@arm.com{ 8310601Sgabeblack@google.com protected: 8410601Sgabeblack@google.com bool acc(Addr addr, size_t len); 8510601Sgabeblack@google.com bool write(Addr addr, size_t size, const char *data); 866019Shines@cs.fsu.edu 8710601Sgabeblack@google.com void getregs(); 8810601Sgabeblack@google.com void setregs(); 896019Shines@cs.fsu.edu 9010601Sgabeblack@google.com public: 9110601Sgabeblack@google.com RemoteGDB(System *_system, ThreadContext *tc); 927752SWilliam.Wang@arm.com}; 937752SWilliam.Wang@arm.com} // namespace ArmISA 946019Shines@cs.fsu.edu 956019Shines@cs.fsu.edu#endif /* __ARCH_ARM_REMOTE_GDB_H__ */ 96