remote_gdb.hh revision 4161:3147493a5c6b
16145Snate@binkert.org/*
26145Snate@binkert.org * Copyright (c) 2007 The Hewlett-Packard Development Company
36145Snate@binkert.org * All rights reserved.
46145Snate@binkert.org *
56145Snate@binkert.org * Redistribution and use of this software in source and binary forms,
66145Snate@binkert.org * with or without modification, are permitted provided that the
76145Snate@binkert.org * following conditions are met:
86145Snate@binkert.org *
96145Snate@binkert.org * The software must be used only for Non-Commercial Use which means any
106145Snate@binkert.org * use which is NOT directed to receiving any direct monetary
116145Snate@binkert.org * compensation for, or commercial advantage from such use.  Illustrative
126145Snate@binkert.org * examples of non-commercial use are academic research, personal study,
136145Snate@binkert.org * teaching, education and corporate research & development.
146145Snate@binkert.org * Illustrative examples of commercial use are distributing products for
156145Snate@binkert.org * commercial advantage and providing services using the software for
166145Snate@binkert.org * commercial advantage.
176145Snate@binkert.org *
186145Snate@binkert.org * If you wish to use this software or functionality therein that may be
196145Snate@binkert.org * covered by patents for commercial use, please contact:
206145Snate@binkert.org *     Director of Intellectual Property Licensing
216145Snate@binkert.org *     Office of Strategy and Technology
226145Snate@binkert.org *     Hewlett-Packard Company
236145Snate@binkert.org *     1501 Page Mill Road
246145Snate@binkert.org *     Palo Alto, California  94304
256145Snate@binkert.org *
266145Snate@binkert.org * Redistributions of source code must retain the above copyright notice,
276145Snate@binkert.org * this list of conditions and the following disclaimer.  Redistributions
286145Snate@binkert.org * in binary form must reproduce the above copyright notice, this list of
296154Snate@binkert.org * conditions and the following disclaimer in the documentation and/or
306154Snate@binkert.org * other materials provided with the distribution.  Neither the name of
316145Snate@binkert.org * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
326145Snate@binkert.org * contributors may be used to endorse or promote products derived from
336145Snate@binkert.org * this software without specific prior written permission.  No right of
347454Snate@binkert.org * sublicense is granted herewith.  Derivatives of the software and
356145Snate@binkert.org * output created using the software may be prepared, but only for
366145Snate@binkert.org * Non-Commercial Uses.  Derivatives of the software may be shared with
377039Snate@binkert.org * others provided: (i) the others agree to abide by the list of
387039Snate@binkert.org * conditions herein which includes the Non-Commercial Use restrictions;
396145Snate@binkert.org * and (ii) such Derivatives of the software include the above copyright
407039Snate@binkert.org * notice to acknowledge the contribution from this software where
416145Snate@binkert.org * applicable, this list of conditions and the disclaimer below.
426145Snate@binkert.org *
437039Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
447039Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
456145Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
467039Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
477039Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
487039Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
497039Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
506145Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
516145Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
527039Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
537039Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
546145Snate@binkert.org *
557039Snate@binkert.org * Authors: Gabe Black
567039Snate@binkert.org */
576145Snate@binkert.org
586145Snate@binkert.org#ifndef __ARCH_X86_REMOTEGDB_HH__
597039Snate@binkert.org#define __ARCH_X86_REMOTEGDB_HH__
607039Snate@binkert.org
616145Snate@binkert.org#include "arch/x86/types.hh"
627039Snate@binkert.org#include "base/remote_gdb.hh"
637039Snate@binkert.org
647039Snate@binkert.orgclass System;
657039Snate@binkert.orgclass ThreadContext;
666145Snate@binkert.org
676145Snate@binkert.orgnamespace X86ISA
687039Snate@binkert.org{
697039Snate@binkert.org    class RemoteGDB : public BaseRemoteGDB
706145Snate@binkert.org    {
717039Snate@binkert.org      protected:
726145Snate@binkert.org        enum RegisterContants
736145Snate@binkert.org        {
747039Snate@binkert.org            NumGDBRegs
757039Snate@binkert.org            //XXX fill this in
766145Snate@binkert.org        };
777039Snate@binkert.org
787039Snate@binkert.org      public:
797039Snate@binkert.org        RemoteGDB(System *system, ThreadContext *context);
807039Snate@binkert.org
816145Snate@binkert.org        bool acc(Addr addr, size_t len);
826145Snate@binkert.org
837039Snate@binkert.org      protected:
847039Snate@binkert.org        void getregs();
856145Snate@binkert.org        void setregs();
867039Snate@binkert.org
877039Snate@binkert.org        void clearSingleStep();
887039Snate@binkert.org        void setSingleStep();
896145Snate@binkert.org
906145Snate@binkert.org        Addr nextBkpt;
917039Snate@binkert.org    };
927039Snate@binkert.org}
936145Snate@binkert.org
947039Snate@binkert.org#endif // __ARCH_X86_REMOTEGDB_HH__
957039Snate@binkert.org