Deleted Added
sdiff udiff text old ( 13570:b6484720c6a9 ) new ( 13988:d579f9c76531 )
full compact
1/*
2 * Copyright (c) 2003-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;

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

27 *
28 * Authors: Ali Saidi
29 */
30
31#include "arch/sparc/solaris/process.hh"
32
33#include "arch/sparc/isa_traits.hh"
34#include "arch/sparc/registers.hh"
35#include "base/loader/object_file.hh"
36#include "base/trace.hh"
37#include "cpu/thread_context.hh"
38#include "kern/solaris/solaris.hh"
39#include "sim/process.hh"
40#include "sim/syscall_desc.hh"
41#include "sim/syscall_emul.hh"
42
43using namespace std;
44using namespace SparcISA;
45
46namespace
47{
48
49class SparcSolarisObjectFileLoader : public ObjectFile::Loader
50{
51 public:
52 Process *
53 load(ProcessParams *params, ObjectFile *obj_file) override
54 {
55 auto arch = obj_file->getArch();
56 auto opsys = obj_file->getOpSys();
57
58 if (arch != ObjectFile::SPARC64 && arch != ObjectFile::SPARC32)
59 return nullptr;
60
61 if (opsys != ObjectFile::Solaris)
62 return nullptr;
63
64 return new SparcSolarisProcess(params, obj_file);
65 }
66};
67
68SparcSolarisObjectFileLoader loader;
69
70} // anonymous namespace
71
72
73/// Target uname() handler.
74static SyscallReturn
75unameFunc(SyscallDesc *desc, int callnum, Process *process,
76 ThreadContext *tc)
77{
78 int index = 0;
79 TypedBufferArg<Solaris::utsname> name(process->getSyscallArg(tc, index));
80

--- 290 unchanged lines hidden ---