syscall_desc.cc (11877:5ea85692a53e) syscall_desc.cc (11994:211df6a05c5e)
1/*
2 * Copyright (c) 2016 Advanced Micro Devices, Inc.
3 * Copyright (c) 2003-2005 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

49SyscallDesc::doSyscall(int callnum, Process *process, ThreadContext *tc,
50 Fault *fault)
51{
52 TheISA::IntReg arg[6] M5_VAR_USED;
53
54 /**
55 * Step through the first six parameters for the system call and
56 * retrieve their values. Note that index is incremented as a
1/*
2 * Copyright (c) 2016 Advanced Micro Devices, Inc.
3 * Copyright (c) 2003-2005 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

49SyscallDesc::doSyscall(int callnum, Process *process, ThreadContext *tc,
50 Fault *fault)
51{
52 TheISA::IntReg arg[6] M5_VAR_USED;
53
54 /**
55 * Step through the first six parameters for the system call and
56 * retrieve their values. Note that index is incremented as a
57 * side-effect of the getSyscallArg method which is why the LHS
58 * needs the "-1".
57 * side-effect of the getSyscallArg method.
59 */
58 */
60 for (int index = 0; index < 6; )
61 arg[index - 1] = process->getSyscallArg(tc, index);
59 int index = 0;
60 for (int i = 0; i < 6; i++)
61 arg[i] = process->getSyscallArg(tc, index);
62
63 /**
64 * Linux supports up to six system call arguments through registers
65 * so we want to print all six. Check to the relevant man page to
66 * verify how many are actually used by a given system call.
67 */
68 DPRINTF_SYSCALL(Base, "%s called w/arguments %d, %d, %d, %d, %d, %d\n",
69 _name, arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]);

--- 26 unchanged lines hidden ---
62
63 /**
64 * Linux supports up to six system call arguments through registers
65 * so we want to print all six. Check to the relevant man page to
66 * verify how many are actually used by a given system call.
67 */
68 DPRINTF_SYSCALL(Base, "%s called w/arguments %d, %d, %d, %d, %d, %d\n",
69 _name, arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]);

--- 26 unchanged lines hidden ---