aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:44:20 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:46:36 -0700
commitc378d69dffc04b96a99e08f8df7a117ac0e57dbf (patch)
tree16289a0151127fc213bef66e5ac3bf1704bc67b6
parentbd7ae0f5ac99eac95313ae91ae705c45f669f20f (diff)
downloadgdb-c378d69dffc04b96a99e08f8df7a117ac0e57dbf.zip
gdb-c378d69dffc04b96a99e08f8df7a117ac0e57dbf.tar.gz
gdb-c378d69dffc04b96a99e08f8df7a117ac0e57dbf.tar.bz2
Add target_ops argument to to_set_permissions
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_set_permissions>: Add argument. (target_set_permissions): Add argument. * target.c (update_current_target): Update. * remote.c (remote_set_permissions): Add 'self' argument. (remote_start_remote): Update.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/remote.c6
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h4
4 files changed, 14 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 108c750..2b9fa7f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops) <to_set_permissions>: Add argument.
+ (target_set_permissions): Add argument.
+ * target.c (update_current_target): Update.
+ * remote.c (remote_set_permissions): Add 'self' argument.
+ (remote_start_remote): Update.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* windows-nat.c (windows_get_tib_address): Add 'self' argument.
* target.h (struct target_ops) <to_get_tib_address>: Add argument.
(target_get_tib_address): Add argument.
diff --git a/gdb/remote.c b/gdb/remote.c
index bd420aa..7a62fdc 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -196,7 +196,7 @@ static void show_remote_protocol_packet_cmd (struct ui_file *file,
static char *write_ptid (char *buf, const char *endbuf, ptid_t ptid);
static ptid_t read_ptid (char *buf, char **obuf);
-static void remote_set_permissions (void);
+static void remote_set_permissions (struct target_ops *self);
struct remote_state;
static int remote_get_trace_status (struct target_ops *self,
@@ -3357,7 +3357,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
/* If the stub wants to get a QAllow, compose one and send it. */
if (remote_protocol_packets[PACKET_QAllow].support != PACKET_DISABLE)
- remote_set_permissions ();
+ remote_set_permissions (target);
/* Next, we possibly activate noack mode.
@@ -3757,7 +3757,7 @@ remote_serial_open (char *name)
permissions. */
void
-remote_set_permissions (void)
+remote_set_permissions (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
diff --git a/gdb/target.c b/gdb/target.c
index e020add..2cf7055 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -921,7 +921,7 @@ update_current_target (void)
(int (*) (struct target_ops *, ptid_t, CORE_ADDR *))
tcomplain);
de_fault (to_set_permissions,
- (void (*) (void))
+ (void (*) (struct target_ops *))
target_ignore);
de_fault (to_static_tracepoint_marker_at,
(int (*) (CORE_ADDR, struct static_tracepoint_marker *))
diff --git a/gdb/target.h b/gdb/target.h
index d4620f3..8220d57 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -863,7 +863,7 @@ struct target_ops
ptid_t ptid, CORE_ADDR *addr);
/* Send the new settings of write permission variables. */
- void (*to_set_permissions) (void);
+ void (*to_set_permissions) (struct target_ops *);
/* Look for a static tracepoint marker at ADDR, and fill in MARKER
with its details. Return 1 on success, 0 on failure. */
@@ -1865,7 +1865,7 @@ extern char *target_fileio_read_stralloc (const char *filename);
(*current_target.to_get_tib_address) (&current_target, (ptid), (addr))
#define target_set_permissions() \
- (*current_target.to_set_permissions) ()
+ (*current_target.to_set_permissions) (&current_target)
#define target_static_tracepoint_marker_at(addr, marker) \
(*current_target.to_static_tracepoint_marker_at) (addr, marker)