projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add target_ops argument to to_pid_to_exec_file
[deliverable/binutils-gdb.git]
/
gdb
/
target.c
diff --git
a/gdb/target.c
b/gdb/target.c
index 74a2817034eb19ce190213343303c2cf6f06568b..7ffe2df3ebb6a4d0a6b55248d7fb616312392972 100644
(file)
--- a/
gdb/target.c
+++ b/
gdb/target.c
@@
-144,9
+144,9
@@
static void debug_to_terminal_ours (struct target_ops *self);
static void debug_to_load (struct target_ops *self, char *, int);
static void debug_to_load (struct target_ops *self, char *, int);
-static int debug_to_can_run (
void
);
+static int debug_to_can_run (
struct target_ops *self
);
-static void debug_to_stop (ptid_t);
+static void debug_to_stop (
struct target_ops *self,
ptid_t);
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
@@
-813,24
+813,25
@@
update_current_target (void)
(int (*) (struct target_ops *, int, int, int, int, int *))
return_one);
de_fault (to_has_exited,
(int (*) (struct target_ops *, int, int, int, int, int *))
return_one);
de_fault (to_has_exited,
- (int (*) (int, int, int *))
+ (int (*) (
struct target_ops *,
int, int, int *))
return_zero);
de_fault (to_can_run,
return_zero);
de_fault (to_can_run,
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_extra_thread_info,
return_zero);
de_fault (to_extra_thread_info,
- (char *(*) (struct thread_info *))
+ (char *(*) (struct t
arget_ops *, struct t
hread_info *))
return_null);
de_fault (to_thread_name,
return_null);
de_fault (to_thread_name,
- (char *(*) (struct thread_info *))
+ (char *(*) (struct t
arget_ops *, struct t
hread_info *))
return_null);
de_fault (to_stop,
return_null);
de_fault (to_stop,
- (void (*) (ptid_t))
+ (void (*) (
struct target_ops *,
ptid_t))
target_ignore);
de_fault (to_rcmd,
target_ignore);
de_fault (to_rcmd,
- (void (*) (char *, struct ui_file *))
+ (void (*) (
struct target_ops *,
char *, struct ui_file *))
tcomplain);
de_fault (to_pid_to_exec_file,
tcomplain);
de_fault (to_pid_to_exec_file,
- (char *(*) (int))
+ (char *(*) (
struct target_ops *,
int))
return_null);
de_fault (to_thread_architecture,
default_thread_architecture);
return_null);
de_fault (to_thread_architecture,
default_thread_architecture);
@@
-2770,7
+2771,7
@@
target_thread_name (struct thread_info *info)
for (t = current_target.beneath; t != NULL; t = t->beneath)
{
if (t->to_thread_name != NULL)
for (t = current_target.beneath; t != NULL; t = t->beneath)
{
if (t->to_thread_name != NULL)
- return (*t->to_thread_name) (info);
+ return (*t->to_thread_name) (
t,
info);
}
return NULL;
}
return NULL;
@@
-2820,7
+2821,7
@@
target_pass_signals (int numsigs, unsigned char *pass_signals)
fprintf_unfiltered (gdb_stdlog, " })\n");
}
fprintf_unfiltered (gdb_stdlog, " })\n");
}
- (*t->to_pass_signals) (numsigs, pass_signals);
+ (*t->to_pass_signals) (
t,
numsigs, pass_signals);
return;
}
}
return;
}
}
@@
-2850,7
+2851,7
@@
target_program_signals (int numsigs, unsigned char *program_signals)
fprintf_unfiltered (gdb_stdlog, " })\n");
}
fprintf_unfiltered (gdb_stdlog, " })\n");
}
- (*t->to_program_signals) (numsigs, program_signals);
+ (*t->to_program_signals) (
t,
numsigs, program_signals);
return;
}
}
return;
}
}
@@
-3924,7
+3925,7
@@
target_stop (ptid_t ptid)
return;
}
return;
}
- (*current_target.to_stop) (ptid);
+ (*current_target.to_stop) (
¤t_target,
ptid);
}
static void
}
static void
@@
-4944,11
+4945,13
@@
debug_to_remove_exec_catchpoint (struct target_ops *self, int pid)
}
static int
}
static int
-debug_to_has_exited (int pid, int wait_status, int *exit_status)
+debug_to_has_exited (struct target_ops *self,
+ int pid, int wait_status, int *exit_status)
{
int has_exited;
{
int has_exited;
- has_exited = debug_target.to_has_exited (pid, wait_status, exit_status);
+ has_exited = debug_target.to_has_exited (&debug_target,
+ pid, wait_status, exit_status);
fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n",
pid, wait_status, *exit_status, has_exited);
fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n",
pid, wait_status, *exit_status, has_exited);
@@
-4957,11
+4960,11
@@
debug_to_has_exited (int pid, int wait_status, int *exit_status)
}
static int
}
static int
-debug_to_can_run (
void
)
+debug_to_can_run (
struct target_ops *self
)
{
int retval;
{
int retval;
- retval = debug_target.to_can_run ();
+ retval = debug_target.to_can_run (
&debug_target
);
fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval);
fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval);
@@
-4984,28
+4987,28
@@
debug_to_thread_architecture (struct target_ops *ops, ptid_t ptid)
}
static void
}
static void
-debug_to_stop (ptid_t ptid)
+debug_to_stop (
struct target_ops *self,
ptid_t ptid)
{
{
- debug_target.to_stop (ptid);
+ debug_target.to_stop (
&debug_target,
ptid);
fprintf_unfiltered (gdb_stdlog, "target_stop (%s)\n",
target_pid_to_str (ptid));
}
static void
fprintf_unfiltered (gdb_stdlog, "target_stop (%s)\n",
target_pid_to_str (ptid));
}
static void
-debug_to_rcmd (char *command,
+debug_to_rcmd (
struct target_ops *self,
char *command,
struct ui_file *outbuf)
{
struct ui_file *outbuf)
{
- debug_target.to_rcmd (command, outbuf);
+ debug_target.to_rcmd (
&debug_target,
command, outbuf);
fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
}
static char *
fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
}
static char *
-debug_to_pid_to_exec_file (int pid)
+debug_to_pid_to_exec_file (
struct target_ops *self,
int pid)
{
char *exec_file;
{
char *exec_file;
- exec_file = debug_target.to_pid_to_exec_file (pid);
+ exec_file = debug_target.to_pid_to_exec_file (
&debug_target,
pid);
fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n",
pid, exec_file);
fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n",
pid, exec_file);
@@
-5072,10
+5075,11
@@
do_monitor_command (char *cmd,
int from_tty)
{
if ((current_target.to_rcmd
int from_tty)
{
if ((current_target.to_rcmd
- == (void (*) (char *, struct ui_file *)) tcomplain)
+ == (void (*) (
struct target_ops *,
char *, struct ui_file *)) tcomplain)
|| (current_target.to_rcmd == debug_to_rcmd
&& (debug_target.to_rcmd
|| (current_target.to_rcmd == debug_to_rcmd
&& (debug_target.to_rcmd
- == (void (*) (char *, struct ui_file *)) tcomplain)))
+ == (void (*) (struct target_ops *,
+ char *, struct ui_file *)) tcomplain)))
error (_("\"monitor\" command not supported by this target."));
target_rcmd (cmd, gdb_stdtarg);
}
error (_("\"monitor\" command not supported by this target."));
target_rcmd (cmd, gdb_stdtarg);
}
This page took
0.025815 seconds
and
4
git commands to generate.