This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Change to_stopped_data_address ABI
- From: "Eli Zaretskii" <eliz at gnu dot org>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 01 Sep 2004 06:39:25 +0300
- Subject: Re: [RFA]: Change to_stopped_data_address ABI
- References: <4134C991.7050507@redhat.com> <01c48f92$Blat.v2.2.2$1eec0d00@zahav.net.il> <4134DD15.2080806@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Tue, 31 Aug 2004 16:18:29 -0400
> From: Jeff Johnston <jjohnstn@redhat.com>
> Cc: gdb-patches@sources.redhat.com
>
> Perhaps my description isn't clear enough. The function returns non-zero if
> successful (i.e. true). It returns 0 (false) to indicate failure or no stopped
> data address.
Well, I understood that, I think; but the code you posted seems to
work differently: if no watchpoint triggered, it returns 1, not zero:
> >>@@ -593,7 +598,16 @@ i386_stopped_data_address (void)
> >> if (maint_show_dr && addr == 0)
> >> i386_show_dr ("stopped_data_addr", 0, 0, hw_write);
> >>
> >>- return addr;
> >>+ *addr_p = addr;
> >>+ return 1;
Thus, in the case of "no stopped data address",
i386_stopped_data_address will return 1 with 0 in the place pointed to
by its argument, is that right?