diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-02 12:11:19 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-02 12:11:19 +0000 |
commit | 78267919d631833aaba8deb8c2febf119f653227 (patch) | |
tree | b93b76222a651d83775ceee1dbee898b4224e72b /gdb/infrun.c | |
parent | 0daa2b63ccc8c016d21d06513058310385cfa221 (diff) | |
download | gdb-78267919d631833aaba8deb8c2febf119f653227.zip gdb-78267919d631833aaba8deb8c2febf119f653227.tar.gz gdb-78267919d631833aaba8deb8c2febf119f653227.tar.bz2 |
* gdbtypes.h (struct builtin_type): Add internal_fn member.
* gdbtypes.c (gdbtypes_post_init): Initialize it.
* value.c (internal_fn_type): Remove.
(_initialize_values): Do not initialize it.
* value.c (struct internalvar): Add enum internalvar_kind type and
kind member. Restructure union internalvar_data type. Remove type,
canonical, and make_value members.
(init_if_undefined_command): Update for data structure changes.
(create_internalvar): Likewise.
(create_internalvar_type_lazy): Likewise.
(get_internalvar_integer): Likewise.
(get_internalvar_function): Likewise.
(set_internalvar_component): Likewise.
(set_internalvar): Likewise.
(set_internalvar_integer): Likewise.
(set_internalvar_function): Likewise.
(clear_internalvar): Likewise.
(add_internal_function): Likewise.
(preserve_one_internalvar): New function.
(preserve_values): Call it.
* value.h (value_of_internalvar): Add GDBARCH parameter.
(internalvar_make_value): Likewise.
* value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
make_value callback. Use it to generate per-architecture result value
types for internal variables with no pre-defined type. Update for data
structure changes.
(show_convenience): Pass architecture to value_of_internalvar.
* eval.c (evaluate_subexp_standard): Likewise.
* infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
instead of current frame architecture. Return per-architecture type.
* value.h (set_internalvar_string): Add prototype.
* value.c (set_internalvar_string): New function.
* tracepoint.c (set_traceframe_context): Use it.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 45a8c87..ec17f6d 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5263,29 +5263,21 @@ static struct lval_funcs siginfo_value_funcs = }; /* Return a new value with the correct type for the siginfo object of - the current thread. Return a void value if there's no object - available. */ + the current thread using architecture GDBARCH. Return a void value + if there's no object available. */ static struct value * -siginfo_make_value (struct internalvar *var) +siginfo_make_value (struct gdbarch *gdbarch, struct internalvar *var) { - struct type *type; - struct gdbarch *gdbarch; - if (target_has_stack - && !ptid_equal (inferior_ptid, null_ptid)) + && !ptid_equal (inferior_ptid, null_ptid) + && gdbarch_get_siginfo_type_p (gdbarch)) { - gdbarch = get_frame_arch (get_current_frame ()); - - if (gdbarch_get_siginfo_type_p (gdbarch)) - { - type = gdbarch_get_siginfo_type (gdbarch); - - return allocate_computed_value (type, &siginfo_value_funcs, NULL); - } + struct type *type = gdbarch_get_siginfo_type (gdbarch); + return allocate_computed_value (type, &siginfo_value_funcs, NULL); } - return allocate_value (builtin_type_void); + return allocate_value (builtin_type (gdbarch)->builtin_void); } |