[PATCH] BFD patch for solaris (was: gcore fix for native gdb on solaris)

Daniel Gutson dgutson@codesourcery.com
Thu Nov 12 22:42:00 GMT 2009


Hi, I posted this patch in the gdb-patches list, but was told that the 
BFD part had to be posted here.

Please let me know if the BFD part (description and changelog below) is 
OK to commit.

Thanks,
	Daniel.

-------- Original Message --------
Subject: [PATCH] gcore fix for native gdb on solaris
Date: Tue, 10 Nov 2009 19:14:21 -0300
From: Daniel Gutson <dgutson@codesourcery.com>
Organization: CodeSourcery
To: gdb-patches@sourceware.org <gdb-patches@sourceware.org>

The attached patch solves a bug that caused GDB to wrongly read core
dump files generated with the gcore command, running on solaris.

A define (_STRUCTURE_PROC) was needed before including procfs.h.
Additionally, fp regs are properly read.

I tested this with the gdb test suite, comparing results before and
after (the only differences were caused by timeouts).

Please let me know any comments, or commit it for me since I don't have
write access.

Thanks,
	Daniel.

2009-11-10  Daniel Gutson  <dgutson@codesourcery.com>

	bfd/
	* bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
	before including procfs.h.
	(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
	* configure.in: Added autoconf probe for the pr_fpreg member.
	* configure: Regenerated.
	* config.in: Regenerated.
	* elf.c: Define _STRUCTURE_PROC before including procfs.h.

	gdb/
	* procfs.c: (procfs_do_thread_registers) Use
	elfcore_write_lwpstatus.

-- 
Daniel Gutson
CodeSourcery
www.codesourcery.com


-- 
Daniel Gutson
CodeSourcery
www.codesourcery.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: procfs.patch
Type: text/x-diff
Size: 6703 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091112/0d9e7903/attachment.bin>


More information about the Binutils mailing list