public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] breakpoint.c:watchpoints_triggered: simplify a tiny bit.
@ 2013-10-28 18:36 Pedro Alves
  2013-10-28 19:35 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2013-10-28 18:36 UTC (permalink / raw)
  To: gdb-patches

I was reading this, checking the the possible returns, and this
particular path confused a tiny little.  Above we do:

  if (!stopped_by_watchpoint)
    {
...
      return 0;
    }

so any return after that always return true.

Tested on x86_64 Fedora 17.

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

	* breakpoint.c (watchpoints_triggered)
	<!target_stopped_data_address>: Hardcode return 1.
---
 gdb/breakpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c630b87..e172be1 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4714,7 +4714,7 @@ watchpoints_triggered (struct target_waitstatus *ws)
 	    w->watchpoint_triggered = watch_triggered_unknown;
 	  }
 
-      return stopped_by_watchpoint;
+      return 1;
     }
 
   /* The target could report the data address.  Mark watchpoints
-- 
1.7.11.7

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

* Re: [PATCH] breakpoint.c:watchpoints_triggered: simplify a tiny bit.
  2013-10-28 18:36 [PATCH] breakpoint.c:watchpoints_triggered: simplify a tiny bit Pedro Alves
@ 2013-10-28 19:35 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2013-10-28 19:35 UTC (permalink / raw)
  To: gdb-patches

FYI, I already had pushed this in, but forgot to mention it
in the subject.

-- 
Pedro Alves

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

end of thread, other threads:[~2013-10-28 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28 18:36 [PATCH] breakpoint.c:watchpoints_triggered: simplify a tiny bit Pedro Alves
2013-10-28 19:35 ` Pedro Alves

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).