Re: [RFC] TARGET_ADJUST_BREAKPOINT_ADDRESS - patch 1 of 4

Kevin Buettner
2003-10-13T23:43:03Z

On Oct 3, 5:28pm, Kevin Buettner wrote:

> * arch-utils.h (default_target_adjust_breakpoint_address): New
> function declaration.
> * arch-utils.c (default_target_adjust_breakpoint_address): New
> function.
> * gdbarch.sh (TARGET_ADJUST_BREAKPOINT_ADDRESS): New method.
> * gdbarch.h, gdbarch.c: Regenerate.

I reworked this patch per Andrew's and Mark's suggestions. Using an
"M" (method with predicate) eliminated the need for the
arch-utils.[hc] changes.

Here's what I've checked in:

* gdbarch.sh (ADJUST_BREAKPOINT_ADDRESS): New method.
* gdbarch.h, gdbarch.c: Regenerate.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.277
diff -u -p -r1.277 gdbarch.sh
--- gdbarch.sh 11 Oct 2003 12:52:29 -0000 1.277
+++ gdbarch.sh 13 Oct 2003 23:33:27 -0000
@@ -614,6 +614,7 @@ f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologu
f:2:PROLOGUE_FRAMELESS_P:int:prologue_frameless_p:CORE_ADDR ip:ip::0:generic_prologue_frameless_p::0
f:2:INNER_THAN:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs::0:0
f::BREAKPOINT_FROM_PC:const unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr:::0:
+M:2:ADJUST_BREAKPOINT_ADDRESS:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
f:2:MEMORY_INSERT_BREAKPOINT:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_insert_breakpoint::0
f:2:MEMORY_REMOVE_BREAKPOINT:int:memory_remove_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_remove_breakpoint::0
v:2:DECR_PC_AFTER_BREAK:CORE_ADDR:decr_pc_after_break::::0:-1