stacktrace.cc revision 10417
19241Sandreas.hansson@arm.com/*
29241Sandreas.hansson@arm.com * Copyright (c) 2005 The Regents of The University of Michigan
39241Sandreas.hansson@arm.com * All rights reserved.
49241Sandreas.hansson@arm.com *
59241Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without
69241Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are
79241Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright
89241Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer;
99241Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright
109241Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the
119241Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution;
129241Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its
139241Sandreas.hansson@arm.com * contributors may be used to endorse or promote products derived from
149241Sandreas.hansson@arm.com * this software without specific prior written permission.
159241Sandreas.hansson@arm.com *
169241Sandreas.hansson@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
179241Sandreas.hansson@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
189241Sandreas.hansson@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
199241Sandreas.hansson@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
209241Sandreas.hansson@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
219241Sandreas.hansson@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
229241Sandreas.hansson@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
239241Sandreas.hansson@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
249241Sandreas.hansson@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
259241Sandreas.hansson@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
269241Sandreas.hansson@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
279241Sandreas.hansson@arm.com *
289241Sandreas.hansson@arm.com * Authors: Nathan Binkert
299241Sandreas.hansson@arm.com */
309241Sandreas.hansson@arm.com
319241Sandreas.hansson@arm.com#include <string>
329241Sandreas.hansson@arm.com
339241Sandreas.hansson@arm.com#include "arch/power/stacktrace.hh"
349241Sandreas.hansson@arm.com#include "base/trace.hh"
359241Sandreas.hansson@arm.com
369241Sandreas.hansson@arm.comusing namespace std;
379241Sandreas.hansson@arm.com
389241Sandreas.hansson@arm.comnamespace PowerISA {
399241Sandreas.hansson@arm.com
409241Sandreas.hansson@arm.comProcessInfo::ProcessInfo(ThreadContext *_tc)
419241Sandreas.hansson@arm.com{
429241Sandreas.hansson@arm.com    panic("ProcessInfo constructor not implemented.\n");
439241Sandreas.hansson@arm.com}
449241Sandreas.hansson@arm.com
459241Sandreas.hansson@arm.comAddr
469241Sandreas.hansson@arm.comProcessInfo::task(Addr ksp) const
47{
48    panic("ProcessInfo::task not implemented.\n");
49    return 0;
50}
51
52int
53ProcessInfo::pid(Addr ksp) const
54{
55    panic("ProcessInfo::pid not implemented.\n");
56    return 0;
57}
58
59string
60ProcessInfo::name(Addr ksp) const
61{
62    panic("ProcessInfo::name not implemented.\n");
63    return "";
64}
65
66StackTrace::StackTrace()
67    : tc(0), stack(64)
68{
69    panic("StackTrace constructor not implemented.\n");
70}
71
72StackTrace::StackTrace(ThreadContext *_tc, const StaticInstPtr &inst)
73    : tc(0), stack(64)
74{
75    panic("StackTrace constructor not implemented.\n");
76}
77
78StackTrace::~StackTrace()
79{
80    panic("StackTrace destructor not implemented.\n");
81}
82
83void
84StackTrace::trace(ThreadContext *_tc, bool is_call)
85{
86    panic("StackTrace::trace not implemented.\n");
87}
88
89bool
90StackTrace::isEntry(Addr addr)
91{
92    panic("StackTrace::isEntry not implemented.\n");
93    return false;
94}
95
96bool
97StackTrace::decodeStack(MachInst inst, int &disp)
98{
99    panic("StackTrace::decodeStack not implemented.\n");
100    return false;
101}
102
103bool
104StackTrace::decodeSave(MachInst inst, int &reg, int &disp)
105{
106    panic("StackTrace::decodeSave not implemented.\n");
107    return true;
108}
109
110/*
111 * Decode the function prologue for the function we're in, and note
112 * which registers are stored where, and how large the stack frame is.
113 */
114bool
115StackTrace::decodePrologue(Addr sp, Addr callpc, Addr func, int &size,
116                           Addr &ra)
117{
118    panic("StackTrace::decodePrologue not implemented.\n");
119    return true;
120}
121
122#if TRACING_ON
123void
124StackTrace::dump()
125{
126    panic("StackTrace::dump not implemented.\n");
127}
128#endif
129
130} // namespace PowerISA
131