gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
stacktrace.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #include "arch/power/stacktrace.hh"
30 
31 #include <string>
32 
33 #include "base/trace.hh"
34 
35 using namespace std;
36 
37 namespace PowerISA {
38 
39 ProcessInfo::ProcessInfo(ThreadContext *_tc)
40 {
41  panic("ProcessInfo constructor not implemented.\n");
42 }
43 
44 Addr
45 ProcessInfo::task(Addr ksp) const
46 {
47  panic("ProcessInfo::task not implemented.\n");
48  return 0;
49 }
50 
51 int
52 ProcessInfo::pid(Addr ksp) const
53 {
54  panic("ProcessInfo::pid not implemented.\n");
55  return 0;
56 }
57 
58 string
60 {
61  panic("ProcessInfo::name not implemented.\n");
62  return "";
63 }
64 
65 StackTrace::StackTrace()
66  : tc(0), stack(64)
67 {
68  panic("StackTrace constructor not implemented.\n");
69 }
70 
72  : tc(0), stack(64)
73 {
74  panic("StackTrace constructor not implemented.\n");
75 }
76 
78 {
79  panic("StackTrace destructor not implemented.\n");
80 }
81 
82 void
83 StackTrace::trace(ThreadContext *_tc, bool is_call)
84 {
85  panic("StackTrace::trace not implemented.\n");
86 }
87 
88 bool
90 {
91  panic("StackTrace::isEntry not implemented.\n");
92  return false;
93 }
94 
95 bool
97 {
98  panic("StackTrace::decodeStack not implemented.\n");
99  return false;
100 }
101 
102 bool
103 StackTrace::decodeSave(MachInst inst, int &reg, int &disp)
104 {
105  panic("StackTrace::decodeSave not implemented.\n");
106  return true;
107 }
108 
109 /*
110  * Decode the function prologue for the function we're in, and note
111  * which registers are stored where, and how large the stack frame is.
112  */
113 bool
114 StackTrace::decodePrologue(Addr sp, Addr callpc, Addr func, int &size,
115  Addr &ra)
116 {
117  panic("StackTrace::decodePrologue not implemented.\n");
118  return true;
119 }
120 
121 #if TRACING_ON
122 void
124 {
125  panic("StackTrace::dump not implemented.\n");
126 }
127 #endif
128 
129 } // namespace PowerISA
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:163
Bitfield< 5, 3 > reg
Definition: types.hh:87
const std::string & name()
Definition: trace.cc:50
bool decodeStack(MachInst inst, int &disp)
Definition: stacktrace.cc:96
ip6_addr_t addr
Definition: inet.hh:330
Bitfield< 0 > sp
Overload hash function for BasicBlockRange type.
Definition: vec_reg.hh:587
ThreadContext is the external interface to all thread state for anything outside of the CPU...
bool decodeSave(MachInst inst, int &reg, int &disp)
Definition: stacktrace.cc:103
void trace(ThreadContext *tc, bool is_call)
Definition: stacktrace.cc:83
uint32_t MachInst
Definition: types.hh:39
bool isEntry(Addr addr)
Definition: stacktrace.cc:89
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:140
Bitfield< 20, 16 > ra
Definition: types.hh:45
std::vector< Addr > stack
Definition: stacktrace.hh:58
Bitfield< 17, 16 > stack
Definition: misc.hh:587
bool decodePrologue(Addr sp, Addr callpc, Addr func, int &size, Addr &ra)
Definition: stacktrace.cc:114
ThreadContext * tc
Definition: stacktrace.hh:57
void dump()
Dump all statistics data to the registered outputs.
Definition: statistics.cc:560

Generated on Mon Jun 8 2020 15:34:40 for gem5 by doxygen 1.8.13