include/elf:

* 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.
This commit is contained in:
Jason Thorpe 2002-01-09 18:59:11 +00:00
parent c564377fea
commit b4db1224b7
6 changed files with 47 additions and 17 deletions

View 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.

View File

@ -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:

View 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.

View 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;
}

View 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.

View 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. */