remote_gdb.cc revision 10595
112953Sgabeblack@google.com/* 212953Sgabeblack@google.com * Copyright (c) 2007 The Hewlett-Packard Development Company 312953Sgabeblack@google.com * All rights reserved. 412953Sgabeblack@google.com * 512953Sgabeblack@google.com * The license below extends only to copyright in the software and shall 612953Sgabeblack@google.com * not be construed as granting a license to any other intellectual 712953Sgabeblack@google.com * property including but not limited to intellectual property relating 812953Sgabeblack@google.com * to a hardware implementation of the functionality of the software 912953Sgabeblack@google.com * licensed hereunder. You may use the software subject to the license 1012953Sgabeblack@google.com * terms below provided that you ensure that this notice is replicated 1112953Sgabeblack@google.com * unmodified and in its entirety in all distributions of the software, 1212953Sgabeblack@google.com * modified or unmodified, in source code or in binary form. 1312953Sgabeblack@google.com * 1412953Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 1512953Sgabeblack@google.com * modification, are permitted provided that the following conditions are 1612953Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 1712953Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 1812953Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1912953Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 2012953Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 2112953Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 2212953Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 2312953Sgabeblack@google.com * this software without specific prior written permission. 2412953Sgabeblack@google.com * 2512953Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2612953Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2712953Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2812953Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2912953Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3012953Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3112953Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3212953Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3313063Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3413063Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3513063Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3612957Sgabeblack@google.com * 3712957Sgabeblack@google.com * Authors: Gabe Black 3812961Sgabeblack@google.com */ 3913063Sgabeblack@google.com 4012954Sgabeblack@google.com#include <sys/signal.h> 4112954Sgabeblack@google.com#include <unistd.h> 4212953Sgabeblack@google.com 4312953Sgabeblack@google.com#include <string> 4413063Sgabeblack@google.com 4512953Sgabeblack@google.com#include "arch/x86/remote_gdb.hh" 4612961Sgabeblack@google.com#include "arch/vtophys.hh" 4712961Sgabeblack@google.com#include "base/remote_gdb.hh" 4812953Sgabeblack@google.com#include "base/socket.hh" 4912953Sgabeblack@google.com#include "base/trace.hh" 5012953Sgabeblack@google.com#include "cpu/thread_context.hh" 5113245Sgabeblack@google.com 5213245Sgabeblack@google.comusing namespace std; 5312953Sgabeblack@google.comusing namespace X86ISA; 5412954Sgabeblack@google.com 5512954Sgabeblack@google.comRemoteGDB::RemoteGDB(System *_system, ThreadContext *c) 5612954Sgabeblack@google.com : BaseRemoteGDB(_system, c, NumGDBRegs) 5712954Sgabeblack@google.com{} 5812954Sgabeblack@google.com 5912954Sgabeblack@google.combool RemoteGDB::acc(Addr va, size_t len) 6012954Sgabeblack@google.com{ 6112954Sgabeblack@google.com panic("Remote gdb acc not implemented in x86!\n"); 6212954Sgabeblack@google.com} 6312954Sgabeblack@google.com 6412954Sgabeblack@google.comvoid RemoteGDB::getregs() 6512954Sgabeblack@google.com{ 6612954Sgabeblack@google.com panic("Remote gdb getregs not implemented in x86!\n"); 6712954Sgabeblack@google.com} 6812954Sgabeblack@google.com 6912954Sgabeblack@google.comvoid RemoteGDB::setregs() 7012954Sgabeblack@google.com{ 7112954Sgabeblack@google.com panic("Remote gdb setregs not implemented in x86!\n"); 7212954Sgabeblack@google.com} 7312957Sgabeblack@google.com 7412954Sgabeblack@google.comvoid RemoteGDB::clearSingleStep() 7512954Sgabeblack@google.com{ 7612954Sgabeblack@google.com panic("Remote gdb clearSingleStep not implemented in x86!\n"); 7712954Sgabeblack@google.com} 7812954Sgabeblack@google.com 7912954Sgabeblack@google.comvoid RemoteGDB::setSingleStep() 8012954Sgabeblack@google.com{ 8112954Sgabeblack@google.com panic("Remoge gdb setSingleStep not implemented in x86!\n"); 8212954Sgabeblack@google.com} 8312954Sgabeblack@google.com