const-fy breakpoint_ops->breakpoint_hit parameter aspace
authorYao Qi <yao.qi@linaro.org>
Thu, 26 Oct 2017 08:46:16 +0000 (09:46 +0100)
committerYao Qi <yao.qi@linaro.org>
Thu, 26 Oct 2017 08:46:16 +0000 (09:46 +0100)
gdb:

2017-10-26  Yao Qi  <yao.qi@linaro.org>

* break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
aspace const.
* break-catch-syscall.c (breakpoint_hit_catch_syscall):
Likewise.
* breakpoint.c (bpstat_check_location): Remove cast.
(breakpoint_hit_catch_fork): Make aspce const.
(breakpoint_hit_catch_solib): Likewise.
(breakpoint_hit_catch_exec): Likewise.
(breakpoint_hit_ranged_breakpoint): Likewise.
(breakpoint_hit_watchpoint): Likewise.
(base_breakpoint_breakpoint_hit): Likewise.
(bkpt_breakpoint_hit): Likewise.
(dprintf_breakpoint_hit): Likewise.
(tracepoint_breakpoint_hit): Likewise.
* breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.

gdb/ChangeLog
gdb/break-catch-sig.c
gdb/break-catch-syscall.c
gdb/breakpoint.c
gdb/breakpoint.h

index 042c60917c5c97a0a5974b805fc0b102585896c7..47a4ac52ec239ce258d988a29ee8353ff9f4a58d 100644 (file)
@@ -1,3 +1,21 @@
+2017-10-26  Yao Qi  <yao.qi@linaro.org>
+
+       * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
+       aspace const.
+       * break-catch-syscall.c (breakpoint_hit_catch_syscall):
+       Likewise.
+       * breakpoint.c (bpstat_check_location): Remove cast.
+       (breakpoint_hit_catch_fork): Make aspce const.
+       (breakpoint_hit_catch_solib): Likewise.
+       (breakpoint_hit_catch_exec): Likewise.
+       (breakpoint_hit_ranged_breakpoint): Likewise.
+       (breakpoint_hit_watchpoint): Likewise.
+       (base_breakpoint_breakpoint_hit): Likewise.
+       (bkpt_breakpoint_hit): Likewise.
+       (dprintf_breakpoint_hit): Likewise.
+       (tracepoint_breakpoint_hit): Likewise.
+       * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
+
 2017-10-26  Yao Qi  <yao.qi@linaro.org>
 
        * breakpoint.c (breakpoint_location_address_match): Change
index 5bc3aed09d7bb54b9e040e3461b7aba6c590b4f0..5ab7cd36069f6ce87d8bcc563e74230f39735d43 100644 (file)
@@ -145,7 +145,7 @@ signal_catchpoint_remove_location (struct bp_location *bl,
 
 static int
 signal_catchpoint_breakpoint_hit (const struct bp_location *bl,
-                                 struct address_space *aspace,
+                                 const address_space *aspace,
                                  CORE_ADDR bp_addr,
                                  const struct target_waitstatus *ws)
 {
index 82d3e360a10cee1fda57090a46a22bd2531ae50d..b0ed4d29f873f38ea1617c7cad285c242283cdba 100644 (file)
@@ -157,7 +157,7 @@ remove_catch_syscall (struct bp_location *bl, enum remove_bp_reason reason)
 
 static int
 breakpoint_hit_catch_syscall (const struct bp_location *bl,
-                             struct address_space *aspace, CORE_ADDR bp_addr,
+                             const address_space *aspace, CORE_ADDR bp_addr,
                              const struct target_waitstatus *ws)
 {
   /* We must check if we are catching specific syscalls in this
index f0a8d496870eb18310069e7319cc3ffef199750e..ada72e04237a41adb27218de2265aac4522846dd 100644 (file)
@@ -5072,8 +5072,7 @@ bpstat_check_location (const struct bp_location *bl,
   /* BL is from an existing breakpoint.  */
   gdb_assert (b != NULL);
 
-  return b->ops->breakpoint_hit (bl, const_cast<address_space *> (aspace),
-                                bp_addr, ws);
+  return b->ops->breakpoint_hit (bl, aspace, bp_addr, ws);
 }
 
 /* Determine if the watched values have actually changed, and we
@@ -7828,7 +7827,7 @@ remove_catch_fork (struct bp_location *bl, enum remove_bp_reason reason)
 
 static int
 breakpoint_hit_catch_fork (const struct bp_location *bl,
-                          struct address_space *aspace, CORE_ADDR bp_addr,
+                          const address_space *aspace, CORE_ADDR bp_addr,
                           const struct target_waitstatus *ws)
 {
   struct fork_catchpoint *c = (struct fork_catchpoint *) bl->owner;
@@ -7944,7 +7943,7 @@ remove_catch_vfork (struct bp_location *bl, enum remove_bp_reason reason)
 
 static int
 breakpoint_hit_catch_vfork (const struct bp_location *bl,
-                           struct address_space *aspace, CORE_ADDR bp_addr,
+                           const address_space *aspace, CORE_ADDR bp_addr,
                            const struct target_waitstatus *ws)
 {
   struct fork_catchpoint *c = (struct fork_catchpoint *) bl->owner;
@@ -8072,7 +8071,7 @@ remove_catch_solib (struct bp_location *ignore, enum remove_bp_reason reason)
 
 static int
 breakpoint_hit_catch_solib (const struct bp_location *bl,
-                           struct address_space *aspace,
+                           const address_space *aspace,
                            CORE_ADDR bp_addr,
                            const struct target_waitstatus *ws)
 {
@@ -8378,7 +8377,7 @@ remove_catch_exec (struct bp_location *bl, enum remove_bp_reason reason)
 
 static int
 breakpoint_hit_catch_exec (const struct bp_location *bl,
-                          struct address_space *aspace, CORE_ADDR bp_addr,
+                          const address_space *aspace, CORE_ADDR bp_addr,
                           const struct target_waitstatus *ws)
 {
   struct exec_catchpoint *c = (struct exec_catchpoint *) bl->owner;
@@ -9796,7 +9795,7 @@ agent_printf_command (char *arg, int from_tty)
 
 static int
 breakpoint_hit_ranged_breakpoint (const struct bp_location *bl,
-                                 struct address_space *aspace,
+                                 const address_space *aspace,
                                  CORE_ADDR bp_addr,
                                  const struct target_waitstatus *ws)
 {
@@ -10256,7 +10255,7 @@ remove_watchpoint (struct bp_location *bl, enum remove_bp_reason reason)
 
 static int
 breakpoint_hit_watchpoint (const struct bp_location *bl,
-                          struct address_space *aspace, CORE_ADDR bp_addr,
+                          const address_space *aspace, CORE_ADDR bp_addr,
                           const struct target_waitstatus *ws)
 {
   struct breakpoint *b = bl->owner;
@@ -12433,7 +12432,7 @@ base_breakpoint_remove_location (struct bp_location *bl,
 
 static int
 base_breakpoint_breakpoint_hit (const struct bp_location *bl,
-                               struct address_space *aspace,
+                               const address_space *aspace,
                                CORE_ADDR bp_addr,
                                const struct target_waitstatus *ws)
 {
@@ -12601,7 +12600,7 @@ bkpt_remove_location (struct bp_location *bl, enum remove_bp_reason reason)
 
 static int
 bkpt_breakpoint_hit (const struct bp_location *bl,
-                    struct address_space *aspace, CORE_ADDR bp_addr,
+                    const address_space *aspace, CORE_ADDR bp_addr,
                     const struct target_waitstatus *ws)
 {
   if (ws->kind != TARGET_WAITKIND_STOPPED
@@ -12622,7 +12621,7 @@ bkpt_breakpoint_hit (const struct bp_location *bl,
 
 static int
 dprintf_breakpoint_hit (const struct bp_location *bl,
-                       struct address_space *aspace, CORE_ADDR bp_addr,
+                       const address_space *aspace, CORE_ADDR bp_addr,
                        const struct target_waitstatus *ws)
 {
   if (dprintf_style == dprintf_style_agent
@@ -12982,7 +12981,7 @@ tracepoint_re_set (struct breakpoint *b)
 
 static int
 tracepoint_breakpoint_hit (const struct bp_location *bl,
-                          struct address_space *aspace, CORE_ADDR bp_addr,
+                          const address_space *aspace, CORE_ADDR bp_addr,
                           const struct target_waitstatus *ws)
 {
   /* By definition, the inferior does not report stops at
index c4e55ea09aaa1412e454360f89f64b78a85a9be6..63e879ca782b8dfc559b5a7e5de0ace743cdbf3c 100644 (file)
@@ -540,7 +540,7 @@ struct breakpoint_ops
      which the inferior stopped, and WS is the target_waitstatus
      describing the event.  */
   int (*breakpoint_hit) (const struct bp_location *bl,
-                        struct address_space *aspace,
+                        const address_space *aspace,
                         CORE_ADDR bp_addr,
                         const struct target_waitstatus *ws);
 
This page took 0.042662 seconds and 4 git commands to generate.