aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/mem-break.c
diff options
context:
space:
mode:
authorAntoine Tremblay <antoine.tremblay@ericsson.com>2015-10-23 13:20:39 -0400
committerAntoine Tremblay <antoine.tremblay@ericsson.com>2015-10-23 13:20:39 -0400
commit2e6ee069ae81f3b5140059f6b997ccb0dcd1684e (patch)
treecb1faaba4134e5c9564ad2fce4e2bf57cebf1a63 /gdb/gdbserver/mem-break.c
parent1cce69b9dc8c58884c3cc4a8928fb234294e6886 (diff)
downloadgdb-2e6ee069ae81f3b5140059f6b997ccb0dcd1684e.zip
gdb-2e6ee069ae81f3b5140059f6b997ccb0dcd1684e.tar.gz
gdb-2e6ee069ae81f3b5140059f6b997ccb0dcd1684e.tar.bz2
Refactor default_breakpoint_kind_from_pc to be used by all targets in GDBServer.
This patch moves default_breakpoint_kind_from_pc to target.c and creates a macro so that all targets can easily use it. This allows the breakpoint_kind_from_pc operation to be left unimplemented in targets that do not need it. This is preparation to fix the win32/nto/spu build that was broken by this patch: https://sourceware.org/ml/gdb-patches/2015-10/msg00369.html No regression on Ubuntu 14.04 x86-64 with gdbserver-{native-extended} gdb/gdbserver/ChangeLog: * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c. * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc. * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c * target.h (target_breakpoint_kind_from_pc): New macro.
Diffstat (limited to 'gdb/gdbserver/mem-break.c')
-rw-r--r--gdb/gdbserver/mem-break.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c
index a676ea2..656402a 100644
--- a/gdb/gdbserver/mem-break.c
+++ b/gdb/gdbserver/mem-break.c
@@ -784,7 +784,7 @@ set_breakpoint_at (CORE_ADDR where, int (*handler) (CORE_ADDR))
{
int err_ignored;
CORE_ADDR placed_address = where;
- int breakpoint_kind = the_target->breakpoint_kind_from_pc (&placed_address);
+ int breakpoint_kind = target_breakpoint_kind_from_pc (&placed_address);
return set_breakpoint (other_breakpoint, raw_bkpt_type_sw,
placed_address, breakpoint_kind, handler,