From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: [PATCH v3 05/10] Remove too simple breakpoint_reinsert_addr implementations.
Date: Mon, 23 Nov 2015 14:14:00 -0000 [thread overview]
Message-ID: <1448287968-12907-6-git-send-email-antoine.tremblay@ericsson.com> (raw)
In-Reply-To: <1448287968-12907-1-git-send-email-antoine.tremblay@ericsson.com>
This patch removes too simple implementations of the breakpoint_reinsert_addr
operation.
The only reason to keep them around was to support thread events when
PTRACE_EVENT_CLONE was not present but this support has been removed in a
previous patch.
No regressions, tested on ubuntu 14.04 ARMv7 and x86.
With gdbserver-{native,extended} / { -marm -mthumb }
Also compilation was tested on aarch64, bfin, cris, crisv32,
m32r, mips, nios2, ppc, s390, sparc, tic6x, tile, xtensa.
gdb/gdbserver/ChangeLog:
* linux-arm-low.c (arm_reinsert_addr): Remove function.
(struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
* linux-cris-low.c (cris_reinsert_addr> Remove function.
(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
* linux-crisv32-low.c (cris_reinsert_addr): Remove function.
(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
* linux-mips-low.c (mips_reinsert_addr): Remove function.
(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
* linux-nios2-low.c (nios2_reinsert_addr): Remove function.
(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
* linux-sparc-low.c (sparc_reinsert_addr): Remove function.
(struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
---
gdb/gdbserver/linux-arm-low.c | 14 +-------------
gdb/gdbserver/linux-cris-low.c | 18 +-----------------
gdb/gdbserver/linux-crisv32-low.c | 19 +------------------
gdb/gdbserver/linux-mips-low.c | 14 +-------------
gdb/gdbserver/linux-nios2-low.c | 14 +-------------
gdb/gdbserver/linux-sparc-low.c | 15 +--------------
6 files changed, 6 insertions(+), 88 deletions(-)
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index 0c78888..885aec9 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -317,18 +317,6 @@ 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 (void)
-{
- struct regcache *regcache = get_thread_regcache (current_thread, 1);
- unsigned long pc;
- collect_register_by_name (regcache, "lr", &pc);
- return pc;
-}
-
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
@@ -1044,7 +1032,7 @@ struct linux_target_ops the_low_target = {
arm_set_pc,
arm_breakpoint_kind_from_pc,
arm_sw_breakpoint_from_kind,
- arm_reinsert_addr,
+ NULL, /* breakpoint_reinsert_addr */
0,
arm_breakpoint_at,
arm_supports_z_point_type,
diff --git a/gdb/gdbserver/linux-cris-low.c b/gdb/gdbserver/linux-cris-low.c
index d7b70e3..9f4519c 100644
--- a/gdb/gdbserver/linux-cris-low.c
+++ b/gdb/gdbserver/linux-cris-low.c
@@ -105,18 +105,6 @@ cris_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
-cris_reinsert_addr (void)
-{
- struct regcache *regcache = get_thread_regcache (current_thread, 1);
- unsigned long pc;
- collect_register_by_name (regcache, "srp", &pc);
- return pc;
-}
-
static void
cris_arch_setup (void)
{
@@ -151,13 +139,9 @@ struct linux_target_ops the_low_target = {
cris_set_pc,
NULL, /* breakpoint_kind_from_pc */
cris_sw_breakpoint_from_kind,
- cris_reinsert_addr,
+ NULL, /* breakpoint_reinsert_addr */
0,
cris_breakpoint_at,
- 0,
- 0,
- 0,
- 0,
};
void
diff --git a/gdb/gdbserver/linux-crisv32-low.c b/gdb/gdbserver/linux-crisv32-low.c
index 4f9afa6..2404d0e 100644
--- a/gdb/gdbserver/linux-crisv32-low.c
+++ b/gdb/gdbserver/linux-crisv32-low.c
@@ -101,23 +101,6 @@ cris_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. */
-
-/* FIXME: This function should not be needed, since we have PTRACE_SINGLESTEP
- for CRISv32. Without it, td_ta_event_getmsg in thread_db_create_event
- will fail when debugging multi-threaded applications. */
-
-static CORE_ADDR
-cris_reinsert_addr (void)
-{
- struct regcache *regcache = get_thread_regcache (current_thread, 1);
- unsigned long pc;
- collect_register_by_name (regcache, "srp", &pc);
- return pc;
-}
-
static void
cris_write_data_breakpoint (struct regcache *regcache,
int bp, unsigned long start, unsigned long end)
@@ -439,7 +422,7 @@ struct linux_target_ops the_low_target = {
cris_set_pc,
NULL, /* breakpoint_kind_from_pc */
cris_sw_breakpoint_from_kind,
- cris_reinsert_addr,
+ NULL, /* breakpoint_reinsert_addr */
0,
cris_breakpoint_at,
cris_supports_z_point_type,
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 459f4fc..b8f8805 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -275,18 +275,6 @@ mips_sw_breakpoint_from_kind (int kind, int *size)
return (const gdb_byte *) &mips_breakpoint;
}
-/* 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
-mips_reinsert_addr (void)
-{
- struct regcache *regcache = get_thread_regcache (current_thread, 1);
- union mips_register ra;
- collect_register_by_name (regcache, "r31", ra.buf);
- return register_size (regcache->tdesc, 0) == 4 ? ra.reg32 : ra.reg64;
-}
-
static int
mips_breakpoint_at (CORE_ADDR where)
{
@@ -892,7 +880,7 @@ struct linux_target_ops the_low_target = {
mips_set_pc,
NULL, /* breakpoint_kind_from_pc */
mips_sw_breakpoint_from_kind,
- mips_reinsert_addr,
+ NULL, /* breakpoint_reinsert_addr */
0,
mips_breakpoint_at,
mips_supports_z_point_type,
diff --git a/gdb/gdbserver/linux-nios2-low.c b/gdb/gdbserver/linux-nios2-low.c
index 369e89c..9380c3b 100644
--- a/gdb/gdbserver/linux-nios2-low.c
+++ b/gdb/gdbserver/linux-nios2-low.c
@@ -144,18 +144,6 @@ nios2_sw_breakpoint_from_kind (int kind, int *size)
return (const gdb_byte *) &nios2_breakpoint;
}
-/* Implement the breakpoint_reinsert_addr linux_target_ops method. */
-
-static CORE_ADDR
-nios2_reinsert_addr (void)
-{
- union nios2_register ra;
- struct regcache *regcache = get_thread_regcache (current_thread, 1);
-
- collect_register_by_name (regcache, "ra", ra.buf);
- return ra.reg32;
-}
-
/* Implement the breakpoint_at linux_target_ops method. */
static int
@@ -279,7 +267,7 @@ struct linux_target_ops the_low_target =
nios2_set_pc,
NULL, /* breakpoint_kind_from_pc */
nios2_sw_breakpoint_from_kind,
- nios2_reinsert_addr,
+ NULL, /* breakpoint_reinsert_addr */
0,
nios2_breakpoint_at,
};
diff --git a/gdb/gdbserver/linux-sparc-low.c b/gdb/gdbserver/linux-sparc-low.c
index e6a4f84..54a849c 100644
--- a/gdb/gdbserver/linux-sparc-low.c
+++ b/gdb/gdbserver/linux-sparc-low.c
@@ -265,19 +265,6 @@ sparc_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
-sparc_reinsert_addr (void)
-{
- struct regcache *regcache = get_thread_regcache (current_thread, 1);
- CORE_ADDR lr;
- /* O7 is the equivalent to the 'lr' of other archs. */
- collect_register_by_name (regcache, "o7", &lr);
- return lr;
-}
-
static void
sparc_arch_setup (void)
{
@@ -333,7 +320,7 @@ struct linux_target_ops the_low_target = {
NULL,
NULL, /* breakpoint_kind_from_pc */
sparc_sw_breakpoint_from_kind,
- sparc_reinsert_addr,
+ NULL, /* breakpoint_reinsert_addr */
0,
sparc_breakpoint_at,
NULL, /* supports_z_point_type */
--
2.6.3
next prev parent reply other threads:[~2015-11-23 14:14 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 14:14 [PATCH v3 0/10] Support software single step and conditional breakpoints on ARM in GDBServer Antoine Tremblay
2015-11-23 14:14 ` [PATCH v3 06/10] Replace breakpoint_reinsert_addr by get_next_pcs operation " Antoine Tremblay
2015-11-26 10:30 ` Yao Qi
2015-11-26 13:48 ` Antoine Tremblay
2015-11-26 10:50 ` Pedro Alves
2015-11-26 13:50 ` Antoine Tremblay
2015-11-23 14:14 ` [PATCH v3 04/10] Remove support for thread events without PTRACE_EVENT_CLONE " Antoine Tremblay
2015-11-25 16:48 ` Yao Qi
2015-11-25 17:42 ` Antoine Tremblay
2015-11-23 14:14 ` Antoine Tremblay [this message]
2015-11-23 14:14 ` [PATCH v3 02/10] Fix instruction skipping when using software single step " Antoine Tremblay
2015-11-23 14:14 ` [PATCH v3 09/10] Enable software single stepping for while-stepping actions " Antoine Tremblay
2015-11-23 14:14 ` [PATCH v3 01/10] Fix breakpoint size when stepping over a permanent breakpoint " Antoine Tremblay
2015-11-23 14:14 ` [PATCH v3 03/10] Refactor queries for hardware and software single stepping support " Antoine Tremblay
2015-11-23 14:14 ` [PATCH v3 07/10] Share some ARM target dependant code from GDB with GDBServer Antoine Tremblay
2015-11-25 17:01 ` Yao Qi
2015-11-26 10:38 ` Yao Qi
2015-11-26 13:56 ` Antoine Tremblay
2015-11-23 14:15 ` [PATCH v3 08/10] Support software single step on ARM in GDBServer Antoine Tremblay
2015-11-26 10:49 ` Pedro Alves
2015-11-26 13:35 ` Antoine Tremblay
2015-11-26 12:48 ` Yao Qi
2015-11-26 15:12 ` Antoine Tremblay
2015-11-26 16:04 ` Yao Qi
2015-11-26 16:07 ` Antoine Tremblay
2015-11-27 13:45 ` Antoine Tremblay
2015-11-27 15:15 ` Yao Qi
2015-11-27 15:35 ` Antoine Tremblay
2015-11-23 14:15 ` [PATCH v3 10/10] Enable conditional breakpoints for targets that support software single step " Antoine Tremblay
2015-11-26 10:25 ` Yao Qi
2015-11-26 15:34 ` Antoine Tremblay
2015-12-03 9:50 ` Yao Qi
2015-11-27 9:27 ` [PATCH v3 0/10] Support software single step and conditional breakpoints on ARM " Yao Qi
2015-11-27 13:16 ` Antoine Tremblay
2015-11-30 20:21 ` Antoine Tremblay
2015-12-01 9:33 ` Yao Qi
2015-12-01 13:00 ` Antoine Tremblay
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=1448287968-12907-6-git-send-email-antoine.tremblay@ericsson.com \
--to=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
/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