projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* symfile.c (compare_psymbols, compare_symbols): Declare using
[deliverable/binutils-gdb.git]
/
gdb
/
target.c
diff --git
a/gdb/target.c
b/gdb/target.c
index ba4ddc2fce05e24b80486d51d2edc7af11f64105..cdccd7f65aed8088170acacee19f3bc04c61d19e 100644
(file)
--- a/
gdb/target.c
+++ b/
gdb/target.c
@@
-1,5
+1,6
@@
/* Select target systems and architectures at runtime for GDB.
/* Select target systems and architectures at runtime for GDB.
- Copyright 1990, 1992-1995, 1998-2000, 2001 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB.
Contributed by Cygnus Support.
This file is part of GDB.
@@
-21,7
+22,6
@@
#include "defs.h"
#include <errno.h>
#include "defs.h"
#include <errno.h>
-#include <ctype.h>
#include "gdb_string.h"
#include "target.h"
#include "gdbcmd.h"
#include "gdb_string.h"
#include "target.h"
#include "gdbcmd.h"
@@
-33,6
+33,7
@@
#include "gdb_wait.h"
#include "dcache.h"
#include <signal.h>
#include "gdb_wait.h"
#include "dcache.h"
#include <signal.h>
+#include "regcache.h"
extern int errno;
extern int errno;
@@
-70,7
+71,7
@@
static void update_current_target (void);
static void nosupport_runtime (void);
static void nosupport_runtime (void);
-static void normal_target_post_startup_inferior (
int p
id);
+static void normal_target_post_startup_inferior (
ptid_t pt
id);
/* Transfer LEN bytes between target address MEMADDR and GDB address
MYADDR. Returns 0 for success, errno code for failure (which
/* Transfer LEN bytes between target address MEMADDR and GDB address
MYADDR. Returns 0 for success, errno code for failure (which
@@
-91,9
+92,9
@@
static void debug_to_attach (char *, int);
static void debug_to_detach (char *, int);
static void debug_to_detach (char *, int);
-static void debug_to_resume (
in
t, int, enum target_signal);
+static void debug_to_resume (
ptid_
t, int, enum target_signal);
-static
int debug_to_wait (in
t, struct target_waitstatus *);
+static
ptid_t debug_to_wait (ptid_
t, struct target_waitstatus *);
static void debug_to_fetch_registers (int);
static void debug_to_fetch_registers (int);
@@
-133,9
+134,9
@@
static void debug_to_mourn_inferior (void);
static int debug_to_can_run (void);
static int debug_to_can_run (void);
-static void debug_to_notice_signals (
in
t);
+static void debug_to_notice_signals (
ptid_
t);
-static int debug_to_thread_alive (
in
t);
+static int debug_to_thread_alive (
ptid_
t);
static void debug_to_stop (void);
static void debug_to_stop (void);
@@
-270,7
+271,7
@@
nosymbol (char *name, CORE_ADDR *addrp)
static void
nosupport_runtime (void)
{
static void
nosupport_runtime (void)
{
- if (
!inferior_pid
)
+ if (
ptid_equal (inferior_ptid, null_ptid)
)
noprocess ();
else
error ("No run-time support for this");
noprocess ();
else
error ("No run-time support for this");
@@
-362,13
+363,13
@@
cleanup_target (struct target_ops *t)
(void (*) (int, char *, int))
target_ignore);
de_fault (to_resume,
(void (*) (int, char *, int))
target_ignore);
de_fault (to_resume,
- (void (*) (
in
t, int, enum target_signal))
+ (void (*) (
ptid_
t, int, enum target_signal))
noprocess);
de_fault (to_wait,
noprocess);
de_fault (to_wait,
- (
int (*) (in
t, struct target_waitstatus *))
+ (
ptid_t (*) (ptid_
t, struct target_waitstatus *))
noprocess);
de_fault (to_post_wait,
noprocess);
de_fault (to_post_wait,
- (void (*) (
in
t, int))
+ (void (*) (
ptid_
t, int))
target_ignore);
de_fault (to_fetch_registers,
(void (*) (int))
target_ignore);
de_fault (to_fetch_registers,
(void (*) (int))
@@
-415,7
+416,7
@@
cleanup_target (struct target_ops *t)
de_fault (to_create_inferior,
maybe_kill_then_create_inferior);
de_fault (to_post_startup_inferior,
de_fault (to_create_inferior,
maybe_kill_then_create_inferior);
de_fault (to_post_startup_inferior,
- (void (*) (
in
t))
+ (void (*) (
ptid_
t))
target_ignore);
de_fault (to_acknowledge_created_inferior,
(void (*) (int))
target_ignore);
de_fault (to_acknowledge_created_inferior,
(void (*) (int))
@@
-473,10
+474,10
@@
cleanup_target (struct target_ops *t)
de_fault (to_can_run,
return_zero);
de_fault (to_notice_signals,
de_fault (to_can_run,
return_zero);
de_fault (to_notice_signals,
- (void (*) (
in
t))
+ (void (*) (
ptid_
t))
target_ignore);
de_fault (to_thread_alive,
target_ignore);
de_fault (to_thread_alive,
- (int (*) (
in
t))
+ (int (*) (
ptid_
t))
return_zero);
de_fault (to_find_new_threads,
(void (*) (void))
return_zero);
de_fault (to_find_new_threads,
(void (*) (void))
@@
-502,9
+503,6
@@
cleanup_target (struct target_ops *t)
de_fault (to_pid_to_exec_file,
(char *(*) (int))
return_zero);
de_fault (to_pid_to_exec_file,
(char *(*) (int))
return_zero);
- de_fault (to_core_file_to_sym_file,
- (char *(*) (char *))
- return_zero);
de_fault (to_can_async_p,
(int (*) (void))
return_zero);
de_fault (to_can_async_p,
(int (*) (void))
return_zero);
@@
-598,7
+596,6
@@
update_current_target (void)
INHERIT (to_enable_exception_callback, t);
INHERIT (to_get_current_exception_event, t);
INHERIT (to_pid_to_exec_file, t);
INHERIT (to_enable_exception_callback, t);
INHERIT (to_get_current_exception_event, t);
INHERIT (to_pid_to_exec_file, t);
- INHERIT (to_core_file_to_sym_file, t);
INHERIT (to_stratum, t);
INHERIT (DONT_USE, t);
INHERIT (to_has_all_memory, t);
INHERIT (to_stratum, t);
INHERIT (DONT_USE, t);
INHERIT (to_has_all_memory, t);
@@
-1379,7
+1376,7
@@
generic_mourn_inferior (void)
{
extern int show_breakpoint_hit_counts;
{
extern int show_breakpoint_hit_counts;
- inferior_p
id = 0
;
+ inferior_p
tid = null_ptid
;
attach_flag = 0;
breakpoint_init_inferior (inf_exited);
registers_changed ();
attach_flag = 0;
breakpoint_init_inferior (inf_exited);
registers_changed ();
@@
-2165,15
+2162,11
@@
int target_activity_fd;
buffer. */
char *
buffer. */
char *
-normal_pid_to_str (
int p
id)
+normal_pid_to_str (
ptid_t pt
id)
{
static char buf[30];
{
static char buf[30];
- if (STREQ (current_target.to_shortname, "remote"))
- sprintf (buf, "thread %d", pid);
- else
- sprintf (buf, "process %d", pid);
-
+ sprintf (buf, "process %d", PIDGET (ptid));
return buf;
}
return buf;
}
@@
-2190,7
+2183,7
@@
normal_pid_to_str (int pid)
target_acknowledge_forked_child.
*/
static void
target_acknowledge_forked_child.
*/
static void
-normal_target_post_startup_inferior (
int p
id)
+normal_target_post_startup_inferior (
ptid_t pt
id)
{
/* This space intentionally left blank. */
}
{
/* This space intentionally left blank. */
}
@@
-2277,24
+2270,25
@@
debug_to_require_detach (int pid, char *args, int from_tty)
}
static void
}
static void
-debug_to_resume (
int p
id, int step, enum target_signal siggnal)
+debug_to_resume (
ptid_t pt
id, int step, enum target_signal siggnal)
{
{
- debug_target.to_resume (pid, step, siggnal);
+ debug_target.to_resume (p
t
id, step, siggnal);
- fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n",
pid
,
+ fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n",
PIDGET (ptid)
,
step ? "step" : "continue",
target_signal_to_name (siggnal));
}
step ? "step" : "continue",
target_signal_to_name (siggnal));
}
-static
in
t
-debug_to_wait (
int p
id, struct target_waitstatus *status)
+static
ptid_
t
+debug_to_wait (
ptid_t pt
id, struct target_waitstatus *status)
{
{
-
in
t retval;
+
ptid_
t retval;
- retval = debug_target.to_wait (pid, status);
+ retval = debug_target.to_wait (p
t
id, status);
fprintf_unfiltered (gdb_stdlog,
fprintf_unfiltered (gdb_stdlog,
- "target_wait (%d, status) = %d, ", pid, retval);
+ "target_wait (%d, status) = %d, ", PIDGET (ptid),
+ PIDGET (retval));
fprintf_unfiltered (gdb_stdlog, "status->kind = ");
switch (status->kind)
{
fprintf_unfiltered (gdb_stdlog, "status->kind = ");
switch (status->kind)
{
@@
-2334,12
+2328,12
@@
debug_to_wait (int pid, struct target_waitstatus *status)
}
static void
}
static void
-debug_to_post_wait (
int p
id, int status)
+debug_to_post_wait (
ptid_t pt
id, int status)
{
{
- debug_target.to_post_wait (pid, status);
+ debug_target.to_post_wait (p
t
id, status);
fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n",
fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n",
-
pid
, status);
+
PIDGET (ptid)
, status);
}
static void
}
static void
@@
-2528,12
+2522,12
@@
debug_to_create_inferior (char *exec_file, char *args, char **env)
}
static void
}
static void
-debug_to_post_startup_inferior (
int p
id)
+debug_to_post_startup_inferior (
ptid_t pt
id)
{
{
- debug_target.to_post_startup_inferior (pid);
+ debug_target.to_post_startup_inferior (p
t
id);
fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n",
fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n",
-
pid
);
+
PIDGET (ptid)
);
}
static void
}
static void
@@
-2783,22
+2777,23
@@
debug_to_can_run (void)
}
static void
}
static void
-debug_to_notice_signals (
int p
id)
+debug_to_notice_signals (
ptid_t pt
id)
{
{
- debug_target.to_notice_signals (pid);
+ debug_target.to_notice_signals (p
t
id);
- fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", pid);
+ fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n",
+ PIDGET (ptid));
}
static int
}
static int
-debug_to_thread_alive (
int p
id)
+debug_to_thread_alive (
ptid_t pt
id)
{
int retval;
{
int retval;
- retval = debug_target.to_thread_alive (pid);
+ retval = debug_target.to_thread_alive (p
t
id);
fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n",
fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n",
-
pid
, retval);
+
PIDGET (ptid)
, retval);
return retval;
}
return retval;
}
@@
-2872,19
+2867,6
@@
debug_to_pid_to_exec_file (int pid)
return exec_file;
}
return exec_file;
}
-static char *
-debug_to_core_file_to_sym_file (char *core)
-{
- char *sym_file;
-
- sym_file = debug_target.to_core_file_to_sym_file (core);
-
- fprintf_unfiltered (gdb_stdlog, "target_core_file_to_sym_file (%s) = %s\n",
- core, sym_file);
-
- return sym_file;
-}
-
static void
setup_target_debug (void)
{
static void
setup_target_debug (void)
{
@@
-2945,7
+2927,6
@@
setup_target_debug (void)
current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;
current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;
- current_target.to_core_file_to_sym_file = debug_to_core_file_to_sym_file;
}
\f
}
\f
This page took
0.02746 seconds
and
4
git commands to generate.