This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA]: Change to_stopped_data_address ABI


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]