MFC 295636,295637:
Fix issues with tracing Linux/i386 binaries. 295636: Sign extend the error value for failing Linux/i386 system calls. This restores the mapping of Linux errors to native FreeBSD errno values after the refactoring in r288424. 295637: Correct the ABI name for Linux/i386 binaries under FreeBSD/i386. This allows truss to work for these binaries again after r288424. Approved by: re (marius)
This commit is contained in:
parent
972671f920
commit
266e77bc14
@ -116,6 +116,8 @@ amd64_linux32_fetch_retval(struct trussinfo *trussinfo, long *retval,
|
||||
retval[0] = regs.r_rax & 0xffffffff;
|
||||
retval[1] = regs.r_rdx & 0xffffffff;
|
||||
*errorp = !!(regs.r_rflags & PSL_C);
|
||||
if (*errorp)
|
||||
retval[0] = (int)retval[0];
|
||||
|
||||
if (*errorp) {
|
||||
for (i = 0; i < nitems(bsd_to_linux_errno); i++) {
|
||||
|
@ -130,7 +130,7 @@ i386_linux_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp)
|
||||
}
|
||||
|
||||
static struct procabi i386_linux = {
|
||||
"Linux ELF32",
|
||||
"Linux ELF",
|
||||
linux_syscallnames,
|
||||
nitems(linux_syscallnames),
|
||||
i386_linux_fetch_args,
|
||||
|
Loading…
x
Reference in New Issue
Block a user