From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22124 invoked by alias); 21 Dec 2004 22:34:29 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 22098 invoked from network); 21 Dec 2004 22:34:24 -0000 Received: from unknown (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org with SMTP; 21 Dec 2004 22:34:24 -0000 Received: from [192.168.20.27] (CATDOG [192.168.20.27]) by nimbus.ott.qnx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id ZHDMX5DH; Tue, 21 Dec 2004 17:34:23 -0500 Message-ID: <41C8A4E2.8070900@qnx.com> Date: Tue, 21 Dec 2004 22:34:00 -0000 From: Kris Warkentin User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) MIME-Version: 1.0 To: binutils@sources.redhat.com Subject: [patch] (OB?) Fix for QNX Neutrino core file floating point handler Content-Type: multipart/mixed; boundary="------------000703070001040405040404" X-SW-Source: 2004-12/txt/msg00269.txt.bz2 This is a multi-part message in MIME format. --------------000703070001040405040404 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 495 We weren't generating the floating point register core file sections properly. Instead of .reg2/tid we were getting .reg2/pid which was confusing gdb. This patch fixes that. Okay to commit? cheers, Kris ChangeLog: 2004-12-21 Kris Warkentin * elf.c (elfcore_grok_nto_gregs): Change name to ..._nto_regs. Add 'base' argument for constructing register sections. Reformat. (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both gp and fp regs. Reformat. --------------000703070001040405040404 Content-Type: text/plain; name="bfd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bfd.diff" Content-length: 1832 Index: elf.c =================================================================== RCS file: /cvs/src/src/bfd/elf.c,v retrieving revision 1.258 diff -u -r1.258 elf.c --- elf.c 10 Dec 2004 14:04:55 -0000 1.258 +++ elf.c 21 Dec 2004 22:22:46 -0000 @@ -7382,14 +7382,17 @@ } static bfd_boolean -elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid) +elfcore_grok_nto_regs (bfd *abfd, + Elf_Internal_Note *note, + pid_t tid, + char *base) { char buf[100]; char *name; asection *sect; - /* Make a ".reg/%d" section. */ - sprintf (buf, ".reg/%d", tid); + /* Make a "(base)/%d" section. */ + sprintf (buf, "%s/%d", base, tid); name = bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) @@ -7407,7 +7410,7 @@ /* This is the current thread. */ if (elf_tdata (abfd)->core_lwpid == tid) - return elfcore_maybe_make_sect (abfd, ".reg", sect); + return elfcore_maybe_make_sect (abfd, base, sect); return TRUE; } @@ -7427,11 +7430,16 @@ switch (note->type) { - case BFD_QNT_CORE_INFO: return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note); - case BFD_QNT_CORE_STATUS: return elfcore_grok_nto_status (abfd, note, &tid); - case BFD_QNT_CORE_GREG: return elfcore_grok_nto_gregs (abfd, note, tid); - case BFD_QNT_CORE_FPREG: return elfcore_grok_prfpreg (abfd, note); - default: return TRUE; + case BFD_QNT_CORE_INFO: + return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note); + case BFD_QNT_CORE_STATUS: + return elfcore_grok_nto_status (abfd, note, &tid); + case BFD_QNT_CORE_GREG: + return elfcore_grok_nto_regs (abfd, note, tid, ".reg"); + case BFD_QNT_CORE_FPREG: + return elfcore_grok_nto_regs (abfd, note, tid, ".reg2"); + default: + return TRUE; } } --------------000703070001040405040404--