stacktrace.cc (7737:f4362ffd810f) | stacktrace.cc (8706:b1838faf3bcc) |
---|---|
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; --- 23 unchanged lines hidden (view full) --- 32 33#include "arch/x86/isa_traits.hh" 34#include "arch/x86/stacktrace.hh" 35#include "arch/x86/vtophys.hh" 36#include "base/bitfield.hh" 37#include "base/trace.hh" 38#include "cpu/base.hh" 39#include "cpu/thread_context.hh" | 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; --- 23 unchanged lines hidden (view full) --- 32 33#include "arch/x86/isa_traits.hh" 34#include "arch/x86/stacktrace.hh" 35#include "arch/x86/vtophys.hh" 36#include "base/bitfield.hh" 37#include "base/trace.hh" 38#include "cpu/base.hh" 39#include "cpu/thread_context.hh" |
40#include "mem/vport.hh" | 40#include "mem/fs_translating_port_proxy.hh" |
41#include "sim/system.hh" 42 43using namespace std; 44namespace X86ISA 45{ 46 ProcessInfo::ProcessInfo(ThreadContext *_tc) 47 : tc(_tc) 48 { 49 Addr addr = 0; 50 | 41#include "sim/system.hh" 42 43using namespace std; 44namespace X86ISA 45{ 46 ProcessInfo::ProcessInfo(ThreadContext *_tc) 47 : tc(_tc) 48 { 49 Addr addr = 0; 50 |
51 VirtualPort *vp; | 51 FSTranslatingPortProxy* vp; |
52 | 52 |
53 vp = tc->getVirtPort(); | 53 vp = tc->getVirtProxy(); |
54 55 if (!tc->getSystemPtr()->kernelSymtab->findAddress("thread_info_size", addr)) 56 panic("thread info not compiled into kernel\n"); 57 thread_info_size = vp->readGtoH<int32_t>(addr); 58 59 if (!tc->getSystemPtr()->kernelSymtab->findAddress("task_struct_size", addr)) 60 panic("thread info not compiled into kernel\n"); 61 task_struct_size = vp->readGtoH<int32_t>(addr); --- 15 unchanged lines hidden (view full) --- 77 ProcessInfo::task(Addr ksp) const 78 { 79 Addr base = ksp & ~0x3fff; 80 if (base == ULL(0xfffffc0000000000)) 81 return 0; 82 83 Addr tsk; 84 | 54 55 if (!tc->getSystemPtr()->kernelSymtab->findAddress("thread_info_size", addr)) 56 panic("thread info not compiled into kernel\n"); 57 thread_info_size = vp->readGtoH<int32_t>(addr); 58 59 if (!tc->getSystemPtr()->kernelSymtab->findAddress("task_struct_size", addr)) 60 panic("thread info not compiled into kernel\n"); 61 task_struct_size = vp->readGtoH<int32_t>(addr); --- 15 unchanged lines hidden (view full) --- 77 ProcessInfo::task(Addr ksp) const 78 { 79 Addr base = ksp & ~0x3fff; 80 if (base == ULL(0xfffffc0000000000)) 81 return 0; 82 83 Addr tsk; 84 |
85 VirtualPort *vp; | 85 FSTranslatingPortProxy* vp; |
86 | 86 |
87 vp = tc->getVirtPort(); | 87 vp = tc->getVirtProxy(); |
88 tsk = vp->readGtoH<Addr>(base + task_off); 89 90 return tsk; 91 } 92 93 int 94 ProcessInfo::pid(Addr ksp) const 95 { 96 Addr task = this->task(ksp); 97 if (!task) 98 return -1; 99 100 uint16_t pd; 101 | 88 tsk = vp->readGtoH<Addr>(base + task_off); 89 90 return tsk; 91 } 92 93 int 94 ProcessInfo::pid(Addr ksp) const 95 { 96 Addr task = this->task(ksp); 97 if (!task) 98 return -1; 99 100 uint16_t pd; 101 |
102 VirtualPort *vp; | 102 FSTranslatingPortProxy* vp; |
103 | 103 |
104 vp = tc->getVirtPort(); | 104 vp = tc->getVirtProxy(); |
105 pd = vp->readGtoH<uint16_t>(task + pid_off); 106 107 return pd; 108 } 109 110 string 111 ProcessInfo::name(Addr ksp) const 112 { --- 115 unchanged lines hidden --- | 105 pd = vp->readGtoH<uint16_t>(task + pid_off); 106 107 return pd; 108 } 109 110 string 111 ProcessInfo::name(Addr ksp) const 112 { --- 115 unchanged lines hidden --- |