summaryrefslogtreecommitdiff
path: root/gdb/dbug-rom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dbug-rom.c')
-rw-r--r--gdb/dbug-rom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c
index c4f0ef043d5..298a28b55fc 100644
--- a/gdb/dbug-rom.c
+++ b/gdb/dbug-rom.c
@@ -92,7 +92,7 @@ dbug_regname (int index)
};
if ((index >= (sizeof (regnames) / sizeof (regnames[0])))
- || (index < 0) || (index >= NUM_REGS))
+ || (index < 0) || (index >= gdbarch_num_regs (current_gdbarch)))
return NULL;
else
return regnames[index];