🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #384

mips floating-point register printing

#384
From: Andrew Heybey
Date: Wed, 19 Aug 1992 08:52
55 lines
2353 bytes
gdb-4.6, "configure decstation"

Couple of minor bugs in printing out the registers for the mips
architecture.  raw_buffer is not large enough so the stack was being
stomped in mips_print_register(), and REGISTER_VIRTUAL_TYPE() did not
return the correct type for the floating-point registers.

It's not clear whether the odd-numbered floating-point registers
should be printed as floating-point numbers or not since they cannot
be used for floating-point operations--they are only used for loading
and storing.  Beats me, so I left it alone.

andrew

*** /tmp/RCSAa08527	Wed Aug 19 12:38:22 1992
--- mips-tdep.c	Wed Aug 19 11:51:07 1992
***************
*** 533,539 ****
  mips_print_register(regnum, all)
       int regnum, all;
  {
!       unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE];
        REGISTER_TYPE val;
  
        /* Get the data in raw format.  */
--- 533,539 ----
  mips_print_register(regnum, all)
       int regnum, all;
  {
!       unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE*2];
        REGISTER_TYPE val;
  
        /* Get the data in raw format.  */
*** /tmp/RCSAa08536	Wed Aug 19 12:38:40 1992
--- tm-mips.h	Wed Aug 19 11:51:51 1992
***************
*** 190,196 ****
  /* Return the GDB type object for the "standard" data type
     of data in register N.  */
  
! #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
  /* Store the address of the place in which to copy the structure the
     subroutine will return.  This is called from call_function. */
  
--- 190,199 ----
  /* Return the GDB type object for the "standard" data type
     of data in register N.  */
  
! #define REGISTER_VIRTUAL_TYPE(N)  \
! 	(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32)  \
! 	 ? builtin_type_float : builtin_type_int) \
! 
  /* Store the address of the place in which to copy the structure the
     subroutine will return.  This is called from call_function. */
  
Technical Details
Message-ID: <9208191652.AA04608@mace.LCS.MIT.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!lcs.mit.edu!ath

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!lcs.mit.edu!ath
From: ath@lcs.mit.edu (Andrew Heybey)
Subject: mips floating-point register printing
Message-ID: <9208191652.AA04608@mace.LCS.MIT.EDU>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 19 Aug 1992 08:52:25 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 56