* buildsym.h (struct subfile): Add debugformat member.
[deliverable/binutils-gdb.git] / gdb / m88k-nat.c
index 619d8652883eb1f3594e94ed6dab7f5b2c9b2c65..19e9392ea666169b8eae2ac884fdc59743ccab38 100644 (file)
@@ -15,7 +15,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "frame.h"
@@ -34,7 +34,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <sys/ioctl.h>
 #include <fcntl.h>
 #include <sys/file.h>
-#include <sys/stat.h>
+#include "gdb_stat.h"
 
 #include "symtab.h"
 #include "setjmp.h"
@@ -211,14 +211,21 @@ m88k_register_u_addr (blockend, regnum)
     case 28:
     case 29:
     case 30:
-    case 31:          return (ustart + ((int) &u.pt_r0 - (int) &u) + sizeof(REGISTER_TYPE) * regnum);
+    case 31:
+      return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
     case PSR_REGNUM:  return (ustart + ((int) &u.pt_psr - (int) &u));
     case FPSR_REGNUM: return (ustart + ((int) &u.pt_fpsr - (int) &u));
     case FPCR_REGNUM: return (ustart + ((int) &u.pt_fpcr - (int) &u));
     case SXIP_REGNUM: return (ustart + SXIP_OFFSET); 
     case SNIP_REGNUM: return (ustart + SNIP_OFFSET);
     case SFIP_REGNUM: return (ustart + SFIP_OFFSET); 
-    default: return (blockend + sizeof (REGISTER_TYPE) * regnum);
+    default: 
+       if (regnum < NUM_REGS)
+           /* The register is one of those which is not defined...
+              give it zero */
+           return (ustart + ((int) &u.pt_r0 - (int) &u));
+       else
+           return (blockend + REGISTER_SIZE * regnum);
     }
 }
 
This page took 0.023536 seconds and 4 git commands to generate.