stacktrace.hh revision 7706
12246SN/A/*
22246SN/A * Copyright (c) 2005 The Regents of The University of Michigan
32246SN/A * All rights reserved.
42246SN/A *
52246SN/A * Redistribution and use in source and binary forms, with or without
62246SN/A * modification, are permitted provided that the following conditions are
72246SN/A * met: redistributions of source code must retain the above copyright
82246SN/A * notice, this list of conditions and the following disclaimer;
92246SN/A * redistributions in binary form must reproduce the above copyright
102246SN/A * notice, this list of conditions and the following disclaimer in the
112246SN/A * documentation and/or other materials provided with the distribution;
122246SN/A * neither the name of the copyright holders nor the names of its
132246SN/A * contributors may be used to endorse or promote products derived from
142246SN/A * this software without specific prior written permission.
152246SN/A *
162246SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172246SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182246SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192246SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202246SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212246SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222246SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232246SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242246SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252246SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262246SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Nathan Binkert
292246SN/A */
302246SN/A
312977Sgblack@eecs.umich.edu#ifndef __ARCH_SPARC_STACKTRACE_HH__
322977Sgblack@eecs.umich.edu#define __ARCH_SPARC_STACKTRACE_HH__
332246SN/A
347706Sgblack@eecs.umich.edu#include <vector>
357706Sgblack@eecs.umich.edu
367706Sgblack@eecs.umich.edu#include "base/types.hh"
372246SN/A#include "cpu/static_inst.hh"
382246SN/A
392680Sktlim@umich.educlass ThreadContext;
403570Sgblack@eecs.umich.edunamespace SparcISA
413570Sgblack@eecs.umich.edu{
427706Sgblack@eecs.umich.edu    class StackTrace
433570Sgblack@eecs.umich.edu    {
443570Sgblack@eecs.umich.edu      private:
457706Sgblack@eecs.umich.edu        std::vector<Addr> stack;
462246SN/A
473570Sgblack@eecs.umich.edu      public:
487706Sgblack@eecs.umich.edu        bool trace(ThreadContext *tc, StaticInstPtr inst)
497706Sgblack@eecs.umich.edu        {
507706Sgblack@eecs.umich.edu            panic("StackTrace::trace not implemented for SPARC.\n");
517706Sgblack@eecs.umich.edu            return false;
527706Sgblack@eecs.umich.edu        }
532246SN/A
547706Sgblack@eecs.umich.edu        const std::vector<Addr> &getstack() const { return stack; }
552246SN/A
563570Sgblack@eecs.umich.edu      public:
573570Sgblack@eecs.umich.edu        void dprintf() {}
583570Sgblack@eecs.umich.edu    };
592246SN/A}
602246SN/A
612977Sgblack@eecs.umich.edu#endif // __ARCH_SPARC_STACKTRACE_HH__
62