stacktrace.cc (3570:aacc19068f25) | stacktrace.cc (4172:141705d83494) |
---|---|
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; --- 132 unchanged lines hidden (view full) --- 141 { 142 } 143 144 void 145 StackTrace::trace(ThreadContext *_tc, bool is_call) 146 { 147 tc = _tc; 148 | 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; --- 132 unchanged lines hidden (view full) --- 141 { 142 } 143 144 void 145 StackTrace::trace(ThreadContext *_tc, bool is_call) 146 { 147 tc = _tc; 148 |
149 bool usermode = (tc->readMiscReg(AlphaISA::IPR_DTB_CM) & 0x18) != 0; | 149 bool usermode = (tc->readMiscRegNoEffect(AlphaISA::IPR_DTB_CM) & 0x18) != 0; |
150 151 Addr pc = tc->readNextPC(); 152 bool kernel = tc->getSystemPtr()->kernelStart <= pc && 153 pc <= tc->getSystemPtr()->kernelEnd; 154 155 if (usermode) { 156 stack.push_back(user); 157 return; --- 56 unchanged lines hidden (view full) --- 214 } 215 216 panic("unwinding too far"); 217 } 218 219 bool 220 StackTrace::isEntry(Addr addr) 221 { | 150 151 Addr pc = tc->readNextPC(); 152 bool kernel = tc->getSystemPtr()->kernelStart <= pc && 153 pc <= tc->getSystemPtr()->kernelEnd; 154 155 if (usermode) { 156 stack.push_back(user); 157 return; --- 56 unchanged lines hidden (view full) --- 214 } 215 216 panic("unwinding too far"); 217 } 218 219 bool 220 StackTrace::isEntry(Addr addr) 221 { |
222 if (addr == tc->readMiscReg(AlphaISA::IPR_PALtemp12)) | 222 if (addr == tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp12)) |
223 return true; 224 | 223 return true; 224 |
225 if (addr == tc->readMiscReg(AlphaISA::IPR_PALtemp7)) | 225 if (addr == tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp7)) |
226 return true; 227 | 226 return true; 227 |
228 if (addr == tc->readMiscReg(AlphaISA::IPR_PALtemp11)) | 228 if (addr == tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp11)) |
229 return true; 230 | 229 return true; 230 |
231 if (addr == tc->readMiscReg(AlphaISA::IPR_PALtemp21)) | 231 if (addr == tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp21)) |
232 return true; 233 | 232 return true; 233 |
234 if (addr == tc->readMiscReg(AlphaISA::IPR_PALtemp9)) | 234 if (addr == tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp9)) |
235 return true; 236 | 235 return true; 236 |
237 if (addr == tc->readMiscReg(AlphaISA::IPR_PALtemp2)) | 237 if (addr == tc->readMiscRegNoEffect(AlphaISA::IPR_PALtemp2)) |
238 return true; 239 240 return false; 241 } 242 243 bool 244 StackTrace::decodeStack(MachInst inst, int &disp) 245 { --- 125 unchanged lines hidden --- | 238 return true; 239 240 return false; 241 } 242 243 bool 244 StackTrace::decodeStack(MachInst inst, int &disp) 245 { --- 125 unchanged lines hidden --- |