From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13200 invoked by alias); 5 Oct 2007 13:48:02 -0000 Received: (qmail 13191 invoked by uid 22791); 5 Oct 2007 13:48:01 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.29.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 Oct 2007 13:47:58 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.8/8.13.8) with ESMTP id l95DlsJa740738 for ; Fri, 5 Oct 2007 13:47:54 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l95Dlrw72322684 for ; Fri, 5 Oct 2007 15:47:53 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l95DlrOI018079 for ; Fri, 5 Oct 2007 15:47:53 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l95DlrFe018076 for ; Fri, 5 Oct 2007 15:47:53 +0200 Message-Id: <200710051347.l95DlrFe018076@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 5 Oct 2007 15:47:53 +0200 Subject: Remote watchpoint support for FRV To: gdb-patches@sourceware.org Date: Fri, 05 Oct 2007 13:48:00 -0000 From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00050.txt.bz2 Hello, the tm-frv.h header file overrides a number of watchpoint related target macros, in particular: #define STOPPED_BY_WATCHPOINT(W) \ ((W).kind == TARGET_WAITKIND_STOPPED \ && (W).value.sig == TARGET_SIGNAL_TRAP \ && frv_have_stopped_data_address()) Note that FRV is a remote-only target, so this will affect and modifiy the behaviour of the remote.c watchpoint handling. Apparently the intent is to use the standard remote protocol mechanisms to *set* watchpoints, but change the way to test whether a watchpoint was hit. Usually, remote.c would rely on the remote stub to detect this condition and report it via a "watch" stop reason in the stop reply packet. However, due to the tm-frv.h override, for FRV targets GDB will actually perform the check on the host side (by reading control registers via the normal register access protocol). To get rid of the TM header file, I can see two options: - Simply remove support for this way of handling remote watchpoints. Existing FRV remote stubs will need to be changed to use the standard "watch" stop reason code. - If we think we cannot break existing FRV stubs, I'd suggest to add new gdbarch callbacks that will be used by the remote target to allow architecture-specific overrides of the remote watchpoint mechanism, e.g.: gdbarch_remote_stopped_by_watchpoint gdbarch_remote_stopped_data_address gdbarch_remote_check_watch_resources Any opinions on this? The first option would obviously be the easiest to implement in GDB, but I'm not sure what extent FRV remote stubs are currently in use ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com