diff options
author | sergiodj <sergiodj> | 2012-04-27 20:38:36 +0000 |
---|---|---|
committer | sergiodj <sergiodj> | 2012-04-27 20:38:36 +0000 |
commit | f3a9452f6c0dab2c189a86c6daf57aabba0859f4 (patch) | |
tree | 7d1c8b18c0482157c5f63afe6f7acf2345579385 /gdb/thread.c | |
parent | 7a431e7fb0e1a9d24f42a88ea45a13e6f5692063 (diff) | |
download | gdb-f3a9452f6c0dab2c189a86c6daf57aabba0859f4.tar.gz |
2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey <tromey@redhat.com>
* ax-gdb.c (gen_expr): Clean up code to handle internal variables
and to compile agent expressions.
* infrun.c (siginfo_make_value): New argument `ignore'.
(siginfo_funcs): New struct.
(_initialize_infrun): New argument when calling
`create_internalvar_type_lazy'.
* thread.c (thread_id_make_value): New argument `ignore'.
(thread_funcs): New struct.
(_initialize_thread): New argument when calling
`create_internalvar_type_lazy'.
* tracepoint.c (sdata_make_value): New argument `ignore'.
(sdata_funcs): New struct.
(_initialize_tracepoint): New argument when calling
`create_internalvar_type_lazy'.
* value.c (make_value): New struct.
(create_internalvar_type_lazy): New argument `data'.
(compile_internalvar_to_ax): New function.
(value_of_internalvar): Properly handling `make_value' case.
(clear_internalvar): Likewise.
(show_convenience): Adding `TRY_CATCH' block.
* value.h (internalvar_make_value): Delete, replace by...
(struct internalvar_funcs): ... this.
(create_internalvar_type_lazy) <fun>: Delete argument.
(create_internalvar_type_lazy) <funcs>, <data>: New arguments.
(compile_internalvar_to_ax): New function.
* windows-tdep.c (tlb_make_value): New argument `ignore'.
(tlb_funcs): New struct.
(_initialize_windows_tdep): New argument when calling
`create_internalvar_type_lazy'.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 97f283cc6be..d361dd81081 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -1439,7 +1439,8 @@ update_thread_list (void) no thread is selected, or no threads exist. */ static struct value * -thread_id_make_value (struct gdbarch *gdbarch, struct internalvar *var) +thread_id_make_value (struct gdbarch *gdbarch, struct internalvar *var, + void *ignore) { struct thread_info *tp = find_thread_ptid (inferior_ptid); @@ -1450,6 +1451,15 @@ thread_id_make_value (struct gdbarch *gdbarch, struct internalvar *var) /* Commands with a prefix of `thread'. */ struct cmd_list_element *thread_cmd_list = NULL; +/* Implementation of `thread' variable. */ + +static const struct internalvar_funcs thread_funcs = +{ + thread_id_make_value, + NULL, + NULL +}; + void _initialize_thread (void) { @@ -1495,5 +1505,5 @@ Show printing of thread events (such as thread start and exit)."), NULL, show_print_thread_events, &setprintlist, &showprintlist); - create_internalvar_type_lazy ("_thread", thread_id_make_value); + create_internalvar_type_lazy ("_thread", &thread_funcs, NULL); } |