public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFA] off by one error in gdbserver/linux-amd64-ipa.c
@ 2011-02-26 22:31 Michael Snyder
  2011-02-27 16:37 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2011-02-26 22:31 UTC (permalink / raw)
  To: gdb-patches, Pedro Alves

[-- Attachment #1: Type: text/plain, Size: 60 bytes --]

Pretty sure this should be greater than or equal.

Michael


[-- Attachment #2: offbyone.txt --]
[-- Type: text/plain, Size: 813 bytes --]

2011-02-26  Michael Snyder  <msnyder@vmware.com>

	* linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
	in comparison.

Index: linux-amd64-ipa.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-amd64-ipa.c,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 linux-amd64-ipa.c
--- linux-amd64-ipa.c	1 Jan 2011 15:33:24 -0000	1.4
+++ linux-amd64-ipa.c	26 Feb 2011 22:28:15 -0000
@@ -69,7 +69,7 @@ supply_fast_tracepoint_registers (struct
 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]);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] off by one error in gdbserver/linux-amd64-ipa.c
  2011-02-26 22:31 [RFA] off by one error in gdbserver/linux-amd64-ipa.c Michael Snyder
@ 2011-02-27 16:37 ` Pedro Alves
  2011-02-27 21:20   ` Michael Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2011-02-27 16:37 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Saturday 26 February 2011 22:31:13, Michael Snyder wrote:
>   2011-02-26  Michael Snyder  <msnyder@vmware.com>
> 
>         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
>         in comparison.
> 

Okay, thanks.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] off by one error in gdbserver/linux-amd64-ipa.c
  2011-02-27 16:37 ` Pedro Alves
@ 2011-02-27 21:20   ` Michael Snyder
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2011-02-27 21:20 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

Pedro Alves wrote:
> On Saturday 26 February 2011 22:31:13, Michael Snyder wrote:
>>   2011-02-26  Michael Snyder  <msnyder@vmware.com>
>>
>>         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
>>         in comparison.
>>
> 
> Okay, thanks.
> 

Committed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-27 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-26 22:31 [RFA] off by one error in gdbserver/linux-amd64-ipa.c Michael Snyder
2011-02-27 16:37 ` Pedro Alves
2011-02-27 21:20   ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).