public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/2] sim: nltvals: pull target errno out into a dedicated source file
Date: Sun, 31 Oct 2021 04:41:20 -0400	[thread overview]
Message-ID: <20211031084121.26732-1-vapier@gentoo.org> (raw)

The current system maintains a list of target errno constants in the
nltvals.def file, then runs a build-time tool to turn that into a C
file.  This list of errno values is the same for all arches, so we
don't need the arch-specific flexibility.  Further, these are only
for newlib/libgloss environments, which makes it confusing to support
other userland runtimes (like Linux).  Let's simplify to make this
easier to understand & build.  We don't namespace the variables yet,
but sets up the framework for it.

Create a new target-newlib-errno.c template file.  The template file
is hand written, but the inline map is still automatically generated.

This allows us to move it to the common set of objects so it's only
built once in a multi-target build.

Now we can remove the output from the gentmap build-time tool since
it's checked into the tree.

Then we stop including the errno lists in nltvals.def since nothing
uses it.
---
 sim/Makefile.in                  |  19 ++
 sim/common/Make-common.in        |   1 +
 sim/common/gennltvals.py         | 109 ++++++++----
 sim/common/gentmap.c             |  20 ---
 sim/common/local.mk              |   1 +
 sim/common/nltvals.def           |  92 ----------
 sim/common/target-newlib-errno.c | 289 +++++++++++++++++++++++++++++++
 7 files changed, 384 insertions(+), 147 deletions(-)
 create mode 100644 sim/common/target-newlib-errno.c

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index cdad4a53d4bc..5db835713e7c 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -231,6 +231,7 @@ EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
 COMMON_OBJS_NAMES = \
 	portability.o \
 	sim-load.o \
+	target-newlib-errno.o \
 	version.o
 COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/common_libcommon_a-%)
 
diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py
index 955ace343110..3006f7f58fe4 100755
--- a/sim/common/gennltvals.py
+++ b/sim/common/gennltvals.py
@@ -63,8 +63,43 @@ FILE_HEADER = f"""\
 /* This file is machine generated by {PROG}.  */\
 """
 
+# Used to update sections of files.
+START_MARKER = 'gennltvals: START'
+END_MARKER = 'gennltvals: END'
 
-def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
+
+def extract_syms(cpp: str, srcdir: Path,
+                 headers: Iterable[str],
+                 pattern: str,
+                 filter: str = r'^$') -> dict:
+    """Extract all the symbols from |headers| matching |pattern| using |cpp|."""
+    srcfile = ''.join(f'#include <{x}>\n' for x in headers)
+    syms = set()
+    define_pattern = re.compile(r'^#\s*define\s+(' + pattern + ')')
+    filter_pattern = re.compile(filter)
+    for header in headers:
+        with open(srcdir / header, 'r', encoding='utf-8') as fp:
+            data = fp.read()
+        for line in data.splitlines():
+            m = define_pattern.match(line)
+            if m and not filter_pattern.search(line):
+                syms.add(m.group(1))
+    for sym in syms:
+        srcfile += f'#ifdef {sym}\nDEFVAL "{sym}" {sym}\n#endif\n'
+
+    result = subprocess.run(
+        f'{cpp} -E -I"{srcdir}" -', shell=True, check=True, encoding='utf-8',
+        input=srcfile, capture_output=True)
+    ret = {}
+    for line in result.stdout.splitlines():
+        if line.startswith('DEFVAL '):
+            _, sym, val = line.split()
+            ret[sym.strip('"')] = val
+    return ret
+
+
+def gentvals(output_dir: Path, output: TextIO,
+             cpp: str, srctype: str, srcdir: Path,
              headers: Iterable[str],
              pattern: str,
              filter: str = r'^$',
@@ -80,6 +115,29 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
         fullpath = srcdir / header
         assert fullpath.exists(), f'{fullpath} does not exist'
 
+    syms = extract_syms(cpp, srcdir, headers, pattern, filter)
+
+    # If we have a map file, use it directly.
+    target_map = output_dir / f'target-newlib-{srctype}.c'
+    if target_map.exists():
+        old_lines = target_map.read_text().splitlines()
+        start_i = end_i = None
+        for i, line in enumerate(old_lines):
+            if START_MARKER in line:
+                start_i = i
+            if END_MARKER in line:
+                end_i = i
+        assert start_i and end_i
+        new_lines = old_lines[0:start_i + 1]
+        new_lines.extend(
+            f'#ifdef {sym}\n'
+            f'  {{ "{sym}", {sym}, {val} }},\n'
+            f'#endif' for sym, val in sorted(syms.items()))
+        new_lines.extend(old_lines[end_i:])
+        target_map.write_text('\n'.join(new_lines) + '\n')
+        return
+
+    # Fallback to classic nltvals.def.
     if target is not None:
         print(f'#ifdef NL_TARGET_{target}', file=output)
     print(f'#ifdef {srctype}_defs', file=output)
@@ -91,27 +149,8 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
     else:
         print(f'/* begin {target} {srctype} target macros */', file=output)
 
-    # Extract all the symbols.
-    srcfile = ''.join(f'#include <{x}>\n' for x in headers)
-    syms = set()
-    define_pattern = re.compile(r'^#\s*define\s+(' + pattern + ')')
-    filter_pattern = re.compile(filter)
-    for header in headers:
-        with open(srcdir / header, 'r', encoding='utf-8') as fp:
-            data = fp.read()
-        for line in data.splitlines():
-            m = define_pattern.match(line)
-            if m and not filter_pattern.search(line):
-                syms.add(m.group(1))
-    for sym in sorted(syms):
-        srcfile += f'#ifdef {sym}\nDEFVAL {{ "{sym}", {sym} }},\n#endif\n'
-
-    result = subprocess.run(
-        f'{cpp} -E -I"{srcdir}" -', shell=True, check=True, encoding='utf-8',
-        input=srcfile, capture_output=True)
-    for line in result.stdout.splitlines():
-        if line.startswith('DEFVAL '):
-            print(line[6:].rstrip(), file=output)
+    for sym, val in sorted(syms.items()):
+        print(f' {{ "{sym}", {val} }},', file=output)
 
     print(f'#undef {srctype}_defs', file=output)
     if target is None:
@@ -122,37 +161,37 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
     print('#endif', file=output)
 
 
-def gen_common(output: TextIO, newlib: Path, cpp: str):
+def gen_common(output_dir: Path, output: TextIO, newlib: Path, cpp: str):
     """Generate the common C library constants.
 
     No arch should override these.
     """
-    gentvals(output, cpp, 'errno', newlib / 'newlib/libc/include',
+    gentvals(output_dir, output, cpp, 'errno', newlib / 'newlib/libc/include',
              ('errno.h', 'sys/errno.h'), 'E[A-Z0-9]*')
 
-    gentvals(output, cpp, 'signal', newlib / 'newlib/libc/include',
+    gentvals(output_dir, output, cpp, 'signal', newlib / 'newlib/libc/include',
              ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*', filter=r'SIGSTKSZ')
 
-    gentvals(output, cpp, 'open', newlib / 'newlib/libc/include',
+    gentvals(output_dir, output, cpp, 'open', newlib / 'newlib/libc/include',
              ('fcntl.h', 'sys/fcntl.h', 'sys/_default_fcntl.h'), r'O_[A-Z0-9]*')
 
 
-def gen_targets(output: TextIO, newlib: Path, cpp: str):
+def gen_targets(output_dir: Path, output: TextIO, newlib: Path, cpp: str):
     """Generate the target-specific lists."""
     for target, subdir in sorted(TARGET_DIRS.items()):
-        gentvals(output, cpp, 'sys', newlib / subdir, ('syscall.h',),
-                 r'SYS_[_a-zA-Z0-9]*', target=target)
+        gentvals(output_dir, output, cpp, 'sys', newlib / subdir,
+                 ('syscall.h',), r'SYS_[_a-zA-Z0-9]*', target=target)
 
     # Then output the common syscall targets.
-    gentvals(output, cpp, 'sys', newlib / 'libgloss', ('syscall.h',),
-             r'SYS_[_a-zA-Z0-9]*')
+    gentvals(output_dir, output, cpp, 'sys', newlib / 'libgloss',
+             ('syscall.h',), r'SYS_[_a-zA-Z0-9]*')
 
 
-def gen(output: TextIO, newlib: Path, cpp: str):
+def gen(output_dir: Path, output: TextIO, newlib: Path, cpp: str):
     """Generate all the things!"""
     print(FILE_HEADER, file=output)
-    gen_common(output, newlib, cpp)
-    gen_targets(output, newlib, cpp)
+    gen_common(output_dir, output, newlib, cpp)
+    gen_targets(output_dir, output, newlib, cpp)
 
 
 def get_parser() -> argparse.ArgumentParser:
@@ -212,7 +251,7 @@ def main(argv: List[str]) -> int:
 
     output = (opts.output / 'nltvals.def').open('w', encoding='utf-8')
 
-    gen(output, opts.newlib, opts.cpp)
+    gen(opts.output, output, opts.newlib, opts.cpp)
     return 0
 
 
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index 9f30e66e378b..8e6e3aeda325 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -16,13 +16,6 @@ static struct tdefs sys_tdefs[] = {
   { 0, 0 }
 };
 
-static struct tdefs errno_tdefs[] =  {
-#define errno_defs
-#include "nltvals.def"
-#undef errno_defs
-  { 0, 0 }
-};
-
 static struct tdefs signal_tdefs[] = {
 #define signal_defs
 #include "nltvals.def"
@@ -75,7 +68,6 @@ gen_targ_map_c (void)
   printf ("/* This file is machine generated by gentmap.c.  */\n\n");
 
   printf ("#include \"defs.h\"\n");
-  printf ("#include <errno.h>\n");
   printf ("#include <fcntl.h>\n");
   printf ("#include <signal.h>\n");
   printf ("#include \"ansidecl.h\"\n");
@@ -95,18 +87,6 @@ gen_targ_map_c (void)
   printf ("  { 0, -1, -1 }\n");
   printf ("};\n\n");
 
-  printf ("/* errno mapping table */\n");
-  printf ("CB_TARGET_DEFS_MAP cb_init_errno_map[] = {\n");
-  for (t = &errno_tdefs[0]; t->symbol; ++t)
-    {
-      printf ("#define TARGET_%s %d\n", t->symbol, t->value);
-      printf ("#ifdef %s\n", t->symbol);
-      printf ("  { \"%s\", %s, TARGET_%s },\n", t->symbol, t->symbol, t->symbol);
-      printf ("#endif\n");
-    }
-  printf ("  { 0, 0, 0 }\n");
-  printf ("};\n\n");
-
   printf ("/* signals mapping table */\n");
   printf ("CB_TARGET_DEFS_MAP cb_init_signal_map[] = {\n");
   for (t = &signal_tdefs[0]; t->symbol; ++t)
diff --git a/sim/common/local.mk b/sim/common/local.mk
index 25c7e5beb1f9..71a931715c2d 100644
--- a/sim/common/local.mk
+++ b/sim/common/local.mk
@@ -36,6 +36,7 @@ noinst_LIBRARIES += %D%/libcommon.a
 %C%_libcommon_a_SOURCES = \
 	%D%/portability.c \
 	%D%/sim-load.c \
+	%D%/target-newlib-errno.c \
 	%D%/version.c
 
 %D%/version.c: %D%/version.c-stamp ; @true
diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
index 8bc6ae59026d..5e72e596ee80 100644
--- a/sim/common/nltvals.def
+++ b/sim/common/nltvals.def
@@ -1,97 +1,5 @@
 /* Newlib/libgloss macro values needed by remote target support.  */
 /* This file is machine generated by gennltvals.py.  */
-#ifdef errno_defs
-/* from errno.h */
-/* from sys/errno.h */
-/* begin errno target macros */
- { "E2BIG", 7 },
- { "EACCES", 13 },
- { "EADDRINUSE", 112 },
- { "EADDRNOTAVAIL", 125 },
- { "EAFNOSUPPORT", 106 },
- { "EAGAIN", 11 },
- { "EALREADY", 120 },
- { "EBADF", 9 },
- { "EBADMSG", 77 },
- { "EBUSY", 16 },
- { "ECANCELED", 140 },
- { "ECHILD", 10 },
- { "ECONNABORTED", 113 },
- { "ECONNREFUSED", 111 },
- { "ECONNRESET", 104 },
- { "EDEADLK", 45 },
- { "EDESTADDRREQ", 121 },
- { "EDOM", 33 },
- { "EDQUOT", 132 },
- { "EEXIST", 17 },
- { "EFAULT", 14 },
- { "EFBIG", 27 },
- { "EFTYPE", 79 },
- { "EHOSTDOWN", 117 },
- { "EHOSTUNREACH", 118 },
- { "EIDRM", 36 },
- { "EILSEQ", 138 },
- { "EINPROGRESS", 119 },
- { "EINTR", 4 },
- { "EINVAL", 22 },
- { "EIO", 5 },
- { "EISCONN", 127 },
- { "EISDIR", 21 },
- { "ELOOP", 92 },
- { "EMFILE", 24 },
- { "EMLINK", 31 },
- { "EMSGSIZE", 122 },
- { "EMULTIHOP", 74 },
- { "ENAMETOOLONG", 91 },
- { "ENETDOWN", 115 },
- { "ENETRESET", 126 },
- { "ENETUNREACH", 114 },
- { "ENFILE", 23 },
- { "ENOBUFS", 105 },
- { "ENODATA", 61 },
- { "ENODEV", 19 },
- { "ENOENT", 2 },
- { "ENOEXEC", 8 },
- { "ENOLCK", 46 },
- { "ENOLINK", 67 },
- { "ENOMEM", 12 },
- { "ENOMSG", 35 },
- { "ENOPROTOOPT", 109 },
- { "ENOSPC", 28 },
- { "ENOSR", 63 },
- { "ENOSTR", 60 },
- { "ENOSYS", 88 },
- { "ENOTCONN", 128 },
- { "ENOTDIR", 20 },
- { "ENOTEMPTY", 90 },
- { "ENOTRECOVERABLE", 141 },
- { "ENOTSOCK", 108 },
- { "ENOTSUP", 134 },
- { "ENOTTY", 25 },
- { "ENXIO", 6 },
- { "EOPNOTSUPP", 95 },
- { "EOVERFLOW", 139 },
- { "EOWNERDEAD", 142 },
- { "EPERM", 1 },
- { "EPFNOSUPPORT", 96 },
- { "EPIPE", 32 },
- { "EPROTO", 71 },
- { "EPROTONOSUPPORT", 123 },
- { "EPROTOTYPE", 107 },
- { "ERANGE", 34 },
- { "EROFS", 30 },
- { "ESPIPE", 29 },
- { "ESRCH", 3 },
- { "ESTALE", 133 },
- { "ETIME", 62 },
- { "ETIMEDOUT", 116 },
- { "ETOOMANYREFS", 129 },
- { "ETXTBSY", 26 },
- { "EWOULDBLOCK", 11 },
- { "EXDEV", 18 },
-#undef errno_defs
-/* end errno target macros */
-#endif
 #ifdef signal_defs
 /* from signal.h */
 /* from sys/signal.h */
diff --git a/sim/common/target-newlib-errno.c b/sim/common/target-newlib-errno.c
new file mode 100644
index 000000000000..af223afebefd
--- /dev/null
+++ b/sim/common/target-newlib-errno.c
@@ -0,0 +1,289 @@
+/* Target errno mappings for newlib/libgloss environment.
+   Copyright 1995-2021 Free Software Foundation, Inc.
+   Contributed by Mike Frysinger.
+
+   This file is part of simulators.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* This must come before any other includes.  */
+#include "defs.h"
+
+#include <errno.h>
+
+#include "sim/callback.h"
+
+/* This file is kept up-to-date via the gennltvals.py script.  Do not edit
+   anything between the START & END comment blocks below.  */
+
+CB_TARGET_DEFS_MAP cb_init_errno_map[] = {
+  /* gennltvals: START */
+#ifdef E2BIG
+  { "E2BIG", E2BIG, 7 },
+#endif
+#ifdef EACCES
+  { "EACCES", EACCES, 13 },
+#endif
+#ifdef EADDRINUSE
+  { "EADDRINUSE", EADDRINUSE, 112 },
+#endif
+#ifdef EADDRNOTAVAIL
+  { "EADDRNOTAVAIL", EADDRNOTAVAIL, 125 },
+#endif
+#ifdef EAFNOSUPPORT
+  { "EAFNOSUPPORT", EAFNOSUPPORT, 106 },
+#endif
+#ifdef EAGAIN
+  { "EAGAIN", EAGAIN, 11 },
+#endif
+#ifdef EALREADY
+  { "EALREADY", EALREADY, 120 },
+#endif
+#ifdef EBADF
+  { "EBADF", EBADF, 9 },
+#endif
+#ifdef EBADMSG
+  { "EBADMSG", EBADMSG, 77 },
+#endif
+#ifdef EBUSY
+  { "EBUSY", EBUSY, 16 },
+#endif
+#ifdef ECANCELED
+  { "ECANCELED", ECANCELED, 140 },
+#endif
+#ifdef ECHILD
+  { "ECHILD", ECHILD, 10 },
+#endif
+#ifdef ECONNABORTED
+  { "ECONNABORTED", ECONNABORTED, 113 },
+#endif
+#ifdef ECONNREFUSED
+  { "ECONNREFUSED", ECONNREFUSED, 111 },
+#endif
+#ifdef ECONNRESET
+  { "ECONNRESET", ECONNRESET, 104 },
+#endif
+#ifdef EDEADLK
+  { "EDEADLK", EDEADLK, 45 },
+#endif
+#ifdef EDESTADDRREQ
+  { "EDESTADDRREQ", EDESTADDRREQ, 121 },
+#endif
+#ifdef EDOM
+  { "EDOM", EDOM, 33 },
+#endif
+#ifdef EDQUOT
+  { "EDQUOT", EDQUOT, 132 },
+#endif
+#ifdef EEXIST
+  { "EEXIST", EEXIST, 17 },
+#endif
+#ifdef EFAULT
+  { "EFAULT", EFAULT, 14 },
+#endif
+#ifdef EFBIG
+  { "EFBIG", EFBIG, 27 },
+#endif
+#ifdef EFTYPE
+  { "EFTYPE", EFTYPE, 79 },
+#endif
+#ifdef EHOSTDOWN
+  { "EHOSTDOWN", EHOSTDOWN, 117 },
+#endif
+#ifdef EHOSTUNREACH
+  { "EHOSTUNREACH", EHOSTUNREACH, 118 },
+#endif
+#ifdef EIDRM
+  { "EIDRM", EIDRM, 36 },
+#endif
+#ifdef EILSEQ
+  { "EILSEQ", EILSEQ, 138 },
+#endif
+#ifdef EINPROGRESS
+  { "EINPROGRESS", EINPROGRESS, 119 },
+#endif
+#ifdef EINTR
+  { "EINTR", EINTR, 4 },
+#endif
+#ifdef EINVAL
+  { "EINVAL", EINVAL, 22 },
+#endif
+#ifdef EIO
+  { "EIO", EIO, 5 },
+#endif
+#ifdef EISCONN
+  { "EISCONN", EISCONN, 127 },
+#endif
+#ifdef EISDIR
+  { "EISDIR", EISDIR, 21 },
+#endif
+#ifdef ELOOP
+  { "ELOOP", ELOOP, 92 },
+#endif
+#ifdef EMFILE
+  { "EMFILE", EMFILE, 24 },
+#endif
+#ifdef EMLINK
+  { "EMLINK", EMLINK, 31 },
+#endif
+#ifdef EMSGSIZE
+  { "EMSGSIZE", EMSGSIZE, 122 },
+#endif
+#ifdef EMULTIHOP
+  { "EMULTIHOP", EMULTIHOP, 74 },
+#endif
+#ifdef ENAMETOOLONG
+  { "ENAMETOOLONG", ENAMETOOLONG, 91 },
+#endif
+#ifdef ENETDOWN
+  { "ENETDOWN", ENETDOWN, 115 },
+#endif
+#ifdef ENETRESET
+  { "ENETRESET", ENETRESET, 126 },
+#endif
+#ifdef ENETUNREACH
+  { "ENETUNREACH", ENETUNREACH, 114 },
+#endif
+#ifdef ENFILE
+  { "ENFILE", ENFILE, 23 },
+#endif
+#ifdef ENOBUFS
+  { "ENOBUFS", ENOBUFS, 105 },
+#endif
+#ifdef ENODATA
+  { "ENODATA", ENODATA, 61 },
+#endif
+#ifdef ENODEV
+  { "ENODEV", ENODEV, 19 },
+#endif
+#ifdef ENOENT
+  { "ENOENT", ENOENT, 2 },
+#endif
+#ifdef ENOEXEC
+  { "ENOEXEC", ENOEXEC, 8 },
+#endif
+#ifdef ENOLCK
+  { "ENOLCK", ENOLCK, 46 },
+#endif
+#ifdef ENOLINK
+  { "ENOLINK", ENOLINK, 67 },
+#endif
+#ifdef ENOMEM
+  { "ENOMEM", ENOMEM, 12 },
+#endif
+#ifdef ENOMSG
+  { "ENOMSG", ENOMSG, 35 },
+#endif
+#ifdef ENOPROTOOPT
+  { "ENOPROTOOPT", ENOPROTOOPT, 109 },
+#endif
+#ifdef ENOSPC
+  { "ENOSPC", ENOSPC, 28 },
+#endif
+#ifdef ENOSR
+  { "ENOSR", ENOSR, 63 },
+#endif
+#ifdef ENOSTR
+  { "ENOSTR", ENOSTR, 60 },
+#endif
+#ifdef ENOSYS
+  { "ENOSYS", ENOSYS, 88 },
+#endif
+#ifdef ENOTCONN
+  { "ENOTCONN", ENOTCONN, 128 },
+#endif
+#ifdef ENOTDIR
+  { "ENOTDIR", ENOTDIR, 20 },
+#endif
+#ifdef ENOTEMPTY
+  { "ENOTEMPTY", ENOTEMPTY, 90 },
+#endif
+#ifdef ENOTRECOVERABLE
+  { "ENOTRECOVERABLE", ENOTRECOVERABLE, 141 },
+#endif
+#ifdef ENOTSOCK
+  { "ENOTSOCK", ENOTSOCK, 108 },
+#endif
+#ifdef ENOTSUP
+  { "ENOTSUP", ENOTSUP, 134 },
+#endif
+#ifdef ENOTTY
+  { "ENOTTY", ENOTTY, 25 },
+#endif
+#ifdef ENXIO
+  { "ENXIO", ENXIO, 6 },
+#endif
+#ifdef EOPNOTSUPP
+  { "EOPNOTSUPP", EOPNOTSUPP, 95 },
+#endif
+#ifdef EOVERFLOW
+  { "EOVERFLOW", EOVERFLOW, 139 },
+#endif
+#ifdef EOWNERDEAD
+  { "EOWNERDEAD", EOWNERDEAD, 142 },
+#endif
+#ifdef EPERM
+  { "EPERM", EPERM, 1 },
+#endif
+#ifdef EPFNOSUPPORT
+  { "EPFNOSUPPORT", EPFNOSUPPORT, 96 },
+#endif
+#ifdef EPIPE
+  { "EPIPE", EPIPE, 32 },
+#endif
+#ifdef EPROTO
+  { "EPROTO", EPROTO, 71 },
+#endif
+#ifdef EPROTONOSUPPORT
+  { "EPROTONOSUPPORT", EPROTONOSUPPORT, 123 },
+#endif
+#ifdef EPROTOTYPE
+  { "EPROTOTYPE", EPROTOTYPE, 107 },
+#endif
+#ifdef ERANGE
+  { "ERANGE", ERANGE, 34 },
+#endif
+#ifdef EROFS
+  { "EROFS", EROFS, 30 },
+#endif
+#ifdef ESPIPE
+  { "ESPIPE", ESPIPE, 29 },
+#endif
+#ifdef ESRCH
+  { "ESRCH", ESRCH, 3 },
+#endif
+#ifdef ESTALE
+  { "ESTALE", ESTALE, 133 },
+#endif
+#ifdef ETIME
+  { "ETIME", ETIME, 62 },
+#endif
+#ifdef ETIMEDOUT
+  { "ETIMEDOUT", ETIMEDOUT, 116 },
+#endif
+#ifdef ETOOMANYREFS
+  { "ETOOMANYREFS", ETOOMANYREFS, 129 },
+#endif
+#ifdef ETXTBSY
+  { "ETXTBSY", ETXTBSY, 26 },
+#endif
+#ifdef EWOULDBLOCK
+  { "EWOULDBLOCK", EWOULDBLOCK, 11 },
+#endif
+#ifdef EXDEV
+  { "EXDEV", EXDEV, 18 },
+#endif
+  /* gennltvals: END */
+  { NULL, -1, -1 },
+};
-- 
2.33.0


             reply	other threads:[~2021-10-31  8:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-31  8:41 Mike Frysinger [this message]
2021-10-31  8:41 ` [PATCH 2/2] sim: nltvals: pull target signal " Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211031084121.26732-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).