From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 10/13] Remove gdbarch_remote_breakpoint_from_pc
Date: Wed, 31 Aug 2016 15:06:00 -0000 [thread overview]
Message-ID: <1472655965-12212-11-git-send-email-yao.qi@linaro.org> (raw)
In-Reply-To: <1472655965-12212-1-git-send-email-yao.qi@linaro.org>
This patch removes gdbarch method remote_breakpoint_from_pc, as it
is no longer used.
gdb:
2016-08-30 Yao Qi <yao.qi@linaro.org>
* arch-utils.c (default_remote_breakpoint_from_pc): Remove.
* arch-utils.h (default_remote_breakpoint_from_pc): Remove.
* arm-tdep.c (arm_remote_breakpoint_from_pc): Remove.
(arm_gdbarch_init): Don't call
set_gdbarch_remote_breakpoint_from_pc.
* gdbarch.sh (remote_breakpoint_from_pc): Remove.
* gdbarch.c, gdbarch.h: Regenerate.
* mips-tdep.c (mips_remote_breakpoint_from_pc): Remove.
(mips_gdbarch_init): Don't call
set_gdbarch_remote_breakpoint_from_pc.
---
gdb/arch-utils.c | 7 -------
gdb/arch-utils.h | 3 ---
gdb/arm-tdep.c | 10 ----------
gdb/gdbarch.c | 23 -----------------------
gdb/gdbarch.h | 8 --------
gdb/gdbarch.sh | 4 ----
gdb/mips-tdep.c | 24 ++++++++++++------------
7 files changed, 12 insertions(+), 67 deletions(-)
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 53121bc..b562716 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -813,13 +813,6 @@ default_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr,
}
void
-default_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
- int *kindptr)
-{
- gdbarch_breakpoint_from_pc (gdbarch, pcptr, kindptr);
-}
-
-void
default_gen_return_address (struct gdbarch *gdbarch,
struct agent_expr *ax, struct axs_value *value,
CORE_ADDR scope)
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 0386d3d..263f4d5 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -223,9 +223,6 @@ extern int default_has_shared_address_space (struct gdbarch *);
extern int default_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
CORE_ADDR addr, char **msg);
-extern void default_remote_breakpoint_from_pc (struct gdbarch *,
- CORE_ADDR *pcptr, int *kindptr);
-
extern void default_gen_return_address (struct gdbarch *gdbarch,
struct agent_expr *ax,
struct axs_value *value,
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 065d177..eba59a5 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -7863,14 +7863,6 @@ arm_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
GDBARCH_BREAKPOINT_FROM_PC (arm)
-static void
-arm_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
- int *kindptr)
-{
-
- *kindptr = arm_breakpoint_kind_from_pc (gdbarch, pcptr);
-}
-
/* Extract from an array REGBUF containing the (raw) register state a
function return value of type TYPE, and copy that, in virtual
format, into VALBUF. */
@@ -9379,8 +9371,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Breakpoint manipulation. */
SET_GDBARCH_BREAKPOINT_MANIPULATION (arm);
- set_gdbarch_remote_breakpoint_from_pc (gdbarch,
- arm_remote_breakpoint_from_pc);
/* Information about registers, etc. */
set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index a1cf602..c85dc9a 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -231,7 +231,6 @@ struct gdbarch
gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
- gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
@@ -404,7 +403,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->address_to_pointer = unsigned_address_to_pointer;
gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
gdbarch->sw_breakpoint_from_kind = NULL;
- gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
gdbarch->remote_register_number = default_remote_register_number;
@@ -586,7 +584,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
if (gdbarch->breakpoint_kind_from_pc == 0)
fprintf_unfiltered (log, "\n\tbreakpoint_kind_from_pc");
/* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
- /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
/* Skip verify of adjust_breakpoint_address, has predicate. */
/* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
/* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
@@ -1285,9 +1282,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: relocate_instruction = <%s>\n",
host_address_to_string (gdbarch->relocate_instruction));
fprintf_unfiltered (file,
- "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
- host_address_to_string (gdbarch->remote_breakpoint_from_pc));
- fprintf_unfiltered (file,
"gdbarch_dump: remote_register_number = <%s>\n",
host_address_to_string (gdbarch->remote_register_number));
fprintf_unfiltered (file,
@@ -2805,23 +2799,6 @@ set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
}
-void
-gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
- gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
-}
-
-void
-set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
- gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
-{
- gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
-}
-
int
gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
{
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 29abf65..65a6a6e 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -556,14 +556,6 @@ typedef const gdb_byte * (gdbarch_sw_breakpoint_from_kind_ftype) (struct gdbarch
extern const gdb_byte * gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size);
extern void set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind);
-/* Return the adjusted address and kind to use for Z0/Z1 packets.
- KIND is usually the memory length of the breakpoint, but may have a
- different target-specific meaning. */
-
-typedef void (gdbarch_remote_breakpoint_from_pc_ftype) (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr);
-extern void gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr);
-extern void set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc);
-
extern int gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch);
typedef CORE_ADDR (gdbarch_adjust_breakpoint_address_ftype) (struct gdbarch *gdbarch, CORE_ADDR bpaddr);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index b73c6fa..d7e4d87 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -564,10 +564,6 @@ m:int:breakpoint_kind_from_pc:CORE_ADDR *pcptr:pcptr::0:
# SIZE is set to the software breakpoint's length in memory.
m:const gdb_byte *:sw_breakpoint_from_kind:int kind, int *size:kind, size::NULL::0
-# Return the adjusted address and kind to use for Z0/Z1 packets.
-# KIND is usually the memory length of the breakpoint, but may have a
-# different target-specific meaning.
-m:void:remote_breakpoint_from_pc:CORE_ADDR *pcptr, int *kindptr:pcptr, kindptr:0:default_remote_breakpoint_from_pc::0
M:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
m:int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0
m:int:memory_remove_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_remove_breakpoint::0
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index e73b6e1..10a1b08 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -7050,7 +7050,18 @@ gdb_print_insn_mips_n64 (bfd_vma memaddr, struct disassemble_info *info)
return gdb_print_insn_mips (memaddr, info);
}
-/* Implement the breakpoint_kind_from_pc gdbarch method. */
+/* Implement the breakpoint_kind_from_pc gdbarch method.
+
+ Determine the remote breakpoint kind suitable for the PC. The following
+ kinds are used:
+
+ * 2 -- 16-bit MIPS16 mode breakpoint,
+
+ * 3 -- 16-bit microMIPS mode breakpoint,
+
+ * 4 -- 32-bit standard MIPS mode breakpoint,
+
+ * 5 -- 32-bit microMIPS mode breakpoint. */
static int
mips_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
@@ -7178,15 +7189,6 @@ mips_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
GDBARCH_BREAKPOINT_FROM_PC (mips)
-/* Determine the remote breakpoint kind suitable for the PC. */
-
-static void
-mips_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
- int *kindptr)
-{
- *kindptr = mips_breakpoint_kind_from_pc (gdbarch, pcptr);
-}
-
/* Return non-zero if the standard MIPS instruction INST has a branch
delay slot (i.e. it is a jump or branch instruction). This function
is based on mips32_next_pc. */
@@ -8798,8 +8800,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
SET_GDBARCH_BREAKPOINT_MANIPULATION (mips);
- set_gdbarch_remote_breakpoint_from_pc (gdbarch,
- mips_remote_breakpoint_from_pc);
set_gdbarch_adjust_breakpoint_address (gdbarch,
mips_adjust_breakpoint_address);
--
1.9.1
next prev parent reply other threads:[~2016-08-31 15:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 15:06 [PATCH 00/13] Split brekapoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind Yao Qi
2016-08-31 15:06 ` [PATCH 05/13] Share enum arm_breakpoint_kinds Yao Qi
2016-08-31 15:06 ` [PATCH 01/13] Remove v850_dbtrap_breakpoint_from_pc Yao Qi
2016-08-31 15:06 ` [PATCH 11/13] Add default_breakpoint_from_pc Yao Qi
2016-08-31 15:06 ` [PATCH 03/13] gdbarch_breakpoint_from_pc doesn't return NULL Yao Qi
2016-09-28 15:23 ` Michael Eager
2016-08-31 15:06 ` Yao Qi [this message]
2016-10-27 14:55 ` [PATCH 10/13] Remove gdbarch_remote_breakpoint_from_pc Pedro Alves
2016-08-31 15:06 ` [PATCH 13/13] Remove arm_override_mode Yao Qi
2016-10-27 14:56 ` Pedro Alves
2016-08-31 15:06 ` [PATCH 04/13] GDBARCH_BREAKPOINT_MANIPULATION and SET_GDBARCH_BREAKPOINT_MANIPULATION Yao Qi
2016-08-31 15:06 ` [PATCH 09/13] Rename placed_size to kind Yao Qi
2016-08-31 15:06 ` [PATCH 02/13] Rename 'arch' by 'gdbarch' in m32c_gdbarch_init Yao Qi
2016-08-31 15:06 ` [PATCH 08/13] New gdbarch methods breakpoint_kind_from_pc and sw_breakpoint_from_kind Yao Qi
2016-08-31 15:06 ` [PATCH 07/13] Split brekapoint_from_pc to " Yao Qi
2016-10-10 10:05 ` Yao Qi
2016-10-27 14:55 ` Pedro Alves
2016-10-28 19:44 ` Maciej W. Rozycki
2016-08-31 15:06 ` [PATCH 06/13] Add enum for mips breakpoint kinds Yao Qi
2016-10-27 14:54 ` Pedro Alves
2016-10-28 19:39 ` Maciej W. Rozycki
2016-08-31 15:06 ` [PATCH 12/13] Determine the kind of single step breakpoint Yao Qi
2016-10-27 14:55 ` Pedro Alves
2016-10-10 10:17 ` [PATCH 00/13] Split brekapoint_from_pc to breakpoint_kind_from_pc and sw_breakpoint_from_kind Yao Qi
2016-10-26 15:43 ` Yao Qi
2016-10-27 14:58 ` Pedro Alves
2016-10-27 15:41 ` Yao Qi
2016-10-27 17:55 ` Pedro Alves
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=1472655965-12212-11-git-send-email-yao.qi@linaro.org \
--to=qiyaoltc@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).