]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
include/elf:
authorJason Thorpe <thorpej@netbsd.org>
Wed, 9 Jan 2002 18:59:11 +0000 (18:59 +0000)
committerJason Thorpe <thorpej@netbsd.org>
Wed, 9 Jan 2002 18:59:11 +0000 (18:59 +0000)
* common.h: Update copyright years.
(NT_NETBSDCORE_PROCINFO): Define.
(NT_NETBSDCORE_FIRSTMACH): Define.

bfd:
* elf.c: Update copyright years.
(elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.

bintuils:
* readelf.c (get_netbsd_elfcore_note_type): Use
NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.

bfd/ChangeLog
bfd/elf.c
binutils/ChangeLog
binutils/readelf.c
include/elf/ChangeLog
include/elf/common.h

index 7013b7d23f1d7c52388ee1eb0253d85ef6660670..24af6fd414eb805280c14474e296ce0d3ec10bdf 100644 (file)
@@ -1,3 +1,9 @@
+2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com> 
+
+       * elf.c: Update copyright years.
+       (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
+       and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
+
 2002-01-08  Michael Snyder  <msnyder@redhat.com>
 
        Add capability to write corefile note sections, for gdb.
index ed2396e76ffbd49609ae3ad165b4f18b8a12ffca..1dd7d7db257e62fd46c900bf9732055c608bc257 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6432,7 +6432,7 @@ elfcore_grok_netbsd_note (abfd, note)
   if (elfcore_netbsd_get_lwpid (note, &lwp))
     elf_tdata (abfd)->core_lwpid = lwp;
 
-  if (note->type == 1)
+  if (note->type == NT_NETBSDCORE_PROCINFO)
     {
       /* NetBSD-specific core "procinfo".  Note that we expect to
          find this note before any of the others, which is fine,
@@ -6442,11 +6442,12 @@ elfcore_grok_netbsd_note (abfd, note)
       return elfcore_grok_netbsd_procinfo (abfd, note);
     }
 
-  /* There are not currently any other machine-independent notes defined
-     for NetBSD ELF core files.  If the note type is less than the start
-     of the machine-dependent note types, we don't understand it.  */
+  /* As of Jan 2002 there are no other machine-independent notes
+     defined for NetBSD core files.  If the note type is less
+     than the start of the machine-dependent note types, we don't
+     understand it.  */
   
-  if (note->type < 32)
+  if (note->type < NT_NETBSDCORE_FIRSTMACH)
     return true;
 
 
@@ -6459,10 +6460,10 @@ elfcore_grok_netbsd_note (abfd, note)
     case bfd_arch_sparc:
       switch (note->type)
         {
-        case 32+0:
+        case NT_NETBSDCORE_FIRSTMACH+0:
           return elfcore_make_note_pseudosection (abfd, ".reg", note);
 
-        case 32+2:
+        case NT_NETBSDCORE_FIRSTMACH+2:
           return elfcore_make_note_pseudosection (abfd, ".reg2", note);
 
         default:
@@ -6475,10 +6476,10 @@ elfcore_grok_netbsd_note (abfd, note)
     default:
       switch (note->type)
         {
-        case 32+1:
+        case NT_NETBSDCORE_FIRSTMACH+1:
           return elfcore_make_note_pseudosection (abfd, ".reg", note);
 
-        case 32+3:
+        case NT_NETBSDCORE_FIRSTMACH+3:
           return elfcore_make_note_pseudosection (abfd, ".reg2", note);
 
         default:
index 574ced0521e7a35a8b26fbb12990f006d0a41c9d..51b9bfcc152fa7dd4349257c4c152926d4b0d25c 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * readelf.c (get_netbsd_elfcore_note_type): Use
+       NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
+
 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * readelf.c: Update copyright years.
index 6eddf7e90a0300c0a0d8f3cfa4494e18d92c6548..7ac891f9ab96705288199f9eb583fbcce2ef16ce 100644 (file)
@@ -9087,7 +9087,7 @@ get_netbsd_elfcore_note_type (e_type)
 {
   static char buff[64];
 
-  if (e_type == 1)
+  if (e_type == NT_NETBSDCORE_PROCINFO)
     {
       /* NetBSD core "procinfo" structure.  */
       return _("NetBSD procinfo structure");
@@ -9098,7 +9098,7 @@ get_netbsd_elfcore_note_type (e_type)
      than the start of the machine-dependent note types, we don't
      understand it.  */
 
-  if (e_type < 32)
+  if (e_type < NT_NETBSDCORE_FIRSTMACH)
     {
       sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
       return buff;
@@ -9116,8 +9116,10 @@ get_netbsd_elfcore_note_type (e_type)
     case EM_SPARCV9:
       switch (e_type)
        {
-       case 32+0:      return _("PT_GETREGS (reg structure)");
-       case 32+2:      return _("PT_GETFPREGS (fpreg structure)");
+       case NT_NETBSDCORE_FIRSTMACH+0:
+         return _("PT_GETREGS (reg structure)");
+       case NT_NETBSDCORE_FIRSTMACH+2:
+         return _("PT_GETFPREGS (fpreg structure)");
        default:
          break;
        }
@@ -9128,14 +9130,16 @@ get_netbsd_elfcore_note_type (e_type)
     default:
       switch (e_type)
        {
-       case 32+1:      return _("PT_GETREGS (reg structure)");
-       case 32+3:      return _("PT_GETFPREGS (fpreg structure)");
+       case NT_NETBSDCORE_FIRSTMACH+1:
+         return _("PT_GETREGS (reg structure)");
+       case NT_NETBSDCORE_FIRSTMACH+3:
+         return _("PT_GETFPREGS (fpreg structure)");
        default:
          break;
        }
     }
 
-  sprintf (buff, _("PT_FIRSTMACH+%d"), e_type - 32);
+  sprintf (buff, _("PT_FIRSTMACH+%d"), e_type - NT_NETBSDCORE_FIRSTMACH);
   return buff;
 }
 
index 068a4b6696c375620b34d8732e50293b09814361..ae780e20cc13c54c76a58982a7521618ac80d87d 100644 (file)
@@ -1,3 +1,9 @@
+2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * common.h: Update copyright years.
+       (NT_NETBSDCORE_PROCINFO): Define.
+       (NT_NETBSDCORE_FIRSTMACH): Define. 
+
 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
 
        * ia64.h (ELF_STRING_ia64_unwind_hdr): New Macro for HP-UX.
index 39ba05a0f759cdbee029a34e3f13733279b99144..289d3f2add2f275641435db64f886ad84b2bfdb5 100644 (file)
@@ -1,6 +1,6 @@
 /* ELF support for BFD.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001
+   2001, 2002
    Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
@@ -342,6 +342,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define NT_LWPSINFO    17              /* Has a struct lwpsinfo_t */
 #define NT_WIN32PSTATUS        18              /* Has a struct win32_pstatus */
 
+
+/* Note segments for core files on NetBSD systems.  Note name
+   must start with "NetBSD-CORE".  */
+
+#define NT_NETBSDCORE_PROCINFO 1       /* Has a struct procinfo */
+#define NT_NETBSDCORE_FIRSTMACH        32      /* start of machdep note types */
+
+
 /* Values of note segment descriptor types for object files.  */
 
 #define NT_VERSION     1               /* Contains a version string.  */