Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Orjan Friberg <orjan.friberg@axis.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: New port: CRISv32
Date: Tue, 25 Jan 2005 16:08:00 -0000	[thread overview]
Message-ID: <41F66EBA.3020107@gnu.org> (raw)
In-Reply-To: <41F65A50.9090003@axis.com>

Orjan Friberg wrote:
> Andrew Cagney wrote:
> 
>> Orjan Friberg wrote:
>>
>>>
>>> 2005-01-15  Orjan Friberg  <orjanf@axis.com>
>>>
>>>     * 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  <orjanf@axis.com>
> 
>     * 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:

     <gdb>                 <target>              <arch>
       |
       +-target*watchpoint()->.
                              |
                              +--arch*watchpoint()->.
                                                    |
                              .<--target*register()-+

or:

     <gdb>                <target>              <arch>
       |
       +------------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
> 
> 


  parent reply	other threads:[~2005-01-25 16:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-14  9:51 Orjan Friberg
2005-01-14 17:42 ` Andrew Cagney
2005-01-25 14:40   ` Orjan Friberg
2005-01-25 14:45     ` Orjan Friberg
2005-01-25 14:48       ` Daniel Jacobowitz
2005-01-25 15:03         ` Orjan Friberg
2005-01-25 15:06           ` Daniel Jacobowitz
2005-01-25 16:23         ` Orjan Friberg
2005-01-25 17:03           ` Daniel Jacobowitz
2005-01-25 16:08     ` Andrew Cagney [this message]
2005-01-25 16:28       ` Orjan Friberg
2005-01-25 16:39         ` Andrew Cagney
2005-01-26 12:36           ` Orjan Friberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41F66EBA.3020107@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=orjan.friberg@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox