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

Mark Kettenis kettenis@chello.nl
Tue Aug 12 17:06:00 GMT 2003


   Date: Tue, 12 Aug 2003 09:39:37 -0700
   From: Kevin Buettner <kevinb@redhat.com>

   On Aug 12,  5:36pm, Mark Kettenis wrote:

   > There is one more concern that I do have: If we include
   > the SSE registers, we somehow should also set their values to
   > something sensible for targets that don't support them.  We already do
   > this for Linux, but it makes more sense to add some code to
   > i387_supply_fsave().

   I just took a quick look at this.  It's not obvious to me what you have
   in mind.  Would you mind taking care of this?

I'll take care of it.

   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.

   > Do you want it on the 6.0 branch too?

   It's not critical, but it'd be nice.

I'll see.  At the very least I'll wait a few days and see whether
someone complains about the changed behaviour.

Mark



More information about the Gdb-patches mailing list