* gennltvals.sh: Generate syscall values for d30v.
authorDoug Evans <dje@google.com>
Tue, 25 Nov 1997 08:18:57 +0000 (08:18 +0000)
committerDoug Evans <dje@google.com>
Tue, 25 Nov 1997 08:18:57 +0000 (08:18 +0000)
Use libgloss/syscall.h for sparc.
* nltvals.def: Regenerate.

sim/common/ChangeLog
sim/common/gennltvals.sh [new file with mode: 0644]
sim/common/nltvals.def [new file with mode: 0644]

index 98b8e00db4b8db54bc8dd6dbefcdb5c76b6aecd0..2b6ef9220664e2517963650e95f70a2167456b2b 100644 (file)
@@ -1,3 +1,9 @@
+Tue Nov 25 00:12:38 1997  Doug Evans  <devans@seba.cygnus.com>
+
+       * gennltvals.sh: Generate syscall values for d30v.
+       Use libgloss/syscall.h for sparc.
+       * nltvals.def: Regenerate.
+
 Mon Nov 24 18:56:07 1997  Michael Meissner  <meissner@cygnus.com>
 
        * sim-io.c (sim_io_syscalls): New function to provide system call
@@ -22,6 +28,7 @@ Mon Nov 24 12:09:59 1997  Doug Evans  <devans@seba.cygnus.com>
        * sim-trace.c (trace_option_handler): Set state trace file
        for --trace-file in addition to cpu's values.
        (trace_vprintf): If cpu == NULL, try state's trace file.
+       (trace_options): Reorganize table, reword some descriptions.
 
 Sun Nov 23 10:57:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
diff --git a/sim/common/gennltvals.sh b/sim/common/gennltvals.sh
new file mode 100644 (file)
index 0000000..4c4794b
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Generate nltvals.def, a file that describes various target values
+# used by the host/target interface.
+#
+# Syntax: /bin/sh gennltvals.sh shell srcroot cpp
+
+shell=$1
+srcroot=$2
+cpp=$3
+
+srccom=$srcroot/sim/common
+
+echo '/* Newlib/libgloss macro values needed by remote target support.  */'
+echo '/* This file is machine generated by gennltvals.sh.  */'
+
+$shell ${srccom}/gentvals.sh "" errno ${srcroot}/newlib/libc/include \
+       "errno.h sys/errno.h" 'E[A-Z0-9]*' "${cpp}"
+
+$shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \
+       "signal.h sys/signal.h" 'SIG[A-Z0-9]*' "${cpp}"
+
+$shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \
+       "fcntl.h sys/fcntl.h" 'O_[A-Z0-9]*' "${cpp}"
+
+# Unfortunately, each newlib/libgloss port has seen fit to define their own
+# syscall.h file.  This means that system call numbers can vary for each port.
+# Support for all this crud is kept here, rather than trying to get too fancy.
+# If you want to try to improve this, please do, but don't break anything.
+# Note that there is a standard syscall.h file (libgloss/syscall.h) now which
+# hopefully more targets can use.
+
+targets="d30v m32r sparc"
+
+for t in $targets
+do
+       case $t in
+       d30v) dir=libgloss macro=d30v ;;
+       m32r) dir=libgloss/m32r/sys macro=m32r ;;
+       sparc) dir=libgloss macro=sparc ;;
+       esac
+
+       $shell ${srccom}/gentvals.sh $macro sys ${srcroot}/$dir \
+               "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+done
diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
new file mode 100644 (file)
index 0000000..20bfabd
--- /dev/null
@@ -0,0 +1,254 @@
+/* Newlib/libgloss macro values needed by remote target support.  */
+/* This file is machine generated by gennltvals.sh.  */
+#ifdef errno_defs
+/* from errno.h */
+/* from sys/errno.h */
+/* begin errno target macros */
+ { "E2BIG", 7  },
+ { "EACCES", 13  },
+ { "EADDRINUSE", 112  },
+ { "EADDRNOTAVAIL", 125  },
+ { "EADV", 68  },
+ { "EAFNOSUPPORT", 106  },
+ { "EAGAIN", 11  },
+ { "EALREADY", 120  },
+ { "EBADE", 50  },
+ { "EBADF", 9  },
+ { "EBADFD", 81  },
+ { "EBADMSG", 77  },
+ { "EBADR", 51  },
+ { "EBADRQC", 54  },
+ { "EBADSLT", 55  },
+ { "EBFONT", 57  },
+ { "EBUSY", 16  },
+ { "ECHILD", 10  },
+ { "ECHRNG", 37  },
+ { "ECOMM", 70  },
+ { "ECONNABORTED", 113  },
+ { "ECONNREFUSED", 111  },
+ { "ECONNRESET", 104  },
+ { "EDEADLK", 45  },
+ { "EDEADLOCK", 56  },
+ { "EDESTADDRREQ", 121  },
+ { "EDOM", 33  },
+ { "EDOTDOT", 76  },
+ { "EDQUOT", 132  },
+ { "EEXIST", 17  },
+ { "EFAULT", 14  },
+ { "EFBIG", 27  },
+ { "EHOSTDOWN", 117  },
+ { "EHOSTUNREACH", 118  },
+ { "EIDRM", 36  },
+ { "EINPROGRESS", 119  },
+ { "EINTR", 4  },
+ { "EINVAL", 22  },
+ { "EIO", 5  },
+ { "EISCONN", 127  },
+ { "EISDIR", 21  },
+ { "EL2HLT", 44  },
+ { "EL2NSYNC", 38  },
+ { "EL3HLT", 39  },
+ { "EL3RST", 40  },
+ { "ELBIN", 75  },
+ { "ELIBACC", 83  },
+ { "ELIBBAD", 84  },
+ { "ELIBEXEC", 87  },
+ { "ELIBMAX", 86  },
+ { "ELIBSCN", 85  },
+ { "ELNRNG", 41  },
+ { "ELOOP", 92  },
+ { "EMFILE", 24  },
+ { "EMLINK", 31  },
+ { "EMSGSIZE", 122  },
+ { "EMULTIHOP", 74  },
+ { "ENAMETOOLONG", 91  },
+ { "ENETDOWN", 115  },
+ { "ENETRESET", 126  },
+ { "ENETUNREACH", 114  },
+ { "ENFILE", 23  },
+ { "ENMFILE", 89  },
+ { "ENOANO", 53  },
+ { "ENOBUFS", 105  },
+ { "ENOCSI", 43  },
+ { "ENODATA", 61  },
+ { "ENODEV", 19  },
+ { "ENOENT", 2  },
+ { "ENOEXEC", 8  },
+ { "ENOLCK", 46  },
+ { "ENOLINK", 67  },
+ { "ENOMEM", 12  },
+ { "ENOMSG", 35  },
+ { "ENONET", 64  },
+ { "ENOPKG", 65  },
+ { "ENOPROTOOPT", 109  },
+ { "ENOSPC", 28  },
+ { "ENOSR", 63  },
+ { "ENOSTR", 60  },
+ { "ENOSYS", 88  },
+ { "ENOTBLK", 15  },
+ { "ENOTCONN", 128  },
+ { "ENOTDIR", 20  },
+ { "ENOTEMPTY", 90  },
+ { "ENOTSOCK", 108  },
+ { "ENOTSUP", 134  },
+ { "ENOTTY", 25  },
+ { "ENOTUNIQ", 80  },
+ { "ENXIO", 6  },
+ { "EOPNOTSUPP", 95  },
+ { "EPERM", 1  },
+ { "EPFNOSUPPORT", 96  },
+ { "EPIPE", 32  },
+ { "EPROCLIM", 130  },
+ { "EPROTO", 71  },
+ { "EPROTONOSUPPORT", 123  },
+ { "EPROTOTYPE", 107  },
+ { "ERANGE", 34  },
+ { "EREMCHG", 82  },
+ { "EREMOTE", 66  },
+ { "EROFS", 30  },
+ { "ESHUTDOWN", 110  },
+ { "ESOCKTNOSUPPORT", 124  },
+ { "ESPIPE", 29  },
+ { "ESRCH", 3  },
+ { "ESRMNT", 69  },
+ { "ESTALE", 133  },
+ { "ETIME", 62  },
+ { "ETIMEDOUT", 116  },
+ { "ETOOMANYREFS", 129  },
+ { "ETXTBSY", 26  },
+ { "EUNATCH", 42  },
+ { "EUSERS", 131  },
+ { "EWOULDBLOCK", 11   },
+ { "EXDEV", 18  },
+ { "EXFULL", 52  },
+/* end errno target macros */
+#endif
+#ifdef signal_defs
+/* from signal.h */
+/* from sys/signal.h */
+/* begin signal target macros */
+ { "SIGABRT", 6  },
+ { "SIGALRM", 14  },
+ { "SIGBUS", 10  },
+ { "SIGCHLD", 20  },
+ { "SIGCLD", 20  },
+ { "SIGCONT", 19  },
+ { "SIGEMT", 7  },
+ { "SIGFPE", 8  },
+ { "SIGHUP", 1  },
+ { "SIGILL", 4  },
+ { "SIGINT", 2  },
+ { "SIGIO", 23  },
+ { "SIGIOT", 6  },
+ { "SIGKILL", 9  },
+ { "SIGLOST", 29  },
+ { "SIGPIPE", 13  },
+ { "SIGPOLL", 23   },
+ { "SIGPROF", 27  },
+ { "SIGQUIT", 3  },
+ { "SIGSEGV", 11  },
+ { "SIGSTOP", 17  },
+ { "SIGSYS", 12  },
+ { "SIGTERM", 15  },
+ { "SIGTRAP", 5  },
+ { "SIGTSTP", 18  },
+ { "SIGTTIN", 21  },
+ { "SIGTTOU", 22  },
+ { "SIGURG", 16  },
+ { "SIGUSR1", 30  },
+ { "SIGUSR2", 31  },
+ { "SIGVTALRM", 26  },
+ { "SIGWINCH", 28  },
+ { "SIGXCPU", 24  },
+ { "SIGXFSZ", 25  },
+/* end signal target macros */
+#endif
+#ifdef open_defs
+/* from fcntl.h */
+/* from sys/fcntl.h */
+/* begin open target macros */
+ { "O_ACCMODE", (0 | 1 | 2 )  },
+ { "O_APPEND", 0x0008   },
+ { "O_CREAT", 0x0200   },
+ { "O_EXCL", 0x0800   },
+ { "O_NOCTTY", 0x8000   },
+ { "O_NONBLOCK", 0x4000   },
+ { "O_RDONLY", 0  },
+ { "O_RDWR", 2  },
+ { "O_SYNC", 0x2000   },
+ { "O_TRUNC", 0x0400   },
+ { "O_WRONLY", 1  },
+/* end open target macros */
+#endif
+#ifdef NL_TARGET_d30v
+#ifdef sys_defs
+/* from syscall.h */
+/* begin d30v sys target macros */
+ { "SYS_argv", 13  },
+ { "SYS_argvlen", 12  },
+ { "SYS_chdir", 14  },
+ { "SYS_chmod", 16  },
+ { "SYS_close", 3  },
+ { "SYS_exit", 1  },
+ { "SYS_fstat", 10  },
+ { "SYS_getpid", 8  },
+ { "SYS_kill", 9  },
+ { "SYS_lseek", 6  },
+ { "SYS_open", 2  },
+ { "SYS_read", 4  },
+ { "SYS_stat", 15  },
+ { "SYS_time", 18  },
+ { "SYS_unlink", 7  },
+ { "SYS_utime", 17  },
+ { "SYS_write", 5  },
+/* end d30v sys target macros */
+#endif
+#endif
+#ifdef NL_TARGET_m32r
+#ifdef sys_defs
+/* from syscall.h */
+/* begin m32r sys target macros */
+ { "SYS_argv", 13  },
+ { "SYS_argvlen", 12  },
+ { "SYS_chdir", 20  },
+ { "SYS_chmod", 22  },
+ { "SYS_close", 3  },
+ { "SYS_exit", 1  },
+ { "SYS_fstat", 10  },
+ { "SYS_getpid", 8  },
+ { "SYS_kill", 9  },
+ { "SYS_lseek", 6  },
+ { "SYS_open", 2  },
+ { "SYS_read", 4  },
+ { "SYS_stat", 21  },
+ { "SYS_time", 24  },
+ { "SYS_unlink", 7  },
+ { "SYS_utime", 23  },
+ { "SYS_write", 5  },
+/* end m32r sys target macros */
+#endif
+#endif
+#ifdef NL_TARGET_sparc
+#ifdef sys_defs
+/* from syscall.h */
+/* begin sparc sys target macros */
+ { "SYS_argv", 13  },
+ { "SYS_argvlen", 12  },
+ { "SYS_chdir", 14  },
+ { "SYS_chmod", 16  },
+ { "SYS_close", 3  },
+ { "SYS_exit", 1  },
+ { "SYS_fstat", 10  },
+ { "SYS_getpid", 8  },
+ { "SYS_kill", 9  },
+ { "SYS_lseek", 6  },
+ { "SYS_open", 2  },
+ { "SYS_read", 4  },
+ { "SYS_stat", 15  },
+ { "SYS_time", 18  },
+ { "SYS_unlink", 7  },
+ { "SYS_utime", 17  },
+ { "SYS_write", 5  },
+/* end sparc sys target macros */
+#endif
+#endif
This page took 0.032703 seconds and 4 git commands to generate.