PATCH: fix typo in elfcore_write_lwpstatus()

Dennis Brueni dbrueni@slickedit.com
Fri Oct 24 18:16:00 GMT 2014
Fix an obvious coding error that led to a GDB crash on AIX or HPUX.

bfd/ChangeLog

2014-10-23  Dennis Brueni  <dbrueni@slickedit.com<mailto:dbrueni@slickedit.com>>

* elf.c (elfcore_write_lwpstatus): fix typo in call to memcpy



diff -urN binutils-2.24-dist/bfd/elf.c binutils-2.24/bfd/elf.c

--- binutils-2.24-dist/bfd/elf.c 2013-11-04 07:33:37.000000000 -0800

+++ binutils-2.24/bfd/elf.c 2014-10-24 11:09:36.000000000 -0700

@@ -9287,7 +9287,7 @@

   lwpstat.pr_lwpid  = pid >> 16;

   lwpstat.pr_cursig = cursig;

 #if defined (HAVE_LWPSTATUS_T_PR_REG)

-  memcpy (lwpstat.pr_reg, gregs, sizeof (lwpstat.pr_reg));

+  memcpy (&lwpstat.pr_reg, gregs, sizeof (lwpstat.pr_reg));

 #elif defined (HAVE_LWPSTATUS_T_PR_CONTEXT)

 #if !defined(gregs)

   memcpy (lwpstat.pr_context.uc_mcontext.gregs,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-2.24-elf.diff
Type: application/octet-stream
Size: 558 bytes
Desc: binutils-2.24-elf.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20141024/e9c2aade/attachment.obj>


More information about the Binutils mailing list