From cb2edec922e11c0dcda53db951d9f33ae4096cd5 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 2 Jun 2015 14:54:53 +0000 Subject: MFC 281266: Move the 32-bit compatible procfs types from freebsd32.h to and export them to userland. - Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in to control when to export prstatus32, etc. - Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform. - Use the structure definitions from in gcore's elf32 core dump code instead of duplicating the definitions. --- sys/mips/include/reg.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/mips') diff --git a/sys/mips/include/reg.h b/sys/mips/include/reg.h index c240506..0dc36c6 100644 --- a/sys/mips/include/reg.h +++ b/sys/mips/include/reg.h @@ -70,7 +70,7 @@ struct dbreg { unsigned long junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { uint32_t r_regs[NUMSAVEREGS]; @@ -83,6 +83,8 @@ struct fpreg32 { struct dbreg32 { uint32_t junk; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL -- cgit v1.1