Add target_ops argument to to_extra_thread_info

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_extra_thread_info>: Add
	argument.
	(target_extra_thread_info): Add argument.
	* target.c (update_current_target): Update.
	* remote.c (remote_threads_extra_info): Add 'self' argument.
	* ravenscar-thread.c (ravenscar_extra_thread_info): Add 'self'
	argument.
	* nto-tdep.h (nto_extra_thread_info): Add 'self' argument.
	* nto-tdep.c (nto_extra_thread_info): Add 'self' argument.
	* linux-thread-db.c (thread_db_extra_thread_info): Add 'self'
	argument.
	* inf-ttrace.c (inf_ttrace_extra_thread_info): Add 'self'
	argument.
	* bsd-uthread.c (bsd_uthread_extra_thread_info): Add 'self'
	argument.
	* aix-thread.c (aix_thread_extra_thread_info): Add 'self'
	argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:34:09 -07:00
parent daf5e9b64c
commit c15906d8e6
11 changed files with 37 additions and 12 deletions

View File

@ -1,3 +1,23 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_extra_thread_info>: Add
argument.
(target_extra_thread_info): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_threads_extra_info): Add 'self' argument.
* ravenscar-thread.c (ravenscar_extra_thread_info): Add 'self'
argument.
* nto-tdep.h (nto_extra_thread_info): Add 'self' argument.
* nto-tdep.c (nto_extra_thread_info): Add 'self' argument.
* linux-thread-db.c (thread_db_extra_thread_info): Add 'self'
argument.
* inf-ttrace.c (inf_ttrace_extra_thread_info): Add 'self'
argument.
* bsd-uthread.c (bsd_uthread_extra_thread_info): Add 'self'
argument.
* aix-thread.c (aix_thread_extra_thread_info): Add 'self'
argument.
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_program_signals>: Add argument.

View File

@ -1748,7 +1748,8 @@ aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid)
THREAD, for use in "info threads" output. */
static char *
aix_thread_extra_thread_info (struct thread_info *thread)
aix_thread_extra_thread_info (struct target_ops *self,
struct thread_info *thread)
{
struct ui_file *buf;
int status;

View File

@ -483,7 +483,8 @@ static char *bsd_uthread_state[] =
INFO. */
static char *
bsd_uthread_extra_thread_info (struct thread_info *info)
bsd_uthread_extra_thread_info (struct target_ops *self,
struct thread_info *info)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
CORE_ADDR addr = ptid_get_tid (info->ptid);

View File

@ -1282,7 +1282,8 @@ inf_ttrace_thread_alive (struct target_ops *ops, ptid_t ptid)
INFO. */
static char *
inf_ttrace_extra_thread_info (struct thread_info *info)
inf_ttrace_extra_thread_info (struct target_ops *self,
struct thread_info *info)
{
struct inf_ttrace_private_thread_info* private =
(struct inf_ttrace_private_thread_info *) info->private;

View File

@ -1772,7 +1772,8 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
INFO. */
static char *
thread_db_extra_thread_info (struct thread_info *info)
thread_db_extra_thread_info (struct target_ops *self,
struct thread_info *info)
{
if (info->private == NULL)
return NULL;

View File

@ -362,7 +362,7 @@ static const char *nto_thread_state_str[] =
};
char *
nto_extra_thread_info (struct thread_info *ti)
nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
{
if (ti && ti->private
&& ti->private->state < ARRAY_SIZE (nto_thread_state_str))

View File

@ -166,6 +166,6 @@ void nto_dummy_supply_regset (struct regcache *regcache, char *regs);
int nto_in_dynsym_resolve_code (CORE_ADDR pc);
char *nto_extra_thread_info (struct thread_info *);
char *nto_extra_thread_info (struct target_ops *self, struct thread_info *);
#endif

View File

@ -54,7 +54,8 @@ static const char ravenscar_runtime_initializer[] =
static void ravenscar_find_new_threads (struct target_ops *ops);
static ptid_t ravenscar_running_thread (void);
static char *ravenscar_extra_thread_info (struct thread_info *tp);
static char *ravenscar_extra_thread_info (struct target_ops *self,
struct thread_info *tp);
static int ravenscar_thread_alive (struct target_ops *ops, ptid_t ptid);
static void ravenscar_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regnum);
@ -240,7 +241,7 @@ ravenscar_running_thread (void)
}
static char *
ravenscar_extra_thread_info (struct thread_info *tp)
ravenscar_extra_thread_info (struct target_ops *self, struct thread_info *tp)
{
return "Ravenscar task";
}

View File

@ -2808,7 +2808,7 @@ remote_threads_info (struct target_ops *ops)
*/
static char *
remote_threads_extra_info (struct thread_info *tp)
remote_threads_extra_info (struct target_ops *self, struct thread_info *tp)
{
struct remote_state *rs = get_remote_state ();
int result;

View File

@ -819,7 +819,7 @@ update_current_target (void)
(int (*) (struct target_ops *))
return_zero);
de_fault (to_extra_thread_info,
(char *(*) (struct thread_info *))
(char *(*) (struct target_ops *, struct thread_info *))
return_null);
de_fault (to_thread_name,
(char *(*) (struct thread_info *))

View File

@ -522,7 +522,7 @@ struct target_ops
int (*to_thread_alive) (struct target_ops *, ptid_t ptid);
void (*to_find_new_threads) (struct target_ops *);
char *(*to_pid_to_str) (struct target_ops *, ptid_t);
char *(*to_extra_thread_info) (struct thread_info *);
char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *);
char *(*to_thread_name) (struct thread_info *);
void (*to_stop) (ptid_t);
void (*to_rcmd) (char *command, struct ui_file *output);
@ -1524,7 +1524,7 @@ extern char *normal_pid_to_str (ptid_t ptid);
is okay. */
#define target_extra_thread_info(TP) \
(current_target.to_extra_thread_info (TP))
(current_target.to_extra_thread_info (&current_target, TP))
/* Return the thread's name. A NULL result means that the target
could not determine this thread's name. */