stacktrace.cc (8706:b1838faf3bcc) stacktrace.cc (8775:1e3ca5d77b53)
1/*
2 * Copyright (c) 2004-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/mips/isa_traits.hh"
34#include "arch/mips/stacktrace.hh"
35#include "arch/mips/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) 2004-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/mips/isa_traits.hh"
34#include "arch/mips/stacktrace.hh"
35#include "arch/mips/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 "sim/system.hh"
41
42using namespace std;
43using namespace MipsISA;
44
45ProcessInfo::ProcessInfo(ThreadContext *_tc) : tc(_tc)
46{}
47
48Addr
49ProcessInfo::task(Addr ksp) const
50{
51 Addr base = ksp & ~0x3fff;
52 if (base == ULL(0xfffffc0000000000))
53 return 0;
54
55 Addr tsk;
56
41#include "sim/system.hh"
42
43using namespace std;
44using namespace MipsISA;
45
46ProcessInfo::ProcessInfo(ThreadContext *_tc) : tc(_tc)
47{}
48
49Addr
50ProcessInfo::task(Addr ksp) const
51{
52 Addr base = ksp & ~0x3fff;
53 if (base == ULL(0xfffffc0000000000))
54 return 0;
55
56 Addr tsk;
57
57 FSTranslatingPortProxy* vp;
58 VirtualPort *vp;
58
59
59 vp = tc->getVirtProxy();
60 vp = tc->getVirtPort();
60 tsk = vp->readGtoH<Addr>(base + task_off);
61
62 return tsk;
63}
64
65int
66ProcessInfo::pid(Addr ksp) const
67{
68 Addr task = this->task(ksp);
69 if (!task)
70 return -1;
71
72 uint16_t pd;
73
61 tsk = vp->readGtoH<Addr>(base + task_off);
62
63 return tsk;
64}
65
66int
67ProcessInfo::pid(Addr ksp) const
68{
69 Addr task = this->task(ksp);
70 if (!task)
71 return -1;
72
73 uint16_t pd;
74
74 FSTranslatingPortProxy* vp;
75 VirtualPort *vp;
75
76
76 vp = tc->getVirtProxy();
77 vp = tc->getVirtPort();
77 pd = vp->readGtoH<uint16_t>(task + pid_off);
78
79 return pd;
80}
81
82string
83ProcessInfo::name(Addr ksp) const
84{

--- 152 unchanged lines hidden ---
78 pd = vp->readGtoH<uint16_t>(task + pid_off);
79
80 return pd;
81}
82
83string
84ProcessInfo::name(Addr ksp) const
85{

--- 152 unchanged lines hidden ---