/* Target-dependent code for the Texas Instruments MSP430 for GDB, the
GNU debugger.
- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
static int
msp430_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- if (reg < MSP430_NUM_REGS)
+ if (reg >= 0 && reg < MSP430_NUM_REGS)
return reg + MSP430_NUM_REGS;
- else
- {
- warning (_("Unmapped DWARF Register #%d encountered."), reg);
- return -1;
- }
+ return -1;
}
/* Implement the "return_value" gdbarch method. */