From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27554 invoked by alias); 25 Jan 2005 16:08:25 -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 26241 invoked from network); 25 Jan 2005 16:07:38 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 25 Jan 2005 16:07:38 -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.11) with ESMTP id j0PG7cd9002641 for ; Tue, 25 Jan 2005 11:07:38 -0500 Received: from localhost.redhat.com (vpn50-81.rdu.redhat.com [172.16.50.81]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j0PG7cO29321; Tue, 25 Jan 2005 11:07:38 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3F1657D79; Tue, 25 Jan 2005 11:07:24 -0500 (EST) Message-ID: <41F66EBA.3020107@gnu.org> Date: Tue, 25 Jan 2005 16:08:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Orjan Friberg Cc: gdb-patches@sources.redhat.com Subject: Re: New port: CRISv32 References: <41E79606.40302@axis.com> <41E803F5.2020307@gnu.org> <41F65A50.9090003@axis.com> In-Reply-To: <41F65A50.9090003@axis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00243.txt.bz2 Orjan Friberg wrote: > Andrew Cagney wrote: > >> Orjan Friberg wrote: >> >>> >>> 2005-01-15 Orjan Friberg >>> >>> * config/cris/tm-cris.h: Resurrect. >>> (TARGET_HAS_HARDWARE_WATCHPOINTS, >>> TARGET_CAN_USE_HARDWARE_WATCHPOINT) >>> (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Define. > > > [snip] > >> We're going to need to figure out how to fix things so that these >> macros are avoided. > > > Could something as straightforward as this be the answer? (gdbarch.[hc] > diffs not included.) > > 2005-01-25 Orjan Friberg > > * gdbarch.sh (target_has_hardware_watchpoints) > (target_can_use_hardware_watchpoint, target_region_ok_for_watchpoint): > Add. > * gdbarch.h: Re-generate. > * gdbarch.c: Ditto. It's unfortunatly more complicated than that :-( The interaction can be drawn as either: | +-target*watchpoint()->. | +--arch*watchpoint()->. | .<--target*register()-+ or: | +------------arch*watchpoint()------------>. | <--target*register()-+ That is either: - the watchpoint code calls on the target to set up watchpoints - the target in turn calls on the architecture code to manipulate the target setting up the watchpoint or: - the watchpoint code calls the architecture code to set up watchpoints - the arch code in turn manipulates the target code. Our current implementation is a confused hybrid of both, sigh! Fixing this is going to involve re-aranging a few deckchairs, and the result certainly won't directly mesh with your current code :-( Until this is done can you commit the new code, but minus the tm-*.h file (i.e., minus watchpoints). Andrew > Index: gdbarch.sh > =================================================================== > RCS file: /cvs/src/src/gdb/gdbarch.sh,v > retrieving revision 1.352 > diff -u -r1.352 gdbarch.sh > --- gdbarch.sh 3 Dec 2004 23:59:52 -0000 1.352 > +++ gdbarch.sh 25 Jan 2005 14:25:33 -0000 > @@ -650,7 +650,10 @@ > f:=:void:coff_make_msymbol_special:int val, struct minimal_symbol > *msym:val, msym::default_coff_make_msymbol_special::0 > v:=:const char *:name_of_malloc:::"malloc":"malloc"::0:NAME_OF_MALLOC > v:=:int:cannot_step_breakpoint:::0:0::0 > +v:=:int:target_has_hardware_watchpoints:::0:0::0 > v:=:int:have_nonsteppable_watchpoint:::0:0::0 > +f:=:int:target_can_use_hardware_watchpoint:int type, int count, int > other:type, count, other > +f:=:int:target_region_ok_for_watchpoint:CORE_ADDR addr, int len:addr, len > F:=:int:address_class_type_flags:int byte_size, int > dwarf2_addr_class:byte_size, dwarf2_addr_class > M::const char *:address_class_type_flags_to_name:int type_flags:type_flags > M::int:address_class_name_to_type_flags:const char *name, int > *type_flags_ptr:name, type_flags_ptr > >