[commit/6.0] Gdbserver threads fix for ARM
Daniel Jacobowitz
drow@mvista.com
Thu Jul 24 19:05:00 GMT 2003
I've checked in this patch based on a discussion at the end of June on gdb@.
This avoids using the Linux kernel's software-single-step support on ARM,
which is both non-thread-safe and unaware of the bx instruction.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-07-24 Daniel Jacobowitz <drow@mvista.com>
* linux-arm-low.c (arm_reinsert_addr): New function.
(the_low_target): Add arm_reinsert_addr.
Index: linux-arm-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-arm-low.c,v
retrieving revision 1.5
diff -u -p -r1.5 linux-arm-low.c
--- linux-arm-low.c 18 Nov 2002 00:37:50 -0000 1.5
+++ linux-arm-low.c 28 Jun 2003 23:53:49 -0000
@@ -80,6 +80,17 @@ arm_breakpoint_at (CORE_ADDR where)
return 0;
}
+/* We only place breakpoints in empty marker functions, and thread locking
+ is outside of the function. So rather than importing software single-step,
+ we can just run until exit. */
+static CORE_ADDR
+arm_reinsert_addr ()
+{
+ unsigned long pc;
+ collect_register_by_name ("lr", &pc);
+ return pc;
+}
+
struct linux_target_ops the_low_target = {
arm_num_regs,
arm_regmap,
@@ -89,7 +100,7 @@ struct linux_target_ops the_low_target =
arm_set_pc,
(const char *) &arm_breakpoint,
arm_breakpoint_len,
- NULL,
+ arm_reinsert_addr,
0,
arm_breakpoint_at,
};
More information about the Gdb-patches
mailing list