[RFC] Refactor elf_prpsinfo{32,64} structures

Sergio Durigan Junior sergiodj@redhat.com
Fri Nov 16 04:19:00 GMT 2012


Hi,

This patch is related to
<http://sourceware.org/ml/binutils/2012-10/msg00286.html>.

Please take it with a ton of salt, since it's still an RFC and is not
complete.  I have also not written a ChangeLog entry because I'd like to
know others first.

My first task was to extend the information being generated/recorded on
prpsinfo structures on GNU/Linux.  When I started working on this, I
noticed that the code is a bit confuse and perhaps does not do what it
should.  For example, elf_x86_64_write_core_note on bfd/elf64-x86-64.c
handles two cases for NT_PRPSINFO: elfclass is 32-bit or 64-bit.
However, it never gets called (or at least I couldn't make it be called)
for the 32-bit case, basically because elfcore_write_prpsinfo (at
bfd/elf.c) will only call it when the class is 64-bit.

That, and some other discrepancies made me rewrite some parts of the
prpsinfo code to better handle the generation of such note on corefiles.

The most important things that my patch adds are:

1) The creation of bfd/elf-psinfo.h, which now holds the declaration for
elf_prpsinfo32 and elf_prpsinfo64.  This file is to be included on every
architecture file (e.g. bfd/elf64-x86-64.c) that deals with prpsinfo
things.

2) The rewriting of elf_prpsinfo{32,64} in order to make them have
explicit sizes.  I did this because those structures are well by ABI, so
we can rely on having those sizes fixed for all architectures running
ELF (am I talking nonsense here?).  This is also important because those
sizes are used for calculations when assembling the data that is going
to be written in the NT_PRPSINFO section of the corefile (see the new
version of elf_x86_64_write_core_note for an example).

3) The redefinition of the *_write_core_note functions (currently only
for x86 and x86_64, but I intend to expand this if the idea gets
approved) to deal with alignments and sizes in a generic way.  This was
actually done because of some conversations I had with Pedro Alves and
Jan Kratochvil, where we talked mainly about cross-build concerns that
they both had, and how to deal with them.

4) elfcore_write_prpsinfo now takes an internal representation of
elf_prpsinfo, suited for passing information between BFD and its clients
(I have GDB in my mind).  I already have a patch for GDB that uses this
new interface, and it's working well.  Actually, this is the way I have
chosen to test those BFD changes: to see if I could generate a correct
NT_PRPSINFO section in corefiles.  I did my tests by generating
x86_64->x86_64, x86_64->x86, and x86->x86.  Everything succeeded.

Anyway, what I'd like to hear now is if I am in the right path here.  I
think this change could be also extended to the struct elf_psinfo, but
for now I only did the prpsinfo part.  Also, as I said above, other
architectures will benefit from this change as well.

Thanks in advance,

-- 
Sergio

diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 92d9d08..e12deb5 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1050,7 +1050,7 @@ BUILD_CFILES = \
 CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
 SOURCE_HFILES = \
 	aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
-	elf-bfd.h elf-hppa.h elf32-hppa.h \
+	elf-bfd.h elf-psinfo.h elf-hppa.h elf32-hppa.h \
 	elf64-hppa.h elfcode.h elfcore.h \
 	freebsd.h genlink.h go32stub.h \
 	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index aa78ecd..c93df27 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1724,6 +1724,28 @@ struct elf_obj_tdata
   (elf_known_obj_attributes (bfd) [OBJ_ATTR_PROC])
 #define elf_other_obj_attributes_proc(bfd) \
   (elf_other_obj_attributes (bfd) [OBJ_ATTR_PROC])
+
+#define ELF_PRARGSZ     (80)    /* Number of chars for args */
+
+/* This structure holds the information that will be converted
+   to a `prpsinfo_t' structure.  Ultimately, these information will
+   be stored in a core file's NT_PRPSINFO note section.  */
+
+struct elf_internal_prpsinfo
+  {
+    char pr_state;			/* Numeric process state.  */
+    char pr_sname;			/* Char for pr_state.  */
+    char pr_zomb;			/* Zombie.  */
+    char pr_nice;			/* Nice val.  */
+    unsigned long pr_flag;		/* Flags.  */
+    unsigned int pr_uid;
+    unsigned int pr_gid;
+    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+    /* Lots missing */
+    char pr_fname[16];			/* Filename of executable.  */
+    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
+  };
+
 
 extern void _bfd_elf_swap_verdef_in
   (bfd *, const Elf_External_Verdef *, Elf_Internal_Verdef *);
@@ -2240,7 +2262,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section
 extern char *elfcore_write_note
   (bfd *, char *, int *, const char *, int, const void *, int);
 extern char *elfcore_write_prpsinfo
-  (bfd *, char *, int *, const char *, const char *);
+  (bfd *, char *, int *, const struct elf_internal_prpsinfo *);
 extern char *elfcore_write_prstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char * elfcore_write_pstatus
diff --git a/bfd/elf-psinfo.h b/bfd/elf-psinfo.h
new file mode 100644
index 0000000..09b4a9e
--- /dev/null
+++ b/bfd/elf-psinfo.h
@@ -0,0 +1,76 @@
+/* Declarations for PRPSINFO/PSINFO structures under ELF on GNU/Linux.
+   Copyright 2012 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   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, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+typedef char int8_t;
+typedef unsigned short int uint16_t;
+typedef int int32_t;
+typedef unsigned int uint32_t;
+#endif
+
+#undef HAVE_PRPSINFO32_T
+#define HAVE_PRPSINFO32_T
+#undef HAVE_PRPSINFO32_T_PR_PID
+#define HAVE_PRPSINFO32_T_PR_PID
+
+#define ELF_PRARGSZ (80)
+
+/* Unsigned 64-bit integer aligned to 8 bytes.  */
+typedef uint64_t __attribute__ ((__aligned__ (8))) a8_uint64_t;
+
+#define PRPSINFO32_FIELD_SIZE(field) sizeof (((prpsinfo32_t *) 0)->field)
+
+struct elf_prpsinfo32
+  {
+    int8_t pr_state;			/* Numeric process state.  */
+    char pr_sname;			/* Char for pr_state.  */
+    int8_t pr_zomb;			/* Zombie.  */
+    int8_t pr_nice;			/* Nice val.  */
+    uint32_t pr_flag;			/* Flags.  */
+    uint16_t pr_uid;
+    uint16_t pr_gid;
+    int32_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
+    /* Lots missing */
+    char pr_fname[16];			/* Filename of executable.  */
+    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
+  };
+
+#define PRPSINFO64_FIELD_SIZE(field) sizeof (((prpsinfo64_t *) 0)->field)
+
+struct elf_prpsinfo64
+  {
+    int8_t pr_state;			/* Numeric process state.  */
+    char pr_sname;			/* Char for pr_state.  */
+    int8_t pr_zomb;			/* Zombie.  */
+    int8_t pr_nice;			/* Nice val.  */
+    a8_uint64_t pr_flag;		/* Flags.  */
+    uint32_t pr_uid;
+    uint32_t pr_gid;
+    int32_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
+    /* Lots missing */
+    char pr_fname[16];			/* Filename of executable.  */
+    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
+  };
+
+/* Process status and info.  In the end we do provide typedefs for them.  */
+typedef struct elf_prpsinfo32 prpsinfo32_t;
+typedef struct elf_prpsinfo64 prpsinfo64_t;
diff --git a/bfd/elf.c b/bfd/elf.c
index b8bb6d3..3d2c493 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9037,16 +9037,16 @@ char *
 elfcore_write_prpsinfo (bfd  *abfd,
 			char *buf,
 			int  *bufsiz,
-			const char *fname,
-			const char *psargs)
+			const struct elf_internal_prpsinfo *input)
 {
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
 
   if (bed->elf_backend_write_core_note != NULL)
     {
       char *ret;
+
       ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
-						 NT_PRPSINFO, fname, psargs);
+						 NT_PRPSINFO, input);
       if (ret != NULL)
 	return ret;
     }
@@ -9064,8 +9064,8 @@ elfcore_write_prpsinfo (bfd  *abfd,
 #endif
 
       memset (&data, 0, sizeof (data));
-      strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
-      strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+      strncpy (data.pr_fname, input->pr_fname, sizeof (data.pr_fname));
+      strncpy (data.pr_psargs, input->pr_psargs, sizeof (data.pr_psargs));
       return elfcore_write_note (abfd, buf, bufsiz,
 				 "CORE", note_type, &data, sizeof (data));
     }
@@ -9081,8 +9081,8 @@ elfcore_write_prpsinfo (bfd  *abfd,
 #endif
 
       memset (&data, 0, sizeof (data));
-      strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
-      strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+      strncpy (data.pr_fname, input->pr_fname, sizeof (data.pr_fname));
+      strncpy (data.pr_psargs, input->pr_psargs, sizeof (data.pr_psargs));
       return elfcore_write_note (abfd, buf, bufsiz,
 				 "CORE", note_type, &data, sizeof (data));
     }
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 1b04a6e..6512cb4 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -31,12 +31,19 @@
 #include "objalloc.h"
 #include "hashtab.h"
 #include "dwarf2.h"
+#include "elf-bfd.h"
+#include "elf-psinfo.h"
 
 /* 386 uses REL relocations instead of RELA.  */
 #define USE_REL	1
 
 #include "elf/i386.h"
 
+#ifdef CORE_HEADER
+#include <stdarg.h>
+#include CORE_HEADER
+#endif
+
 static reloc_howto_type elf_howto_table[]=
 {
   HOWTO(R_386_NONE, 0, 0, 0, FALSE, 0, complain_overflow_bitfield,
@@ -500,6 +507,96 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 
   return TRUE;
 }
+
+#ifdef CORE_HEADER
+static char *
+elf_i386_write_core_note (bfd *abfd, char *buf, int *bufsiz,
+			  int note_type, ...)
+{
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  va_list ap;
+  const struct elf_internal_prpsinfo *prpsinfo;
+  long pid;
+  int cursig;
+  const void *gregs;
+  char data[sizeof (prpsinfo32_t)];
+  char *p = data;
+
+  switch (note_type)
+    {
+    default:
+      return NULL;
+
+    case NT_PRPSINFO:
+      va_start (ap, note_type);
+      prpsinfo = va_arg (ap, const struct elf_internal_prpsinfo *);
+      va_end (ap);
+
+      memset (data, 0, sizeof (data));
+
+      memcpy (p, &prpsinfo->pr_state, PRPSINFO32_FIELD_SIZE (pr_state));
+      p += PRPSINFO32_FIELD_SIZE (pr_state);
+      memcpy (p, &prpsinfo->pr_sname, PRPSINFO32_FIELD_SIZE (pr_sname));
+      p += PRPSINFO32_FIELD_SIZE (pr_sname);
+      memcpy (p, &prpsinfo->pr_zomb, PRPSINFO32_FIELD_SIZE (pr_zomb));
+      p += PRPSINFO32_FIELD_SIZE (pr_zomb);
+      memcpy (p, &prpsinfo->pr_nice, PRPSINFO32_FIELD_SIZE (pr_nice));
+      p += PRPSINFO32_FIELD_SIZE (pr_nice);
+      memcpy (p, &prpsinfo->pr_flag, PRPSINFO32_FIELD_SIZE (pr_flag));
+      p += PRPSINFO32_FIELD_SIZE (pr_flag);
+      memcpy (p, &prpsinfo->pr_uid, PRPSINFO32_FIELD_SIZE (pr_uid));
+      p += PRPSINFO32_FIELD_SIZE (pr_uid);
+      memcpy (p, &prpsinfo->pr_gid, PRPSINFO32_FIELD_SIZE (pr_gid));
+      p += PRPSINFO32_FIELD_SIZE (pr_gid);
+      memcpy (p, &prpsinfo->pr_pid, PRPSINFO32_FIELD_SIZE (pr_pid));
+      p += PRPSINFO32_FIELD_SIZE (pr_pid);
+      memcpy (p, &prpsinfo->pr_ppid, PRPSINFO32_FIELD_SIZE (pr_ppid));
+      p += PRPSINFO32_FIELD_SIZE (pr_ppid);
+      memcpy (p, &prpsinfo->pr_pgrp, PRPSINFO32_FIELD_SIZE (pr_pgrp));
+      p += PRPSINFO32_FIELD_SIZE (pr_pgrp);
+      memcpy (p, &prpsinfo->pr_sid, PRPSINFO32_FIELD_SIZE (pr_sid));
+      p += PRPSINFO32_FIELD_SIZE (pr_sid);
+      memcpy (p, prpsinfo->pr_fname, PRPSINFO32_FIELD_SIZE (pr_fname));
+      p += PRPSINFO32_FIELD_SIZE (pr_fname);
+      memcpy (p, prpsinfo->pr_psargs, PRPSINFO32_FIELD_SIZE (pr_psargs));
+      p += PRPSINFO32_FIELD_SIZE (pr_psargs);
+
+      return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				 data, sizeof (data));
+      /* NOTREACHED */
+
+    case NT_PRSTATUS:
+      va_start (ap, note_type);
+      pid = va_arg (ap, long);
+      cursig = va_arg (ap, int);
+      gregs = va_arg (ap, const void *);
+      va_end (ap);
+
+      if (bed->elf_machine_code == EM_X86_64)
+	{
+	  prstatusx32_t prstat;
+	  memset (&prstat, 0, sizeof (prstat));
+	  prstat.pr_pid = pid;
+	  prstat.pr_cursig = cursig;
+	  memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
+	  return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				     &prstat, sizeof (prstat));
+	}
+      else
+	{
+	  prstatus32_t prstat;
+	  memset (&prstat, 0, sizeof (prstat));
+	  prstat.pr_pid = pid;
+	  prstat.pr_cursig = cursig;
+	  memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
+	  return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				     &prstat, sizeof (prstat));
+	}
+    }
+  /* NOTREACHED */
+}
+#endif /* CORE_HEADER */
+
 
 /* Functions for the i386 ELF linker.
 
@@ -5112,6 +5209,9 @@ elf_i386_add_symbol_hook (bfd * abfd,
 #define elf_backend_gc_sweep_hook	      elf_i386_gc_sweep_hook
 #define elf_backend_grok_prstatus	      elf_i386_grok_prstatus
 #define elf_backend_grok_psinfo		      elf_i386_grok_psinfo
+#if defined CORE_HEADER
+#define elf_backend_write_core_note	      elf_i386_write_core_note
+#endif
 #define elf_backend_reloc_type_class	      elf_i386_reloc_type_class
 #define elf_backend_relocate_section	      elf_i386_relocate_section
 #define elf_backend_size_dynamic_sections     elf_i386_size_dynamic_sections
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index d58384f..5ff27b0 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -32,6 +32,7 @@
 #include "hashtab.h"
 #include "dwarf2.h"
 #include "libiberty.h"
+#include "elf-psinfo.h"
 
 #include "elf/x86-64.h"
 
@@ -422,10 +423,12 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
 {
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   va_list ap;
-  const char *fname, *psargs;
+  const struct elf_internal_prpsinfo *prpsinfo;
   long pid;
   int cursig;
   const void *gregs;
+  char data[sizeof (prpsinfo64_t)];
+  char *p = data;
 
   switch (note_type)
     {
@@ -434,28 +437,41 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz,
 
     case NT_PRPSINFO:
       va_start (ap, note_type);
-      fname = va_arg (ap, const char *);
-      psargs = va_arg (ap, const char *);
+      prpsinfo = va_arg (ap, const struct elf_internal_prpsinfo *);
       va_end (ap);
 
-      if (bed->s->elfclass == ELFCLASS32)
-	{
-	  prpsinfo32_t data;
-	  memset (&data, 0, sizeof (data));
-	  strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
-	  strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
-	  return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
-				     &data, sizeof (data));
-	}
-      else
-	{
-	  prpsinfo64_t data;
-	  memset (&data, 0, sizeof (data));
-	  strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
-	  strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
-	  return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
-				     &data, sizeof (data));
-	}
+      memset (data, 0, sizeof (data));
+
+      memcpy (p, &prpsinfo->pr_state, PRPSINFO64_FIELD_SIZE (pr_state));
+      p += PRPSINFO64_FIELD_SIZE (pr_state);
+      memcpy (p, &prpsinfo->pr_sname, PRPSINFO64_FIELD_SIZE (pr_sname));
+      p += PRPSINFO64_FIELD_SIZE (pr_sname);
+      memcpy (p, &prpsinfo->pr_zomb, PRPSINFO64_FIELD_SIZE (pr_zomb));
+      p += PRPSINFO64_FIELD_SIZE (pr_zomb);
+      memcpy (p, &prpsinfo->pr_nice, PRPSINFO64_FIELD_SIZE (pr_nice));
+      /* The 64-bit structure has a 4-byte padding here.  */
+      p += PRPSINFO64_FIELD_SIZE (pr_nice) + 4;
+      memcpy (p, &prpsinfo->pr_flag, PRPSINFO64_FIELD_SIZE (pr_flag));
+      p += PRPSINFO64_FIELD_SIZE (pr_flag);
+      memcpy (p, &prpsinfo->pr_uid, PRPSINFO64_FIELD_SIZE (pr_uid));
+      p += PRPSINFO64_FIELD_SIZE (pr_uid);
+      memcpy (p, &prpsinfo->pr_gid, PRPSINFO64_FIELD_SIZE (pr_gid));
+      p += PRPSINFO64_FIELD_SIZE (pr_gid);
+      memcpy (p, &prpsinfo->pr_pid, PRPSINFO64_FIELD_SIZE (pr_pid));
+      p += PRPSINFO64_FIELD_SIZE (pr_pid);
+      memcpy (p, &prpsinfo->pr_ppid, PRPSINFO64_FIELD_SIZE (pr_ppid));
+      p += PRPSINFO64_FIELD_SIZE (pr_ppid);
+      memcpy (p, &prpsinfo->pr_pgrp, PRPSINFO64_FIELD_SIZE (pr_pgrp));
+      p += PRPSINFO64_FIELD_SIZE (pr_pgrp);
+      memcpy (p, &prpsinfo->pr_sid, PRPSINFO64_FIELD_SIZE (pr_sid));
+      p += PRPSINFO64_FIELD_SIZE (pr_sid);
+      memcpy (p, prpsinfo->pr_fname, PRPSINFO64_FIELD_SIZE (pr_fname));
+      p += PRPSINFO64_FIELD_SIZE (pr_fname);
+      memcpy (p, prpsinfo->pr_psargs, PRPSINFO64_FIELD_SIZE (pr_psargs));
+      p += PRPSINFO64_FIELD_SIZE (pr_psargs);
+
+      return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+				 data, sizeof (data));
       /* NOTREACHED */
 
     case NT_PRSTATUS:
diff --git a/bfd/hosts/x86-64linux.h b/bfd/hosts/x86-64linux.h
index 78be09a..6070978 100644
--- a/bfd/hosts/x86-64linux.h
+++ b/bfd/hosts/x86-64linux.h
@@ -43,11 +43,6 @@ typedef unsigned long long int uint64_t;
 /* Unsigned 64-bit integer aligned to 8 bytes.  */
 typedef uint64_t __attribute__ ((__aligned__ (8))) a8_uint64_t;
 
-#undef HAVE_PRPSINFO32_T
-#define HAVE_PRPSINFO32_T
-#undef HAVE_PRPSINFO32_T_PR_PID
-#define HAVE_PRPSINFO32_T_PR_PID
-
 #undef HAVE_PRSTATUS32_T
 #define HAVE_PRSTATUS32_T
 
@@ -191,36 +186,6 @@ struct elf_prstatus64
     int pr_fpvalid;			/* True if math copro being used.  */
   };
 
-struct elf_prpsinfo32
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-    unsigned int pr_flag;		/* Flags.  */
-    unsigned short int pr_uid;
-    unsigned short int pr_gid;
-    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
-    /* Lots missing */
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
-  };
-
-struct elf_prpsinfo64
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-    a8_uint64_t pr_flag;		/* Flags.  */
-    unsigned int pr_uid;
-    unsigned int pr_gid;
-    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
-    /* Lots missing */
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
-  };
-
 /* The rest of this file provides the types for emulation of the
    Solaris <proc_service.h> interfaces that should be implemented by
    users of libthread_db.  */
@@ -229,5 +194,3 @@ struct elf_prpsinfo64
 typedef struct elf_prstatus32 prstatus32_t;
 typedef struct elf_prstatusx32 prstatusx32_t;
 typedef struct elf_prstatus64 prstatus64_t;
-typedef struct elf_prpsinfo32 prpsinfo32_t;
-typedef struct elf_prpsinfo64 prpsinfo64_t;



More information about the Binutils mailing list