[RFA]: Change to_stopped_data_address ABI

Jeff Johnston jjohnstn@redhat.com
Mon Sep 20 21:35:00 GMT 2004


Ping.  I hope I clarified Eli's questions already.

Jeff Johnston wrote:
> I am proposing a change to the to_stopped_data_address target vector 
> function. There are two reasons.  The first reason is that there is no 
> way to determine if a platform actually supports 
> to_stopped_data_address.  For example, the S390 supports hardware 
> watchpoints, but doesn't support figuring out which address caused a 
> watchpoint to trigger.  This level of detail is necessary for proper 
> threaded watchpoint support to know whether to trust in the 
> to_stopped_data_address function or whether to check all watchpoints for 
> value changes.
> 
> The second reason for the proposed change is that there is no way to 
> watch address 0 since to_stopped_data_address currently returns the 
> address 0 to indicate failure.
> 
> The proposed change is to change the prototype to be:
> 
> int
> to_stopped_data_address (CORE_ADDR *addr_p);
> 
> If the input pointer is NULL, the function returns non-zero if it works 
> on the given target, otherwise, it fails by returning 0.  The function 
> also returns 0 if unsuccessful.  By separating out the success/fail code 
> from the address, the new prototype allows for succeeding and returning 
> any address, including 0.
> 
> Ok to commit?
> 
> -- Jeff J.
> 
> 2004-08-31  Jeff Johnston  <jjohnstn@redhat.com>
> 
>         * target.h (to_stopped_data_address): Change prototype to
>         take a CORE_ADDR pointer and return an int.
>         * target.c (update_current_target): Change to_stopped_data_address
>         to match new prototype.
>         (debug_to_stopped_data_address): Change appropriately.
>     * breakpoint.c (bpstat_stop_status): Change call to
>     target_stopped_data_address to use new prototype.
>         * frv-tdep.c (frv_have_stopped_data_address): New function.
>         (frv_stopped_data_address): Change to new prototype and
>         functionality.
>         * ia64-linux-nat.c (ia64_stopped_data_address): Change to new
>         prototype and functionality.
>         (ia64_stopped_by_watchpoint): New function.
>         * i386-nat.c (i386_stopped_data_address): Change to new
>         prototype and functionality.
>         (i386_stopped_by_watchpoint): New function.
>         * remote.c (remote_stopped_data_address): Change to new prototype
>         and functionality.
>         * remote-m32r-sdi.c (m32r_stopped_data_address): Ditto.
>         * config/frv/tm-frv.h (frv_stopped_data_address): Change prototype.
>         (STOPPED_BY_WATCHPOINT): Change to use 
> frv_have_stopped_data_address.
>         * config/i386/nm-i386.h (STOPPED_BY_WATCHPOINT): Change to use
>         new i386_stopped_by_watchpoint function.
>         (i386_stopped_by_watchpoint): New prototype.
>         (i386_stoppped_data_address): Change to new prototype.
>         * config/ia64/nm-linux.h (STOPPED_BY_WATCHPOINT): Change to use
>         new ia64_stopped_by_watchpoint function.
>         (ia64_stopped_by_watchpoint): New prototype.
>         (ia64_stopped_data_address): Ditto.
> 
> doc/ChangeLog:
> 
> 2004-08-31  Jeff Johnston  <jjohnstn@redhat.com>
> 
>         * gdbint.texinfo (target_stopped_data_address): Update to
>         new prototype.
>         (i386_stopped_data_address): Update prototype and description.
>         (i386_stopped_by_watchpoint): New function and description.
> 
> 



More information about the Gdb-patches mailing list