This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC 13/32] Add target_ops argument to to_get_ada_task_ptid
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Mon, 13 Jan 2014 12:12:28 -0700
- Subject: [RFC 13/32] Add target_ops argument to to_get_ada_task_ptid
- Authentication-results: sourceware.org; auth=none
- References: <1389640367-5571-1-git-send-email-tromey at redhat dot com>
2014-01-08 Tom Tromey <tromey@redhat.com>
* windows-nat.c (windows_get_ada_task_ptid): Add 'self' argument.
* target.h (struct target_ops) <to_get_ada_task_ptid>: Add
argument.
(target_get_ada_task_ptid): Add argument.
* target.c (update_current_target): Update.
(default_get_ada_task_ptid): Add 'self' argument.
* sol-thread.c (sol_get_ada_task_ptid): Add 'self' argument.
* remote.c (remote_get_ada_task_ptid): Add 'self' argument.
* ravenscar-thread.c (ravenscar_get_ada_task_ptid): Add 'self'
argument.
* linux-thread-db.c (thread_db_get_ada_task_ptid): Add 'self'
argument.
* inf-ttrace.c (inf_ttrace_get_ada_task_ptid): Add 'self'
argument.
* dec-thread.c (dec_thread_get_ada_task_ptid): Add 'self'
argument.
* darwin-nat.c (darwin_get_ada_task_ptid): Add 'self' argument.
* aix-thread.c (aix_thread_get_ada_task_ptid): Add 'self'
argument.
Add target_ops argument to to_can_execute_reverse
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_can_execute_reverse>: Add
argument.
(target_can_execute_reverse): Add argument.
* remote.c (remote_can_execute_reverse): Add 'self' argument.
* record-full.c (record_full_can_execute_reverse): Add 'self'
argument.
Add target_ops argument to to_execution_direction
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_execution_direction>: Add
argument.
(target_execution_direction): Add argument.
* target.c (default_execution_direction): Add 'self' argument.
* record-full.c (record_full_execution_direction): Add 'self'
argument.
Add target_ops argument to to_supports_multi_process
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_supports_multi_process>: Add
argument.
(target_supports_multi_process): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_supports_multi_process): Add 'self' argument.
* linux-nat.c (linux_nat_supports_multi_process): Add 'self'
argument.
* darwin-nat.c (darwin_supports_multi_process): Add 'self'
argument.
Add target_ops argument to to_supports_enable_disable_tracepoint
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops)
<to_supports_enable_disable_tracepoint>: Add argument.
(target_supports_enable_disable_tracepoint): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_supports_enable_disable_tracepoint): Add 'self'
argument.
Add target_ops argument to to_supports_disable_randomization
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops)
<to_supports_disable_randomization>: Add argument.
* target.c (find_default_supports_disable_randomization): Add
argument.
(target_supports_disable_randomization): Add argument.
(find_default_supports_disable_randomization): Add 'self'
argument.
* remote.c (extended_remote_supports_disable_randomization): Add
'self' argument.
(remote_supports_disable_randomization): Add 'self' argument.
(extended_remote_create_inferior): Update.
* linux-nat.c (linux_nat_supports_disable_randomization): Add
'self' argument.
Add target_ops argument to to_supports_string_tracing
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_supports_string_tracing>: Add
argument.
(target_supports_string_tracing): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_supports_string_tracing): Add 'self' argument.
Add target_ops argument to to_supports_evaluation_of_breakpoint_conditions
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops)
<to_supports_evaluation_of_breakpoint_conditions>: Add argument.
(target_supports_evaluation_of_breakpoint_conditions): Add
argument.
* target.c (update_current_target): Update.
* remote.c (remote_supports_cond_breakpoints): Add 'self'
argument.
(remote_insert_breakpoint): Add 'self' argument.
(remote_insert_hw_breakpoint): Add 'self' argument.
(remote_supports_cond_breakpoints): Add 'self' argument.
Add target_ops argument to to_can_run_breakpoint_commands
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_can_run_breakpoint_commands>:
Add argument.
(target_can_run_breakpoint_commands): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_can_run_breakpoint_commands): Add 'self'
argument.
(remote_insert_breakpoint): Add 'self' argument.
(remote_insert_hw_breakpoint): Add 'self' argument.
(remote_can_run_breakpoint_commands): Add 'self' argument.
Add target_ops argument to to_fileio_open
2014-01-08 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_fileio_open>: Add argument.
* target.c (target_fileio_open): Add argument.
* remote.c (remote_hostio_open): Add 'self' argument.
(remote_bfd_iovec_open): Add 'self' argument.
(remote_file_put): Add 'self' argument.
(remote_file_get): Add 'self' argument.
* inf-child.c (inf_child_fileio_open): Add 'self' argument.
---
gdb/ChangeLog | 120 +++++++++++++++++++++++++++++++++++++++++++++++++
gdb/aix-thread.c | 2 +-
gdb/darwin-nat.c | 4 +-
gdb/dec-thread.c | 5 ++-
gdb/inf-child.c | 3 +-
gdb/inf-ttrace.c | 2 +-
gdb/linux-nat.c | 4 +-
gdb/linux-thread-db.c | 2 +-
gdb/ravenscar-thread.c | 2 +-
gdb/record-full.c | 4 +-
gdb/remote.c | 44 +++++++++---------
gdb/sol-thread.c | 2 +-
gdb/target.c | 24 +++++-----
gdb/target.h | 38 ++++++++--------
gdb/windows-nat.c | 2 +-
15 files changed, 193 insertions(+), 65 deletions(-)
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 1a24eb0..53d6840 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1808,7 +1808,7 @@ aix_thread_extra_thread_info (struct target_ops *self,
}
static ptid_t
-aix_thread_get_ada_task_ptid (long lwp, long thread)
+aix_thread_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
return ptid_build (ptid_get_pid (inferior_ptid), 0, thread);
}
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index bb6c014..9c4d511 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1992,7 +1992,7 @@ darwin_pid_to_exec_file (struct target_ops *self, int pid)
}
static ptid_t
-darwin_get_ada_task_ptid (long lwp, long thread)
+darwin_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
int i;
darwin_thread_t *t;
@@ -2059,7 +2059,7 @@ darwin_get_ada_task_ptid (long lwp, long thread)
}
static int
-darwin_supports_multi_process (void)
+darwin_supports_multi_process (struct target_ops *self)
{
return 1;
}
diff --git a/gdb/dec-thread.c b/gdb/dec-thread.c
index 0376828..909f090 100644
--- a/gdb/dec-thread.c
+++ b/gdb/dec-thread.c
@@ -687,12 +687,13 @@ dec_thread_new_objfile_observer (struct objfile *objfile)
/* The "to_get_ada_task_ptid" method of the dec_thread_ops. */
static ptid_t
-dec_thread_get_ada_task_ptid (long lwp, long thread)
+dec_thread_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
int i;
struct dec_thread_info *info;
- debug ("dec_thread_get_ada_task_ptid (lwp=0x%lx, thread=0x%lx)",
+ debug ("dec_thread_get_ada_task_ptid (struct target_ops *self,
+ lwp=0x%lx, thread=0x%lx)",
lwp, thread);
for (i = 0; VEC_iterate (dec_thread_info_s, dec_thread_list, i, info);
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 7b8491f..7a65bfe 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -231,7 +231,8 @@ inf_child_errno_to_fileio_error (int errnum)
target file descriptor, or -1 if an error occurs (and set
*TARGET_ERRNO). */
static int
-inf_child_fileio_open (const char *filename, int flags, int mode,
+inf_child_fileio_open (struct target_ops *self,
+ const char *filename, int flags, int mode,
int *target_errno)
{
int nat_flags;
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 545af88..7efe1e0 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -1304,7 +1304,7 @@ inf_ttrace_pid_to_str (struct target_ops *ops, ptid_t ptid)
/* Implement the get_ada_task_ptid target_ops method. */
static ptid_t
-inf_ttrace_get_ada_task_ptid (long lwp, long thread)
+inf_ttrace_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
}
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 1116f9c..8dfeb40 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4534,13 +4534,13 @@ linux_nat_supports_non_stop (struct target_ops *self)
int linux_multi_process = 1;
static int
-linux_nat_supports_multi_process (void)
+linux_nat_supports_multi_process (struct target_ops *self)
{
return linux_multi_process;
}
static int
-linux_nat_supports_disable_randomization (void)
+linux_nat_supports_disable_randomization (struct target_ops *self)
{
#ifdef HAVE_PERSONALITY
return 1;
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 2e39aa8..3c40c40 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1867,7 +1867,7 @@ thread_db_find_thread_from_tid (struct thread_info *thread, void *data)
/* Implement the to_get_ada_task_ptid target method for this target. */
static ptid_t
-thread_db_get_ada_task_ptid (long lwp, long thread)
+thread_db_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
struct thread_info *thread_info;
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index d912691..0286e9a 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -352,7 +352,7 @@ ravenscar_inferior_created (struct target_ops *target, int from_tty)
}
static ptid_t
-ravenscar_get_ada_task_ptid (long lwp, long thread)
+ravenscar_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
return ptid_build (ptid_get_pid (base_ptid), 0, thread);
}
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 61b1397..3b251c6 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -1683,7 +1683,7 @@ record_full_remove_breakpoint (struct target_ops *ops,
/* "to_can_execute_reverse" method for process record target. */
static int
-record_full_can_execute_reverse (void)
+record_full_can_execute_reverse (struct target_ops *self)
{
return 1;
}
@@ -1740,7 +1740,7 @@ record_full_goto_bookmark (struct target_ops *self,
}
static enum exec_direction_kind
-record_full_execution_direction (void)
+record_full_execution_direction (struct target_ops *self)
{
return record_full_execution_dir;
}
diff --git a/gdb/remote.c b/gdb/remote.c
index 41147a2..1370c5d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -232,9 +232,9 @@ static int remote_read_description_p (struct target_ops *target);
static void remote_console_output (char *msg);
-static int remote_supports_cond_breakpoints (void);
+static int remote_supports_cond_breakpoints (struct target_ops *self);
-static int remote_can_run_breakpoint_commands (void);
+static int remote_can_run_breakpoint_commands (struct target_ops *self);
/* For "remote". */
@@ -3025,7 +3025,7 @@ remote_static_tracepoint_markers_by_strid (const char *strid)
/* Implement the to_get_ada_task_ptid function for the remote targets. */
static ptid_t
-remote_get_ada_task_ptid (long lwp, long thread)
+remote_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
return ptid_build (ptid_get_pid (inferior_ptid), 0, lwp);
}
@@ -7992,7 +7992,7 @@ extended_remote_mourn (struct target_ops *ops)
}
static int
-extended_remote_supports_disable_randomization (void)
+extended_remote_supports_disable_randomization (struct target_ops *self)
{
return (remote_protocol_packets[PACKET_QDisableRandomization].support
== PACKET_ENABLE);
@@ -8096,7 +8096,7 @@ extended_remote_create_inferior (struct target_ops *ops,
target_async (inferior_event_handler, 0);
/* Disable address space randomization if requested (and supported). */
- if (extended_remote_supports_disable_randomization ())
+ if (extended_remote_supports_disable_randomization (ops))
extended_remote_disable_randomization (disable_randomization);
/* Now restart the remote server. */
@@ -8237,10 +8237,10 @@ remote_insert_breakpoint (struct target_ops *ops,
p += hexnumstr (p, addr);
xsnprintf (p, endbuf - p, ",%d", bpsize);
- if (remote_supports_cond_breakpoints ())
+ if (remote_supports_cond_breakpoints (ops))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
- if (remote_can_run_breakpoint_commands ())
+ if (remote_can_run_breakpoint_commands (ops))
remote_add_target_side_commands (gdbarch, bp_tgt, p);
putpkt (rs->buf);
@@ -8510,10 +8510,10 @@ remote_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
p += hexnumstr (p, (ULONGEST) addr);
xsnprintf (p, endbuf - p, ",%x", bp_tgt->placed_size);
- if (remote_supports_cond_breakpoints ())
+ if (remote_supports_cond_breakpoints (self))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
- if (remote_can_run_breakpoint_commands ())
+ if (remote_can_run_breakpoint_commands (self))
remote_add_target_side_commands (gdbarch, bp_tgt, p);
putpkt (rs->buf);
@@ -9790,7 +9790,8 @@ remote_hostio_send_command (int command_bytes, int which_packet,
*REMOTE_ERRNO). */
static int
-remote_hostio_open (const char *filename, int flags, int mode,
+remote_hostio_open (struct target_ops *self,
+ const char *filename, int flags, int mode,
int *remote_errno)
{
struct remote_state *rs = get_remote_state ();
@@ -10036,7 +10037,8 @@ remote_bfd_iovec_open (struct bfd *abfd, void *open_closure)
gdb_assert (remote_filename_p (filename));
- fd = remote_hostio_open (filename + 7, FILEIO_O_RDONLY, 0, &remote_errno);
+ fd = remote_hostio_open (find_target_at (process_stratum),
+ filename + 7, FILEIO_O_RDONLY, 0, &remote_errno);
if (fd == -1)
{
errno = remote_fileio_errno_to_host (remote_errno);
@@ -10142,7 +10144,8 @@ remote_file_put (const char *local_file, const char *remote_file, int from_tty)
perror_with_name (local_file);
back_to = make_cleanup_fclose (file);
- fd = remote_hostio_open (remote_file, (FILEIO_O_WRONLY | FILEIO_O_CREAT
+ fd = remote_hostio_open (find_target_at (process_stratum),
+ remote_file, (FILEIO_O_WRONLY | FILEIO_O_CREAT
| FILEIO_O_TRUNC),
0700, &remote_errno);
if (fd == -1)
@@ -10226,7 +10229,8 @@ remote_file_get (const char *remote_file, const char *local_file, int from_tty)
if (!rs->remote_desc)
error (_("command can only be used with remote target"));
- fd = remote_hostio_open (remote_file, FILEIO_O_RDONLY, 0, &remote_errno);
+ fd = remote_hostio_open (find_target_at (process_stratum),
+ remote_file, FILEIO_O_RDONLY, 0, &remote_errno);
if (fd == -1)
remote_hostio_error (remote_errno);
@@ -10350,7 +10354,7 @@ remote_command (char *args, int from_tty)
}
static int
-remote_can_execute_reverse (void)
+remote_can_execute_reverse (struct target_ops *self)
{
if (remote_protocol_packets[PACKET_bs].support == PACKET_ENABLE
|| remote_protocol_packets[PACKET_bc].support == PACKET_ENABLE)
@@ -10366,14 +10370,14 @@ remote_supports_non_stop (struct target_ops *self)
}
static int
-remote_supports_disable_randomization (void)
+remote_supports_disable_randomization (struct target_ops *self)
{
/* Only supported in extended mode. */
return 0;
}
static int
-remote_supports_multi_process (void)
+remote_supports_multi_process (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
@@ -10393,7 +10397,7 @@ remote_supports_cond_tracepoints (void)
}
static int
-remote_supports_cond_breakpoints (void)
+remote_supports_cond_breakpoints (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
@@ -10425,7 +10429,7 @@ remote_supports_install_in_trace (void)
}
static int
-remote_supports_enable_disable_tracepoint (void)
+remote_supports_enable_disable_tracepoint (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
@@ -10433,7 +10437,7 @@ remote_supports_enable_disable_tracepoint (void)
}
static int
-remote_supports_string_tracing (void)
+remote_supports_string_tracing (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
@@ -10441,7 +10445,7 @@ remote_supports_string_tracing (void)
}
static int
-remote_can_run_breakpoint_commands (void)
+remote_can_run_breakpoint_commands (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index b480b58..b1d33ee 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1186,7 +1186,7 @@ thread_db_find_thread_from_tid (struct thread_info *thread, void *data)
}
static ptid_t
-sol_get_ada_task_ptid (long lwp, long thread)
+sol_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
struct thread_info *thread_info =
iterate_over_threads (thread_db_find_thread_from_tid, &thread);
diff --git a/gdb/target.c b/gdb/target.c
index dce3eac..5c886dc 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -533,13 +533,13 @@ default_terminal_info (struct target_ops *self, const char *args, int from_tty)
inferior_ptid. */
static ptid_t
-default_get_ada_task_ptid (long lwp, long tid)
+default_get_ada_task_ptid (struct target_ops *self, long lwp, long tid)
{
return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
}
static enum exec_direction_kind
-default_execution_direction (void)
+default_execution_direction (struct target_ops *self)
{
if (!target_can_execute_reverse)
return EXEC_FORWARD;
@@ -833,16 +833,16 @@ update_current_target (void)
default_thread_architecture);
current_target.to_read_description = NULL;
de_fault (to_get_ada_task_ptid,
- (ptid_t (*) (long, long))
+ (ptid_t (*) (struct target_ops *, long, long))
default_get_ada_task_ptid);
de_fault (to_supports_multi_process,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_supports_enable_disable_tracepoint,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_supports_string_tracing,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_trace_init,
(void (*) (void))
@@ -926,10 +926,10 @@ update_current_target (void)
(struct traceframe_info * (*) (void))
return_zero);
de_fault (to_supports_evaluation_of_breakpoint_conditions,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_can_run_breakpoint_commands,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_use_agent,
(int (*) (int))
@@ -3194,13 +3194,13 @@ target_info_proc (char *args, enum info_proc_what what)
}
static int
-find_default_supports_disable_randomization (void)
+find_default_supports_disable_randomization (struct target_ops *self)
{
struct target_ops *t;
t = find_default_run_target (NULL);
if (t && t->to_supports_disable_randomization)
- return (t->to_supports_disable_randomization) ();
+ return (t->to_supports_disable_randomization) (t);
return 0;
}
@@ -3211,7 +3211,7 @@ target_supports_disable_randomization (void)
for (t = ¤t_target; t != NULL; t = t->beneath)
if (t->to_supports_disable_randomization)
- return t->to_supports_disable_randomization ();
+ return t->to_supports_disable_randomization (t);
return 0;
}
@@ -3299,7 +3299,7 @@ target_fileio_open (const char *filename, int flags, int mode,
{
if (t->to_fileio_open != NULL)
{
- int fd = t->to_fileio_open (filename, flags, mode, target_errno);
+ int fd = t->to_fileio_open (t, filename, flags, mode, target_errno);
if (targetdebug)
fprintf_unfiltered (gdb_stdlog,
diff --git a/gdb/target.h b/gdb/target.h
index 6071e8f..d28bfd3 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -623,7 +623,8 @@ struct target_ops
based on LWP and THREAD. These values are extracted from the
task Private_Data section of the Ada Task Control Block, and
their interpretation depends on the target. */
- ptid_t (*to_get_ada_task_ptid) (long lwp, long thread);
+ ptid_t (*to_get_ada_task_ptid) (struct target_ops *,
+ long lwp, long thread);
/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
Return 0 if *READPTR is already at the end of the buffer.
@@ -644,34 +645,34 @@ struct target_ops
CORE_ADDR *found_addrp);
/* Can target execute in reverse? */
- int (*to_can_execute_reverse) (void);
+ int (*to_can_execute_reverse) (struct target_ops *);
/* The direction the target is currently executing. Must be
implemented on targets that support reverse execution and async
mode. The default simply returns forward execution. */
- enum exec_direction_kind (*to_execution_direction) (void);
+ enum exec_direction_kind (*to_execution_direction) (struct target_ops *);
/* Does this target support debugging multiple processes
simultaneously? */
- int (*to_supports_multi_process) (void);
+ int (*to_supports_multi_process) (struct target_ops *);
/* Does this target support enabling and disabling tracepoints while a trace
experiment is running? */
- int (*to_supports_enable_disable_tracepoint) (void);
+ int (*to_supports_enable_disable_tracepoint) (struct target_ops *);
/* Does this target support disabling address space randomization? */
- int (*to_supports_disable_randomization) (void);
+ int (*to_supports_disable_randomization) (struct target_ops *);
/* Does this target support the tracenz bytecode for string collection? */
- int (*to_supports_string_tracing) (void);
+ int (*to_supports_string_tracing) (struct target_ops *);
/* Does this target support evaluation of breakpoint conditions on its
end? */
- int (*to_supports_evaluation_of_breakpoint_conditions) (void);
+ int (*to_supports_evaluation_of_breakpoint_conditions) (struct target_ops *);
/* Does this target support evaluation of breakpoint commands on its
end? */
- int (*to_can_run_breakpoint_commands) (void);
+ int (*to_can_run_breakpoint_commands) (struct target_ops *);
/* Determine current architecture of thread PTID.
@@ -697,7 +698,8 @@ struct target_ops
/* Open FILENAME on the target, using FLAGS and MODE. Return a
target file descriptor, or -1 if an error occurs (and set
*TARGET_ERRNO). */
- int (*to_fileio_open) (const char *filename, int flags, int mode,
+ int (*to_fileio_open) (struct target_ops *,
+ const char *filename, int flags, int mode,
int *target_errno);
/* Write up to LEN bytes from WRITE_BUF to FD on the target.
@@ -1070,7 +1072,7 @@ int target_info_proc (char *, enum info_proc_what);
simultaneously. */
#define target_supports_multi_process() \
- (*current_target.to_supports_multi_process) ()
+ (*current_target.to_supports_multi_process) (¤t_target)
/* Returns true if this target can disable address space randomization. */
@@ -1080,22 +1082,22 @@ int target_supports_disable_randomization (void);
while a trace experiment is running. */
#define target_supports_enable_disable_tracepoint() \
- (*current_target.to_supports_enable_disable_tracepoint) ()
+ (*current_target.to_supports_enable_disable_tracepoint) (¤t_target)
#define target_supports_string_tracing() \
- (*current_target.to_supports_string_tracing) ()
+ (*current_target.to_supports_string_tracing) (¤t_target)
/* Returns true if this target can handle breakpoint conditions
on its end. */
#define target_supports_evaluation_of_breakpoint_conditions() \
- (*current_target.to_supports_evaluation_of_breakpoint_conditions) ()
+ (*current_target.to_supports_evaluation_of_breakpoint_conditions) (¤t_target)
/* Returns true if this target can handle breakpoint commands
on its end. */
#define target_can_run_breakpoint_commands() \
- (*current_target.to_can_run_breakpoint_commands) ()
+ (*current_target.to_can_run_breakpoint_commands) (¤t_target)
extern int target_read_string (CORE_ADDR, char **, int, int *);
@@ -1476,7 +1478,7 @@ int target_supports_non_stop (void);
(current_target.to_async (¤t_target, (CALLBACK), (CONTEXT)))
#define target_execution_direction() \
- (current_target.to_execution_direction ())
+ (current_target.to_execution_direction (¤t_target))
/* Converts a process id to a string. Usually, the string just contains
`process xyz', but on some systems it may contain
@@ -1657,12 +1659,12 @@ extern int target_masked_watch_num_registers (CORE_ADDR addr, CORE_ADDR mask);
/* Target can execute in reverse? */
#define target_can_execute_reverse \
(current_target.to_can_execute_reverse ? \
- current_target.to_can_execute_reverse () : 0)
+ current_target.to_can_execute_reverse (¤t_target) : 0)
extern const struct target_desc *target_read_description (struct target_ops *);
#define target_get_ada_task_ptid(lwp, tid) \
- (*current_target.to_get_ada_task_ptid) (lwp,tid)
+ (*current_target.to_get_ada_task_ptid) (¤t_target, lwp,tid)
/* Utility implementation of searching memory. */
extern int simple_search_memory (struct target_ops* ops,
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 7132034..c3982f1 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2571,7 +2571,7 @@ windows_get_tib_address (ptid_t ptid, CORE_ADDR *addr)
}
static ptid_t
-windows_get_ada_task_ptid (long lwp, long thread)
+windows_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
return ptid_build (ptid_get_pid (inferior_ptid), 0, lwp);
}
--
1.8.1.4