From: Michael Snyder Date: Sun, 27 Feb 2011 21:18:14 +0000 (+0000) Subject: 2011-02-26 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35f5825a72aa7f4fcddc06f6505f3ab3f39951ff;p=binutils-gdb.git 2011-02-26 Michael Snyder * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error in comparison. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index ed1bf1209f0..29b175fa98b 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2011-02-27 Michael Snyder + + * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error + in comparison. + 2011-02-26 Michael Snyder * utils.c (decimal2str): Eliminate dead code and dead param. diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c index 359a689925d..60665a71d63 100644 --- a/gdb/gdbserver/linux-amd64-ipa.c +++ b/gdb/gdbserver/linux-amd64-ipa.c @@ -69,7 +69,7 @@ supply_fast_tracepoint_registers (struct regcache *regcache, ULONGEST __attribute__ ((visibility("default"), used)) gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum) { - if (regnum > X86_64_NUM_FT_COLLECT_GREGS) + if (regnum >= X86_64_NUM_FT_COLLECT_GREGS) return 0; return *(ULONGEST *) (raw_regs + x86_64_ft_collect_regmap[regnum]);