Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!CIS.OHIO-STATE.EDU!mdt
From: mdt@CIS.OHIO-STATE.EDU (Michael Tiemann)
Newsgroups: gnu.gdb.bug
Subject: Sun4 GDB bug (3.0)
Message-ID: <8811271906.AA01414@chickasaw.>
Date: 27 Nov 88 19:06:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 17

This code in printcmd.c assumes that LOC_REGPARM implies
an integer or floating type.  In fact, any kind of type
can occur for a LOC_REGPARM.  GDB crashes if a parameter
has some other kind of type.

      /* Print the next arg.  */
      if (SYMBOL_CLASS (sym) == LOC_REGPARM)
	{
	  unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE];
	  unsigned char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];

	  read_relative_register_raw_bytes (SYMBOL_VALUE (sym), raw_buffer);
	  if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
	    val = value_from_long (SYMBOL_TYPE (sym), *(int *)raw_buffer);
	  else if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FLT)
	    val = value_from_double (SYMBOL_TYPE (sym), *(double *)raw_buffer);
	}