mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
* linux-nat.c (linux_nat_wait): Adjust.
(linux_nat_pid_to_str): Adjust. Remove call to thread_db_init. * linux-nat.h (thread_db_init): Delete declaration. * linux-thread-db.c (target_beneath): Delete. (thread_db_init): Delete. (thread_db_detach): Use find_target_beneath. (thread_db_wait): Adjust interface. Use find_target_beneath. (thread_db_mourn_inferior): Use find_target_beneath. (thread_db_can_async_p, thread_db_is_async_p, thread_db_async) (thread_db_async_mask): Delete. (thread_db_pid_to_str): Adjust interface. Use find_target_beneath. (thread_db_get_thread_local_address): Adjust interface. Use find_target_beneath. (init_thread_db_ops): Delete references to delete functions. * target.c (update_current_target): Don't inherit or default to_wait. Don't inherit to_pid_to_str and to_get_thread_local_address. (target_translate_tls_address): Look for a pushed target that implements to_get_thread_local_address, and use it instead of checking for target_get_thread_local_address_p. (target_wait, target_pid_to_str): Reimplement as functions. (dummy_pid_to_str): New. (init_dummy_target): Register it. (debug_to_wait): Delete. * target.h (struct target_ops): Make to_wait, to_pid_to_str and to_get_thread_local_address accept a pointer to struct target_ops. (target_wait): Delete macro, and declare as function. (target_pid_to_str): Likewise. (target_get_thread_local_address) (target_get_thread_local_address_p): Delete. (noprocess): Add NORETURN and ATTR_NORETURN tags. * inf-ptrace.c (inf_ptrace_wait): Adjust. (inf_ptrace_pid_to_str): New. (inf_ptrace_target): Use inf_ptrace_pid_to_str. * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust. * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust. * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str): Adjust. * corelow.c (core_pid_to_str): Adjust. * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust. * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust. * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust. * go32-nat.c (go32_wait, go32_pid_to_str): Adjust. * hpux-thread.c (hpux_thread_wait): Adjust. * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust. * monitor.c (monitor_wait, monitor_pid_to_str): Adjust. * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust. * procfs.c (procfs_pid_to_str): Adjust. * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust. * remote-mips.c (mips_wait): Adjust. * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust. * remote.c (remote_wait, remote_pid_to_str) (remote_get_thread_local_address): Adjust. * rs6000-nat.c (rs6000_wait): Adjust. * sol-thread.c (procfs_pid_to_str): Adjust declaration. (sol_thread_wait, solaris_pid_to_str): Adjust. * spu-linux-nat.c (spu_child_wait): Adjust. * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
This commit is contained in:
23
gdb/target.h
23
gdb/target.h
@@ -330,7 +330,8 @@ struct target_ops
|
||||
void (*to_detach) (struct target_ops *ops, char *, int);
|
||||
void (*to_disconnect) (struct target_ops *, char *, int);
|
||||
void (*to_resume) (ptid_t, int, enum target_signal);
|
||||
ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
|
||||
ptid_t (*to_wait) (struct target_ops *,
|
||||
ptid_t, struct target_waitstatus *);
|
||||
void (*to_fetch_registers) (struct regcache *, int);
|
||||
void (*to_store_registers) (struct regcache *, int);
|
||||
void (*to_prepare_to_store) (struct regcache *);
|
||||
@@ -402,7 +403,7 @@ struct target_ops
|
||||
void (*to_notice_signals) (ptid_t ptid);
|
||||
int (*to_thread_alive) (ptid_t ptid);
|
||||
void (*to_find_new_threads) (void);
|
||||
char *(*to_pid_to_str) (ptid_t);
|
||||
char *(*to_pid_to_str) (struct target_ops *, ptid_t);
|
||||
char *(*to_extra_thread_info) (struct thread_info *);
|
||||
void (*to_stop) (ptid_t);
|
||||
void (*to_rcmd) (char *command, struct ui_file *output);
|
||||
@@ -438,7 +439,8 @@ struct target_ops
|
||||
or executable file given by OBJFILE. If that block of
|
||||
thread-local storage hasn't been allocated yet, this function
|
||||
may return an error. */
|
||||
CORE_ADDR (*to_get_thread_local_address) (ptid_t ptid,
|
||||
CORE_ADDR (*to_get_thread_local_address) (struct target_ops *ops,
|
||||
ptid_t ptid,
|
||||
CORE_ADDR load_module_addr,
|
||||
CORE_ADDR offset);
|
||||
|
||||
@@ -625,8 +627,7 @@ extern void target_resume (ptid_t ptid, int step, enum target_signal signal);
|
||||
to the prompt with a debugging target but without the frame cache,
|
||||
stop_pc, etc., set up. */
|
||||
|
||||
#define target_wait(ptid, status) \
|
||||
(*current_target.to_wait) (ptid, status)
|
||||
extern ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status);
|
||||
|
||||
/* Fetch at least register REGNO, or all regs if regno == -1. No result. */
|
||||
|
||||
@@ -1013,8 +1014,7 @@ int target_supports_non_stop (void);
|
||||
`process xyz', but on some systems it may contain
|
||||
`process xyz thread abc'. */
|
||||
|
||||
#undef target_pid_to_str
|
||||
#define target_pid_to_str(PID) current_target.to_pid_to_str (PID)
|
||||
extern char *target_pid_to_str (ptid_t ptid);
|
||||
|
||||
extern char *normal_pid_to_str (ptid_t ptid);
|
||||
|
||||
@@ -1057,13 +1057,6 @@ extern char *normal_pid_to_str (ptid_t ptid);
|
||||
#define target_make_corefile_notes(BFD, SIZE_P) \
|
||||
(current_target.to_make_corefile_notes) (BFD, SIZE_P)
|
||||
|
||||
/* Thread-local values. */
|
||||
#define target_get_thread_local_address \
|
||||
(current_target.to_get_thread_local_address)
|
||||
#define target_get_thread_local_address_p() \
|
||||
(target_get_thread_local_address != NULL)
|
||||
|
||||
|
||||
/* Hardware watchpoint interfaces. */
|
||||
|
||||
/* Returns non-zero if we were stopped by a hardware watchpoint (memory read or
|
||||
@@ -1252,7 +1245,7 @@ extern int default_memory_insert_breakpoint (struct gdbarch *, struct bp_target_
|
||||
|
||||
extern void initialize_targets (void);
|
||||
|
||||
extern void noprocess (void);
|
||||
extern NORETURN void noprocess (void) ATTR_NORETURN;
|
||||
|
||||
extern void target_require_runnable (void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user