Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146725318
D13516.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D13516.diff
View Options
Index: head/lib/libsysdecode/errno.c
===================================================================
--- head/lib/libsysdecode/errno.c
+++ head/lib/libsysdecode/errno.c
@@ -58,7 +58,6 @@
};
#endif
-#if defined(__aarch64__) || defined(__amd64__)
#include <contrib/cloudabi/cloudabi_types_common.h>
static const int cloudabi_errno_table[] = {
@@ -139,7 +138,6 @@
[CLOUDABI_EXDEV] = EXDEV,
[CLOUDABI_ENOTCAPABLE] = ENOTCAPABLE,
};
-#endif
int
sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, int error)
@@ -165,13 +163,12 @@
break;
}
#endif
-#if defined(__aarch64__) || defined(__amd64__)
+ case SYSDECODE_ABI_CLOUDABI32:
case SYSDECODE_ABI_CLOUDABI64:
if (error >= 0 &&
(unsigned int)error < nitems(cloudabi_errno_table))
return (cloudabi_errno_table[error]);
break;
-#endif
default:
break;
}
@@ -193,7 +190,7 @@
return (bsd_to_linux_errno[error]);
break;
#endif
-#if defined(__aarch64__) || defined(__amd64__)
+ case SYSDECODE_ABI_CLOUDABI32:
case SYSDECODE_ABI_CLOUDABI64: {
unsigned int i;
@@ -203,7 +200,6 @@
}
break;
}
-#endif
default:
break;
}
Index: head/lib/libsysdecode/syscallnames.c
===================================================================
--- head/lib/libsysdecode/syscallnames.c
+++ head/lib/libsysdecode/syscallnames.c
@@ -63,10 +63,10 @@
#include <amd64/linux32/linux32_syscalls.c>
#endif
-#if defined(__amd64__) || defined(__aarch64__)
static
+#include <compat/cloudabi32/cloudabi32_syscalls.c>
+static
#include <compat/cloudabi64/cloudabi64_syscalls.c>
-#endif
const char *
sysdecode_syscallname(enum sysdecode_abi abi, unsigned int code)
@@ -95,12 +95,14 @@
return (linux32_syscallnames[code]);
break;
#endif
-#if defined(__amd64__) || defined(__aarch64__)
+ case SYSDECODE_ABI_CLOUDABI32:
+ if (code < nitems(cloudabi32_syscallnames))
+ return (cloudabi32_syscallnames[code]);
+ break;
case SYSDECODE_ABI_CLOUDABI64:
if (code < nitems(cloudabi64_syscallnames))
return (cloudabi64_syscallnames[code]);
break;
-#endif
default:
break;
}
Index: head/lib/libsysdecode/sysdecode.h
===================================================================
--- head/lib/libsysdecode/sysdecode.h
+++ head/lib/libsysdecode/sysdecode.h
@@ -35,7 +35,8 @@
SYSDECODE_ABI_FREEBSD32,
SYSDECODE_ABI_LINUX,
SYSDECODE_ABI_LINUX32,
- SYSDECODE_ABI_CLOUDABI64
+ SYSDECODE_ABI_CLOUDABI64,
+ SYSDECODE_ABI_CLOUDABI32
};
int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi _abi, int _error);
Index: head/lib/libsysdecode/sysdecode.3
===================================================================
--- head/lib/libsysdecode/sysdecode.3
+++ head/lib/libsysdecode/sysdecode.3
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 24, 2017
+.Dd December 16, 2017
.Dt SYSDECODE 3
.Os
.Sh NAME
@@ -61,9 +61,12 @@
.It Li SYSDECODE_ABI_LINUX32
32-bit Linux binaries.
Supported on amd64.
+.It Li SYSDECODE_ABI_CLOUDABI32
+32-bit CloudABI binaries.
+Supported on all platforms.
.It Li SYSDECODE_ABI_CLOUDABI64
64-bit CloudABI binaries.
-Supported on aarch64 and amd64.
+Supported on all platforms.
.It Li SYSDECODE_ABI_UNKNOWN
A placeholder for use when the ABI is not known.
.El
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 6, 1:47 AM (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29307397
Default Alt Text
D13516.diff (3 KB)
Attached To
Mode
D13516: Make truss(8) work for i686-unknown-cloudabi binaries on FreeBSD/amd64.
Attached
Detach File
Event Timeline
Log In to Comment