home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / gdb / bug / 986 < prev    next >
Encoding:
Text File  |  1992-08-19  |  2.2 KB  |  69 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!lcs.mit.edu!ath
  3. From: ath@lcs.mit.edu (Andrew Heybey)
  4. Subject: mips floating-point register printing
  5. Message-ID: <9208191652.AA04608@mace.LCS.MIT.EDU>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 19 Aug 1992 08:52:25 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 56
  12.  
  13. gdb-4.6, "configure decstation"
  14.  
  15. Couple of minor bugs in printing out the registers for the mips
  16. architecture.  raw_buffer is not large enough so the stack was being
  17. stomped in mips_print_register(), and REGISTER_VIRTUAL_TYPE() did not
  18. return the correct type for the floating-point registers.
  19.  
  20. It's not clear whether the odd-numbered floating-point registers
  21. should be printed as floating-point numbers or not since they cannot
  22. be used for floating-point operations--they are only used for loading
  23. and storing.  Beats me, so I left it alone.
  24.  
  25. andrew
  26.  
  27. *** /tmp/RCSAa08527    Wed Aug 19 12:38:22 1992
  28. --- mips-tdep.c    Wed Aug 19 11:51:07 1992
  29. ***************
  30. *** 533,539 ****
  31.   mips_print_register(regnum, all)
  32.        int regnum, all;
  33.   {
  34. !       unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE];
  35.         REGISTER_TYPE val;
  36.   
  37.         /* Get the data in raw format.  */
  38. --- 533,539 ----
  39.   mips_print_register(regnum, all)
  40.        int regnum, all;
  41.   {
  42. !       unsigned char raw_buffer[MAX_REGISTER_RAW_SIZE*2];
  43.         REGISTER_TYPE val;
  44.   
  45.         /* Get the data in raw format.  */
  46. *** /tmp/RCSAa08536    Wed Aug 19 12:38:40 1992
  47. --- tm-mips.h    Wed Aug 19 11:51:51 1992
  48. ***************
  49. *** 190,196 ****
  50.   /* Return the GDB type object for the "standard" data type
  51.      of data in register N.  */
  52.   
  53. ! #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
  54.   /* Store the address of the place in which to copy the structure the
  55.      subroutine will return.  This is called from call_function. */
  56.   
  57. --- 190,199 ----
  58.   /* Return the GDB type object for the "standard" data type
  59.      of data in register N.  */
  60.   
  61. ! #define REGISTER_VIRTUAL_TYPE(N)  \
  62. !     (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32)  \
  63. !      ? builtin_type_float : builtin_type_int) \
  64.   /* Store the address of the place in which to copy the structure the
  65.      subroutine will return.  This is called from call_function. */
  66.   
  67.  
  68.