2008-11-12 Tristan Gingold <gingold@adacore.com>
[binutils-gdb.git] / gdb / hppa-linux-nat.c
index 366d1fcf5173808bb2754baf8e559334fe272c12..a92510b94aeb4d7444130956aa963ad24028870d 100644 (file)
@@ -1,6 +1,6 @@
 /* Functions specific to running GDB native on HPPA running GNU/Linux.
 
-   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -153,7 +153,7 @@ hppa_linux_register_addr (int regno, CORE_ADDR blockend)
 {
   CORE_ADDR addr;
 
-  if ((unsigned) regno >= gdbarch_num_regs (current_gdbarch))
+  if ((unsigned) regno >= ARRAY_SIZE (u_offsets))
     error (_("Invalid register number %d."), regno);
 
   if (u_offsets[regno] == -1)