stacktrace.cc (14018:9d2153431f44) stacktrace.cc (14020:c9bf7a011602)
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;

--- 33 unchanged lines hidden (view full) ---

42#include "sim/system.hh"
43
44namespace ArmISA
45{
46
47static int32_t
48readSymbol(ThreadContext *tc, const std::string name)
49{
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;

--- 33 unchanged lines hidden (view full) ---

42#include "sim/system.hh"
43
44namespace ArmISA
45{
46
47static int32_t
48readSymbol(ThreadContext *tc, const std::string name)
49{
50 FSTranslatingPortProxy &vp = tc->getVirtProxy();
50 PortProxy &vp = tc->getVirtProxy();
51 SymbolTable *symtab = tc->getSystemPtr()->kernelSymtab;
52
53 Addr addr;
54 if (!symtab->findAddress(name, addr))
55 panic("thread info not compiled into kernel\n");
56
57 return vp.read<int32_t>(addr, GuestByteOrder);
58}

--- 11 unchanged lines hidden (view full) ---

70ProcessInfo::task(Addr ksp) const
71{
72 Addr base = ksp & ~0x1fff;
73 if (base == ULL(0xffffffffc0000000))
74 return 0;
75
76 Addr tsk;
77
51 SymbolTable *symtab = tc->getSystemPtr()->kernelSymtab;
52
53 Addr addr;
54 if (!symtab->findAddress(name, addr))
55 panic("thread info not compiled into kernel\n");
56
57 return vp.read<int32_t>(addr, GuestByteOrder);
58}

--- 11 unchanged lines hidden (view full) ---

70ProcessInfo::task(Addr ksp) const
71{
72 Addr base = ksp & ~0x1fff;
73 if (base == ULL(0xffffffffc0000000))
74 return 0;
75
76 Addr tsk;
77
78 FSTranslatingPortProxy &vp = tc->getVirtProxy();
78 PortProxy &vp = tc->getVirtProxy();
79 tsk = vp.read<Addr>(base + task_off, GuestByteOrder);
80
81 return tsk;
82}
83
84int
85ProcessInfo::pid(Addr ksp) const
86{
87 Addr task = this->task(ksp);
88 if (!task)
89 return -1;
90
91 uint16_t pd;
92
79 tsk = vp.read<Addr>(base + task_off, GuestByteOrder);
80
81 return tsk;
82}
83
84int
85ProcessInfo::pid(Addr ksp) const
86{
87 Addr task = this->task(ksp);
88 if (!task)
89 return -1;
90
91 uint16_t pd;
92
93 FSTranslatingPortProxy &vp = tc->getVirtProxy();
93 PortProxy &vp = tc->getVirtProxy();
94 pd = vp.read<uint16_t>(task + pid_off, GuestByteOrder);
95
96 return pd;
97}
98
99std::string
100ProcessInfo::name(Addr ksp) const
101{

--- 71 unchanged lines hidden ---
94 pd = vp.read<uint16_t>(task + pid_off, GuestByteOrder);
95
96 return pd;
97}
98
99std::string
100ProcessInfo::name(Addr ksp) const
101{

--- 71 unchanged lines hidden ---