This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New port: CRISv32


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]