From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24468 invoked by alias); 20 Sep 2004 21:35:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24454 invoked from network); 20 Sep 2004 21:35:18 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 20 Sep 2004 21:35:18 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8KLZI3b020632 for ; Mon, 20 Sep 2004 17:35:18 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8KLZHr22658 for ; Mon, 20 Sep 2004 17:35:17 -0400 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id i8KLZH1l001671; Mon, 20 Sep 2004 17:35:17 -0400 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 2B585800143; Mon, 20 Sep 2004 17:35:17 -0400 (EDT) Message-ID: <414F4D15.7010503@redhat.com> Date: Mon, 20 Sep 2004 21:35:00 -0000 From: Jeff Johnston User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 MIME-Version: 1.0 To: Jeff Johnston Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Change to_stopped_data_address ABI References: <4134C991.7050507@redhat.com> In-Reply-To: <4134C991.7050507@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00326.txt.bz2 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 > > * 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 > > * 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. > >