summaryrefslogtreecommitdiff
path: root/gdb/varobj.h
AgeCommit message (Collapse)Author
2018-01-02Update copyright year range in all GDB filesJoel Brobecker
gdb/ChangeLog: Update copyright year range in all GDB files
2017-11-23Change int -> bool where applicable throughout varobjSimon Marchi
This patch changes all the "int" I could find in varobj.{c,h} that are really boolean values to use bool. I followed the ramifications (parameters and return values of exported functions), so the changes spilled a bit on other, related files (ada-varobj.c and c-varobj.c). gdb/ChangeLog: * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable. (ada_value_has_mutated): Likewise. * c-varobj.c (varobj_is_anonymous_child): Likewise. (c_is_path_expr_parent): Likewise. * mi/mi-cmd-var.c (varobj_update_one): Likewise. (mi_cmd_var_set_frozen): Likewise. (mi_cmd_var_update_iter): Likewise. (mi_cmd_var_update): Likewise. * varobj.c (pretty_printing): Likewise. (varobj_enable_pretty_printing): Likewise. (struct varobj_root) <floating, is_valid>: Likewise. (struct varobj_dynamic) <children_requested>: Likewise. (delete_variable): Likewise. (delete_variable_1): Likewise. (install_variable): Likewise. (update_type_if_necessary): Likewise. (install_new_value): Likewise. (value_of_root): Likewise. (is_root_p): Likewise. (varobj_create): Likewise. (varobj_delete): Likewise. (varobj_has_more): Likewise. (varobj_set_frozen): Likewise. (varobj_get_frozen): Likewise. (install_dynamic_child): Likewise. (dynamic_varobj_has_child_method): Likewise. (update_dynamic_varobj_children): Likewise. (varobj_get_num_children): Likewise. (varobj_list_children): Likewise. (is_path_expr_parent): Likewise. (varobj_default_is_path_expr_parent): Likewise. (varobj_is_dynamic_p): Likewise. (varobj_set_value): Likewise. (varobj_value_has_mutated): Likewise. (varobj_update): Likewise. (check_scope): Likewise. (value_of_root_1): Likewise. (varobj_value_get_print_value): Likewise. (varobj_editable_p): Likewise. (varobj_value_is_changeable_p): Likewise. (varobj_floating_p): Likewise. (varobj_default_value_is_changeable_p): Likewise. (varobj_invalidate_iter): Likewise. * varobj.h (struct varobj_update_result) <type_changed, children_changed, changed, value_installed>: Likewise. (struct varobj) <updated, frozen, not_fetched>: Likewise. (struct lang_varobj_ops) <value_is_changeable_p, value_has_mutated, is_path_expr_parent>: Likewise. (varobj_delete): Likewise. (varobj_set_frozen): Likewise. (varobj_get_frozen): Likewise. (varobj_set_value): Likewise. (varobj_update): Likewise. (varobj_editable_p): Likewise. (varobj_floating_p): Likewise. (varobj_has_more): Likewise. (varobj_is_dynamic_p): Likewise. (varobj_default_value_is_changeable_p): Likewise. (varobj_value_is_changeable_p): Likewise. (varobj_is_anonymous_child): Likewise. (varobj_default_is_path_expr_parent): Likewise.
2017-11-22Remove DEF_VEC_P (varobj_p)Simon Marchi
The last patch removed the last usage of this type, so we can remove it. gdb/ChangeLog: * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2017-11-22Replace VEC (varobj_update_result) with std::vectorSimon Marchi
This patch replaces makes varobj_update return an std::vector, and updates the fallouts. To make that easier, the varobj_update_result is c++ified a bit. I added a constructor and initialized its fields in-class. The newobj vector is also made an std::vector, so that it's automatically freed when varobj_update_result is destroyed and handled correctly by the default move constructor. I disabled copy constructor and assignment for that structure, because normally it never needs to be copied, only moved. As a result, the newobj parameter of update_dynamic_varobj_children must be changed to an std::vector. The patch converts the other vector parameters of update_dynamic_varobj_children to std::vector. It's not strictly necessary to do it in the same patch, but I think it makes sense to do it. gdb/ChangeLog: * varobj.h (struct varobj_update_result): Add constructor, add move constructor, disable copy and assign, initialize fields. <newobj>: Change type to std::vector. (varobj_update): Return std::vector. * varobj.c (install_dynamic_child): Change VEC parameters to std::vector and adjust. (update_dynamic_varobj_children): Likewise. (varobj_update): Return std::vector and adjust. * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2017-11-22Make varobj::children an std::vectorSimon Marchi
This patch makes the children field of varobj an std::vector, and updates the fallout. One note is that varobj::parent must be made non-const. The reason is that when a child deletes itself, it modifies its writes NULL to its slot in its parent's children vector. With the VEC, the const didn't made the parent's children vector content const, only the pointer to it, but with std::vector, even the content is. gdb/ChangeLog: * varobj.h (struct varobj) <parent>: Remove const. <children>: Change type to std::vector. (varobj_list_children): Return std::vector const reference. (varobj_restrict_range): Change parameter type to std::vector const reference. * varobj.c (varobj_has_more): Adjust. (varobj_restrict_range): Change parameter type to std::vector const reference and adjust. (install_dynamic_child): Adjust. (update_dynamic_varobj_children): Adjust. (varobj_list_children): Return std::vector const reference and adjust. (varobj_add_child): Adjust. (update_type_if_necessary): Adjust. (varobj_update): Adjust. (delete_variable_1): Adjust. * ada-varobj.c (ada_value_has_mutated): Adjust. * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2017-11-22Basic c++ification of varobjSimon Marchi
This patch does a basic c++ification or the varobj data structure. - varobj: add constructor and destructor, initialize fields - varobj_root: initialize fields - varobj_dynamic: initialize fields This allows getting rid of new_variable, new_root_variable. free_variable essentially becomes varobj's destructor. This also allows getting rid of a cleanup, make_cleanup_free_variable, which was only used in varobj_create in case the varobj creation fails. It is replaced with a unique_ptr. gdb/ChangeLog: * varobj.h (struct varobj): Add constructor and destructor, initialize fields. * varobj.c (struct varobj_root): Initialize fields. (struct varobj_dynamic): Initialize fields. (varobj_create): Use unique_ptr instead of cleanup. Create varobj with new instead of new_root_variable. (delete_variable_1): Free variable with delete instead of free_variable. (create_child_with_value): Create variable with new instead of new_variable. (varobj::varobj): New. (varobj::~varobj): New (body mostly coming from free_variable). (new_variable): Remove. (free_variable): Remove. (do_free_variable_cleanup): Remove. (make_cleanup_free_variable): Remove.
2017-09-29Remove cleanups from mi-cmd-var.cTom Tromey
This removes some cleanups from mi-cmd-var.c. varobj_gen_name now returns a string, simplifying mi_cmd_var_create. In mi_cmd_var_delete, a string copy is apparently unnecessary, so it's simply removed. gdb/ChangeLog 2017-09-29 Tom Tromey <tom@tromey.com> * varobj.h (varobj_gen_name): Return std::string. * varobj.c (varobj_gen_name): Return std::string. * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string. (mi_cmd_var_delete): Don't copy "name".
2017-04-05-Wwrite-strings: The RestPedro Alves
This is the remainder boring constification that all looks more of less borderline obvious IMO. gdb/ChangeLog: 2017-04-05 Pedro Alves <palves@redhat.com> * ada-exp.y (yyerror): Constify. * ada-lang.c (bound_name, get_selections) (ada_variant_discrim_type) (ada_variant_discrim_name, ada_value_struct_elt) (ada_lookup_struct_elt_type, is_unchecked_variant) (ada_which_variant_applies, standard_exc, ada_get_next_arg) (catch_ada_exception_command_split) (catch_ada_assert_command_split, catch_assert_command) (ada_op_name): Constify. * ada-lang.h (ada_yyerror, get_selections) (ada_variant_discrim_name, ada_value_struct_elt): Constify. * arc-tdep.c (arc_print_frame_cache): Constify. * arm-tdep.c (arm_skip_stub): Constify. * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref) (gen_aggregate_elt_ref): Constify. * bcache.c (print_bcache_statistics): Constify. * bcache.h (print_bcache_statistics): Constify. * break-catch-throw.c (catch_exception_command_1): * breakpoint.c (struct ep_type_description::description): Constify. (add_solib_catchpoint): Constify. (catch_fork_command_1): Add cast. (add_catch_command): Constify. * breakpoint.h (add_catch_command, add_solib_catchpoint): Constify. * bsd-uthread.c (bsd_uthread_state): Constify. * buildsym.c (patch_subfile_names): Constify. * buildsym.h (next_symbol_text_func, patch_subfile_names): Constify. * c-exp.y (yyerror): Constify. (token::oper): Constify. * c-lang.h (c_yyerror, cp_print_class_member): Constify. * c-varobj.c (cplus_describe_child): Constify. * charset.c (find_charset_names): Add cast. (find_charset_names): Constify array and add const_cast. * cli/cli-cmds.c (complete_command, cd_command): Constify. (edit_command): Constify. * cli/cli-decode.c (lookup_cmd): Constify. * cli/cli-dump.c (dump_memory_command, dump_value_command): Constify. (struct dump_context): Constify. (add_dump_command, restore_command): Constify. * cli/cli-script.c (get_command_line): Constify. * cli/cli-script.h (get_command_line): Constify. * cli/cli-utils.c (check_for_argument): Constify. * cli/cli-utils.h (check_for_argument): Constify. * coff-pe-read.c (struct read_pe_section_data): Constify. * command.h (lookup_cmd): Constify. * common/print-utils.c (decimal2str): Constify. * completer.c (gdb_print_filename): Constify. * corefile.c (set_gnutarget): Constify. * cp-name-parser.y (yyerror): Constify. * cp-valprint.c (cp_print_class_member): Constify. * cris-tdep.c (cris_register_name, crisv32_register_name): Constify. * d-exp.y (yyerror): Constify. (struct token::oper): Constify. * d-lang.h (d_yyerror): Constify. * dbxread.c (struct header_file_location::name): Constify. (add_old_header_file, add_new_header_file, last_function_name) (dbx_next_symbol_text, add_bincl_to_list) (find_corresponding_bincl_psymtab, set_namestring) (find_stab_function_addr, read_dbx_symtab, start_psymtab) (dbx_end_psymtab, read_ofile_symtab, process_one_symbol): * defs.h (command_line_input, print_address_symbolic) (deprecated_readline_begin_hook): Constify. * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name): Constify. * event-top.c (handle_line_of_input): Constify and add cast. * exceptions.c (catch_errors): Constify. * exceptions.h (catch_errors): Constify. * expprint.c (print_subexp_standard, op_string, op_name) (op_name_standard, dump_raw_expression, dump_raw_expression): * expression.h (op_name, op_string, dump_raw_expression): Constify. * f-exp.y (yyerror): Constify. (struct token::oper): Constify. (struct f77_boolean_val::name): Constify. * f-lang.c (f_word_break_characters): Constify. * f-lang.h (f_yyerror): Constify. * fork-child.c (fork_inferior): Add cast. * frv-tdep.c (struct gdbarch_tdep::register_names): Constify. (new_variant): Constify. * gdbarch.sh (pstring_ptr, pstring_list): Constify. * gdbarch.c: Regenerate. * gdbcore.h (set_gnutarget): Constify. * go-exp.y (yyerror): Constify. (token::oper): Constify. * go-lang.h (go_yyerror): Constify. * go32-nat.c (go32_sysinfo): Constify. * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify. * guile/scm-cmd.c (cmdscm_function): Constify. * guile/scm-param.c (pascm_param_value): Constify. * h8300-tdep.c (h8300_register_name, h8300s_register_name) (h8300sx_register_name): Constify. * hppa-tdep.c (hppa32_register_name, hppa64_register_name): Constify. * ia64-tdep.c (ia64_register_names): Constify. * infcmd.c (construct_inferior_arguments): Constify. (path_command, attach_post_wait): Constify. * language.c (show_range_command, show_case_command) (unk_lang_error): Constify. * language.h (language_defn::la_error) (language_defn::la_name_of_this): Constify. * linespec.c (decode_line_2): Constify. * linux-thread-db.c (thread_db_err_str): Constify. * lm32-tdep.c (lm32_register_name): Constify. * m2-exp.y (yyerror): Constify. * m2-lang.h (m2_yyerror): Constify. * m32r-tdep.c (m32r_register_names): Constify and make static. * m68hc11-tdep.c (m68hc11_register_names): Constify. * m88k-tdep.c (m88k_register_name): Constify. * macroexp.c (appendmem): Constify. * mdebugread.c (fdr_name, add_data_symbol, parse_type) (upgrade_type, parse_external, parse_partial_symbols) (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab) (new_symbol): Constify. * memattr.c (mem_info_command): Constify. * mep-tdep.c (register_name_from_keyword): Constify. * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env): Constify. * mi/mi-cmd-stack.c (list_args_or_locals): Constify. * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify. * mi/mi-main.c (captured_mi_execute_command): Constify and add cast. (mi_execute_async_cli_command): Constify. * mips-tdep.c (mips_register_name): Constify. * mn10300-tdep.c (register_name, mn10300_generic_register_name) (am33_register_name, am33_2_register_name) * moxie-tdep.c (moxie_register_names): Constify. * nat/linux-osdata.c (osdata_type): Constify fields. * nto-tdep.c (nto_parse_redirection): Constify. * objc-lang.c (lookup_struct_typedef, lookup_objc_class) (lookup_child_selector): Constify. (objc_methcall::name): Constify. * objc-lang.h (lookup_objc_class, lookup_child_selector) (lookup_struct_typedef): Constify. * objfiles.c (pc_in_section): Constify. * objfiles.h (pc_in_section): Constify. * p-exp.y (struct token::oper): Constify. (yyerror): Constify. * p-lang.h (pascal_yyerror): Constify. * parser-defs.h (op_name_standard): Constify. (op_print::string): Constify. (exp_descriptor::op_name): Constify. * printcmd.c (print_address_symbolic): Constify. * psymtab.c (print_partial_symbols): Constify. * python/py-breakpoint.c (stop_func): Constify. (bppy_get_expression): Constify. * python/py-cmd.c (cmdpy_completer::name): Constify. (cmdpy_function): Constify. * python/py-event.c (evpy_add_attribute) (gdbpy_initialize_event_generic): Constify. * python/py-event.h (evpy_add_attribute) (gdbpy_initialize_event_generic): Constify. * python/py-evts.c (add_new_registry): Constify. * python/py-finishbreakpoint.c (outofscope_func): Constify. * python/py-framefilter.c (get_py_iter_from_func): Constify. * python/py-inferior.c (get_buffer): Add cast. * python/py-param.c (parm_constant::name): Constify. * python/py-unwind.c (fprint_frame_id): Constify. * python/python.c (gdbpy_parameter_value): Constify. * remote-fileio.c (remote_fio_func_map): Make 'name' const. * remote.c (memory_packet_config::name): Constify. (show_packet_config_cmd, remote_write_bytes) (remote_buffer_add_string): * reverse.c (exec_reverse_once): Constify. * rs6000-tdep.c (variant::name, variant::description): Constify. * rust-exp.y (rustyyerror): Constify. * rust-lang.c (rust_op_name): Constify. * rust-lang.h (rustyyerror): Constify. * serial.h (serial_ops::name): Constify. * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name) (sh_sh3e_register_name, sh_sh2e_register_name) (sh_sh2a_register_name, sh_sh2a_nofpu_register_name) (sh_sh_dsp_register_name, sh_sh3_dsp_register_name) (sh_sh4_register_name, sh_sh4_nofpu_register_name) (sh_sh4al_dsp_register_name): Constify. * sh64-tdep.c (sh64_register_name): Constify. * solib-darwin.c (lookup_symbol_from_bfd): Constify. * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify. * stabsread.c (patch_block_stabs, read_type_number) (ref_map::stabs, ref_add, process_reference) (symbol_reference_defined, define_symbol, define_symbol) (error_type, read_type, read_member_functions, read_cpp_abbrev) (read_one_struct_field, read_struct_fields, read_baseclasses) (read_tilde_fields, read_struct_type, read_array_type) (read_enum_type, read_sun_builtin_type, read_sun_floating_type) (read_huge_number, read_range_type, read_args, common_block_start) (find_name_end): Constify. * stabsread.h (common_block_start, define_symbol) (process_one_symbol, symbol_reference_defined, ref_add): * symfile.c (get_section_index, add_symbol_file_command): * symfile.h (get_section_index): Constify. * target-descriptions.c (tdesc_type::name): Constify. (tdesc_free_type): Add cast. * target.c (find_default_run_target): (add_deprecated_target_alias, find_default_run_target) (target_announce_detach): Constify. (do_option): Constify. * target.h (add_deprecated_target_alias): Constify. * thread.c (print_thread_info_1): Constify. * top.c (deprecated_readline_begin_hook, command_line_input): Constify. (init_main): Add casts. * top.h (handle_line_of_input): Constify. * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify. * tracepoint.c (tvariables_info_1, trace_status_mi): Constify. (tfind_command): Rename to ... (tfind_command_1): ... this and constify. (tfind_command): New function. (tfind_end_command, tfind_start_command): Adjust. (encode_source_string): Constify. * tracepoint.h (encode_source_string): Constify. * tui/tui-data.c (tui_partial_win_by_name): Constify. * tui/tui-data.h (tui_partial_win_by_name): Constify. * tui/tui-source.c (tui_set_source_content_nil): Constify. * tui/tui-source.h (tui_set_source_content_nil): Constify. * tui/tui-win.c (parse_scrolling_args): Constify. * tui/tui-windata.c (tui_erase_data_content): Constify. * tui/tui-windata.h (tui_erase_data_content): Constify. * tui/tui-winsource.c (tui_erase_source_content): Constify. * tui/tui.c (tui_enable): Add cast. * utils.c (defaulted_query): Constify. (init_page_info): Add cast. (puts_debug, subset_compare): Constify. * utils.h (subset_compare): Constify. * varobj.c (varobj_format_string): Constify. * varobj.h (varobj_format_string): Constify. * vax-tdep.c (vax_register_name): Constify. * windows-nat.c (windows_detach): Constify. * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify. * xml-support.c (gdb_xml_end_element): Constify. * xml-tdesc.c (tdesc_start_reg): Constify. * xstormy16-tdep.c (xstormy16_register_name): Constify. * xtensa-tdep.c (xtensa_find_register_by_name): Constify. * xtensa-tdep.h (xtensa_register_t::name): Constify. gdb/gdbserver/ChangeLog: 2017-04-05 Pedro Alves <palves@redhat.com> * gdbreplay.c (sync_error): Constify. * linux-x86-low.c (push_opcode): Constify.
2017-01-10Remove ensure_python_envTom Tromey
All of gdb has been converted away from ensure_python_env and varobj_ensure_python_env now; so remove them. 2017-01-10 Tom Tromey <tom@tromey.com> * python/python.c (ensure_python_env, restore_python_env): Remove. * python/python-internal.h (ensure_python_env): Don't declare. * varobj.h (varobj_ensure_python_env): Don't declare. * varobj.c (varobj_ensure_python_env): Remove.
2017-01-01update copyright year range in GDB filesJoel Brobecker
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-11-09Use unique_xmalloc_ptr in Python codeTom Tromey
This changes some utility functions in the Python code to return unique_xmalloc_ptr, and then fixes up the callers. I chose unique_xmalloc_ptr rather than std::string because at a few call points the xmalloc'd string is released and ownership transferred elsewhere. This patch found a few existing memory leaks. For example, py-unwind.c called gdbpy_obj_to_string but never freed the result. Built and regression tested on the buildbot. 2016-11-09 Tom Tromey <tom@tromey.com> * varobj.h (varobj_get_display_hint): Change return type. * varobj.c (varobj_get_display_hint): Return unique_xmalloc_ptr. (varobj_value_get_print_value): Update. * python/python.c (gdbpy_before_prompt_hook, gdbpy_print_stack) (gdbpy_apply_type_printers): Update. * python/python-internal.h (unicode_to_target_string) (python_string_to_target_string, python_string_to_host_string) (gdbpy_obj_to_string, gdbpy_exception_to_string) (gdbpy_get_display_hint): Change return types. * python/py-varobj.c (py_varobj_iter_next): Update. * python/py-value.c (valpy_getitem, convert_value_from_python): Update. * python/py-utils.c (unicode_to_encoded_string) (unicode_to_target_string, python_string_to_target_string) (python_string_to_host_string, gdbpy_obj_to_string) (gdbpy_exception_to_string): Return unique_xmalloc_ptr. * python/py-unwind.c (pyuw_parse_register_id): Update. * python/py-type.c (typy_getitem): Update. * python/py-prettyprint.c (gdbpy_get_display_hint) (print_stack_unless_memory_error, print_children) (gdbpy_apply_val_pretty_printer): Update. * python/py-param.c (set_parameter_value): Update. (get_doc_string, call_doc_function): Return unique_xmalloc_ptr. (get_set_value, get_show_value, compute_enum_values, parmpy_init): Update. * python/py-infthread.c (thpy_set_name): Update. * python/py-function.c (fnpy_call, fnpy_init): Update. * python/py-framefilter.c (extract_sym): Change "name" to unique_xmalloc_ptr. (enumerate_args, enumerate_locals): Update. (py_print_frame): Use unique_xmalloc_ptr. * python/py-frame.c (frapy_read_var): Update. Remove cleanup. * python/py-cmd.c (cmdpy_function, cmdpy_completer, cmdpy_init): Update. * python/py-breakpoint.c (bppy_set_condition): Use unique_xmalloc_ptr. (bppy_init): Likewise. Remove cleanup. (local_setattro): Update. * mi/mi-cmd-var.c (print_varobj, mi_cmd_var_list_children) (varobj_update_one): Update.
2016-11-08Use ui_file_as_string throughout morePedro Alves
This replaces most of the remaining ui_file_xstrdup calls with ui_file_as_string calls. Whenever a call was replaced, that led to a cascade of other necessary adjustments throughout, to make the code use std::string instead of raw pointers. And then whenever I added a std::string as member of a struct, I needed to adjust allocation/destruction of said struct to use new/delete instead of xmalloc/xfree. The stopping point was once gdb built again. These doesn't seem to be a way to reasonably split this out further. Maybe-not-obvious changes: - demangle_for_lookup returns a cleanup today. To get rid of that, and avoid unnecessary string dupping/copying, this introduces a demangle_result_storage type that the caller instantiates and passes to demangle_for_lookup. - Many methods returned a "char *" to indicate that the caller owns the memory and must free it. Those are switched to return a std::string instead. Methods that return a "view" into some internal string return a "const char *" instead. I.e., we only copy/allocate when necessary. gdb/ChangeLog: 2016-11-08 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_name_for_lookup, type_as_string): Use and return std::string. (type_as_string_and_cleanup): Delete. (ada_lookup_struct_elt_type): Use type_as_string. * ada-lang.h (ada_name_for_lookup): Now returns std::string. * ada-varobj.c (ada_varobj_scalar_image): Return a std::string. (ada_varobj_describe_child): Make 'child_name' and 'child_path_expr' parameters std::string pointers. (ada_varobj_describe_struct_child, ada_varobj_describe_ptr_child): Likewise, and use string_printf. (ada_varobj_describe_simple_array_child) (ada_varobj_describe_child): Likewise. (ada_varobj_get_name_of_child, ada_varobj_get_path_expr_of_child) (ada_varobj_get_value_image) (ada_varobj_get_value_of_array_variable) (ada_varobj_get_value_of_variable, ada_name_of_variable) (ada_name_of_child, ada_path_expr_of_child) (ada_value_of_variable): Now returns std::string. Use string_printf. (ada_value_of_child): Adjust. * break-catch-throw.c (check_status_exception_catchpoint): Adjust to use std::string. * breakpoint.c (watch_command_1): Adjust to use std::string. * c-lang.c (c_get_string): Adjust to use std::string. * c-typeprint.c (print_name_maybe_canonical): Use std::string. * c-varobj.c (varobj_is_anonymous_child): Use ==/!= std::string operators. (c_name_of_variable): Now returns a std::string. (c_describe_child): The 'cname' and 'cfull_expression' output parameters are now std::string pointers. Adjust. (c_name_of_child, c_path_expr_of_child, c_value_of_variable) (cplus_number_of_children): Adjust to use std::string and string_printf. (cplus_name_of_variable): Now returns a std::string. (cplus_describe_child): The 'cname' and 'cfull_expression' output parameters are now std::string pointers. Adjust. (cplus_name_of_child, cplus_path_expr_of_child) (cplus_value_of_variable): Now returns a std::string. * cp-abi.c (cplus_typename_from_type_info): Return std::string. * cp-abi.h (cplus_typename_from_type_info): Return std::string. (struct cp_abi_ops) <get_typename_from_type_info>: Return std::string. * cp-support.c (inspect_type): Use std::string. (cp_canonicalize_string_full, cp_canonicalize_string_no_typedefs) (cp_canonicalize_string): Return std::string and adjust. * cp-support.h (cp_canonicalize_string) (cp_canonicalize_string_no_typedefs, cp_canonicalize_string_full): Return std::string. * dbxread.c (read_dbx_symtab): Use std::string. * dwarf2read.c (dwarf2_canonicalize_name): Adjust to use std::string. * gdbcmd.h (lookup_struct_elt_type): Adjust to use std::string. * gnu-v3-abi.c (gnuv3_get_typeid): Use std::string. (gnuv3_get_typename_from_type_info): Return a std::string and adjust. (gnuv3_get_type_from_type_info): Adjust to use std::string. * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use std::string. * infcmd.c (print_return_value_1): Adjust to use std::string. * linespec.c (find_linespec_symbols): Adjust to demangle_for_lookup API change. Use std::string. * mi/mi-cmd-var.c (print_varobj, mi_cmd_var_set_format) (mi_cmd_var_info_type, mi_cmd_var_info_path_expression) (mi_cmd_var_info_expression, mi_cmd_var_evaluate_expression) (mi_cmd_var_assign, varobj_update_one): Adjust to use std::string. * minsyms.c (lookup_minimal_symbol): Use std::string. * python/py-varobj.c (py_varobj_iter_next): Use new instead of XNEW. vitem->name is a std::string now, adjust. * rust-exp.y (convert_ast_to_type, convert_name): Adjust to use std::string. * stabsread.c (define_symbol): Adjust to use std::string. * symtab.c (demangle_for_lookup): Now returns 'const char *'. Add a demangle_result_storage parameter. Use it for storage. (lookup_symbol_in_language) (lookup_symbol_in_objfile_from_linkage_name): Adjust to new demangle_for_lookup API. * symtab.h (struct demangle_result_storage): New type. (demangle_for_lookup): Now returns 'const char *'. Add a demangle_result_storage parameter. * typeprint.c (type_to_string): Return std::string and use ui_file_as_string. * value.h (type_to_string): Change return type to std::string. * varobj-iter.h (struct varobj_item) <name>: Now a std::string. (varobj_iter_delete): Use delete instead of xfree. * varobj.c (create_child): Return std::string instead of char * in output parameter. (name_of_variable, name_of_child, my_value_of_variable): Return std::string instead of char *. (varobj_create, varobj_get_handle): Constify 'objname' parameter. Adjust to std::string fields. (varobj_get_objname): Return a const char * instead of a char *. (varobj_get_expression): Return a std::string. (varobj_list_children): Adjust to use std::string. (varobj_get_type): Return a std::string. (varobj_get_path_expr): Return a const char * instead of a char *. Adjust to std::string fields. (varobj_get_formatted_value, varobj_get_value): Return a std::string. (varobj_set_value): Change type of 'expression' parameter to std::string. Use std::string. (install_new_value): Use std::string. (delete_variable_1): Adjust to use std::string. (create_child): Change the 'name' parameter to a std::string reference. Swap it into the new item's name. (create_child_with_value): Swap item's name into the new child's name. Use string_printf. (new_variable): Use new instead of XNEW. (free_variable): Don't xfree fields that are now std::string. (name_of_variable, name_of_child): Now returns std::string. (value_of_root): Adjust to use std::string. (my_value_of_variable, varobj_value_get_print_value): Return and use std::string. (varobj_value_get_print_value): Adjust to use ui_file_as_string and std::string. * varobj.h (struct varobj) <name, path_expr, obj_name, print_value>: Now std::string's. <name_of_variable, name_of_child, path_expr_of_child, value_of_variable>: Return std::string. (varobj_create, varobj_get_handle): Constify 'objname' parameter. (varobj_get_objname): Return a const char * instead of a char *. (varobj_get_expression, varobj_get_type): Return a std::string. (varobj_get_path_expr): Return a const char * instead of a char *. (varobj_get_formatted_value, varobj_get_value): Return a std::string. (varobj_set_value): Constify 'expression' parameter. (varobj_value_get_print_value): Return a std::string.
2016-10-06Remove Java supportTom Tromey
This patch removes the Java support from gdb. gcj has not seen much development or use for years now, and was recently removed from GCC. This patch changes gdb to follow; in the unlikely event that there are still users using gcj, they can continue to use an older gdb to debug. Or, they can debug in C++ mode. Built and regtested on x86-64 Fedora 24. 2016-10-06 Tom Tromey <tom@tromey.com> * MAINTAINERS: Remove Java test maintainer. * varobj.h (java_varobj_ops): Don't declare. * valprint.h (struct value_print_options) <pascal_static_field_print>: Update comment. * utils.c (producer_is_gcc): Remove java reference. * symtab.h (struct general_symbol_info): Remove java references. (SYMBOL_SEARCH_NAME): Likewise. * objfiles.c (allocate_objfile): Update comment. * linespec.c (find_linespec_symbols): Remove java references. * gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_baseclass_offset): Remove java references. * gdbtypes.h (struct cplus_struct_type) <is_java>: Remove. (TYPE_CPLUS_REALLY_JAVA): Remove. * c-varobj.c (enum vsections): Update comment. * symtab.c (symbol_set_language, symbol_set_names) (symbol_natural_name, symbol_demangled_name) (demangle_for_lookup, symbol_matches_domain) (default_make_symbol_completion_list_break_on_1): Remove java references. (JAVA_PREFIX, JAVA_PREFIX_LEN): Remove. * psymtab.c (match_partial_symbol, psymtab_search_name) (lookup_partial_symbol): Remove java references. * dwarf2read.c (find_slot_in_mapped_hash): Remove java references. (add_partial_symbol, dwarf2_compute_name, dwarf2_physname) (dwarf2_add_member_fn, is_vtable_name, read_structure_type) (process_structure_scope, read_subroutine_type) (read_subrange_type, load_partial_dies) (new_symbol_full, determine_prefix, typename_concat) (dwarf2_name): Remove java references. (set_cu_language): Treat Java as C++. * c-typeprint.c (c_type_print_args): Remove java reference. * defs.h (enum language) <language_java>: Remove. * Makefile.in (SFILES, HFILES_NO_SRCDIR, COMMON_OBS, YYFILES) (YYOBJ, local-maintainer-clean): Don't mention java files. * jv-exp.y, jv-lang.c, jv-lang.h, jv-typeprint.c, jv-valprint.c, jv-varobj.c: Remove. 2016-10-06 Tom Tromey <tom@tromey.com> * guile.texi (Types In Guile): Remove Java mentions. * python.texi (Types In Python): Remove Java mentions. * gdb.texinfo (Address Locations, Supported Languages) (Index Section Format): Remove Java mentions. 2016-10-06 Tom Tromey <tom@tromey.com> * gdb.compile/compile.exp: Change java tests to rust. * gdb.base/setshow.exp: Change java tests to rust. * gdb.base/default.exp: Remove java from language list. * README (Examples): Update language example. * gdb.python/py-lookup-type.exp (test_lookup_type): Remove java test. * lib/gdb.exp (skip_java_tests): Remove. * lib/java.exp: Remove. * gdb.java: Remove.
2016-02-07varobj: Cleanup dead codeSimon Marchi
This patch removes some dead code. I noticed that varobj_delete was always called with dellist == NULL, so I started removing that parameter. That allows removing a good chunk of the code in varobj_delete, making it almost trivial. We can also remove the resultp parameters in that whole trail. In turn, this shows that struct cpstack, cppush and cppop were only used fo that mechanism, so they can be removed as well. I also moved the function comment to the header file to comply with today's guideline, even though the rest of the file does not respect it (yet). gdb/ChangeLog: * varobj.h (varobj_delete): Remove dellist parameter, update and move documentation here. * varobj.c (struct cpstack, cppush, cppop): Remove. (delete_variable): Remove resultp (first) parameter. (delete_variable_1): Likewise. (varobj_delete): Remove dellist parameter and unused code. (update_dynamic_varobj_children): Adjust varobj_delete call. (update_type_if_necessary): Likewise. (varobj_set_visualizer): Likewise. (varobj_update): Likewise. (value_of_root): Likewise. (varobj_invalidate_iter): Likewise. * mi/mi-cmd-var.c (mi_cmd_var_delete): Likewise.
2016-01-31Fix some comments in varobj.{c,h}Simon Marchi
A few typos. The comment about varobj_create has been misplaced since the dawn of time. gdb/ChangeLog: * varobj.h (struct varobj): Fix typos in comments. (struct lang_varobj_ops): Likewise. * varobj.c (VAROBJ_TABLE_SIZE): Likewise. (varobj_create): Move misplaced comment.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-12-09varobj zero-padded hexadecimal formatLuis Machado
This set of patches add support for the zero-padded hexadecimal format for varobj's, defined as "zero-hexadecimal". We currently only support regular non-zero-padded hexadecimal. Talking with IDE developers, they would like to have this option that is already available to GDB's print/x commands, in the CLI, as 'z'. gdb/ChangeLog: 2015-12-09 Luis Machado <lgustavo@codesourcery.com> * gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal" format. * gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry. (format_code): Add 'z' entry. (varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL. * gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum field. * NEWS: Add new note to MI changes citing the new zero-hexadecimal format for -var-set-format. gdb/doc/ChangeLog: 2015-12-09 Luis Machado <lgustavo@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Update text to mention -var-set-format's new zero-hexadecimal format. gdb/testsuite/ChangeLog: 2015-12-09 Luis Machado <lgustavo@codesourcery.com> * gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal format and change test names to make them unique.
2015-02-27C++ keyword cleanliness, mostly auto-generatedPedro Alves
This patch renames symbols that happen to have names which are reserved keywords in C++. Most of this was generated with Tromey's cxx-conversion.el script. Some places where later hand massaged a bit, to fix formatting, etc. And this was rebased several times meanwhile, along with re-running the script, so re-running the script from scratch probably does not result in the exact same output. I don't think that matters anyway. gdb/ 2015-02-27 Tom Tromey <tromey@redhat.com> Pedro Alves <palves@redhat.com> Rename symbols whose names are reserved C++ keywords throughout. gdb/gdbserver/ 2015-02-27 Tom Tromey <tromey@redhat.com> Pedro Alves <palves@redhat.com> Rename symbols whose names are reserved C++ keywords throughout.
2015-02-10Finish constification of varobj interfaceSimon Marchi
This completes the constification of the struct varobj pointers in the lang_varobj_ops interface partially done in b09e2c591f9221d865bfe8425990a6bf9fab24e3. As suggested by Pedro, varobj_get_path_expr casts away the const to assign the "mutable" struct member. gdb/ChangeLog: * ada-varobj.c (ada_name_of_child): Constify parent. (ada_path_expr_of_child): Same. (ada_value_of_child): Same. (ada_type_of_child): Same. * c-varobj.c (c_is_path_expr_parent): Same. (c_describe_child): Same. (c_name_of_child): Same. (c_value_of_child): Same. (c_type_of_child): Same. (cplus_number_of_children): Same. (cplus_describe_child): Constify var. (cplus_name_of_child): Constify parent. (cplus_value_of_child): Same. (cplus_type_of_child): Same. * jv-varobj.c (java_name_of_child): Same. (java_value_of_child): Same. (java_type_of_child): Same. * varobj.c (value_of_child): Same. (varobj_default_is_path_expr_parent): Constify var, parent and return value. (varobj_get_path_expr): Constify var, modify path_expr through mutable_var. (install_new_value): Constify parent. (value_of_child): Constify parent. * varobj.h (struct varobj): Constify parent. (struct lang_varobj_ops): Constify name_of_child, value_of_child and type_of_child. (varobj_get_path_expr): Constify var. (varobj_get_path_expr_parent): Constify var and return value.
2015-02-02Mention which return values need to be freed in lang_varobj_opsSimon Marchi
This is the result of a little bit of investigation of the C and Ada languages, as well as some common sense. gdb/ChangeLog: * varobj.h (lang_varobj_ops): Mention which return values need to be freed.
2015-01-30Constify some parameters in the varobj codeSimon Marchi
To make it clear that some functions should not modify the variable object, this patch adds the const qualifier where it makes sense to some struct varobj * parameters. Most getters should take a const pointer to guarantee they don't modify the object. Unfortunately, I couldn't add it to some callbacks (such as name_of_child). In the C implementation, they call c_describe_child, which calls varobj_get_path_expr. varobj_get_path_expr needs to modify the object in order to cache the computed value. It therefore can't take a const pointer, and it affects the whole call chain. I suppose that's where you would use a "mutable" in C++. I did that to make sure there was no other cases like the one fixed in the previous patch. I don't think it can hurt. gdb/ChangeLog: * ada-varobj.c (ada_number_of_children): Constify struct varobj * parameter. (ada_name_of_variable): Same. (ada_path_expr_of_child): Same. (ada_value_of_variable): Same. (ada_value_is_changeable_p): Same. (ada_value_has_mutated): Same. * c-varobj.c (varobj_is_anonymous_child): Same. (c_is_path_expr_parent): Same. (c_number_of_children): Same. (c_name_of_variable): Same. (c_path_expr_of_child): Same. (get_type): Same. (c_value_of_variable): Same. (cplus_number_of_children): Same. (cplus_name_of_variable): Same. (cplus_path_expr_of_child): Same. (cplus_value_of_variable): Same. * jv-varobj.c (java_number_of_children): Same. (java_name_of_variable): Same. (java_path_expr_of_child): Same. (java_value_of_variable): Same. * varobj.c (number_of_children): Same. (name_of_variable): Same. (is_root_p): Same. (varobj_ensure_python_env): Same. (varobj_get_objname): Same. (varobj_get_expression): Same. (varobj_get_display_format): Same. (varobj_get_display_hint): Same. (varobj_has_more): Same. (varobj_get_thread_id): Same. (varobj_get_frozen): Same. (dynamic_varobj_has_child_method): Same. (varobj_get_gdb_type): Same. (is_path_expr_parent): Same. (varobj_default_is_path_expr_parent): Same. (varobj_get_language): Same. (varobj_get_attributes): Same. (varobj_is_dynamic_p): Same. (varobj_get_child_range): Same. (varobj_value_has_mutated): Same. (varobj_get_value_type): Same. (number_of_children): Same. (name_of_variable): Same. (check_scope): Same. (varobj_editable_p): Same. (varobj_value_is_changeable_p): Same. (varobj_floating_p): Same. (varobj_default_value_is_changeable_p): Same. * varobj.h (struct lang_varobj_ops): Consitfy some struct varobj * parameters. (varobj_get_objname): Constify struct varobj * parameter. (varobj_get_expression): Same. (varobj_get_thread_id): Same. (varobj_get_frozen): Same. (varobj_get_child_range): Same. (varobj_get_display_hint): Same. (varobj_get_gdb_type): Same. (varobj_get_language): Same. (varobj_get_attributes): Same. (varobj_editable_p): Same. (varobj_floating_p): Same. (varobj_has_more): Same. (varobj_is_dynamic_p): Same. (varobj_ensure_python_env): Same. (varobj_default_value_is_changeable_p): Same. (varobj_value_is_changeable_p): Same. (varobj_get_value_type): Same. (varobj_is_anonymous_child): Same. (varobj_value_get_print_value): Same. (varobj_default_is_path_expr_parent): Same.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-07-09Improve MI -var-info-path-expression for nested struct/union case.Andrew Burgess
https://sourceware.org/ml/gdb-patches/2014-05/msg00383.html The MI command -var-info-path-expression currently does not handle non-anonymous structs / unions nested within other structs / unions, it will skip parts of the expression. Consider this example: ## START EXAMPLE ## $ cat ex.c #include <string.h> int main () { struct s1 { int a; }; struct ss { struct s1 x; }; struct ss an_ss; memset (&an_ss, 0, sizeof (an_ss)); return 0; } $ gcc -g -o ex.x ex.c $ gdb ex.x (gdb) break 18 Breakpoint 1 at 0x80483ba: file ex.c, line 18. (gdb) run Starting program: /home/user/ex.x Breakpoint 1, main () at ex.c:18 18 return 0; (gdb) interpreter-exec mi "-var-create an_ss * an_ss" (gdb) interpreter-exec mi "-var-list-children an_ss" ^done,numchild="1",children=[child={name="an_ss.x",exp="x",numchild="1",type="struct s1",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x" ^done,numchild="1",children=[child={name="an_ss.x.a",exp="a",numchild="0",type="int",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x.a" ^done,numchild="0",has_more="0" (gdb) interpreter-exec mi "-var-info-path-expression an_ss.x.a" ^done,path_expr="(an_ss).a" (gdb) print (an_ss).a There is no member named a. ## END EXAMPLE ## Notice that the path expression returned is wrong, and as a result the print command fails. This patch adds a new method to the varobj_ops structure called is_path_expr_parent, to allow language specific control over finding the parent varobj, the current logic becomes the C/C++ version and is extended to handle the nested cases. No other language currently uses this code, so all other languages just get a default method. With this patch, the above example now finishes like this: ## START EXAMPLE ## $ gdb ex.x (gdb) break 18 Breakpoint 1 at 0x80483ba: file ex.c, line 18. (gdb) run Starting program: /home/user/ex.x Breakpoint 1, main () at ex.c:18 18 return 0; (gdb) interpreter-exec mi "-var-list-children an_ss" ^done,numchild="1",children=[child={name="an_ss.x",exp="x",numchild="1",type="struct s1",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x" ^done,numchild="1",children=[child={name="an_ss.x.a",exp="a",numchild="0",type="int",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x.a" ^done,numchild="0",has_more="0" (gdb) interpreter-exec mi "-var-info-path-expression an_ss.x.a" ^done,path_expr="((an_ss).x).a" (gdb) print ((an_ss).x).a $1 = 0 ## END EXAMPLE ## Notice that the path expression is now correct, and the print is a success. gdb/ChangeLog: * ada-varobj.c (ada_varobj_ops): Fill in is_path_expr_parent field. * c-varobj.c (c_is_path_expr_parent): New function, moved core from varobj.c, with additional checks. (c_varobj_ops): Fill in is_path_expr_parent field. (cplus_varobj_ops): Fill in is_path_expr_parent field. * jv-varobj.c (java_varobj_ops): Fill in is_path_expr_parent field. * varobj.c (is_path_expr_parent): Call is_path_expr_parent varobj ops method. (varobj_default_is_path_expr_parent): New function. * varobj.h (lang_varobj_ops): Add is_path_expr_parent field. (varobj_default_is_path_expr_parent): Declare new function. gdb/testsuite/ChangeLog: * gdb.mi/var-cmd.c (do_nested_struct_union_tests): New function setting up test structures. (main): Call new test function. * gdb.mi/mi2-var-child.exp: Create additional breakpoint in new test function, continue into test function and walk test structures.
2014-06-12Rename varobj_pretty_printed_p to varobj_is_dynamic_pYao Qi
We think varobj with --available-children-only behaves like a dynamic varobj, so dyanmic varobj is not pretty-printer specific. We rename varobj_pretty_printed_p to varobj_is_dynamic_p, so that we can handle available-children-only checking in varobj_is_dynamic_p in the next patch. gdb: 2014-06-12 Yao Qi <yao@codesourcery.com> * varobj.c (varobj_pretty_printed_p): Rename to ... (varobj_is_dynamic_p): ... this. New function. * varobj.h (varobj_pretty_printed_p): Remove declaration. (varobj_is_dynamic_p): Declare. * mi/mi-cmd-var.c (print_varobj): All callers updated. (mi_print_value_p, varobj_update_one): Likewise.
2014-06-12Generalize varobj iteratorYao Qi
This patch generalizes varobj iterator, in a python-independent way. Note varobj_item is still a typedef of PyObject, we can only focus on API changes, and leave the data type changes to the next patch. As a result, we include "varobj-iter.h" after the typedef of PyObject in varobj.c, but it is an intermediate state. Finally, varobj-iter.h is independent of PyObject. This change is helpful to move some python-related code out of varobj.c. V2: - Fix a missing cleanup. - Fix typos. - Use XNEW. - Check against NULL explicitly. - Update copyright year for new added files. V3: - Call PyGILState_Ensure before Py_XDECREF. - Use CPYCHECKER_STEALS_REFERENCE_TO_ARG. - Code indentation. V4: - use varobj_ensure_python_env instead of PyGILState_Ensure. gdb: 2014-06-12 Pedro Alves <pedro@codesourcery.com> Yao Qi <yao@codesourcery.com> * Makefile.in (SUBDIR_PYTHON_OBS): Add "py-varobj.o". (SUBDIR_PYTHON_SRCS): Add "python/py-varobj.c". (HFILES_NO_SRCDIR): Add "varobj-iter.h". (py-varobj.o): New rule. * python/py-varobj.c: New file. * python/python-internal.h (py_varobj_get_iterator): Declare. * varobj-iter.h: New file. * varobj.c: Include "varobj-iter.h" (struct varobj) <child_iter>: Change its type from "PyObject *" to "struct varobj_iter *". <saved_item>: Likewise. [HAVE_PYTHON] (varobj_ensure_python_env): Make it extern. [HAVE_PYTHON] (varobj_get_iterator): New function. (update_dynamic_varobj_children) [HAVE_PYTHON]: Move python-specific code to python/py-varobj.c. (install_visualizer): Call varobj_iter_delete instead of Py_XDECREF. * varobj.h (varobj_ensure_python_env): Declare.
2014-02-20mark *_varobj_ops as "extern"Tom Tromey
The AIX linker pointed out that gdb had multiple definitions of the various *_varobj_ops objects. This patch fixes the problem by marking the declarations as "extern" in varobj.h. Tested by rebuilding on x86-64 Fedora 18 and on AIX. 2014-02-20 Tom Tromey <tromey@redhat.com> * varobj.h (c_varobj_ops, cplus_varobj_ops, java_varobj_ops) (ada_varobj_ops): Mark "extern".
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker
2013-11-07Remove varobj_language_string, languages and varobj_languagesYao Qi
This patch does some cleanups, removing some language-related stuff. Note that mi_cmd_var_info_expression uses varobj_language_string, which is redundant, because we can get language name from lang->la_natural_name. varobj_language_string doesn't have "Ada", which looks like a bug to me. With this patch applied, this problem doesn't exist, because the language name is got from the same place (field la_natural_name). gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * mi/mi-cmd-var.c: Include "language.h". (mi_cmd_var_info_expression): Get language name from language_defn. * varobj.c (varobj_language_string): Remove. (variable_language): Remove declaration. (languages): Remove. (varobj_get_language): Change the type of return value. (variable_language): Remove. * varobj.h (enum varobj_languages): Remove. (varobj_language_string): Remove declaration. (varobj_get_language): Update declaration. gdb/doc: 2013-11-07 Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Update doc about the output of "-var-info-expression".
2013-10-25New field la_varobj_ops in struct language_defnYao Qi
This is a follow-up series to move language stuff out of varobj.c. This patch adds a new field la_varobj_ops in struct language_defn so that each language has varobj-related options. Not every language supports varobj, and the operations are identical to operations of c languages. 'struct language_defn' is the ideal place to save all language-related operations. After this patch, some cleanups can be done in patch 2/2, which removes language-related stuff completely from varobj.c. Regression tested on x86_64-linux. gdb: 2013-10-25 Yao Qi <yao@codesourcery.com> * language.h (struct lang_varobj_ops): Declare. (struct language_defn) <la_varobj_ops>: New field. * ada-lang.c: Include "varobj.h" (defn ada_language_defn): Initialize field 'la_varobj_ops' by ada_varobj_ops. * c-lang.c: Include "varobj.h" (c_language_defn): Initialize field 'la_varobj_ops' by c_varobj_ops. (cplus_language_defn): Initialize field 'la_varobj_ops' by cplus_varobj_ops. (asm_language_defn): Initialize field 'la_varobj_ops' by default_varobj_ops. (minimal_language_defn): Likewise. * d-lang.c (d_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * go-lang.c (go_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * opencl-lang.c (opencl_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise. * language.c (unknown_language_defn): Likewise. (auto_language_defn): Likewise. (local_language_defn): Likewise. * jv-lang.c (java_language_defn): Initialize field 'la_varobj_ops' by java_varobj_ops. * varobj.c (varobj_create): Update. * varobj.h (default_varobj_ops): Define macro.
2013-10-25Minor coding style fixes in varobj.hJoel Brobecker
No actual code change, just a minor style fix. gdb/ChangeLog: * varobj.h (struct lang_varobj_ops): Remove spaces between '*' and parameter name.
2013-10-17gdb/Yao Qi
* Makefile.in (SFILES): Add c-varobj.c and jv-varobj.c. (COMMON_OBS): Add c-varobj.o and jv-varobj.o. * ada-varobj.c: Include "varobj.h". (ada_number_of_children): New. Moved from varobj.c. (ada_name_of_variable, ada_name_of_child): Likewise. (ada_path_expr_of_child, ada_value_of_child): Likewise. (ada_type_of_child, ada_value_of_variable): Likewise. (ada_value_is_changeable_p, ada_value_has_mutated): Likewise. (ada_varobj_ops): New. * c-varobj.c, jv-varobj.c: New file. Moved from varobj.c. * gdbtypes.c (get_target_type): New. Moved from varobj.c. * gdbtypes.h (get_target_type): Declare. * varobj.c: Remove the inclusion of "ada-varobj.h" and "ada-lang.h". (ANONYMOUS_STRUCT_NAME): Move it to c-varobj.c. (ANONYMOUS_UNION_NAME): Likewise. (get_type, get_value_type, get_target_type): Remove declarations. (value_get_print_value, varobj_value_get_print_value): Likewise. (c_number_of_children, c_name_of_variable): Likewise. (c_name_of_child, c_path_expr_of_child): Likewise. (c_value_of_child, c_type_of_child): Likewise. (c_value_of_variable, cplus_number_of_children): Likewise. (cplus_class_num_children, cplus_name_of_variable): Likewise. (cplus_name_of_child, cplus_path_expr_of_child): Likewise. (cplus_value_of_child, cplus_type_of_child): Likewise. (cplus_value_of_variable, java_number_of_children): Likewise. (java_name_of_variable, java_name_of_child): Likewise. (java_path_expr_of_child, java_value_of_child): Likewise. (java_type_of_child, java_value_of_variable): Likewise. (ada_number_of_children, ada_name_of_variable): Likewise. (ada_name_of_child, ada_path_expr_of_child): Likewise. (ada_value_of_child, ada_type_of_child): Likewise. (ada_value_of_variable, ada_value_is_changeable_p): Likewise. (ada_value_has_mutated): Likewise. (struct language_specific): Move it to varobj.h. (CPLUS_FAKE_CHILD): Move it to varobj.h. (restrict_range): Rename it varobj_restrict_range. Make it extern. Callers update. (get_path_expr_parent): Rename it to varobj_get_path_expr_parent. Make it extern. (is_anonymous_child): Move it to c-varobj.c and rename to varobj_is_anonymous_child. Caller update. (get_type): Move it to c-varobj.c. (get_value_type): Rename it varobj_get_value_type. Make it extern. (get_target_type): Move it gdbtypes.c. (varobj_formatted_print_options): New function. (value_get_print_value): Rename it to varobj_value_get_print_value and make it extern. (varobj_value_is_changeable_p): Make it extern. (adjust_value_for_child_access): Move it to c-varobj.c. (default_value_is_changeable_p): Rename it to varobj_default_value_is_changeable_p. Make it extern. (c_number_of_children, c_name_of_variable): Move it to c-varobj.c (c_name_of_child, c_path_expr_of_child): Likewise. (c_value_of_child, c_type_of_child): Likewise. (c_value_of_variable, cplus_number_of_children): Likewise. (cplus_class_num_children, cplus_name_of_variable): Likewise. (cplus_name_of_child, cplus_path_expr_of_child): Likewise. (cplus_value_of_child, cplus_type_of_child): Likewise. (cplus_value_of_variable): Likewise. (java_number_of_children, java_name_of_variable): Move it to jv-varobj.c. (java_name_of_child, java_path_expr_of_child): Likewise. (java_value_of_child, java_type_of_child): Likewise. (java_value_of_variable): Likewise. (ada_number_of_children, ada_name_of_variable): Move it to ada-varobj.c. (ada_name_of_child, ada_path_expr_of_child): Likewise. (ada_value_of_child, ada_type_of_child): Likewise. (ada_value_of_variable, ada_value_is_changeable_p): Likewise. (ada_value_has_mutated): Likewise. * varobj.h (CPLUS_FAKE_CHILD): New macro, moved from varobj.c. (struct lang_varobj_ops): New. Renamed by 'struct language_specific'. (c_varobj_ops, cplus_varobj_ops): Declare. (java_varobj_ops, ada_varobj_ops): Declare. (varobj_default_value_is_changeable_p): Declare. (varobj_value_is_changeable_p): Declare. (varobj_get_value_type, varobj_is_anonymous_child): Declare. (varobj_get_path_expr_parent): Declare. (varobj_value_get_print_value): Declare. (varobj_formatted_print_options): Declare. (varobj_restrict_range): Declare.
2013-10-14gdb/Yao Qi
* varobj.c (struct varobj): Move most of the fields to varobj.h. (struct varobj_dynamic): New struct. (varobj_get_display_hint) [HAVE_PYTHON]: Adjust. (varobj_has_more): Likewise. (dynamic_varobj_has_child_method): Likewise. (update_dynamic_varobj_children): Likewise. (varobj_get_num_children): Likewise. (varobj_list_children, varobj_pretty_printed_p): Likewise. (install_new_value_visualizer): Likewise. (install_new_value_visualizer, install_new_value): Likewise. (varobj_update, new_variable, free_variable): Likewise. (my_value_of_variable, value_get_print_value): Likewise. (install_visualizer): Change the type of parameter 'var' to 'struct varobjd_dynamic *'. Callers update. * varobj.h (struct varobj): Moved from varobj.c. (struct varobj) <dynamic>: New field.
2013-10-06gdb/Yao Qi
* varobj.h: Add comments to enum varobj_languages.
2013-10-01gdb/Yao Qi
* varobj.c (varobj_format_string): Remove "unknown". (languages): Remove the first element. * varobj.h (enum varobj_languages): Remove vlang_c.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-07-18gdb/Jean-Charles Delay
* varobj.h (varobj_languages): Add vlang_ada definition to the list of supported languages. * varobj.c: Add top definitions and basic implementation of the following callbacks: ada_number_of_children, ada_name_of_variable, ada_name_of_child, ada_path_expr_of_child, ada_value_of_root, ada_value_of_child, ada_type_of_child, ada_value_of_variable. (languages): Register Ada-specific callbacks. (variable_language): Add the Ada case in the language setter switch.
2011-03-14 Fix ARI warning about function names in first column.Pierre Muller
Put prototype declaration on same line as return type. * objc-exp.y: Ditto. * p-exp.y: Ditto. * python/py-stopevent.h: Ditto. For long function names, split parameters to allow function name on same line as return type. * solib-pa64.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. For long function declaration, use single line. * hppa-tdep.h: Ditto. * inferior.h: Ditto.
2011-01-122011-01-11 Michael Snyder <msnyder@vmware.com>Michael Snyder
* ui-file.c: Comment cleanup, mostly periods and spaces. * ui-file.h: Ditto. * ui-out.c: Ditto. * ui-out.h: Ditto. * utils.c: Ditto. * v850-tdep.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * value.h: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vax-tdep.c: Ditto. * vec.c: Ditto. * vec.h: Ditto. * version.h: Ditto. * windows-nat.c: Ditto. * windows-tdep.c: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xml-support.c: Ditto. * xstormy16-tdep.c: Ditto. * xtensa-tdep.c: Ditto. * xtensa-tdep.h: Ditto.
2011-01-052011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder
* addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
2011-01-01run copyright.sh for 2011.Joel Brobecker
2010-01-01Update copyright year in most headers.Joel Brobecker
Automatic update by copyright.sh.
2009-09-15gdbTom Tromey
* varobj.h (varobj_update_result_t) <new>: New field. (varobj_get_child_range, varobj_set_child_range): Declare. (varobj_list_children): Update. (varobj_enable_pretty_printing, varobj_has_more) (varobj_pretty_printed_p): Declare. * varobj.c (pretty_printing): New global. (varobj_enable_pretty_printing): New function. (struct varobj_root) <from, to, constructor, child_iter, saved_item>: New fields. (varobj_create): Don't call install_default_visualizer. (instantiate_pretty_printer): Don't use value_copy. (varobj_has_more): New function. (restrict_range): New function. (install_dynamic_child): Likewise. (dynamic_varobj_has_child_method): Likewise. (update_dynamic_varobj_children): Remove 'new_and_unchanged' argument; add 'new', 'unchanged', 'from', and 'to' arguments. Rewrite. (varobj_get_num_children): Call update_dynamic_varobj_children. (varobj_list_children): Add 'from' and 'to' arguments. Ignore result of update_dynamic_varobj_children. Don't call install_default_visualizer. Restrict result range. (varobj_add_child): Don't call install_default_visualizer. (varobj_pretty_printed_p): New function. (install_visualizer): Rewrite. Move earlier in file. (install_default_visualizer): Likewise. (construct_visualizer): New function. (install_new_value_visualizer): Likewise. (install_new_value): Don't call release_value. Special case pretty-printed objects. Use value_incref. Rearrange "changed" logic. (varobj_get_child_range): New function. (varobj_set_child_range): Likewise. (varobj_set_visualizer): Rewrite. (varobj_update): Rewrite pretty-printing logic. (new_variable): Initialize new fields. (free_variable): Destroy new fields. (value_of_root): Copy 'from' and 'to'. (my_value_of_variable): Handle pretty-printers. (value_get_print_value): Rework pretty-printing logic. (cplus_describe_child): Don't use release_value. * mi/mi-cmds.h (mi_cmd_enable_pretty_printing) (mi_cmd_var_set_update_range): Declare. * mi/mi-cmds.c (mi_cmds): Add enable-pretty-printing and var-set-update-range. * mi/mi-cmd-var.c (print_varobj): Update. Emit "dynamic" attribute. (mi_cmd_var_create): Emit "has_more" attribute. (mi_cmd_var_set_format): Plug memory leak. (mi_print_value_p): Replace 'type' argument with 'var'. Handle pretty-printed varobjs. (mi_cmd_var_list_children): Accept 'from' and 'to' arguments. Emit "has_more" attribute. (mi_cmd_var_evaluate_expression): Plug memory leak. (mi_cmd_var_assign): Likewise. (varobj_update_one): Likewise. Emit "dynamic", "has_more", and "new_children" attributes. (mi_cmd_enable_pretty_printing): New function. (mi_cmd_var_set_update_range): Likewise. gdb/doc * gdb.texinfo (GDB/MI Variable Objects): Document -enable-pretty-printing, -var-set-update-range, dynamic varobjs. Expand -var-update documentation. gdb/testsuite * lib/mi-support.exp (mi_create_varobj): Update. (mi_create_floating_varobj): Likewise. (mi_create_dynamic_varobj): New proc. (mi_varobj_update): Update. (mi_varobj_update_with_type_change): Likewise. (mi_varobj_update_kv_helper): New proc. (mi_varobj_update_dynamic_helper): Rewrite. (mi_varobj_update_dynamic): New proc. (mi_list_varobj_children): Update. (mi_list_varobj_children_range): Add 'from' and 'to' arguments. * gdb.python/python-prettyprint.py (pp_outer): New class. (pp_nullstr): Likewise. (lookup_function): Register new printers. * gdb.python/python-prettyprint.c (struct substruct): New type. (struct outerstruct): Likewise. (substruct_test): New function. (struct nullstr): New type. (string_1, string_2): New globals. (main): Add new tests. * gdb.python/python-mi.exp: Added regression tests. * gdb.mi/mi2-var-display.exp: Update. * gdb.mi/mi2-var-cmd.exp: Update. * gdb.mi/mi2-var-child.exp: Update. * gdb.mi/mi2-var-block.exp: Update. * gdb.mi/mi-var-invalidate.exp: Update. * gdb.mi/mi-var-display.exp: Update. * gdb.mi/mi-var-cmd.exp: Update. * gdb.mi/mi-var-child.exp: Update. * gdb.mi/mi-var-block.exp: Update. * gdb.mi/mi-break.exp: Update. * gdb.mi/gdb701.exp: Update.
2009-07-30gdb/Jan Kratochvil
Replace public function varobj_list by all_root_varobjs iterator. * mi/mi-cmd-var.c (struct mi_cmd_var_update, mi_cmd_var_update_iter): New. (mi_cmd_var_update): Replace the varobj_list call by all_root_varobjs. Remove the variables rootlist, cr. New variable data. * varobj.c (rootcount, varobj_list): Remove. (install_variable, uninstall_variable): Remove the rootcount updates. (all_root_varobjs): New function. (varobj_invalidate): Use the all_root_varobjs call. Move the code to... (varobj_invalidate_iter): ... a new function. * varobj.h (varobj_list): Remove the prototype. (all_root_varobjs): New prototype.
2009-05-28gdbTom Tromey
2009-05-27 Vladimir Prus <vladimir@codesourcery.com> Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * mi/mi-main.c (mi_cmd_list_features): List "python" feature. * varobj.h (varobj_set_visualizer): Declare. (varobj_get_display_hint): Likewise. (varobj_update_result_t) <children_changed, value_installed>: New fields. * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer. * mi/mi-cmds.h (mi_cmd_var_set_visualizer, mi_cmd_var_set_child_range): Declare. * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function. (mi_cmd_var_list_children): Emit display hint. (varobj_update_one): Emit display hint. Handle dynamic children. * python/python.c (GdbMethods): Add "default_visualizer". * python/python-internal.h (apply_varobj_pretty_printer, gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint): Declare. (gdbpy_default_visualizer): Likewise. * varobj.c: Include python.h, python-internal.h. (PyObject): New typedef. (struct varobj) <children_requested, pretty_printer>: New fields. (varobj_create): Call install_default_visualizer. (instantiate_pretty_printer): New function. (varobj_set_display_format): Update. (varobj_get_display_hint): New function. (update_dynamic_varobj_children): New function. (varobj_get_num_children): Handle dynamic children. (varobj_list_children): Likewise. (install_new_value): Likewise. (varobj_add_child): New function. (install_visualizer): Likewise. (install_default_visualizer): Likewise. (varobj_set_visualizer): Likewise. (varobj_update): Handle dynamic children. (create_child): Use create_child_with_value. (create_child_with_value): New function. (value_get_print_value): Call pretty printer. Add value_formatter argument. (c_value_of_variable): Update. (varobj_invalidate): Always free all_rootvarobj. * python/python-prettyprint.c (apply_varobj_pretty_printer): New function. (gdbpy_get_varobj_pretty_printer): Likewise. (gdbpy_default_visualizer): Likewise. gdb/doc 2009-05-27 Tom Tromey <tromey@redhat.com> * gdb.texinfo (GDB/MI Miscellaneous Commands): Document "python" feature. (GDB/MI Variable Objects): Document -var-set-visualizer. gdb/testsuite 2009-05-27 Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * lib/mi-support.exp (mi_varobj_update_dynamic): New proc. (mi_child_regexp): Likewise. (mi_list_varobj_children_range): Likewise. (mi_get_features): Likewise. (mi_list_varobj_children): Rewrite. * gdb.python/python-mi.exp: New file.
2009-01-03 Updated copyright notices for most files.Joel Brobecker
2008-05-28 Refactor varobj_update interface.Vladimir Prus
* varobj.c (varobj_update): Report changes as vector. Also return not just a list of varobj, but a list of special structures that tell what exactly has changed. * varobj.h (enum varobj_update_error): Rename to varobj_scope_status. (struct varobj_update_result_t): New. (varobj_update): Adjust prototype. * mi/mi-cmd-var.c: Adjust for changes.
2008-04-09gdb/ChangeLogMarc Khouzam
2008-04-09 Marc Khouzam <marc.khouzam@ericsson.com> * mi/mi-cmd-var.c: Include "mi-getopt.h". (mi_parse_format): New. Factored out from mi_cmd_var_set_format. (mi_cmd_var_set_format): Use new mi_parse_format. (mi_cmd_var_evaluate_expression): Support for -f option to specify format. * Makefile.in (mi-cmd-var.o): Update dependencies. * varobj.h (varobj_get_formatted_value): Declare. * varobj.c (my_value_of_variable): Added format parameter. (cplus_value_of_variable): Likewise. (java_value_of_variable): Likewise. (c_value_of_variable): Likewise. Evaluate expression based on format parameter. (struct language_specific): Add format parameter to function member *value_of_variable. (varobj_get_formatted_value): New. (varobj_get_value): Added format parameter to method call. gdb/doc/ChangeLog 2008-04-09 Marc Khouzam <marc.khouzam@ericsson.com> * gdb.texinfo (GDB/MI Variable Objects): Add anchor to -var-set-format. Add -f option to -var-evaluate-expression. gdb/testsuite/ChangeLog 2008-04-09 Marc Khouzam <marc.khouzam@ericsson.com> * gdb.mi/mi2-var-display.exp: Added tests for the new -f option of -var-evaluate-expression. * gdb.mi/mi2-var-display.exp: Likewise.
2008-03-26 * varobj.h (varobj_floating_p): Declare.Vladimir Prus
* varobj.c (varobj_floating_p): New. * mi/mi-cmd-var.c (mi_cmd_var_update): When passed '@' as the name, update all floating varobjs.
2008-03-24 * varobj.c (struct varobj_root): New component thread_id.Vladimir Prus
(varobj_get_thread_id, check_scope): New functions. (c_value_of_root): Use check_scope. Switch to the proper thread if necessary. * varobj.h (varobj_get_thread_id): New extern. * mi/mi-cmd-var.c (print_varobj): Add thread-id field.