summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-11-09 14:27:40 -0600
committerBrandon Potter <brandon.potter@amd.com>2016-11-09 14:27:40 -0600
commit1ced08c85055d5da845ca549c0f5fcea65ee3e08 (patch)
treed0e6b2bbd69b07281a35ac561697a1b145591042 /src/arch
parent7a8dda49a4ec33be17bbd101ebd68e02562b9c3d (diff)
downloadgem5-1ced08c85055d5da845ca549c0f5fcea65ee3e08.tar.xz
syscall_emul: [patch 2/22] move SyscallDesc into its own .hh and .cc
The class was crammed into syscall_emul.hh which has tons of forward declarations and template definitions. To clean it up a bit, moved the class into separate files and commented the class with doxygen style comments. Also, provided some encapsulation by adding some accessors and a mutator. The syscallreturn.hh file was renamed syscall_return.hh to make it consistent with other similarly named files in the src/sim directory. The DPRINTF_SYSCALL macro was moved into its own header file with the include the Base and Verbose flags as well. --HG-- rename : src/sim/syscallreturn.hh => src/sim/syscall_return.hh
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/alpha/linux/process.cc1
-rw-r--r--src/arch/arm/freebsd/process.cc1
-rw-r--r--src/arch/arm/linux/process.cc1
-rw-r--r--src/arch/mips/linux/process.cc1
-rw-r--r--src/arch/power/linux/process.cc1
-rw-r--r--src/arch/riscv/linux/process.cc1
-rw-r--r--src/arch/sparc/linux/process.cc1
-rw-r--r--src/arch/sparc/linux/syscalls.cc1
-rw-r--r--src/arch/sparc/solaris/process.cc1
-rw-r--r--src/arch/x86/linux/process.cc5
-rw-r--r--src/arch/x86/process.cc2
11 files changed, 13 insertions, 3 deletions
diff --git a/src/arch/alpha/linux/process.cc b/src/arch/alpha/linux/process.cc
index 9a26bb9b8..c5e25c4d1 100644
--- a/src/arch/alpha/linux/process.cc
+++ b/src/arch/alpha/linux/process.cc
@@ -38,6 +38,7 @@
#include "debug/SyscallVerbose.hh"
#include "kern/linux/linux.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
using namespace std;
diff --git a/src/arch/arm/freebsd/process.cc b/src/arch/arm/freebsd/process.cc
index c2a6b38b0..266bab8bf 100644
--- a/src/arch/arm/freebsd/process.cc
+++ b/src/arch/arm/freebsd/process.cc
@@ -45,6 +45,7 @@
#include "cpu/thread_context.hh"
#include "kern/freebsd/freebsd.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 67f25893b..36a628d52 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -52,6 +52,7 @@
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index deb6e8b80..170a3edcc 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -40,6 +40,7 @@
#include "kern/linux/linux.hh"
#include "sim/eventq.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc
index f9c424cea..b39027dee 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -40,6 +40,7 @@
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/riscv/linux/process.cc b/src/arch/riscv/linux/process.cc
index 7884b83b2..c6c61c751 100644
--- a/src/arch/riscv/linux/process.cc
+++ b/src/arch/riscv/linux/process.cc
@@ -44,6 +44,7 @@
#include "kern/linux/linux.hh"
#include "sim/eventq.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/sparc/linux/process.cc b/src/arch/sparc/linux/process.cc
index fd4dd9818..a95498ea0 100644
--- a/src/arch/sparc/linux/process.cc
+++ b/src/arch/sparc/linux/process.cc
@@ -38,6 +38,7 @@
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
using namespace std;
diff --git a/src/arch/sparc/linux/syscalls.cc b/src/arch/sparc/linux/syscalls.cc
index 66e8e1fe1..33140f1b8 100644
--- a/src/arch/sparc/linux/syscalls.cc
+++ b/src/arch/sparc/linux/syscalls.cc
@@ -29,6 +29,7 @@
*/
#include "arch/sparc/linux/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
class LiveProcess;
diff --git a/src/arch/sparc/solaris/process.cc b/src/arch/sparc/solaris/process.cc
index 38159720a..b26d37fe7 100644
--- a/src/arch/sparc/solaris/process.cc
+++ b/src/arch/sparc/solaris/process.cc
@@ -36,6 +36,7 @@
#include "cpu/thread_context.hh"
#include "kern/solaris/solaris.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
using namespace std;
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 88bb20483..e4221511d 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -46,6 +46,7 @@
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
#include "sim/process.hh"
+#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
using namespace std;
@@ -159,7 +160,7 @@ setThreadArea32Func(SyscallDesc *desc, int callnum,
return -EFAULT;
if (!gdt.copyIn(tc->getMemProxy()))
- panic("Failed to copy in GDT for %s.\n", desc->name);
+ panic("Failed to copy in GDT for %s.\n", desc->name());
if (userDesc->entry_number == (uint32_t)(-1)) {
// Find a free TLS entry.
@@ -213,7 +214,7 @@ setThreadArea32Func(SyscallDesc *desc, int callnum,
if (!userDesc.copyOut(tc->getMemProxy()))
return -EFAULT;
if (!gdt.copyOut(tc->getMemProxy()))
- panic("Failed to copy out GDT for %s.\n", desc->name);
+ panic("Failed to copy out GDT for %s.\n", desc->name());
return 0;
}
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 3a347e509..116304fb4 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -58,7 +58,7 @@
#include "mem/multi_level_page_table.hh"
#include "mem/page_table.hh"
#include "sim/process_impl.hh"
-#include "sim/syscall_emul.hh"
+#include "sim/syscall_desc.hh"
#include "sim/system.hh"
using namespace std;