From 10230b2353fc60621eb08101e9acab72fb74eb56 Mon Sep 17 00:00:00 2001 From: uwe Date: Mon, 31 Oct 2011 19:12:48 +0000 Subject: [PATCH] get_netbsd_elfcore_note_type: sync SuperH PT_GETREGS value with reality. Recognize old PT___GETREGS40 (for struct __reg40 without GBR). Recognize PT_GETFPREGS that we don't yet actually have, but for which the number is now reserved. --- external/gpl3/binutils/dist/binutils/readelf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/external/gpl3/binutils/dist/binutils/readelf.c b/external/gpl3/binutils/dist/binutils/readelf.c index a31dd3cf435e..1750915ad7d1 100644 --- a/external/gpl3/binutils/dist/binutils/readelf.c +++ b/external/gpl3/binutils/dist/binutils/readelf.c @@ -11933,6 +11933,23 @@ get_netbsd_elfcore_note_type (unsigned e_type) } break; + /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5. + There's also old PT___GETREGS40 == mach + 1 for old reg + structure which lacks GBR. */ + case EM_SH: + switch (e_type) + { + case NT_NETBSDCORE_FIRSTMACH + 1: + return _("PT___GETREGS40 (old reg structure)"); + case NT_NETBSDCORE_FIRSTMACH + 3: + return _("PT_GETREGS (reg structure)"); + case NT_NETBSDCORE_FIRSTMACH + 5: + return _("PT_GETFPREGS (fpreg structure)"); + default: + break; + } + break; + /* On all other arch's, PT_GETREGS == mach+1 and PT_GETFPREGS == mach+3. */ default: