This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: [RFA/i386]: Enable default support for SSE registers


On Aug 12,  7:06pm, Mark Kettenis wrote:

>    Also... I just noticed the following bit of code in i387-tdep.c:
> 
>        i387_supply_register (int regnum, char *fsave)
>        {
> 	 if (fsave == NULL)
> 	   {
> 	     supply_register (regnum, NULL);
> 	     return;
> 	   }
> 
>    Calling supply_register() with NULL will end up calling memcpy() with
>    NULL as the second argument.  If memcpy() is told to copy a non-zero
>    number of characters, it'll SEGV.
> 
> Huh, If you call support_register() with NULL, it will use memset() to
> initialize the register with all zeroes.

My mistake.  The "tags" feature in my editor showed me the version in
gdbserver/regcache.c.

Kevin


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