Resume the inferior with signal rather than stepping over
[deliverable/binutils-gdb.git] / gdb / mep-tdep.c
index f7d33ca92c76b98d2140283238587250086d321c..a110b04dab1a7a407c87f55a8d9bdef338f63911 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Toshiba MeP for GDB, the GNU debugger.
 
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
    Contributed by Red Hat, Inc.
 
@@ -784,7 +784,9 @@ static int
 mep_debug_reg_to_regnum (struct gdbarch *gdbarch, int debug_reg)
 {
   /* The debug info uses the raw register numbers.  */
-  return mep_raw_to_pseudo[debug_reg];
+  if (debug_reg >= 0 && debug_reg < ARRAY_SIZE (mep_raw_to_pseudo))
+    return mep_raw_to_pseudo[debug_reg];
+  return -1;
 }
 
 
This page took 0.023736 seconds and 4 git commands to generate.