aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-01-09 18:59:11 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-01-09 18:59:11 +0000
commitb4db1224b76fe25c9770904953491be0e51cb9fb (patch)
tree549855e99e7e9245bff9809080cf9b675838fa4c /binutils
parentc564377feab16bc2fda4424625f23813186c3e8c (diff)
downloadgdb-b4db1224b76fe25c9770904953491be0e51cb9fb.zip
gdb-b4db1224b76fe25c9770904953491be0e51cb9fb.tar.gz
gdb-b4db1224b76fe25c9770904953491be0e51cb9fb.tar.bz2
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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c18
2 files changed, 16 insertions, 7 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 574ced0..51b9bfc 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,10 @@
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.
(get_note_type): Return a const char *.
(get_netbsd_elfcore_note_type): New function.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 6eddf7e..7ac891f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -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;
}