This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compile errors on FreBSD/i386 3.x


Hello,

On a FreeBSD machine I'm seeing the compiler error:

/home/scratch/GDB/src/bfd/elf.c: In function `elfcore_write_prstatus':
/home/scratch/GDB/src/bfd/elf.c:6588: incompatible type for argument 1 
of `memcpy'

A guess at the fix is:

*** elf.c       2002/01/15 01:30:18
--- elf.c       2002/01/19 01:00:41
*************** elfcore_write_prstatus (abfd, buf, bufsi
*** 6325,6331 ****
     memset (&prstat, 0, sizeof (prstat));
     prstat.pr_pid = pid;
     prstat.pr_cursig = cursig;
!   memcpy (prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
     return elfcore_write_note (abfd, buf, bufsiz,
                              note_name, NT_PRSTATUS, &prstat, sizeof 
(prstat));
   }
--- 6325,6331 ----
     memset (&prstat, 0, sizeof (prstat));
     prstat.pr_pid = pid;
     prstat.pr_cursig = cursig;
!   memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
     return elfcore_write_note (abfd, buf, bufsiz,
                              note_name, NT_PRSTATUS, &prstat, sizeof 
(prstat));
   }


Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]