Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136143154
D2142.id4448.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
D2142.id4448.diff
View Options
Index: sys/compat/freebsd32/freebsd32.h
===================================================================
--- sys/compat/freebsd32/freebsd32.h
+++ sys/compat/freebsd32/freebsd32.h
@@ -243,32 +243,6 @@
uint32_t num;
};
-/*
- * Alternative layouts for <sys/procfs.h>
- */
-struct prstatus32 {
- int pr_version;
- u_int pr_statussz;
- u_int pr_gregsetsz;
- u_int pr_fpregsetsz;
- int pr_osreldate;
- int pr_cursig;
- pid_t pr_pid;
- struct reg32 pr_reg;
-};
-
-struct prpsinfo32 {
- int pr_version;
- u_int pr_psinfosz;
- char pr_fname[PRFNAMESZ+1];
- char pr_psargs[PRARGSZ+1];
-};
-
-struct thrmisc32 {
- char pr_tname[MAXCOMLEN+1];
- u_int _pad;
-};
-
struct mq_attr32 {
int mq_flags;
int mq_maxmsg;
Index: sys/mips/include/reg.h
===================================================================
--- sys/mips/include/reg.h
+++ sys/mips/include/reg.h
@@ -70,7 +70,7 @@
unsigned long junk;
};
-#ifdef COMPAT_FREEBSD32
+#ifdef __LP64__
/* Must match struct trapframe */
struct reg32 {
uint32_t r_regs[NUMSAVEREGS];
@@ -83,6 +83,8 @@
struct dbreg32 {
uint32_t junk;
};
+
+#define __HAVE_REG32
#endif
#ifdef _KERNEL
Index: sys/powerpc/include/reg.h
===================================================================
--- sys/powerpc/include/reg.h
+++ sys/powerpc/include/reg.h
@@ -39,7 +39,7 @@
unsigned int junk;
};
-#ifdef COMPAT_FREEBSD32
+#ifdef __LP64__
/* Must match struct trapframe */
struct reg32 {
int32_t fixreg[32];
@@ -61,6 +61,8 @@
struct dbreg32 {
struct dbreg data;
};
+
+#define __HAVE_REG32
#endif
#ifdef _KERNEL
Index: sys/sparc64/include/reg.h
===================================================================
--- sys/sparc64/include/reg.h
+++ sys/sparc64/include/reg.h
@@ -98,6 +98,8 @@
int dummy;
};
+#define __HAVE_REG32
+
#ifdef _KERNEL
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
Index: sys/sys/procfs.h
===================================================================
--- sys/sys/procfs.h
+++ sys/sys/procfs.h
@@ -89,4 +89,29 @@
typedef uint64_t psaddr_t; /* An address in the target process. */
+#ifdef __HAVE_REG32
+typedef struct prstatus32 {
+ int32_t pr_version;
+ uint32_t pr_statussz;
+ uint32_t pr_gregsetsz;
+ uint32_t pr_fpregsetsz;
+ int32_t pr_osreldate;
+ int32_t pr_cursig;
+ int32_t pr_pid;
+ struct reg32 pr_reg;
+} prstatus32_t;
+
+typedef struct prpsinfo32 {
+ int32_t pr_version;
+ uint32_t pr_psinfosz;
+ char pr_fname[PRFNAMESZ+1];
+ char pr_psargs[PRARGSZ+1];
+} prpsinfo32_t;
+
+struct thrmisc32 {
+ char pr_tname[MAXCOMLEN+1];
+ uint32_t _pad;
+};
+#endif /* __HAVE_REG32 */
+
#endif /* _SYS_PROCFS_H_ */
Index: sys/x86/include/reg.h
===================================================================
--- sys/x86/include/reg.h
+++ sys/x86/include/reg.h
@@ -91,6 +91,7 @@
#define __fpreg64 fpreg
#define __dbreg32 dbreg32
#define __dbreg64 dbreg
+#define __HAVE_REG32
#endif
/*
Index: usr.bin/gcore/elf32core.c
===================================================================
--- usr.bin/gcore/elf32core.c
+++ usr.bin/gcore/elf32core.c
@@ -8,24 +8,6 @@
#include <sys/procfs.h>
-struct prpsinfo32 {
- int pr_version;
- u_int pr_psinfosz;
- char pr_fname[PRFNAMESZ+1];
- char pr_psargs[PRARGSZ+1];
-};
-
-struct prstatus32 {
- int pr_version;
- u_int pr_statussz;
- u_int pr_gregsetsz;
- u_int pr_fpregsetsz;
- int pr_osreldate;
- int pr_cursig;
- pid_t pr_pid;
- struct reg32 pr_reg;
-};
-
#define ELFCORE_COMPAT_32 1
#include "elfcore.c"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 17, 3:33 AM (3 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25403479
Default Alt Text
D2142.id4448.diff (3 KB)
Attached To
Mode
D2142: Move prstatus32 and friends to <sys/procfs.h>.
Attached
Detach File
Event Timeline
Log In to Comment