-Wwrite-strings: The Rest
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.
This commit is contained in:
parent
995816ba55
commit
a121b7c1ac
150 changed files with 737 additions and 452 deletions
240
gdb/ChangeLog
240
gdb/ChangeLog
|
@ -1,3 +1,243 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2017-04-05 Pedro Alves <palves@redhat.com>
|
2017-04-05 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* proc-api.c (struct trans): Constify.
|
* proc-api.c (struct trans): Constify.
|
||||||
|
|
|
@ -77,7 +77,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
static void write_int (struct parser_state *, LONGEST, struct type *);
|
static void write_int (struct parser_state *, LONGEST, struct type *);
|
||||||
|
|
||||||
|
@ -751,7 +751,7 @@ ada_parse (struct parser_state *par_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
error (_("Error in expression, near `%s'."), lexptr);
|
error (_("Error in expression, near `%s'."), lexptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ static void replace_operator_with_call (struct expression **, int, int, int,
|
||||||
|
|
||||||
static int possible_user_operator_p (enum exp_opcode, struct value **);
|
static int possible_user_operator_p (enum exp_opcode, struct value **);
|
||||||
|
|
||||||
static char *ada_op_name (enum exp_opcode);
|
static const char *ada_op_name (enum exp_opcode);
|
||||||
|
|
||||||
static const char *ada_decoded_op_name (enum exp_opcode);
|
static const char *ada_decoded_op_name (enum exp_opcode);
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static enum ada_renaming_category parse_old_style_renaming (struct type *,
|
||||||
static struct symbol *find_old_style_renaming_symbol (const char *,
|
static struct symbol *find_old_style_renaming_symbol (const char *,
|
||||||
const struct block *);
|
const struct block *);
|
||||||
|
|
||||||
static struct type *ada_lookup_struct_elt_type (struct type *, char *,
|
static struct type *ada_lookup_struct_elt_type (struct type *, const char *,
|
||||||
int, int, int *);
|
int, int, int *);
|
||||||
|
|
||||||
static struct value *evaluate_subexp_type (struct expression *, int *);
|
static struct value *evaluate_subexp_type (struct expression *, int *);
|
||||||
|
@ -1576,7 +1576,7 @@ ada_fixup_array_indexes_type (struct type *index_desc_type)
|
||||||
|
|
||||||
/* Names of MAX_ADA_DIMENS bounds in P_BOUNDS fields of array descriptors. */
|
/* Names of MAX_ADA_DIMENS bounds in P_BOUNDS fields of array descriptors. */
|
||||||
|
|
||||||
static char *bound_name[] = {
|
static const char *bound_name[] = {
|
||||||
"LB0", "UB0", "LB1", "UB1", "LB2", "UB2", "LB3", "UB3",
|
"LB0", "UB0", "LB1", "UB1", "LB2", "UB2", "LB3", "UB3",
|
||||||
"LB4", "UB4", "LB5", "UB5", "LB6", "UB6", "LB7", "UB7"
|
"LB4", "UB4", "LB5", "UB5", "LB6", "UB6", "LB7", "UB7"
|
||||||
};
|
};
|
||||||
|
@ -4035,10 +4035,10 @@ See set/show multiple-symbol."));
|
||||||
|
|
||||||
int
|
int
|
||||||
get_selections (int *choices, int n_choices, int max_results,
|
get_selections (int *choices, int n_choices, int max_results,
|
||||||
int is_all_choice, char *annotation_suffix)
|
int is_all_choice, const char *annotation_suffix)
|
||||||
{
|
{
|
||||||
char *args;
|
char *args;
|
||||||
char *prompt;
|
const char *prompt;
|
||||||
int n_chosen;
|
int n_chosen;
|
||||||
int first_choice = is_all_choice ? 2 : 1;
|
int first_choice = is_all_choice ? 2 : 1;
|
||||||
|
|
||||||
|
@ -7066,7 +7066,7 @@ ada_is_variant_part (struct type *type, int field_num)
|
||||||
struct type *
|
struct type *
|
||||||
ada_variant_discrim_type (struct type *var_type, struct type *outer_type)
|
ada_variant_discrim_type (struct type *var_type, struct type *outer_type)
|
||||||
{
|
{
|
||||||
char *name = ada_variant_discrim_name (var_type);
|
const char *name = ada_variant_discrim_name (var_type);
|
||||||
|
|
||||||
return ada_lookup_struct_elt_type (outer_type, name, 1, 1, NULL);
|
return ada_lookup_struct_elt_type (outer_type, name, 1, 1, NULL);
|
||||||
}
|
}
|
||||||
|
@ -7087,7 +7087,7 @@ ada_is_others_clause (struct type *type, int field_num)
|
||||||
returns the name of the discriminant controlling the variant.
|
returns the name of the discriminant controlling the variant.
|
||||||
The value is valid until the next call to ada_variant_discrim_name. */
|
The value is valid until the next call to ada_variant_discrim_name. */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
ada_variant_discrim_name (struct type *type0)
|
ada_variant_discrim_name (struct type *type0)
|
||||||
{
|
{
|
||||||
static char *result = NULL;
|
static char *result = NULL;
|
||||||
|
@ -7484,7 +7484,7 @@ ada_index_struct_field_1 (int *index_p, struct value *arg, int offset,
|
||||||
calling error. */
|
calling error. */
|
||||||
|
|
||||||
struct value *
|
struct value *
|
||||||
ada_value_struct_elt (struct value *arg, char *name, int no_err)
|
ada_value_struct_elt (struct value *arg, const char *name, int no_err)
|
||||||
{
|
{
|
||||||
struct type *t, *t1;
|
struct type *t, *t1;
|
||||||
struct value *v;
|
struct value *v;
|
||||||
|
@ -7598,7 +7598,7 @@ type_as_string (struct type *type)
|
||||||
TYPE is not a type of the right kind. */
|
TYPE is not a type of the right kind. */
|
||||||
|
|
||||||
static struct type *
|
static struct type *
|
||||||
ada_lookup_struct_elt_type (struct type *type, char *name, int refok,
|
ada_lookup_struct_elt_type (struct type *type, const char *name, int refok,
|
||||||
int noerr, int *dispp)
|
int noerr, int *dispp)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -7711,7 +7711,7 @@ BadName:
|
||||||
static int
|
static int
|
||||||
is_unchecked_variant (struct type *var_type, struct type *outer_type)
|
is_unchecked_variant (struct type *var_type, struct type *outer_type)
|
||||||
{
|
{
|
||||||
char *discrim_name = ada_variant_discrim_name (var_type);
|
const char *discrim_name = ada_variant_discrim_name (var_type);
|
||||||
|
|
||||||
return (ada_lookup_struct_elt_type (outer_type, discrim_name, 0, 1, NULL)
|
return (ada_lookup_struct_elt_type (outer_type, discrim_name, 0, 1, NULL)
|
||||||
== NULL);
|
== NULL);
|
||||||
|
@ -7729,7 +7729,7 @@ ada_which_variant_applies (struct type *var_type, struct type *outer_type,
|
||||||
{
|
{
|
||||||
int others_clause;
|
int others_clause;
|
||||||
int i;
|
int i;
|
||||||
char *discrim_name = ada_variant_discrim_name (var_type);
|
const char *discrim_name = ada_variant_discrim_name (var_type);
|
||||||
struct value *outer;
|
struct value *outer;
|
||||||
struct value *discrim;
|
struct value *discrim;
|
||||||
LONGEST discrim_val;
|
LONGEST discrim_val;
|
||||||
|
@ -11834,7 +11834,7 @@ ada_modulus (struct type *type)
|
||||||
an Ada83 compiler). As such, we do not include Numeric_Error from
|
an Ada83 compiler). As such, we do not include Numeric_Error from
|
||||||
this list of standard exceptions. */
|
this list of standard exceptions. */
|
||||||
|
|
||||||
static char *standard_exc[] = {
|
static const char *standard_exc[] = {
|
||||||
"constraint_error",
|
"constraint_error",
|
||||||
"program_error",
|
"program_error",
|
||||||
"storage_error",
|
"storage_error",
|
||||||
|
@ -12791,19 +12791,19 @@ static struct breakpoint_ops catch_assert_breakpoint_ops;
|
||||||
Return NULL if ARGPS does not contain any more tokens. */
|
Return NULL if ARGPS does not contain any more tokens. */
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
ada_get_next_arg (char **argsp)
|
ada_get_next_arg (const char **argsp)
|
||||||
{
|
{
|
||||||
char *args = *argsp;
|
const char *args = *argsp;
|
||||||
char *end;
|
const char *end;
|
||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
args = skip_spaces (args);
|
args = skip_spaces_const (args);
|
||||||
if (args[0] == '\0')
|
if (args[0] == '\0')
|
||||||
return NULL; /* No more arguments. */
|
return NULL; /* No more arguments. */
|
||||||
|
|
||||||
/* Find the end of the current argument. */
|
/* Find the end of the current argument. */
|
||||||
|
|
||||||
end = skip_to_space (args);
|
end = skip_to_space_const (args);
|
||||||
|
|
||||||
/* Adjust ARGSP to point to the start of the next argument. */
|
/* Adjust ARGSP to point to the start of the next argument. */
|
||||||
|
|
||||||
|
@ -12827,7 +12827,7 @@ ada_get_next_arg (char **argsp)
|
||||||
after use). Otherwise COND_STRING is set to NULL. */
|
after use). Otherwise COND_STRING is set to NULL. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
catch_ada_exception_command_split (char *args,
|
catch_ada_exception_command_split (const char *args,
|
||||||
enum ada_exception_catchpoint_kind *ex,
|
enum ada_exception_catchpoint_kind *ex,
|
||||||
char **excep_string,
|
char **excep_string,
|
||||||
char **cond_string)
|
char **cond_string)
|
||||||
|
@ -12850,12 +12850,12 @@ catch_ada_exception_command_split (char *args,
|
||||||
|
|
||||||
/* Check to see if we have a condition. */
|
/* Check to see if we have a condition. */
|
||||||
|
|
||||||
args = skip_spaces (args);
|
args = skip_spaces_const (args);
|
||||||
if (startswith (args, "if")
|
if (startswith (args, "if")
|
||||||
&& (isspace (args[2]) || args[2] == '\0'))
|
&& (isspace (args[2]) || args[2] == '\0'))
|
||||||
{
|
{
|
||||||
args += 2;
|
args += 2;
|
||||||
args = skip_spaces (args);
|
args = skip_spaces_const (args);
|
||||||
|
|
||||||
if (args[0] == '\0')
|
if (args[0] == '\0')
|
||||||
error (_("Condition missing after `if' keyword"));
|
error (_("Condition missing after `if' keyword"));
|
||||||
|
@ -13077,9 +13077,10 @@ create_ada_exception_catchpoint (struct gdbarch *gdbarch,
|
||||||
/* Implement the "catch exception" command. */
|
/* Implement the "catch exception" command. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
catch_ada_exception_command (char *arg, int from_tty,
|
catch_ada_exception_command (char *arg_entry, int from_tty,
|
||||||
struct cmd_list_element *command)
|
struct cmd_list_element *command)
|
||||||
{
|
{
|
||||||
|
const char *arg = arg_entry;
|
||||||
struct gdbarch *gdbarch = get_current_arch ();
|
struct gdbarch *gdbarch = get_current_arch ();
|
||||||
int tempflag;
|
int tempflag;
|
||||||
enum ada_exception_catchpoint_kind ex_kind;
|
enum ada_exception_catchpoint_kind ex_kind;
|
||||||
|
@ -13107,16 +13108,16 @@ catch_ada_exception_command (char *arg, int from_tty,
|
||||||
(the memory needs to be deallocated after use). */
|
(the memory needs to be deallocated after use). */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
catch_ada_assert_command_split (char *args, char **cond_string)
|
catch_ada_assert_command_split (const char *args, char **cond_string)
|
||||||
{
|
{
|
||||||
args = skip_spaces (args);
|
args = skip_spaces_const (args);
|
||||||
|
|
||||||
/* Check whether a condition was provided. */
|
/* Check whether a condition was provided. */
|
||||||
if (startswith (args, "if")
|
if (startswith (args, "if")
|
||||||
&& (isspace (args[2]) || args[2] == '\0'))
|
&& (isspace (args[2]) || args[2] == '\0'))
|
||||||
{
|
{
|
||||||
args += 2;
|
args += 2;
|
||||||
args = skip_spaces (args);
|
args = skip_spaces_const (args);
|
||||||
if (args[0] == '\0')
|
if (args[0] == '\0')
|
||||||
error (_("condition missing after `if' keyword"));
|
error (_("condition missing after `if' keyword"));
|
||||||
*cond_string = xstrdup (args);
|
*cond_string = xstrdup (args);
|
||||||
|
@ -13131,9 +13132,10 @@ catch_ada_assert_command_split (char *args, char **cond_string)
|
||||||
/* Implement the "catch assert" command. */
|
/* Implement the "catch assert" command. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
catch_assert_command (char *arg, int from_tty,
|
catch_assert_command (char *arg_entry, int from_tty,
|
||||||
struct cmd_list_element *command)
|
struct cmd_list_element *command)
|
||||||
{
|
{
|
||||||
|
const char *arg = arg_entry;
|
||||||
struct gdbarch *gdbarch = get_current_arch ();
|
struct gdbarch *gdbarch = get_current_arch ();
|
||||||
int tempflag;
|
int tempflag;
|
||||||
char *cond_string = NULL;
|
char *cond_string = NULL;
|
||||||
|
@ -13571,7 +13573,7 @@ ada_operator_check (struct expression *exp, int pos,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
ada_op_name (enum exp_opcode opcode)
|
ada_op_name (enum exp_opcode opcode)
|
||||||
{
|
{
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
|
|
|
@ -159,7 +159,7 @@ extern int ada_get_field_index (const struct type *type,
|
||||||
|
|
||||||
extern int ada_parse (struct parser_state *); /* Defined in ada-exp.y */
|
extern int ada_parse (struct parser_state *); /* Defined in ada-exp.y */
|
||||||
|
|
||||||
extern void ada_yyerror (char *); /* Defined in ada-exp.y */
|
extern void ada_yyerror (const char *); /* Defined in ada-exp.y */
|
||||||
|
|
||||||
/* Defined in ada-typeprint.c */
|
/* Defined in ada-typeprint.c */
|
||||||
extern void ada_print_type (struct type *, const char *, struct ui_file *, int,
|
extern void ada_print_type (struct type *, const char *, struct ui_file *, int,
|
||||||
|
@ -243,7 +243,7 @@ extern void ada_fill_in_ada_prototype (struct symbol *);
|
||||||
|
|
||||||
extern int user_select_syms (struct block_symbol *, int, int);
|
extern int user_select_syms (struct block_symbol *, int, int);
|
||||||
|
|
||||||
extern int get_selections (int *, int, int, int, char *);
|
extern int get_selections (int *, int, int, int, const char *);
|
||||||
|
|
||||||
extern int ada_scan_number (const char *, int, LONGEST *, int *);
|
extern int ada_scan_number (const char *, int, LONGEST *, int *);
|
||||||
|
|
||||||
|
@ -288,9 +288,9 @@ extern int ada_is_others_clause (struct type *, int);
|
||||||
|
|
||||||
extern int ada_in_variant (LONGEST, struct type *, int);
|
extern int ada_in_variant (LONGEST, struct type *, int);
|
||||||
|
|
||||||
extern char *ada_variant_discrim_name (struct type *);
|
extern const char *ada_variant_discrim_name (struct type *);
|
||||||
|
|
||||||
extern struct value *ada_value_struct_elt (struct value *, char *, int);
|
extern struct value *ada_value_struct_elt (struct value *, const char *, int);
|
||||||
|
|
||||||
extern int ada_is_aligner_type (struct type *);
|
extern int ada_is_aligner_type (struct type *);
|
||||||
|
|
||||||
|
|
|
@ -1530,7 +1530,7 @@ arc_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
|
||||||
/* Dump the frame info. Used for internal debugging only. */
|
/* Dump the frame info. Used for internal debugging only. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
arc_print_frame_cache (struct gdbarch *gdbarch, char *message,
|
arc_print_frame_cache (struct gdbarch *gdbarch, const char *message,
|
||||||
struct arc_frame_cache *cache, int addresses_known)
|
struct arc_frame_cache *cache, int addresses_known)
|
||||||
{
|
{
|
||||||
debug_printf ("arc: frame_info %s\n", message);
|
debug_printf ("arc: frame_info %s\n", message);
|
||||||
|
|
|
@ -8367,7 +8367,7 @@ arm_skip_stub (struct frame_info *frame, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
/* Use the name suffix to determine which register contains the
|
/* Use the name suffix to determine which register contains the
|
||||||
target PC. */
|
target PC. */
|
||||||
static char *table[15] =
|
static const char *table[15] =
|
||||||
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "sl", "fp", "ip", "sp", "lr"
|
"r8", "r9", "sl", "fp", "ip", "sp", "lr"
|
||||||
};
|
};
|
||||||
|
|
21
gdb/ax-gdb.c
21
gdb/ax-gdb.c
|
@ -128,7 +128,8 @@ static void gen_binop (struct agent_expr *ax,
|
||||||
struct axs_value *value1,
|
struct axs_value *value1,
|
||||||
struct axs_value *value2,
|
struct axs_value *value2,
|
||||||
enum agent_op op,
|
enum agent_op op,
|
||||||
enum agent_op op_unsigned, int may_carry, char *name);
|
enum agent_op op_unsigned, int may_carry,
|
||||||
|
const char *name);
|
||||||
static void gen_logical_not (struct agent_expr *ax, struct axs_value *value,
|
static void gen_logical_not (struct agent_expr *ax, struct axs_value *value,
|
||||||
struct type *result_type);
|
struct type *result_type);
|
||||||
static void gen_complement (struct agent_expr *ax, struct axs_value *value);
|
static void gen_complement (struct agent_expr *ax, struct axs_value *value);
|
||||||
|
@ -144,12 +145,13 @@ static void gen_primitive_field (struct expression *exp,
|
||||||
static int gen_struct_ref_recursive (struct expression *exp,
|
static int gen_struct_ref_recursive (struct expression *exp,
|
||||||
struct agent_expr *ax,
|
struct agent_expr *ax,
|
||||||
struct axs_value *value,
|
struct axs_value *value,
|
||||||
char *field, int offset,
|
const char *field, int offset,
|
||||||
struct type *type);
|
struct type *type);
|
||||||
static void gen_struct_ref (struct expression *exp, struct agent_expr *ax,
|
static void gen_struct_ref (struct expression *exp, struct agent_expr *ax,
|
||||||
struct axs_value *value,
|
struct axs_value *value,
|
||||||
char *field,
|
const char *field,
|
||||||
char *operator_name, char *operand_name);
|
const char *operator_name,
|
||||||
|
const char *operand_name);
|
||||||
static void gen_static_field (struct gdbarch *gdbarch,
|
static void gen_static_field (struct gdbarch *gdbarch,
|
||||||
struct agent_expr *ax, struct axs_value *value,
|
struct agent_expr *ax, struct axs_value *value,
|
||||||
struct type *type, int fieldno);
|
struct type *type, int fieldno);
|
||||||
|
@ -1149,7 +1151,7 @@ static void
|
||||||
gen_binop (struct agent_expr *ax, struct axs_value *value,
|
gen_binop (struct agent_expr *ax, struct axs_value *value,
|
||||||
struct axs_value *value1, struct axs_value *value2,
|
struct axs_value *value1, struct axs_value *value2,
|
||||||
enum agent_op op, enum agent_op op_unsigned,
|
enum agent_op op, enum agent_op op_unsigned,
|
||||||
int may_carry, char *name)
|
int may_carry, const char *name)
|
||||||
{
|
{
|
||||||
/* We only handle INT op INT. */
|
/* We only handle INT op INT. */
|
||||||
if ((TYPE_CODE (value1->type) != TYPE_CODE_INT)
|
if ((TYPE_CODE (value1->type) != TYPE_CODE_INT)
|
||||||
|
@ -1434,7 +1436,7 @@ gen_primitive_field (struct expression *exp,
|
||||||
static int
|
static int
|
||||||
gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
|
gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
|
||||||
struct axs_value *value,
|
struct axs_value *value,
|
||||||
char *field, int offset, struct type *type)
|
const char *field, int offset, struct type *type)
|
||||||
{
|
{
|
||||||
int i, rslt;
|
int i, rslt;
|
||||||
int nbases = TYPE_N_BASECLASSES (type);
|
int nbases = TYPE_N_BASECLASSES (type);
|
||||||
|
@ -1498,8 +1500,8 @@ gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
|
||||||
it operates on; we use them in error messages. */
|
it operates on; we use them in error messages. */
|
||||||
static void
|
static void
|
||||||
gen_struct_ref (struct expression *exp, struct agent_expr *ax,
|
gen_struct_ref (struct expression *exp, struct agent_expr *ax,
|
||||||
struct axs_value *value, char *field,
|
struct axs_value *value, const char *field,
|
||||||
char *operator_name, char *operand_name)
|
const char *operator_name, const char *operand_name)
|
||||||
{
|
{
|
||||||
struct type *type;
|
struct type *type;
|
||||||
int found;
|
int found;
|
||||||
|
@ -1671,7 +1673,8 @@ static int
|
||||||
gen_aggregate_elt_ref (struct expression *exp,
|
gen_aggregate_elt_ref (struct expression *exp,
|
||||||
struct agent_expr *ax, struct axs_value *value,
|
struct agent_expr *ax, struct axs_value *value,
|
||||||
struct type *type, char *field,
|
struct type *type, char *field,
|
||||||
char *operator_name, char *operand_name)
|
const char *operator_name,
|
||||||
|
const char *operand_name)
|
||||||
{
|
{
|
||||||
switch (TYPE_CODE (type))
|
switch (TYPE_CODE (type))
|
||||||
{
|
{
|
||||||
|
|
|
@ -356,7 +356,7 @@ print_percentage (int portion, int total)
|
||||||
BCACHE holds. Statistics are printed using `printf_filtered' and
|
BCACHE holds. Statistics are printed using `printf_filtered' and
|
||||||
its ilk. */
|
its ilk. */
|
||||||
void
|
void
|
||||||
print_bcache_statistics (struct bcache *c, char *type)
|
print_bcache_statistics (struct bcache *c, const char *type)
|
||||||
{
|
{
|
||||||
int occupied_buckets;
|
int occupied_buckets;
|
||||||
int max_chain_length;
|
int max_chain_length;
|
||||||
|
|
|
@ -165,7 +165,7 @@ extern struct bcache *bcache_xmalloc (
|
||||||
eliminating duplication. TYPE should be a string describing the
|
eliminating duplication. TYPE should be a string describing the
|
||||||
kind of data BCACHE holds. Statistics are printed using
|
kind of data BCACHE holds. Statistics are printed using
|
||||||
`printf_filtered' and its ilk. */
|
`printf_filtered' and its ilk. */
|
||||||
extern void print_bcache_statistics (struct bcache *bcache, char *type);
|
extern void print_bcache_statistics (struct bcache *bcache, const char *type);
|
||||||
extern int bcache_memory_used (struct bcache *bcache);
|
extern int bcache_memory_used (struct bcache *bcache);
|
||||||
|
|
||||||
/* The hash functions */
|
/* The hash functions */
|
||||||
|
|
|
@ -6215,7 +6215,7 @@ bptype_string (enum bptype type)
|
||||||
struct ep_type_description
|
struct ep_type_description
|
||||||
{
|
{
|
||||||
enum bptype type;
|
enum bptype type;
|
||||||
char *description;
|
const char *description;
|
||||||
};
|
};
|
||||||
static struct ep_type_description bptypes[] =
|
static struct ep_type_description bptypes[] =
|
||||||
{
|
{
|
||||||
|
@ -8507,7 +8507,7 @@ static struct breakpoint_ops catch_solib_breakpoint_ops;
|
||||||
created in an enabled state. */
|
created in an enabled state. */
|
||||||
|
|
||||||
void
|
void
|
||||||
add_solib_catchpoint (char *arg, int is_load, int is_temp, int enabled)
|
add_solib_catchpoint (const char *arg, int is_load, int is_temp, int enabled)
|
||||||
{
|
{
|
||||||
struct solib_catchpoint *c;
|
struct solib_catchpoint *c;
|
||||||
struct gdbarch *gdbarch = get_current_arch ();
|
struct gdbarch *gdbarch = get_current_arch ();
|
||||||
|
@ -8515,7 +8515,7 @@ add_solib_catchpoint (char *arg, int is_load, int is_temp, int enabled)
|
||||||
|
|
||||||
if (!arg)
|
if (!arg)
|
||||||
arg = "";
|
arg = "";
|
||||||
arg = skip_spaces (arg);
|
arg = skip_spaces_const (arg);
|
||||||
|
|
||||||
c = new solib_catchpoint ();
|
c = new solib_catchpoint ();
|
||||||
cleanup = make_cleanup (xfree, c);
|
cleanup = make_cleanup (xfree, c);
|
||||||
|
@ -15857,7 +15857,7 @@ static struct cmd_list_element *catch_cmdlist;
|
||||||
static struct cmd_list_element *tcatch_cmdlist;
|
static struct cmd_list_element *tcatch_cmdlist;
|
||||||
|
|
||||||
void
|
void
|
||||||
add_catch_command (char *name, char *docstring,
|
add_catch_command (const char *name, const char *docstring,
|
||||||
cmd_sfunc_ftype *sfunc,
|
cmd_sfunc_ftype *sfunc,
|
||||||
completer_ftype *completer,
|
completer_ftype *completer,
|
||||||
void *user_data_catch,
|
void *user_data_catch,
|
||||||
|
|
|
@ -1275,7 +1275,7 @@ extern void initialize_breakpoint_ops (void);
|
||||||
function. */
|
function. */
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
add_catch_command (char *name, char *docstring,
|
add_catch_command (const char *name, const char *docstring,
|
||||||
cmd_sfunc_ftype *sfunc,
|
cmd_sfunc_ftype *sfunc,
|
||||||
completer_ftype *completer,
|
completer_ftype *completer,
|
||||||
void *user_data_catch,
|
void *user_data_catch,
|
||||||
|
@ -1517,7 +1517,7 @@ extern int is_catchpoint (struct breakpoint *);
|
||||||
|
|
||||||
/* Shared helper function (MI and CLI) for creating and installing
|
/* Shared helper function (MI and CLI) for creating and installing
|
||||||
a shared object event catchpoint. */
|
a shared object event catchpoint. */
|
||||||
extern void add_solib_catchpoint (char *arg, int is_load, int is_temp,
|
extern void add_solib_catchpoint (const char *arg, int is_load, int is_temp,
|
||||||
int enabled);
|
int enabled);
|
||||||
|
|
||||||
/* Enable breakpoints and delete when hit. Called with ARG == NULL
|
/* Enable breakpoints and delete when hit. Called with ARG == NULL
|
||||||
|
|
|
@ -464,7 +464,7 @@ bsd_uthread_update_thread_list (struct target_ops *ops)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Possible states a thread can be in. */
|
/* Possible states a thread can be in. */
|
||||||
static char *bsd_uthread_state[] =
|
static const char *bsd_uthread_state[] =
|
||||||
{
|
{
|
||||||
"RUNNING",
|
"RUNNING",
|
||||||
"SIGTHREAD",
|
"SIGTHREAD",
|
||||||
|
|
|
@ -825,7 +825,7 @@ free_buildsym_compunit (void)
|
||||||
directory name actually is (by checking for a trailing '/'). */
|
directory name actually is (by checking for a trailing '/'). */
|
||||||
|
|
||||||
void
|
void
|
||||||
patch_subfile_names (struct subfile *subfile, char *name)
|
patch_subfile_names (struct subfile *subfile, const char *name)
|
||||||
{
|
{
|
||||||
if (subfile != NULL
|
if (subfile != NULL
|
||||||
&& buildsym_compunit->comp_dir == NULL
|
&& buildsym_compunit->comp_dir == NULL
|
||||||
|
|
|
@ -194,7 +194,7 @@ typedef void (record_line_ftype) (struct subfile *subfile, int line,
|
||||||
|
|
||||||
/* Function to invoke get the next symbol. Return the symbol name. */
|
/* Function to invoke get the next symbol. Return the symbol name. */
|
||||||
|
|
||||||
EXTERN char *(*next_symbol_text_func) (struct objfile *);
|
EXTERN const char *(*next_symbol_text_func) (struct objfile *);
|
||||||
|
|
||||||
extern void add_symbol_to_list (struct symbol *symbol,
|
extern void add_symbol_to_list (struct symbol *symbol,
|
||||||
struct pending **listhead);
|
struct pending **listhead);
|
||||||
|
@ -216,7 +216,7 @@ extern void really_free_pendings (void *dummy);
|
||||||
|
|
||||||
extern void start_subfile (const char *name);
|
extern void start_subfile (const char *name);
|
||||||
|
|
||||||
extern void patch_subfile_names (struct subfile *subfile, char *name);
|
extern void patch_subfile_names (struct subfile *subfile, const char *name);
|
||||||
|
|
||||||
extern void push_subfile (void);
|
extern void push_subfile (void);
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
static int type_aggregate_p (struct type *);
|
static int type_aggregate_p (struct type *);
|
||||||
|
|
||||||
|
@ -2217,7 +2217,7 @@ DEF_ENUM_FLAGS_TYPE (enum token_flag, token_flags);
|
||||||
|
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
char *oper;
|
const char *oper;
|
||||||
int token;
|
int token;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
token_flags flags;
|
token_flags flags;
|
||||||
|
@ -3265,7 +3265,7 @@ c_print_token (FILE *file, int type, YYSTYPE value)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (prev_lexptr)
|
if (prev_lexptr)
|
||||||
lexptr = prev_lexptr;
|
lexptr = prev_lexptr;
|
||||||
|
|
|
@ -63,7 +63,7 @@ DEF_ENUM_FLAGS_TYPE (enum c_string_type_values, c_string_type);
|
||||||
|
|
||||||
extern int c_parse (struct parser_state *);
|
extern int c_parse (struct parser_state *);
|
||||||
|
|
||||||
extern void c_yyerror (char *);
|
extern void c_yyerror (const char *);
|
||||||
|
|
||||||
extern int c_parse_escape (const char **, struct obstack *);
|
extern int c_parse_escape (const char **, struct obstack *);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ extern void c_type_print_base (struct type *, struct ui_file *,
|
||||||
/* These are in cp-valprint.c */
|
/* These are in cp-valprint.c */
|
||||||
|
|
||||||
extern void cp_print_class_member (const gdb_byte *, struct type *,
|
extern void cp_print_class_member (const gdb_byte *, struct type *,
|
||||||
struct ui_file *, char *);
|
struct ui_file *, const char *);
|
||||||
|
|
||||||
extern void cp_print_value_fields (struct type *, struct type *,
|
extern void cp_print_value_fields (struct type *, struct type *,
|
||||||
LONGEST, CORE_ADDR,
|
LONGEST, CORE_ADDR,
|
||||||
|
|
|
@ -843,7 +843,7 @@ cplus_describe_child (const struct varobj *parent, int index,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *access = NULL;
|
const char *access = NULL;
|
||||||
int children[3];
|
int children[3];
|
||||||
|
|
||||||
cplus_class_num_children (type, children);
|
cplus_class_num_children (type, children);
|
||||||
|
|
|
@ -706,7 +706,11 @@ static VEC (char_ptr) *charsets;
|
||||||
static void
|
static void
|
||||||
find_charset_names (void)
|
find_charset_names (void)
|
||||||
{
|
{
|
||||||
VEC_safe_push (char_ptr, charsets, GDB_DEFAULT_HOST_CHARSET);
|
/* Cast is fine here, because CHARSETS is never released. Note that
|
||||||
|
the vec does not hold "const char *" pointers instead of "char *"
|
||||||
|
because the non-phony version stores heap-allocated strings in
|
||||||
|
it. */
|
||||||
|
VEC_safe_push (char_ptr, charsets, (char *) GDB_DEFAULT_HOST_CHARSET);
|
||||||
VEC_safe_push (char_ptr, charsets, NULL);
|
VEC_safe_push (char_ptr, charsets, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -775,7 +779,7 @@ static void
|
||||||
find_charset_names (void)
|
find_charset_names (void)
|
||||||
{
|
{
|
||||||
struct pex_obj *child;
|
struct pex_obj *child;
|
||||||
char *args[3];
|
const char *args[3];
|
||||||
int err, status;
|
int err, status;
|
||||||
int fail = 1;
|
int fail = 1;
|
||||||
int flags;
|
int flags;
|
||||||
|
@ -811,7 +815,8 @@ find_charset_names (void)
|
||||||
#endif
|
#endif
|
||||||
/* Note that we simply ignore errors here. */
|
/* Note that we simply ignore errors here. */
|
||||||
if (!pex_run_in_environment (child, flags,
|
if (!pex_run_in_environment (child, flags,
|
||||||
args[0], args, environ_vector (iconv_env),
|
args[0], const_cast<char **> (args),
|
||||||
|
environ_vector (iconv_env),
|
||||||
NULL, NULL, &err))
|
NULL, NULL, &err))
|
||||||
{
|
{
|
||||||
FILE *in = pex_read_output (child, 0);
|
FILE *in = pex_read_output (child, 0);
|
||||||
|
|
|
@ -242,10 +242,11 @@ help_command (char *command, int from_tty)
|
||||||
[Is that why this function writes output with *_unfiltered?] */
|
[Is that why this function writes output with *_unfiltered?] */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
complete_command (char *arg, int from_tty)
|
complete_command (char *arg_entry, int from_tty)
|
||||||
{
|
{
|
||||||
|
const char *arg = arg_entry;
|
||||||
int argpoint;
|
int argpoint;
|
||||||
char *point, *arg_prefix;
|
char *arg_prefix;
|
||||||
VEC (char_ptr) *completions;
|
VEC (char_ptr) *completions;
|
||||||
|
|
||||||
dont_repeat ();
|
dont_repeat ();
|
||||||
|
@ -270,7 +271,7 @@ complete_command (char *arg, int from_tty)
|
||||||
within, and except for filenames at the beginning of, the word to
|
within, and except for filenames at the beginning of, the word to
|
||||||
be completed. The following crude imitation of readline's
|
be completed. The following crude imitation of readline's
|
||||||
word-breaking tries to accomodate this. */
|
word-breaking tries to accomodate this. */
|
||||||
point = arg + argpoint;
|
const char *point = arg + argpoint;
|
||||||
while (point > arg)
|
while (point > arg)
|
||||||
{
|
{
|
||||||
if (strchr (rl_completer_word_break_characters, point[-1]) != 0)
|
if (strchr (rl_completer_word_break_characters, point[-1]) != 0)
|
||||||
|
@ -392,10 +393,7 @@ cd_command (char *dir, int from_tty)
|
||||||
repeat might be useful but is more likely to be a mistake. */
|
repeat might be useful but is more likely to be a mistake. */
|
||||||
dont_repeat ();
|
dont_repeat ();
|
||||||
|
|
||||||
if (dir == 0)
|
dir = tilde_expand (dir != NULL ? dir : "~");
|
||||||
dir = "~";
|
|
||||||
|
|
||||||
dir = tilde_expand (dir);
|
|
||||||
cleanup = make_cleanup (xfree, dir);
|
cleanup = make_cleanup (xfree, dir);
|
||||||
|
|
||||||
if (chdir (dir) < 0)
|
if (chdir (dir) < 0)
|
||||||
|
@ -809,7 +807,7 @@ edit_command (char *arg, int from_tty)
|
||||||
struct symtabs_and_lines sals;
|
struct symtabs_and_lines sals;
|
||||||
struct symtab_and_line sal;
|
struct symtab_and_line sal;
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
char *editor;
|
const char *editor;
|
||||||
char *p;
|
char *p;
|
||||||
const char *fn;
|
const char *fn;
|
||||||
|
|
||||||
|
|
|
@ -1479,7 +1479,8 @@ undef_cmd_error (const char *cmdtype, const char *q)
|
||||||
the function field of the struct cmd_list_element is 0). */
|
the function field of the struct cmd_list_element is 0). */
|
||||||
|
|
||||||
struct cmd_list_element *
|
struct cmd_list_element *
|
||||||
lookup_cmd (const char **line, struct cmd_list_element *list, char *cmdtype,
|
lookup_cmd (const char **line, struct cmd_list_element *list,
|
||||||
|
const char *cmdtype,
|
||||||
int allow_unknown, int ignore_help_classes)
|
int allow_unknown, int ignore_help_classes)
|
||||||
{
|
{
|
||||||
struct cmd_list_element *last_list = 0;
|
struct cmd_list_element *last_list = 0;
|
||||||
|
|
|
@ -247,7 +247,7 @@ dump_memory_to_file (const char *cmd, const char *mode, const char *file_format)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_memory_command (char *cmd, char *mode)
|
dump_memory_command (char *cmd, const char *mode)
|
||||||
{
|
{
|
||||||
dump_memory_to_file (cmd, mode, "binary");
|
dump_memory_to_file (cmd, mode, "binary");
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ dump_value_to_file (const char *cmd, const char *mode, const char *file_format)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_value_command (char *cmd, char *mode)
|
dump_value_command (char *cmd, const char *mode)
|
||||||
{
|
{
|
||||||
dump_value_to_file (cmd, mode, "binary");
|
dump_value_to_file (cmd, mode, "binary");
|
||||||
}
|
}
|
||||||
|
@ -377,8 +377,8 @@ append_binary_value (char *args, int from_tty)
|
||||||
|
|
||||||
struct dump_context
|
struct dump_context
|
||||||
{
|
{
|
||||||
void (*func) (char *cmd, char *mode);
|
void (*func) (char *cmd, const char *mode);
|
||||||
char *mode;
|
const char *mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -390,8 +390,9 @@ call_dump_func (struct cmd_list_element *c, char *args, int from_tty)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_dump_command (char *name, void (*func) (char *args, char *mode),
|
add_dump_command (const char *name,
|
||||||
char *descr)
|
void (*func) (char *args, const char *mode),
|
||||||
|
const char *descr)
|
||||||
|
|
||||||
{
|
{
|
||||||
struct cmd_list_element *c;
|
struct cmd_list_element *c;
|
||||||
|
@ -576,7 +577,7 @@ restore_command (char *args_in, int from_tty)
|
||||||
filename = scan_filename_with_cleanup (&args, NULL);
|
filename = scan_filename_with_cleanup (&args, NULL);
|
||||||
if (args != NULL && *args != '\0')
|
if (args != NULL && *args != '\0')
|
||||||
{
|
{
|
||||||
char *binary_string = "binary";
|
static const char binary_string[] = "binary";
|
||||||
|
|
||||||
/* Look for optional "binary" flag. */
|
/* Look for optional "binary" flag. */
|
||||||
if (startswith (args, binary_string))
|
if (startswith (args, binary_string))
|
||||||
|
|
|
@ -166,7 +166,7 @@ build_command_line (enum command_control_type type, const char *args)
|
||||||
such as "if" and "while". */
|
such as "if" and "while". */
|
||||||
|
|
||||||
struct command_line *
|
struct command_line *
|
||||||
get_command_line (enum command_control_type type, char *arg)
|
get_command_line (enum command_control_type type, const char *arg)
|
||||||
{
|
{
|
||||||
struct command_line *cmd;
|
struct command_line *cmd;
|
||||||
struct cleanup *old_chain = NULL;
|
struct cleanup *old_chain = NULL;
|
||||||
|
|
|
@ -39,7 +39,7 @@ extern enum command_control_type
|
||||||
execute_control_command_untraced (struct command_line *cmd);
|
execute_control_command_untraced (struct command_line *cmd);
|
||||||
|
|
||||||
extern struct command_line *get_command_line (enum command_control_type,
|
extern struct command_line *get_command_line (enum command_control_type,
|
||||||
char *);
|
const char *);
|
||||||
|
|
||||||
extern void print_command_lines (struct ui_out *,
|
extern void print_command_lines (struct ui_out *,
|
||||||
struct command_line *, unsigned int);
|
struct command_line *, unsigned int);
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct read_pe_section_data
|
||||||
enum minimal_symbol_type ms_type; /* Type to assign symbols in
|
enum minimal_symbol_type ms_type; /* Type to assign symbols in
|
||||||
section. */
|
section. */
|
||||||
unsigned int index; /* BFD section number. */
|
unsigned int index; /* BFD section number. */
|
||||||
char *section_name; /* Recorded section name. */
|
const char *section_name; /* Recorded section name. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IMAGE_SCN_CNT_CODE 0x20
|
#define IMAGE_SCN_CNT_CODE 0x20
|
||||||
|
|
|
@ -204,7 +204,8 @@ extern enum cmd_types cmd_type (struct cmd_list_element *cmd);
|
||||||
#define CMD_LIST_AMBIGUOUS ((struct cmd_list_element *) -1)
|
#define CMD_LIST_AMBIGUOUS ((struct cmd_list_element *) -1)
|
||||||
|
|
||||||
extern struct cmd_list_element *lookup_cmd (const char **,
|
extern struct cmd_list_element *lookup_cmd (const char **,
|
||||||
struct cmd_list_element *, char *,
|
struct cmd_list_element *,
|
||||||
|
const char *,
|
||||||
int, int);
|
int, int);
|
||||||
|
|
||||||
extern struct cmd_list_element *lookup_cmd_1 (const char **,
|
extern struct cmd_list_element *lookup_cmd_1 (const char **,
|
||||||
|
|
|
@ -38,7 +38,7 @@ get_print_cell (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
decimal2str (char *sign, ULONGEST addr, int width)
|
decimal2str (const char *sign, ULONGEST addr, int width)
|
||||||
{
|
{
|
||||||
/* Steal code from valprint.c:print_decimal(). Should this worry
|
/* Steal code from valprint.c:print_decimal(). Should this worry
|
||||||
about the real size of addr as the above does? */
|
about the real size of addr as the above does? */
|
||||||
|
|
|
@ -1684,7 +1684,8 @@ gdb_print_filename (char *to_print, char *full_pathname, int prefix_bytes,
|
||||||
const struct match_list_displayer *displayer)
|
const struct match_list_displayer *displayer)
|
||||||
{
|
{
|
||||||
int printed_len, extension_char, slen, tlen;
|
int printed_len, extension_char, slen, tlen;
|
||||||
char *s, c, *new_full_pathname, *dn;
|
char *s, c, *new_full_pathname;
|
||||||
|
const char *dn;
|
||||||
extern int _rl_complete_mark_directories;
|
extern int _rl_complete_mark_directories;
|
||||||
|
|
||||||
extension_char = 0;
|
extension_char = 0;
|
||||||
|
|
|
@ -509,7 +509,7 @@ complete_set_gnutarget (struct cmd_list_element *cmd,
|
||||||
|
|
||||||
/* Set the gnutarget. */
|
/* Set the gnutarget. */
|
||||||
void
|
void
|
||||||
set_gnutarget (char *newtarget)
|
set_gnutarget (const char *newtarget)
|
||||||
{
|
{
|
||||||
if (gnutarget_string != NULL)
|
if (gnutarget_string != NULL)
|
||||||
xfree (gnutarget_string);
|
xfree (gnutarget_string);
|
||||||
|
|
|
@ -173,7 +173,7 @@ static struct demangle_component *d_binary (const char *,
|
||||||
|
|
||||||
int yyparse (void);
|
int yyparse (void);
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
static void yyerror (char *);
|
static void yyerror (const char *);
|
||||||
|
|
||||||
/* Enable yydebug for the stand-alone parser. */
|
/* Enable yydebug for the stand-alone parser. */
|
||||||
#ifdef TEST_CPNAMES
|
#ifdef TEST_CPNAMES
|
||||||
|
@ -1934,7 +1934,7 @@ yylex (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (global_errmsg)
|
if (global_errmsg)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -759,7 +759,7 @@ cp_find_class_member (struct type **self_p, int *fieldno,
|
||||||
|
|
||||||
void
|
void
|
||||||
cp_print_class_member (const gdb_byte *valaddr, struct type *type,
|
cp_print_class_member (const gdb_byte *valaddr, struct type *type,
|
||||||
struct ui_file *stream, char *prefix)
|
struct ui_file *stream, const char *prefix)
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
|
enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
|
||||||
|
|
||||||
|
|
|
@ -1695,7 +1695,7 @@ cris_special_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
static const char *
|
static const char *
|
||||||
cris_register_name (struct gdbarch *gdbarch, int regno)
|
cris_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
static char *cris_genreg_names[] =
|
static const char *cris_genreg_names[] =
|
||||||
{ "r0", "r1", "r2", "r3", \
|
{ "r0", "r1", "r2", "r3", \
|
||||||
"r4", "r5", "r6", "r7", \
|
"r4", "r5", "r6", "r7", \
|
||||||
"r8", "r9", "r10", "r11", \
|
"r8", "r9", "r10", "r11", \
|
||||||
|
@ -1720,14 +1720,14 @@ cris_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
static const char *
|
static const char *
|
||||||
crisv32_register_name (struct gdbarch *gdbarch, int regno)
|
crisv32_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
static char *crisv32_genreg_names[] =
|
static const char *crisv32_genreg_names[] =
|
||||||
{ "r0", "r1", "r2", "r3", \
|
{ "r0", "r1", "r2", "r3", \
|
||||||
"r4", "r5", "r6", "r7", \
|
"r4", "r5", "r6", "r7", \
|
||||||
"r8", "r9", "r10", "r11", \
|
"r8", "r9", "r10", "r11", \
|
||||||
"r12", "r13", "sp", "acr"
|
"r12", "r13", "sp", "acr"
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *crisv32_sreg_names[] =
|
static const char *crisv32_sreg_names[] =
|
||||||
{ "s0", "s1", "s2", "s3", \
|
{ "s0", "s1", "s2", "s3", \
|
||||||
"s4", "s5", "s6", "s7", \
|
"s4", "s5", "s6", "s7", \
|
||||||
"s8", "s9", "s10", "s11", \
|
"s8", "s9", "s10", "s11", \
|
||||||
|
|
|
@ -69,7 +69,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
static int type_aggregate_p (struct type *);
|
static int type_aggregate_p (struct type *);
|
||||||
|
|
||||||
|
@ -957,7 +957,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
|
||||||
|
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
char *oper;
|
const char *oper;
|
||||||
int token;
|
int token;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
};
|
};
|
||||||
|
@ -1648,7 +1648,7 @@ d_parse (struct parser_state *par_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (prev_lexptr)
|
if (prev_lexptr)
|
||||||
lexptr = prev_lexptr;
|
lexptr = prev_lexptr;
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct builtin_d_type
|
||||||
|
|
||||||
extern int d_parse (struct parser_state *);
|
extern int d_parse (struct parser_state *);
|
||||||
|
|
||||||
extern void d_yyerror (char *);
|
extern void d_yyerror (const char *);
|
||||||
|
|
||||||
/* Defined in d-lang.c */
|
/* Defined in d-lang.c */
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,7 @@ find_text_range (bfd * sym_bfd, struct objfile *objfile)
|
||||||
|
|
||||||
struct header_file_location
|
struct header_file_location
|
||||||
{
|
{
|
||||||
char *name; /* Name of header file */
|
const char *name; /* Name of header file */
|
||||||
int instance; /* See above */
|
int instance; /* See above */
|
||||||
struct partial_symtab *pst; /* Partial symtab that has the
|
struct partial_symtab *pst; /* Partial symtab that has the
|
||||||
BINCL/EINCL defs for this file. */
|
BINCL/EINCL defs for this file. */
|
||||||
|
@ -262,13 +262,14 @@ static void read_dbx_symtab (minimal_symbol_reader &, struct objfile *);
|
||||||
|
|
||||||
static void free_bincl_list (struct objfile *);
|
static void free_bincl_list (struct objfile *);
|
||||||
|
|
||||||
static struct partial_symtab *find_corresponding_bincl_psymtab (char *, int);
|
static struct partial_symtab *find_corresponding_bincl_psymtab (const char *,
|
||||||
|
int);
|
||||||
|
|
||||||
static void add_bincl_to_list (struct partial_symtab *, char *, int);
|
static void add_bincl_to_list (struct partial_symtab *, const char *, int);
|
||||||
|
|
||||||
static void init_bincl_list (int, struct objfile *);
|
static void init_bincl_list (int, struct objfile *);
|
||||||
|
|
||||||
static char *dbx_next_symbol_text (struct objfile *);
|
static const char *dbx_next_symbol_text (struct objfile *);
|
||||||
|
|
||||||
static void fill_symbuf (bfd *);
|
static void fill_symbuf (bfd *);
|
||||||
|
|
||||||
|
@ -284,13 +285,13 @@ static void record_minimal_symbol (minimal_symbol_reader &,
|
||||||
const char *, CORE_ADDR, int,
|
const char *, CORE_ADDR, int,
|
||||||
struct objfile *);
|
struct objfile *);
|
||||||
|
|
||||||
static void add_new_header_file (char *, int);
|
static void add_new_header_file (const char *, int);
|
||||||
|
|
||||||
static void add_old_header_file (char *, int);
|
static void add_old_header_file (const char *, int);
|
||||||
|
|
||||||
static void add_this_object_header_file (int);
|
static void add_this_object_header_file (int);
|
||||||
|
|
||||||
static struct partial_symtab *start_psymtab (struct objfile *, char *,
|
static struct partial_symtab *start_psymtab (struct objfile *, const char *,
|
||||||
CORE_ADDR, int,
|
CORE_ADDR, int,
|
||||||
struct partial_symbol **,
|
struct partial_symbol **,
|
||||||
struct partial_symbol **);
|
struct partial_symbol **);
|
||||||
|
@ -340,7 +341,7 @@ add_this_object_header_file (int i)
|
||||||
symbol tables for the same header file. */
|
symbol tables for the same header file. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_old_header_file (char *name, int instance)
|
add_old_header_file (const char *name, int instance)
|
||||||
{
|
{
|
||||||
struct header_file *p = HEADER_FILES (dbxread_objfile);
|
struct header_file *p = HEADER_FILES (dbxread_objfile);
|
||||||
int i;
|
int i;
|
||||||
|
@ -366,7 +367,7 @@ add_old_header_file (char *name, int instance)
|
||||||
so we record the file when its "begin" is seen and ignore the "end". */
|
so we record the file when its "begin" is seen and ignore the "end". */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_new_header_file (char *name, int instance)
|
add_new_header_file (const char *name, int instance)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct header_file *hfile;
|
struct header_file *hfile;
|
||||||
|
@ -734,7 +735,7 @@ static int symbuf_end;
|
||||||
|
|
||||||
/* Name of last function encountered. Used in Solaris to approximate
|
/* Name of last function encountered. Used in Solaris to approximate
|
||||||
object file boundaries. */
|
object file boundaries. */
|
||||||
static char *last_function_name;
|
static const char *last_function_name;
|
||||||
|
|
||||||
/* The address in memory of the string table of the object file we are
|
/* The address in memory of the string table of the object file we are
|
||||||
reading (which might not be the "main" object file, but might be a
|
reading (which might not be the "main" object file, but might be a
|
||||||
|
@ -842,7 +843,7 @@ stabs_seek (int sym_offset)
|
||||||
(a \ at the end of the text of a name)
|
(a \ at the end of the text of a name)
|
||||||
call this function to get the continuation. */
|
call this function to get the continuation. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
dbx_next_symbol_text (struct objfile *objfile)
|
dbx_next_symbol_text (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
struct internal_nlist nlist;
|
struct internal_nlist nlist;
|
||||||
|
@ -873,7 +874,7 @@ init_bincl_list (int number, struct objfile *objfile)
|
||||||
/* Add a bincl to the list. */
|
/* Add a bincl to the list. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_bincl_to_list (struct partial_symtab *pst, char *name, int instance)
|
add_bincl_to_list (struct partial_symtab *pst, const char *name, int instance)
|
||||||
{
|
{
|
||||||
if (next_bincl >= bincl_list + bincls_allocated)
|
if (next_bincl >= bincl_list + bincls_allocated)
|
||||||
{
|
{
|
||||||
|
@ -895,7 +896,7 @@ add_bincl_to_list (struct partial_symtab *pst, char *name, int instance)
|
||||||
with that header_file_location. */
|
with that header_file_location. */
|
||||||
|
|
||||||
static struct partial_symtab *
|
static struct partial_symtab *
|
||||||
find_corresponding_bincl_psymtab (char *name, int instance)
|
find_corresponding_bincl_psymtab (const char *name, int instance)
|
||||||
{
|
{
|
||||||
struct header_file_location *bincl;
|
struct header_file_location *bincl;
|
||||||
|
|
||||||
|
@ -933,10 +934,10 @@ make_cleanup_free_bincl_list (struct objfile *objfile)
|
||||||
give a fake name, and print a single error message per symbol file read,
|
give a fake name, and print a single error message per symbol file read,
|
||||||
rather than abort the symbol reading or flood the user with messages. */
|
rather than abort the symbol reading or flood the user with messages. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
|
set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
|
||||||
{
|
{
|
||||||
char *namestring;
|
const char *namestring;
|
||||||
|
|
||||||
if (nlist->n_strx + file_string_table_offset
|
if (nlist->n_strx + file_string_table_offset
|
||||||
>= DBX_STRINGTAB_SIZE (objfile)
|
>= DBX_STRINGTAB_SIZE (objfile)
|
||||||
|
@ -954,18 +955,19 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
find_stab_function_addr (char *namestring, const char *filename,
|
find_stab_function_addr (const char *namestring, const char *filename,
|
||||||
struct objfile *objfile)
|
struct objfile *objfile)
|
||||||
{
|
{
|
||||||
struct bound_minimal_symbol msym;
|
struct bound_minimal_symbol msym;
|
||||||
char *p;
|
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
p = strchr (namestring, ':');
|
const char *colon = strchr (namestring, ':');
|
||||||
if (p == NULL)
|
if (colon == NULL)
|
||||||
p = namestring;
|
n = 0;
|
||||||
n = p - namestring;
|
else
|
||||||
p = (char *) alloca (n + 2);
|
n = colon - namestring;
|
||||||
|
|
||||||
|
char *p = (char *) alloca (n + 2);
|
||||||
strncpy (p, namestring, n);
|
strncpy (p, namestring, n);
|
||||||
p[n] = 0;
|
p[n] = 0;
|
||||||
|
|
||||||
|
@ -1017,10 +1019,10 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
||||||
struct internal_nlist nlist;
|
struct internal_nlist nlist;
|
||||||
CORE_ADDR text_addr;
|
CORE_ADDR text_addr;
|
||||||
int text_size;
|
int text_size;
|
||||||
char *sym_name;
|
const char *sym_name;
|
||||||
int sym_len;
|
int sym_len;
|
||||||
|
|
||||||
char *namestring;
|
const char *namestring;
|
||||||
int nsl;
|
int nsl;
|
||||||
int past_first_source_file = 0;
|
int past_first_source_file = 0;
|
||||||
CORE_ADDR last_function_start = 0;
|
CORE_ADDR last_function_start = 0;
|
||||||
|
@ -1283,7 +1285,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
||||||
static int prev_so_symnum = -10;
|
static int prev_so_symnum = -10;
|
||||||
static int first_so_symnum;
|
static int first_so_symnum;
|
||||||
const char *p;
|
const char *p;
|
||||||
static char *dirname_nso;
|
static const char *dirname_nso;
|
||||||
int prev_textlow_not_set;
|
int prev_textlow_not_set;
|
||||||
|
|
||||||
valu = nlist.n_value + ANOFFSET (objfile->section_offsets,
|
valu = nlist.n_value + ANOFFSET (objfile->section_offsets,
|
||||||
|
@ -1477,7 +1479,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
||||||
case N_M2C: /* I suspect that I can ignore this here. */
|
case N_M2C: /* I suspect that I can ignore this here. */
|
||||||
case N_SCOPE: /* Same. */
|
case N_SCOPE: /* Same. */
|
||||||
{
|
{
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
namestring = set_namestring (objfile, &nlist);
|
namestring = set_namestring (objfile, &nlist);
|
||||||
|
|
||||||
|
@ -1631,7 +1633,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
||||||
Accept either. */
|
Accept either. */
|
||||||
while (*p && *p != ';' && *p != ',')
|
while (*p && *p != ';' && *p != ',')
|
||||||
{
|
{
|
||||||
char *q;
|
const char *q;
|
||||||
|
|
||||||
/* Check for and handle cretinous dbx symbol name
|
/* Check for and handle cretinous dbx symbol name
|
||||||
continuation! */
|
continuation! */
|
||||||
|
@ -1996,7 +1998,7 @@ read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
|
||||||
(normal). */
|
(normal). */
|
||||||
|
|
||||||
static struct partial_symtab *
|
static struct partial_symtab *
|
||||||
start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
|
start_psymtab (struct objfile *objfile, const char *filename, CORE_ADDR textlow,
|
||||||
int ldsymoff, struct partial_symbol **global_syms,
|
int ldsymoff, struct partial_symbol **global_syms,
|
||||||
struct partial_symbol **static_syms)
|
struct partial_symbol **static_syms)
|
||||||
{
|
{
|
||||||
|
@ -2057,15 +2059,15 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
|
||||||
if (pst->texthigh == 0 && last_function_name
|
if (pst->texthigh == 0 && last_function_name
|
||||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
{
|
{
|
||||||
char *p;
|
|
||||||
int n;
|
int n;
|
||||||
struct bound_minimal_symbol minsym;
|
struct bound_minimal_symbol minsym;
|
||||||
|
|
||||||
p = strchr (last_function_name, ':');
|
const char *colon = strchr (last_function_name, ':');
|
||||||
if (p == NULL)
|
if (colon == NULL)
|
||||||
p = last_function_name;
|
n = 0;
|
||||||
n = p - last_function_name;
|
else
|
||||||
p = (char *) alloca (n + 2);
|
n = colon - last_function_name;
|
||||||
|
char *p = (char *) alloca (n + 2);
|
||||||
strncpy (p, last_function_name, n);
|
strncpy (p, last_function_name, n);
|
||||||
p[n] = 0;
|
p[n] = 0;
|
||||||
|
|
||||||
|
@ -2293,7 +2295,7 @@ dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
|
||||||
static void
|
static void
|
||||||
read_ofile_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
read_ofile_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||||
{
|
{
|
||||||
char *namestring;
|
const char *namestring;
|
||||||
struct external_nlist *bufp;
|
struct external_nlist *bufp;
|
||||||
struct internal_nlist nlist;
|
struct internal_nlist nlist;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
|
@ -2499,7 +2501,7 @@ cp_set_block_scope (const struct symbol *symbol,
|
||||||
is used in end_symtab. */
|
is used in end_symtab. */
|
||||||
|
|
||||||
void
|
void
|
||||||
process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
|
||||||
const struct section_offsets *section_offsets,
|
const struct section_offsets *section_offsets,
|
||||||
struct objfile *objfile)
|
struct objfile *objfile)
|
||||||
{
|
{
|
||||||
|
@ -2805,7 +2807,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||||
down ONE MORE function call level, which we really don't want
|
down ONE MORE function call level, which we really don't want
|
||||||
to do). */
|
to do). */
|
||||||
{
|
{
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
/* Normal object file and NLMs have non-zero text seg offsets,
|
/* Normal object file and NLMs have non-zero text seg offsets,
|
||||||
but don't need their static syms offset in this fashion.
|
but don't need their static syms offset in this fashion.
|
||||||
|
@ -2898,7 +2900,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||||
if (name)
|
if (name)
|
||||||
{
|
{
|
||||||
int deftype;
|
int deftype;
|
||||||
char *colon_pos = strchr (name, ':');
|
const char *colon_pos = strchr (name, ':');
|
||||||
|
|
||||||
if (colon_pos == NULL)
|
if (colon_pos == NULL)
|
||||||
deftype = '\0';
|
deftype = '\0';
|
||||||
|
@ -3021,7 +3023,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||||
definition. If a symbol reference is being defined, go ahead
|
definition. If a symbol reference is being defined, go ahead
|
||||||
and add it. Otherwise, just return. */
|
and add it. Otherwise, just return. */
|
||||||
|
|
||||||
char *s = name;
|
const char *s = name;
|
||||||
int refnum;
|
int refnum;
|
||||||
|
|
||||||
/* If this stab defines a new reference ID that is not on the
|
/* If this stab defines a new reference ID that is not on the
|
||||||
|
|
|
@ -309,7 +309,7 @@ typedef void initialize_file_ftype (void);
|
||||||
|
|
||||||
extern char *gdb_readline_wrapper (const char *);
|
extern char *gdb_readline_wrapper (const char *);
|
||||||
|
|
||||||
extern char *command_line_input (const char *, int, char *);
|
extern char *command_line_input (const char *, int, const char *);
|
||||||
|
|
||||||
extern void print_prompt (void);
|
extern void print_prompt (void);
|
||||||
|
|
||||||
|
@ -324,7 +324,8 @@ extern int info_verbose;
|
||||||
extern void set_next_address (struct gdbarch *, CORE_ADDR);
|
extern void set_next_address (struct gdbarch *, CORE_ADDR);
|
||||||
|
|
||||||
extern int print_address_symbolic (struct gdbarch *, CORE_ADDR,
|
extern int print_address_symbolic (struct gdbarch *, CORE_ADDR,
|
||||||
struct ui_file *, int, char *);
|
struct ui_file *, int,
|
||||||
|
const char *);
|
||||||
|
|
||||||
extern int build_address_symbolic (struct gdbarch *,
|
extern int build_address_symbolic (struct gdbarch *,
|
||||||
CORE_ADDR addr,
|
CORE_ADDR addr,
|
||||||
|
@ -678,7 +679,7 @@ extern int (*deprecated_query_hook) (const char *, va_list)
|
||||||
extern void (*deprecated_warning_hook) (const char *, va_list)
|
extern void (*deprecated_warning_hook) (const char *, va_list)
|
||||||
ATTRIBUTE_FPTR_PRINTF(1,0);
|
ATTRIBUTE_FPTR_PRINTF(1,0);
|
||||||
extern void (*deprecated_interactive_hook) (void);
|
extern void (*deprecated_interactive_hook) (void);
|
||||||
extern void (*deprecated_readline_begin_hook) (char *, ...)
|
extern void (*deprecated_readline_begin_hook) (const char *, ...)
|
||||||
ATTRIBUTE_FPTR_PRINTF_1;
|
ATTRIBUTE_FPTR_PRINTF_1;
|
||||||
extern char *(*deprecated_readline_hook) (const char *);
|
extern char *(*deprecated_readline_hook) (const char *);
|
||||||
extern void (*deprecated_readline_end_hook) (void);
|
extern void (*deprecated_readline_end_hook) (void);
|
||||||
|
|
|
@ -1825,7 +1825,7 @@ static const char *dwarf_attr_name (unsigned int);
|
||||||
|
|
||||||
static const char *dwarf_form_name (unsigned int);
|
static const char *dwarf_form_name (unsigned int);
|
||||||
|
|
||||||
static char *dwarf_bool_name (unsigned int);
|
static const char *dwarf_bool_name (unsigned int);
|
||||||
|
|
||||||
static const char *dwarf_type_encoding_name (unsigned int);
|
static const char *dwarf_type_encoding_name (unsigned int);
|
||||||
|
|
||||||
|
@ -19800,7 +19800,7 @@ guess_full_die_structure_name (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
prefix part in such case. See
|
prefix part in such case. See
|
||||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510. */
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
anonymous_struct_prefix (struct die_info *die, struct dwarf2_cu *cu)
|
anonymous_struct_prefix (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
{
|
{
|
||||||
struct attribute *attr;
|
struct attribute *attr;
|
||||||
|
@ -19853,7 +19853,7 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
struct die_info *parent, *spec_die;
|
struct die_info *parent, *spec_die;
|
||||||
struct dwarf2_cu *spec_cu;
|
struct dwarf2_cu *spec_cu;
|
||||||
struct type *parent_type;
|
struct type *parent_type;
|
||||||
char *retval;
|
const char *retval;
|
||||||
|
|
||||||
if (cu->language != language_cplus
|
if (cu->language != language_cplus
|
||||||
&& cu->language != language_fortran && cu->language != language_d
|
&& cu->language != language_fortran && cu->language != language_d
|
||||||
|
@ -20255,7 +20255,7 @@ dwarf_form_name (unsigned form)
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
dwarf_bool_name (unsigned mybool)
|
dwarf_bool_name (unsigned mybool)
|
||||||
{
|
{
|
||||||
if (mybool)
|
if (mybool)
|
||||||
|
|
|
@ -650,7 +650,7 @@ command_line_append_input_line (struct buffer *cmd_line_buffer, char *rl)
|
||||||
|
|
||||||
char *
|
char *
|
||||||
handle_line_of_input (struct buffer *cmd_line_buffer,
|
handle_line_of_input (struct buffer *cmd_line_buffer,
|
||||||
char *rl, int repeat, char *annotation_suffix)
|
char *rl, int repeat, const char *annotation_suffix)
|
||||||
{
|
{
|
||||||
struct ui *ui = current_ui;
|
struct ui *ui = current_ui;
|
||||||
int from_tty = ui->instream == ui->stdin_stream;
|
int from_tty = ui->instream == ui->stdin_stream;
|
||||||
|
|
|
@ -221,8 +221,8 @@ catch_exceptions_with_msg (struct ui_out *func_uiout,
|
||||||
/* This function is superseded by catch_exceptions(). */
|
/* This function is superseded by catch_exceptions(). */
|
||||||
|
|
||||||
int
|
int
|
||||||
catch_errors (catch_errors_ftype *func, void *func_args, char *errstring,
|
catch_errors (catch_errors_ftype *func, void *func_args,
|
||||||
return_mask mask)
|
const char *errstring, return_mask mask)
|
||||||
{
|
{
|
||||||
struct gdb_exception exception = exception_none;
|
struct gdb_exception exception = exception_none;
|
||||||
volatile int val = 0;
|
volatile int val = 0;
|
||||||
|
|
|
@ -86,7 +86,8 @@ extern int catch_exceptions_with_msg (struct ui_out *uiout,
|
||||||
This function is superseded by catch_exceptions(). */
|
This function is superseded by catch_exceptions(). */
|
||||||
|
|
||||||
typedef int (catch_errors_ftype) (void *);
|
typedef int (catch_errors_ftype) (void *);
|
||||||
extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
|
extern int catch_errors (catch_errors_ftype *, void *,
|
||||||
|
const char *, return_mask);
|
||||||
|
|
||||||
/* Compare two exception objects for print equality. */
|
/* Compare two exception objects for print equality. */
|
||||||
extern int exception_print_same (struct gdb_exception e1,
|
extern int exception_print_same (struct gdb_exception e1,
|
||||||
|
|
|
@ -62,7 +62,7 @@ print_subexp_standard (struct expression *exp, int *pos,
|
||||||
const struct op_print *op_print_tab;
|
const struct op_print *op_print_tab;
|
||||||
int pc;
|
int pc;
|
||||||
unsigned nargs;
|
unsigned nargs;
|
||||||
char *op_str;
|
const char *op_str;
|
||||||
int assign_modify = 0;
|
int assign_modify = 0;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
enum precedence myprec = PREC_NULL;
|
enum precedence myprec = PREC_NULL;
|
||||||
|
@ -649,7 +649,7 @@ print_subexp_standard (struct expression *exp, int *pos,
|
||||||
/* Return the operator corresponding to opcode OP as
|
/* Return the operator corresponding to opcode OP as
|
||||||
a string. NULL indicates that the opcode was not found in the
|
a string. NULL indicates that the opcode was not found in the
|
||||||
current language table. */
|
current language table. */
|
||||||
char *
|
const char *
|
||||||
op_string (enum exp_opcode op)
|
op_string (enum exp_opcode op)
|
||||||
{
|
{
|
||||||
int tem;
|
int tem;
|
||||||
|
@ -669,7 +669,7 @@ static int dump_subexp_body (struct expression *exp, struct ui_file *, int);
|
||||||
|
|
||||||
/* Name for OPCODE, when it appears in expression EXP. */
|
/* Name for OPCODE, when it appears in expression EXP. */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
op_name (struct expression *exp, enum exp_opcode opcode)
|
op_name (struct expression *exp, enum exp_opcode opcode)
|
||||||
{
|
{
|
||||||
return exp->language_defn->la_exp_desc->op_name (opcode);
|
return exp->language_defn->la_exp_desc->op_name (opcode);
|
||||||
|
@ -678,7 +678,7 @@ op_name (struct expression *exp, enum exp_opcode opcode)
|
||||||
/* Default name for the standard operator OPCODE (i.e., one defined in
|
/* Default name for the standard operator OPCODE (i.e., one defined in
|
||||||
the definition of enum exp_opcode). */
|
the definition of enum exp_opcode). */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
op_name_standard (enum exp_opcode opcode)
|
op_name_standard (enum exp_opcode opcode)
|
||||||
{
|
{
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
|
@ -703,10 +703,9 @@ op_name_standard (enum exp_opcode opcode)
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_raw_expression (struct expression *exp, struct ui_file *stream,
|
dump_raw_expression (struct expression *exp, struct ui_file *stream,
|
||||||
char *note)
|
const char *note)
|
||||||
{
|
{
|
||||||
int elt;
|
int elt;
|
||||||
char *opcode_name;
|
|
||||||
char *eltscan;
|
char *eltscan;
|
||||||
int eltsize;
|
int eltsize;
|
||||||
|
|
||||||
|
@ -722,9 +721,10 @@ dump_raw_expression (struct expression *exp, struct ui_file *stream,
|
||||||
for (elt = 0; elt < exp->nelts; elt++)
|
for (elt = 0; elt < exp->nelts; elt++)
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, "\t%5d ", elt);
|
fprintf_filtered (stream, "\t%5d ", elt);
|
||||||
opcode_name = op_name (exp, exp->elts[elt].opcode);
|
|
||||||
|
|
||||||
|
const char *opcode_name = op_name (exp, exp->elts[elt].opcode);
|
||||||
fprintf_filtered (stream, "%20s ", opcode_name);
|
fprintf_filtered (stream, "%20s ", opcode_name);
|
||||||
|
|
||||||
print_longest (stream, 'd', 0, exp->elts[elt].longconst);
|
print_longest (stream, 'd', 0, exp->elts[elt].longconst);
|
||||||
fprintf_filtered (stream, " ");
|
fprintf_filtered (stream, " ");
|
||||||
|
|
||||||
|
|
|
@ -146,12 +146,12 @@ extern struct value *evaluate_subexp_standard
|
||||||
|
|
||||||
extern void print_expression (struct expression *, struct ui_file *);
|
extern void print_expression (struct expression *, struct ui_file *);
|
||||||
|
|
||||||
extern char *op_name (struct expression *exp, enum exp_opcode opcode);
|
extern const char *op_name (struct expression *exp, enum exp_opcode opcode);
|
||||||
|
|
||||||
extern char *op_string (enum exp_opcode);
|
extern const char *op_string (enum exp_opcode);
|
||||||
|
|
||||||
extern void dump_raw_expression (struct expression *,
|
extern void dump_raw_expression (struct expression *,
|
||||||
struct ui_file *, char *);
|
struct ui_file *, const char *);
|
||||||
extern void dump_prefix_expression (struct expression *, struct ui_file *);
|
extern void dump_prefix_expression (struct expression *, struct ui_file *);
|
||||||
|
|
||||||
/* In an OP_RANGE expression, either bound could be empty, indicating
|
/* In an OP_RANGE expression, either bound could be empty, indicating
|
||||||
|
|
|
@ -72,7 +72,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
static void growbuf_by_size (int);
|
static void growbuf_by_size (int);
|
||||||
|
|
||||||
|
@ -773,7 +773,7 @@ parse_number (struct parser_state *par_state,
|
||||||
|
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
char *oper;
|
const char *oper;
|
||||||
int token;
|
int token;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
};
|
};
|
||||||
|
@ -807,7 +807,7 @@ static const struct token dot_ops[] =
|
||||||
|
|
||||||
struct f77_boolean_val
|
struct f77_boolean_val
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
int value;
|
int value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1219,7 +1219,7 @@ f_parse (struct parser_state *par_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (prev_lexptr)
|
if (prev_lexptr)
|
||||||
lexptr = prev_lexptr;
|
lexptr = prev_lexptr;
|
||||||
|
|
|
@ -25,7 +25,7 @@ struct parser_state;
|
||||||
|
|
||||||
extern int f_parse (struct parser_state *);
|
extern int f_parse (struct parser_state *);
|
||||||
|
|
||||||
extern void f_yyerror (char *); /* Defined in f-exp.y */
|
extern void f_yyerror (const char *); /* Defined in f-exp.y */
|
||||||
|
|
||||||
extern void f_print_type (struct type *, const char *, struct ui_file *, int,
|
extern void f_print_type (struct type *, const char *, struct ui_file *, int,
|
||||||
int, const struct type_print_options *);
|
int, const struct type_print_options *);
|
||||||
|
|
|
@ -292,7 +292,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
|
||||||
<args>". */
|
<args>". */
|
||||||
argv = (char **) alloca (4 * sizeof (char *));
|
argv = (char **) alloca (4 * sizeof (char *));
|
||||||
argv[0] = shell_file;
|
argv[0] = shell_file;
|
||||||
argv[1] = "-c";
|
argv[1] = (char *) "-c";
|
||||||
argv[2] = shell_command;
|
argv[2] = shell_command;
|
||||||
argv[3] = (char *) 0;
|
argv[3] = (char *) 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct gdbarch_tdep
|
||||||
int num_hw_breakpoints;
|
int num_hw_breakpoints;
|
||||||
|
|
||||||
/* Register names. */
|
/* Register names. */
|
||||||
char **register_names;
|
const char **register_names;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Return the FR-V ABI associated with GDBARCH. */
|
/* Return the FR-V ABI associated with GDBARCH. */
|
||||||
|
@ -147,8 +147,8 @@ new_variant (void)
|
||||||
/* By default, don't supply any general-purpose or floating-point
|
/* By default, don't supply any general-purpose or floating-point
|
||||||
register names. */
|
register names. */
|
||||||
var->register_names
|
var->register_names
|
||||||
= (char **) xmalloc ((frv_num_regs + frv_num_pseudo_regs)
|
= (const char **) xmalloc ((frv_num_regs + frv_num_pseudo_regs)
|
||||||
* sizeof (char *));
|
* sizeof (const char *));
|
||||||
for (r = 0; r < frv_num_regs + frv_num_pseudo_regs; r++)
|
for (r = 0; r < frv_num_regs + frv_num_pseudo_regs; r++)
|
||||||
var->register_names[r] = "";
|
var->register_names[r] = "";
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ pstring (const char *string)
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
pstring_ptr (char **string)
|
pstring_ptr (char **string)
|
||||||
{
|
{
|
||||||
if (string == NULL || *string == NULL)
|
if (string == NULL || *string == NULL)
|
||||||
|
@ -95,7 +95,7 @@ pstring_ptr (char **string)
|
||||||
/* Helper function to print a list of strings, represented as "const
|
/* Helper function to print a list of strings, represented as "const
|
||||||
char *const *". The list is printed comma-separated. */
|
char *const *". The list is printed comma-separated. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
pstring_list (const char *const *list)
|
pstring_list (const char *const *list)
|
||||||
{
|
{
|
||||||
static char ret[100];
|
static char ret[100];
|
||||||
|
|
|
@ -1678,7 +1678,7 @@ pstring (const char *string)
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
pstring_ptr (char **string)
|
pstring_ptr (char **string)
|
||||||
{
|
{
|
||||||
if (string == NULL || *string == NULL)
|
if (string == NULL || *string == NULL)
|
||||||
|
@ -1689,7 +1689,7 @@ pstring_ptr (char **string)
|
||||||
/* Helper function to print a list of strings, represented as "const
|
/* Helper function to print a list of strings, represented as "const
|
||||||
char *const *". The list is printed comma-separated. */
|
char *const *". The list is printed comma-separated. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
pstring_list (const char *const *list)
|
pstring_list (const char *const *list)
|
||||||
{
|
{
|
||||||
static char ret[100];
|
static char ret[100];
|
||||||
|
|
|
@ -167,7 +167,7 @@ extern void validate_files (void);
|
||||||
|
|
||||||
extern char *gnutarget;
|
extern char *gnutarget;
|
||||||
|
|
||||||
extern void set_gnutarget (char *);
|
extern void set_gnutarget (const char *);
|
||||||
|
|
||||||
/* Structure to keep track of core register reading functions for
|
/* Structure to keep track of core register reading functions for
|
||||||
various core file types. */
|
various core file types. */
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-04-05 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* gdbreplay.c (sync_error): Constify.
|
||||||
|
* linux-x86-low.c (push_opcode): Constify.
|
||||||
|
|
||||||
2017-04-05 Pedro Alves <palves@redhat.com>
|
2017-04-05 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* win32-low.c (get_child_debug_event)
|
* win32-low.c (get_child_debug_event)
|
||||||
|
|
|
@ -142,7 +142,7 @@ perror_with_name (const char *string)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sync_error (FILE *fp, char *desc, int expect, int got)
|
sync_error (FILE *fp, const char *desc, int expect, int got)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "\n%s\n", desc);
|
fprintf (stderr, "\n%s\n", desc);
|
||||||
fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n",
|
fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n",
|
||||||
|
|
|
@ -1067,7 +1067,7 @@ append_insns (CORE_ADDR *to, size_t len, const unsigned char *buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
push_opcode (unsigned char *buf, char *op)
|
push_opcode (unsigned char *buf, const char *op)
|
||||||
{
|
{
|
||||||
unsigned char *buf_org = buf;
|
unsigned char *buf_org = buf;
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -936,7 +936,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
|
||||||
|
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
char *oper;
|
const char *oper;
|
||||||
int token;
|
int token;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
};
|
};
|
||||||
|
@ -1588,7 +1588,7 @@ go_parse (struct parser_state *par_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (prev_lexptr)
|
if (prev_lexptr)
|
||||||
lexptr = prev_lexptr;
|
lexptr = prev_lexptr;
|
||||||
|
|
|
@ -60,7 +60,7 @@ enum go_type
|
||||||
|
|
||||||
extern int go_parse (struct parser_state *);
|
extern int go_parse (struct parser_state *);
|
||||||
|
|
||||||
extern void go_yyerror (char *);
|
extern void go_yyerror (const char *);
|
||||||
|
|
||||||
/* Defined in go-lang.c. */
|
/* Defined in go-lang.c. */
|
||||||
|
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ go32_sysinfo (char *arg, int from_tty)
|
||||||
/* CPUID with EAX = 1 returns processor signature and features. */
|
/* CPUID with EAX = 1 returns processor signature and features. */
|
||||||
if (cpuid_max >= 1)
|
if (cpuid_max >= 1)
|
||||||
{
|
{
|
||||||
static char *brand_name[] = {
|
static const char *brand_name[] = {
|
||||||
"",
|
"",
|
||||||
" Celeron",
|
" Celeron",
|
||||||
" III",
|
" III",
|
||||||
|
|
|
@ -851,7 +851,6 @@ gdbscm_breakpoint_expression (SCM self)
|
||||||
{
|
{
|
||||||
breakpoint_smob *bp_smob
|
breakpoint_smob *bp_smob
|
||||||
= bpscm_get_valid_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
= bpscm_get_valid_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
||||||
char *str;
|
|
||||||
struct watchpoint *wp;
|
struct watchpoint *wp;
|
||||||
|
|
||||||
if (!is_watchpoint (bp_smob->bp))
|
if (!is_watchpoint (bp_smob->bp))
|
||||||
|
@ -859,7 +858,7 @@ gdbscm_breakpoint_expression (SCM self)
|
||||||
|
|
||||||
wp = (struct watchpoint *) bp_smob->bp;
|
wp = (struct watchpoint *) bp_smob->bp;
|
||||||
|
|
||||||
str = wp->exp_string;
|
const char *str = wp->exp_string;
|
||||||
if (! str)
|
if (! str)
|
||||||
str = "";
|
str = "";
|
||||||
|
|
||||||
|
|
|
@ -291,8 +291,10 @@ cmdscm_destroyer (struct cmd_list_element *self, void *context)
|
||||||
/* Called by gdb to invoke the command. */
|
/* Called by gdb to invoke the command. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmdscm_function (struct cmd_list_element *command, char *args, int from_tty)
|
cmdscm_function (struct cmd_list_element *command,
|
||||||
|
char *args_entry, int from_tty)
|
||||||
{
|
{
|
||||||
|
const char *args = args_entry;
|
||||||
command_smob *c_smob/*obj*/ = (command_smob *) get_cmd_context (command);
|
command_smob *c_smob/*obj*/ = (command_smob *) get_cmd_context (command);
|
||||||
SCM arg_scm, tty_scm, result;
|
SCM arg_scm, tty_scm, result;
|
||||||
|
|
||||||
|
|
|
@ -602,7 +602,7 @@ pascm_param_value (enum var_types type, void *var,
|
||||||
case var_filename:
|
case var_filename:
|
||||||
case var_enum:
|
case var_enum:
|
||||||
{
|
{
|
||||||
char *str = * (char **) var;
|
const char *str = *(char **) var;
|
||||||
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
str = "";
|
str = "";
|
||||||
|
|
|
@ -954,7 +954,7 @@ h8300_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
/* The register names change depending on which h8300 processor
|
/* The register names change depending on which h8300 processor
|
||||||
type is selected. */
|
type is selected. */
|
||||||
static char *register_names[] = {
|
static const char *register_names[] = {
|
||||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6",
|
"r0", "r1", "r2", "r3", "r4", "r5", "r6",
|
||||||
"sp", "", "pc", "cycles", "tick", "inst",
|
"sp", "", "pc", "cycles", "tick", "inst",
|
||||||
"ccr", /* pseudo register */
|
"ccr", /* pseudo register */
|
||||||
|
@ -971,7 +971,7 @@ h8300_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
static const char *
|
static const char *
|
||||||
h8300s_register_name (struct gdbarch *gdbarch, int regno)
|
h8300s_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
static char *register_names[] = {
|
static const char *register_names[] = {
|
||||||
"er0", "er1", "er2", "er3", "er4", "er5", "er6",
|
"er0", "er1", "er2", "er3", "er4", "er5", "er6",
|
||||||
"sp", "", "pc", "cycles", "", "tick", "inst",
|
"sp", "", "pc", "cycles", "", "tick", "inst",
|
||||||
"mach", "macl",
|
"mach", "macl",
|
||||||
|
@ -989,7 +989,7 @@ h8300s_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
static const char *
|
static const char *
|
||||||
h8300sx_register_name (struct gdbarch *gdbarch, int regno)
|
h8300sx_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
static char *register_names[] = {
|
static const char *register_names[] = {
|
||||||
"er0", "er1", "er2", "er3", "er4", "er5", "er6",
|
"er0", "er1", "er2", "er3", "er4", "er5", "er6",
|
||||||
"sp", "", "pc", "cycles", "", "tick", "inst",
|
"sp", "", "pc", "cycles", "", "tick", "inst",
|
||||||
"mach", "macl", "sbr", "vbr",
|
"mach", "macl", "sbr", "vbr",
|
||||||
|
|
|
@ -613,7 +613,7 @@ typedef BP_MANIPULATION (hppa_break_insn) hppa_breakpoint;
|
||||||
static const char *
|
static const char *
|
||||||
hppa32_register_name (struct gdbarch *gdbarch, int i)
|
hppa32_register_name (struct gdbarch *gdbarch, int i)
|
||||||
{
|
{
|
||||||
static char *names[] = {
|
static const char *names[] = {
|
||||||
"flags", "r1", "rp", "r3",
|
"flags", "r1", "rp", "r3",
|
||||||
"r4", "r5", "r6", "r7",
|
"r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "r10", "r11",
|
"r8", "r9", "r10", "r11",
|
||||||
|
@ -656,7 +656,7 @@ hppa32_register_name (struct gdbarch *gdbarch, int i)
|
||||||
static const char *
|
static const char *
|
||||||
hppa64_register_name (struct gdbarch *gdbarch, int i)
|
hppa64_register_name (struct gdbarch *gdbarch, int i)
|
||||||
{
|
{
|
||||||
static char *names[] = {
|
static const char *names[] = {
|
||||||
"flags", "r1", "rp", "r3",
|
"flags", "r1", "rp", "r3",
|
||||||
"r4", "r5", "r6", "r7",
|
"r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "r10", "r11",
|
"r8", "r9", "r10", "r11",
|
||||||
|
|
|
@ -140,7 +140,7 @@ enum pseudo_regs { FIRST_PSEUDO_REGNUM = NUM_IA64_RAW_REGS,
|
||||||
/* Array of register names; There should be ia64_num_regs strings in
|
/* Array of register names; There should be ia64_num_regs strings in
|
||||||
the initializer. */
|
the initializer. */
|
||||||
|
|
||||||
static char *ia64_register_names[] =
|
static const char *ia64_register_names[] =
|
||||||
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
||||||
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
|
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
|
||||||
|
|
12
gdb/infcmd.c
12
gdb/infcmd.c
|
@ -261,14 +261,14 @@ construct_inferior_arguments (int argc, char **argv)
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
/* This holds all the characters considered special to the
|
/* This holds all the characters considered special to the
|
||||||
Windows shells. */
|
Windows shells. */
|
||||||
char *special = "\"!&*|[]{}<>?`~^=;, \t\n";
|
static const char special[] = "\"!&*|[]{}<>?`~^=;, \t\n";
|
||||||
const char quote = '"';
|
static const char quote = '"';
|
||||||
#else
|
#else
|
||||||
/* This holds all the characters considered special to the
|
/* This holds all the characters considered special to the
|
||||||
typical Unix shells. We include `^' because the SunOS
|
typical Unix shells. We include `^' because the SunOS
|
||||||
/bin/sh treats it as a synonym for `|'. */
|
/bin/sh treats it as a synonym for `|'. */
|
||||||
char *special = "\"!#$&*()\\|[]{}<>?'`~^; \t\n";
|
static const char special[] = "\"!#$&*()\\|[]{}<>?'`~^; \t\n";
|
||||||
const char quote = '\'';
|
static const char quote = '\'';
|
||||||
#endif
|
#endif
|
||||||
int i;
|
int i;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
@ -2267,7 +2267,7 @@ static void
|
||||||
path_command (char *dirname, int from_tty)
|
path_command (char *dirname, int from_tty)
|
||||||
{
|
{
|
||||||
char *exec_path;
|
char *exec_path;
|
||||||
char *env;
|
const char *env;
|
||||||
|
|
||||||
dont_repeat ();
|
dont_repeat ();
|
||||||
env = get_in_environ (current_inferior ()->environment, path_var_name);
|
env = get_in_environ (current_inferior ()->environment, path_var_name);
|
||||||
|
@ -2681,7 +2681,7 @@ enum attach_post_wait_mode
|
||||||
should be running. Else if ATTACH, */
|
should be running. Else if ATTACH, */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
attach_post_wait (char *args, int from_tty, enum attach_post_wait_mode mode)
|
attach_post_wait (const char *args, int from_tty, enum attach_post_wait_mode mode)
|
||||||
{
|
{
|
||||||
struct inferior *inferior;
|
struct inferior *inferior;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
extern void _initialize_language (void);
|
extern void _initialize_language (void);
|
||||||
|
|
||||||
static void unk_lang_error (char *);
|
static void unk_lang_error (const char *);
|
||||||
|
|
||||||
static int unk_lang_parser (struct parser_state *);
|
static int unk_lang_parser (struct parser_state *);
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ show_range_command (struct ui_file *file, int from_tty,
|
||||||
{
|
{
|
||||||
if (range_mode == range_mode_auto)
|
if (range_mode == range_mode_auto)
|
||||||
{
|
{
|
||||||
char *tmp;
|
const char *tmp;
|
||||||
|
|
||||||
switch (range_check)
|
switch (range_check)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ show_case_command (struct ui_file *file, int from_tty,
|
||||||
{
|
{
|
||||||
if (case_mode == case_mode_auto)
|
if (case_mode == case_mode_auto)
|
||||||
{
|
{
|
||||||
char *tmp = NULL;
|
const char *tmp = NULL;
|
||||||
|
|
||||||
switch (case_sensitivity)
|
switch (case_sensitivity)
|
||||||
{
|
{
|
||||||
|
@ -731,7 +731,7 @@ unk_lang_parser (struct parser_state *ps)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unk_lang_error (char *msg)
|
unk_lang_error (const char *msg)
|
||||||
{
|
{
|
||||||
error (_("Attempted to parse an expression with unknown language"));
|
error (_("Attempted to parse an expression with unknown language"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,7 @@ struct language_defn
|
||||||
|
|
||||||
/* Parser error function. */
|
/* Parser error function. */
|
||||||
|
|
||||||
void (*la_error) (char *);
|
void (*la_error) (const char *);
|
||||||
|
|
||||||
/* Given an expression *EXPP created by prefixifying the result of
|
/* Given an expression *EXPP created by prefixifying the result of
|
||||||
la_parser, perform any remaining processing necessary to complete
|
la_parser, perform any remaining processing necessary to complete
|
||||||
|
@ -271,7 +271,7 @@ struct language_defn
|
||||||
/* If this is non-NULL, specifies the name that of the implicit
|
/* If this is non-NULL, specifies the name that of the implicit
|
||||||
local variable that refers to the current object instance. */
|
local variable that refers to the current object instance. */
|
||||||
|
|
||||||
char *la_name_of_this;
|
const char *la_name_of_this;
|
||||||
|
|
||||||
/* This is a function that lookup_symbol will call when it gets to
|
/* This is a function that lookup_symbol will call when it gets to
|
||||||
the part of symbol lookup where C looks up static and global
|
the part of symbol lookup where C looks up static and global
|
||||||
|
|
|
@ -1293,7 +1293,8 @@ decode_line_2 (struct linespec_state *self,
|
||||||
struct symtabs_and_lines *result,
|
struct symtabs_and_lines *result,
|
||||||
const char *select_mode)
|
const char *select_mode)
|
||||||
{
|
{
|
||||||
char *args, *prompt;
|
char *args;
|
||||||
|
const char *prompt;
|
||||||
int i;
|
int i;
|
||||||
struct cleanup *old_chain;
|
struct cleanup *old_chain;
|
||||||
VEC (const_char_ptr) *filters = NULL;
|
VEC (const_char_ptr) *filters = NULL;
|
||||||
|
|
|
@ -262,7 +262,7 @@ struct private_thread_info
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
thread_db_err_str (td_err_e err)
|
thread_db_err_str (td_err_e err)
|
||||||
{
|
{
|
||||||
static char buf[64];
|
static char buf[64];
|
||||||
|
|
|
@ -91,7 +91,7 @@ lm32_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||||
static const char *
|
static const char *
|
||||||
lm32_register_name (struct gdbarch *gdbarch, int reg_nr)
|
lm32_register_name (struct gdbarch *gdbarch, int reg_nr)
|
||||||
{
|
{
|
||||||
static char *register_names[] = {
|
static const char *register_names[] = {
|
||||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
||||||
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
|
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
|
||||||
|
|
|
@ -65,7 +65,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
static int parse_number (int);
|
static int parse_number (int);
|
||||||
|
|
||||||
|
@ -1050,7 +1050,7 @@ m2_parse (struct parser_state *par_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (prev_lexptr)
|
if (prev_lexptr)
|
||||||
lexptr = prev_lexptr;
|
lexptr = prev_lexptr;
|
||||||
|
|
|
@ -22,7 +22,7 @@ struct parser_state;
|
||||||
|
|
||||||
extern int m2_parse (struct parser_state *); /* Defined in m2-exp.y */
|
extern int m2_parse (struct parser_state *); /* Defined in m2-exp.y */
|
||||||
|
|
||||||
extern void m2_yyerror (char *); /* Defined in m2-exp.y */
|
extern void m2_yyerror (const char *); /* Defined in m2-exp.y */
|
||||||
|
|
||||||
/* Defined in m2-typeprint.c */
|
/* Defined in m2-typeprint.c */
|
||||||
extern void m2_print_type (struct type *, const char *, struct ui_file *, int,
|
extern void m2_print_type (struct type *, const char *, struct ui_file *, int,
|
||||||
|
|
|
@ -202,7 +202,7 @@ m32r_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char *m32r_register_names[] = {
|
static const char *m32r_register_names[] = {
|
||||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp",
|
"r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp",
|
||||||
"psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
|
"psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
|
||||||
|
|
|
@ -166,7 +166,7 @@ struct m68hc11_unwind_cache
|
||||||
|
|
||||||
/* Table of registers for 68HC11. This includes the hard registers
|
/* Table of registers for 68HC11. This includes the hard registers
|
||||||
and the soft registers used by GCC. */
|
and the soft registers used by GCC. */
|
||||||
static char *
|
static const char *
|
||||||
m68hc11_register_names[] =
|
m68hc11_register_names[] =
|
||||||
{
|
{
|
||||||
"x", "d", "y", "sp", "pc", "a", "b",
|
"x", "d", "y", "sp", "pc", "a", "b",
|
||||||
|
|
|
@ -49,7 +49,7 @@ m88k_fetch_instruction (CORE_ADDR pc, enum bfd_endian byte_order)
|
||||||
static const char *
|
static const char *
|
||||||
m88k_register_name (struct gdbarch *gdbarch, int regnum)
|
m88k_register_name (struct gdbarch *gdbarch, int regnum)
|
||||||
{
|
{
|
||||||
static char *register_names[] =
|
static const char *register_names[] =
|
||||||
{
|
{
|
||||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||||
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
||||||
|
|
|
@ -170,7 +170,7 @@ appendc (struct macro_buffer *b, int c)
|
||||||
|
|
||||||
/* Append the LEN bytes at ADDR to the buffer B. */
|
/* Append the LEN bytes at ADDR to the buffer B. */
|
||||||
static void
|
static void
|
||||||
appendmem (struct macro_buffer *b, char *addr, int len)
|
appendmem (struct macro_buffer *b, const char *addr, int len)
|
||||||
{
|
{
|
||||||
int new_len = b->len + len;
|
int new_len = b->len + len;
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ static int found_ecoff_debugging_info;
|
||||||
/* Forward declarations. */
|
/* Forward declarations. */
|
||||||
|
|
||||||
static int upgrade_type (int, struct type **, int, union aux_ext *,
|
static int upgrade_type (int, struct type **, int, union aux_ext *,
|
||||||
int, char *);
|
int, const char *);
|
||||||
|
|
||||||
static void parse_partial_symbols (minimal_symbol_reader &,
|
static void parse_partial_symbols (minimal_symbol_reader &,
|
||||||
struct objfile *);
|
struct objfile *);
|
||||||
|
@ -228,9 +228,9 @@ static void parse_partial_symbols (minimal_symbol_reader &,
|
||||||
static int has_opaque_xref (FDR *, SYMR *);
|
static int has_opaque_xref (FDR *, SYMR *);
|
||||||
|
|
||||||
static int cross_ref (int, union aux_ext *, struct type **, enum type_code,
|
static int cross_ref (int, union aux_ext *, struct type **, enum type_code,
|
||||||
char **, int, char *);
|
const char **, int, const char *);
|
||||||
|
|
||||||
static struct symbol *new_symbol (char *);
|
static struct symbol *new_symbol (const char *);
|
||||||
|
|
||||||
static struct type *new_type (char *);
|
static struct type *new_type (char *);
|
||||||
|
|
||||||
|
@ -245,14 +245,14 @@ static struct linetable *new_linetable (int);
|
||||||
static struct blockvector *new_bvect (int);
|
static struct blockvector *new_bvect (int);
|
||||||
|
|
||||||
static struct type *parse_type (int, union aux_ext *, unsigned int, int *,
|
static struct type *parse_type (int, union aux_ext *, unsigned int, int *,
|
||||||
int, char *);
|
int, const char *);
|
||||||
|
|
||||||
static struct symbol *mylookup_symbol (char *, const struct block *,
|
static struct symbol *mylookup_symbol (const char *, const struct block *,
|
||||||
domain_enum, enum address_class);
|
domain_enum, enum address_class);
|
||||||
|
|
||||||
static void sort_blocks (struct symtab *);
|
static void sort_blocks (struct symtab *);
|
||||||
|
|
||||||
static struct partial_symtab *new_psymtab (char *, struct objfile *);
|
static struct partial_symtab *new_psymtab (const char *, struct objfile *);
|
||||||
|
|
||||||
static void psymtab_to_symtab_1 (struct objfile *objfile,
|
static void psymtab_to_symtab_1 (struct objfile *objfile,
|
||||||
struct partial_symtab *, const char *);
|
struct partial_symtab *, const char *);
|
||||||
|
@ -268,7 +268,7 @@ static struct linetable *shrink_linetable (struct linetable *);
|
||||||
static void handle_psymbol_enumerators (struct objfile *, FDR *, int,
|
static void handle_psymbol_enumerators (struct objfile *, FDR *, int,
|
||||||
CORE_ADDR);
|
CORE_ADDR);
|
||||||
|
|
||||||
static char *mdebug_next_symbol_text (struct objfile *);
|
static const char *mdebug_next_symbol_text (struct objfile *);
|
||||||
|
|
||||||
/* Exported procedure: Builds a symtab from the partial symtab SELF.
|
/* Exported procedure: Builds a symtab from the partial symtab SELF.
|
||||||
Restores the environment in effect when SELF was created, delegates
|
Restores the environment in effect when SELF was created, delegates
|
||||||
|
@ -322,7 +322,7 @@ get_rfd (int cf, int rf)
|
||||||
|
|
||||||
/* Return a safer print NAME for a file descriptor. */
|
/* Return a safer print NAME for a file descriptor. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
fdr_name (FDR *f)
|
fdr_name (FDR *f)
|
||||||
{
|
{
|
||||||
if (f->rss == -1)
|
if (f->rss == -1)
|
||||||
|
@ -574,7 +574,7 @@ static int mdebug_regparm_index;
|
||||||
static void
|
static void
|
||||||
add_data_symbol (SYMR *sh, union aux_ext *ax, int bigend,
|
add_data_symbol (SYMR *sh, union aux_ext *ax, int bigend,
|
||||||
struct symbol *s, int aclass_index, struct block *b,
|
struct symbol *s, int aclass_index, struct block *b,
|
||||||
struct objfile *objfile, char *name)
|
struct objfile *objfile, const char *name)
|
||||||
{
|
{
|
||||||
SYMBOL_DOMAIN (s) = VAR_DOMAIN;
|
SYMBOL_DOMAIN (s) = VAR_DOMAIN;
|
||||||
SYMBOL_ACLASS_INDEX (s) = aclass_index;
|
SYMBOL_ACLASS_INDEX (s) = aclass_index;
|
||||||
|
@ -596,7 +596,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
||||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||||
const bfd_size_type external_sym_size = debug_swap->external_sym_size;
|
const bfd_size_type external_sym_size = debug_swap->external_sym_size;
|
||||||
void (*const swap_sym_in) (bfd *, void *, SYMR *) = debug_swap->swap_sym_in;
|
void (*const swap_sym_in) (bfd *, void *, SYMR *) = debug_swap->swap_sym_in;
|
||||||
char *name;
|
const char *name;
|
||||||
struct symbol *s;
|
struct symbol *s;
|
||||||
struct block *b;
|
struct block *b;
|
||||||
struct mdebug_pending *pend;
|
struct mdebug_pending *pend;
|
||||||
|
@ -1530,7 +1530,7 @@ basic_type (int bt, struct objfile *objfile)
|
||||||
|
|
||||||
static struct type *
|
static struct type *
|
||||||
parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
||||||
int bigend, char *sym_name)
|
int bigend, const char *sym_name)
|
||||||
{
|
{
|
||||||
TIR t[1];
|
TIR t[1];
|
||||||
struct type *tp = 0;
|
struct type *tp = 0;
|
||||||
|
@ -1658,7 +1658,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
||||||
name. This apparently is a MIPS extension for C sets. */
|
name. This apparently is a MIPS extension for C sets. */
|
||||||
t->bt == btSet)
|
t->bt == btSet)
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
|
|
||||||
/* Try to cross reference this type, build new type on failure. */
|
/* Try to cross reference this type, build new type on failure. */
|
||||||
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
|
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
|
||||||
|
@ -1718,7 +1718,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
||||||
FIXME: We are not doing any guessing on range types. */
|
FIXME: We are not doing any guessing on range types. */
|
||||||
if (t->bt == btRange)
|
if (t->bt == btRange)
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
|
|
||||||
/* Try to cross reference this type, build new type on failure. */
|
/* Try to cross reference this type, build new type on failure. */
|
||||||
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
|
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
|
||||||
|
@ -1751,7 +1751,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
||||||
}
|
}
|
||||||
if (t->bt == btTypedef)
|
if (t->bt == btTypedef)
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
|
|
||||||
/* Try to cross reference this type, it should succeed. */
|
/* Try to cross reference this type, it should succeed. */
|
||||||
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
|
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
|
||||||
|
@ -1819,7 +1819,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
upgrade_type (int fd, struct type **tpp, int tq, union aux_ext *ax, int bigend,
|
upgrade_type (int fd, struct type **tpp, int tq, union aux_ext *ax, int bigend,
|
||||||
char *sym_name)
|
const char *sym_name)
|
||||||
{
|
{
|
||||||
int off;
|
int off;
|
||||||
struct type *t;
|
struct type *t;
|
||||||
|
@ -2110,7 +2110,7 @@ parse_external (EXTR *es, int bigend, struct section_offsets *section_offsets,
|
||||||
/* Reading .o files */
|
/* Reading .o files */
|
||||||
if (SC_IS_UNDEF (es->asym.sc) || es->asym.sc == scNil)
|
if (SC_IS_UNDEF (es->asym.sc) || es->asym.sc == scNil)
|
||||||
{
|
{
|
||||||
char *what;
|
const char *what;
|
||||||
switch (es->asym.st)
|
switch (es->asym.st)
|
||||||
{
|
{
|
||||||
case stNil:
|
case stNil:
|
||||||
|
@ -2851,7 +2851,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
||||||
|
|
||||||
switch (type_code)
|
switch (type_code)
|
||||||
{
|
{
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
/* Standard, external, non-debugger, symbols. */
|
/* Standard, external, non-debugger, symbols. */
|
||||||
|
|
||||||
|
@ -3205,7 +3205,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
||||||
Accept either. */
|
Accept either. */
|
||||||
while (*p && *p != ';' && *p != ',')
|
while (*p && *p != ';' && *p != ',')
|
||||||
{
|
{
|
||||||
char *q;
|
const char *q;
|
||||||
|
|
||||||
/* Check for and handle cretinous dbx
|
/* Check for and handle cretinous dbx
|
||||||
symbol name continuation! */
|
symbol name continuation! */
|
||||||
|
@ -3887,7 +3887,7 @@ handle_psymbol_enumerators (struct objfile *objfile, FDR *fh, int stype,
|
||||||
|
|
||||||
/* Get the next symbol. OBJFILE is unused. */
|
/* Get the next symbol. OBJFILE is unused. */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
mdebug_next_symbol_text (struct objfile *objfile)
|
mdebug_next_symbol_text (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
SYMR sh;
|
SYMR sh;
|
||||||
|
@ -4360,7 +4360,7 @@ static int
|
||||||
cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
||||||
enum type_code type_code,
|
enum type_code type_code,
|
||||||
/* Use to alloc new type if none is found. */
|
/* Use to alloc new type if none is found. */
|
||||||
char **pname, int bigend, char *sym_name)
|
const char **pname, int bigend, const char *sym_name)
|
||||||
{
|
{
|
||||||
RNDXR rn[1];
|
RNDXR rn[1];
|
||||||
unsigned int rf;
|
unsigned int rf;
|
||||||
|
@ -4556,7 +4556,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
||||||
keeping the symtab sorted. */
|
keeping the symtab sorted. */
|
||||||
|
|
||||||
static struct symbol *
|
static struct symbol *
|
||||||
mylookup_symbol (char *name, const struct block *block,
|
mylookup_symbol (const char *name, const struct block *block,
|
||||||
domain_enum domain, enum address_class theclass)
|
domain_enum domain, enum address_class theclass)
|
||||||
{
|
{
|
||||||
struct block_iterator iter;
|
struct block_iterator iter;
|
||||||
|
@ -4742,7 +4742,7 @@ new_symtab (const char *name, int maxlines, struct objfile *objfile)
|
||||||
/* Allocate a new partial_symtab NAME. */
|
/* Allocate a new partial_symtab NAME. */
|
||||||
|
|
||||||
static struct partial_symtab *
|
static struct partial_symtab *
|
||||||
new_psymtab (char *name, struct objfile *objfile)
|
new_psymtab (const char *name, struct objfile *objfile)
|
||||||
{
|
{
|
||||||
struct partial_symtab *psymtab;
|
struct partial_symtab *psymtab;
|
||||||
|
|
||||||
|
@ -4836,7 +4836,7 @@ new_block (enum block_type type)
|
||||||
/* Create a new symbol with printname NAME. */
|
/* Create a new symbol with printname NAME. */
|
||||||
|
|
||||||
static struct symbol *
|
static struct symbol *
|
||||||
new_symbol (char *name)
|
new_symbol (const char *name)
|
||||||
{
|
{
|
||||||
struct symbol *s = allocate_symbol (mdebugread_objfile);
|
struct symbol *s = allocate_symbol (mdebugread_objfile);
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ mem_info_command (char *args, int from_tty)
|
||||||
|
|
||||||
for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
|
for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
|
||||||
{
|
{
|
||||||
char *tmp;
|
const char *tmp;
|
||||||
|
|
||||||
printf_filtered ("%-3d %-3c\t",
|
printf_filtered ("%-3d %-3c\t",
|
||||||
m->number,
|
m->number,
|
||||||
|
|
|
@ -305,7 +305,7 @@ register_set_keyword_table (const CGEN_HW_ENTRY *hw)
|
||||||
/* Given a keyword table KEYWORD and a register number REGNUM, return
|
/* Given a keyword table KEYWORD and a register number REGNUM, return
|
||||||
the name of the register, or "" if KEYWORD contains no register
|
the name of the register, or "" if KEYWORD contains no register
|
||||||
whose number is REGNUM. */
|
whose number is REGNUM. */
|
||||||
static char *
|
static const char *
|
||||||
register_name_from_keyword (CGEN_KEYWORD *keyword_table, int regnum)
|
register_name_from_keyword (CGEN_KEYWORD *keyword_table, int regnum)
|
||||||
{
|
{
|
||||||
const CGEN_KEYWORD_ENTRY *entry
|
const CGEN_KEYWORD_ENTRY *entry
|
||||||
|
|
|
@ -116,7 +116,7 @@ mi_cmd_env_path (const char *command, char **argv, int argc)
|
||||||
{
|
{
|
||||||
struct ui_out *uiout = current_uiout;
|
struct ui_out *uiout = current_uiout;
|
||||||
char *exec_path;
|
char *exec_path;
|
||||||
char *env;
|
const char *env;
|
||||||
int reset = 0;
|
int reset = 0;
|
||||||
int oind = 0;
|
int oind = 0;
|
||||||
int i;
|
int i;
|
||||||
|
@ -271,7 +271,7 @@ void
|
||||||
_initialize_mi_cmd_env (void)
|
_initialize_mi_cmd_env (void)
|
||||||
{
|
{
|
||||||
struct gdb_environ *environment;
|
struct gdb_environ *environment;
|
||||||
char *env;
|
const char *env;
|
||||||
|
|
||||||
/* We want original execution path to reset to, if desired later.
|
/* We want original execution path to reset to, if desired later.
|
||||||
At this point, current inferior is not created, so cannot use
|
At this point, current inferior is not created, so cannot use
|
||||||
|
|
|
@ -578,7 +578,7 @@ list_args_or_locals (enum what_to_list what, enum print_values values,
|
||||||
struct block_iterator iter;
|
struct block_iterator iter;
|
||||||
struct cleanup *cleanup_list;
|
struct cleanup *cleanup_list;
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *name_of_result;
|
const char *name_of_result;
|
||||||
struct ui_out *uiout = current_uiout;
|
struct ui_out *uiout = current_uiout;
|
||||||
|
|
||||||
block = get_frame_block (fi, 0);
|
block = get_frame_block (fi, 0);
|
||||||
|
|
|
@ -492,7 +492,7 @@ mi_cmd_var_show_attributes (const char *command, char **argv, int argc)
|
||||||
{
|
{
|
||||||
struct ui_out *uiout = current_uiout;
|
struct ui_out *uiout = current_uiout;
|
||||||
int attr;
|
int attr;
|
||||||
char *attstr;
|
const char *attstr;
|
||||||
struct varobj *var;
|
struct varobj *var;
|
||||||
|
|
||||||
if (argc != 1)
|
if (argc != 1)
|
||||||
|
|
|
@ -89,7 +89,7 @@ static void mi_cmd_execute (struct mi_parse *parse);
|
||||||
|
|
||||||
static void mi_execute_cli_command (const char *cmd, int args_p,
|
static void mi_execute_cli_command (const char *cmd, int args_p,
|
||||||
const char *args);
|
const char *args);
|
||||||
static void mi_execute_async_cli_command (char *cli_command,
|
static void mi_execute_async_cli_command (const char *cli_command,
|
||||||
char **argv, int argc);
|
char **argv, int argc);
|
||||||
static int register_changed_p (int regnum, struct regcache *,
|
static int register_changed_p (int regnum, struct regcache *,
|
||||||
struct regcache *);
|
struct regcache *);
|
||||||
|
@ -2031,7 +2031,7 @@ captured_mi_execute_command (struct ui_out *uiout, struct mi_parse *context)
|
||||||
/* Echo the command on the console. */
|
/* Echo the command on the console. */
|
||||||
fprintf_unfiltered (gdb_stdlog, "%s\n", context->command);
|
fprintf_unfiltered (gdb_stdlog, "%s\n", context->command);
|
||||||
/* Call the "console" interpreter. */
|
/* Call the "console" interpreter. */
|
||||||
argv[0] = INTERP_CONSOLE;
|
argv[0] = (char *) INTERP_CONSOLE;
|
||||||
argv[1] = context->command;
|
argv[1] = context->command;
|
||||||
mi_cmd_interpreter_exec ("-interpreter-exec", argv, 2);
|
mi_cmd_interpreter_exec ("-interpreter-exec", argv, 2);
|
||||||
|
|
||||||
|
@ -2344,7 +2344,7 @@ mi_execute_cli_command (const char *cmd, int args_p, const char *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mi_execute_async_cli_command (char *cli_command, char **argv, int argc)
|
mi_execute_async_cli_command (const char *cli_command, char **argv, int argc)
|
||||||
{
|
{
|
||||||
struct cleanup *old_cleanups;
|
struct cleanup *old_cleanups;
|
||||||
char *run;
|
char *run;
|
||||||
|
|
|
@ -608,7 +608,7 @@ mips_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
/* GPR names for all ABIs other than n32/n64. */
|
/* GPR names for all ABIs other than n32/n64. */
|
||||||
static char *mips_gpr_names[] = {
|
static const char *mips_gpr_names[] = {
|
||||||
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
|
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
|
||||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
|
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
|
||||||
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
|
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
|
||||||
|
@ -616,7 +616,7 @@ mips_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GPR names for n32 and n64 ABIs. */
|
/* GPR names for n32 and n64 ABIs. */
|
||||||
static char *mips_n32_n64_gpr_names[] = {
|
static const char *mips_n32_n64_gpr_names[] = {
|
||||||
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
|
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
|
||||||
"a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
|
"a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
|
||||||
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
|
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
|
||||||
|
@ -6880,7 +6880,7 @@ set_mips_command (char *args, int from_tty)
|
||||||
static void
|
static void
|
||||||
show_mipsfpu_command (char *args, int from_tty)
|
show_mipsfpu_command (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
char *fpu;
|
const char *fpu;
|
||||||
|
|
||||||
if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_mips)
|
if (gdbarch_bfd_arch_info (target_gdbarch ())->arch != bfd_arch_mips)
|
||||||
{
|
{
|
||||||
|
|
|
@ -246,8 +246,8 @@ mn10300_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||||
return RETURN_VALUE_REGISTER_CONVENTION;
|
return RETURN_VALUE_REGISTER_CONVENTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
register_name (int reg, char **regs, long sizeof_regs)
|
register_name (int reg, const char **regs, long sizeof_regs)
|
||||||
{
|
{
|
||||||
if (reg < 0 || reg >= sizeof_regs / sizeof (regs[0]))
|
if (reg < 0 || reg >= sizeof_regs / sizeof (regs[0]))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -258,7 +258,7 @@ register_name (int reg, char **regs, long sizeof_regs)
|
||||||
static const char *
|
static const char *
|
||||||
mn10300_generic_register_name (struct gdbarch *gdbarch, int reg)
|
mn10300_generic_register_name (struct gdbarch *gdbarch, int reg)
|
||||||
{
|
{
|
||||||
static char *regs[] =
|
static const char *regs[] =
|
||||||
{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
||||||
"sp", "pc", "mdr", "psw", "lir", "lar", "", "",
|
"sp", "pc", "mdr", "psw", "lir", "lar", "", "",
|
||||||
"", "", "", "", "", "", "", "",
|
"", "", "", "", "", "", "", "",
|
||||||
|
@ -271,7 +271,7 @@ mn10300_generic_register_name (struct gdbarch *gdbarch, int reg)
|
||||||
static const char *
|
static const char *
|
||||||
am33_register_name (struct gdbarch *gdbarch, int reg)
|
am33_register_name (struct gdbarch *gdbarch, int reg)
|
||||||
{
|
{
|
||||||
static char *regs[] =
|
static const char *regs[] =
|
||||||
{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
||||||
"sp", "pc", "mdr", "psw", "lir", "lar", "",
|
"sp", "pc", "mdr", "psw", "lir", "lar", "",
|
||||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||||
|
@ -283,7 +283,7 @@ am33_register_name (struct gdbarch *gdbarch, int reg)
|
||||||
static const char *
|
static const char *
|
||||||
am33_2_register_name (struct gdbarch *gdbarch, int reg)
|
am33_2_register_name (struct gdbarch *gdbarch, int reg)
|
||||||
{
|
{
|
||||||
static char *regs[] =
|
static const char *regs[] =
|
||||||
{
|
{
|
||||||
"d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
"d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
||||||
"sp", "pc", "mdr", "psw", "lir", "lar", "mdrq", "r0",
|
"sp", "pc", "mdr", "psw", "lir", "lar", "mdrq", "r0",
|
||||||
|
|
|
@ -74,7 +74,7 @@ typedef BP_MANIPULATION (moxie_break_insn) moxie_breakpoint;
|
||||||
|
|
||||||
/* Moxie register names. */
|
/* Moxie register names. */
|
||||||
|
|
||||||
char *moxie_register_names[] = {
|
static const char *moxie_register_names[] = {
|
||||||
"$fp", "$sp", "$r0", "$r1", "$r2",
|
"$fp", "$sp", "$r0", "$r1", "$r2",
|
||||||
"$r3", "$r4", "$r5", "$r6", "$r7",
|
"$r3", "$r4", "$r5", "$r6", "$r7",
|
||||||
"$r8", "$r9", "$r10", "$r11", "$r12",
|
"$r8", "$r9", "$r10", "$r11", "$r12",
|
||||||
|
|
|
@ -1627,9 +1627,9 @@ linux_xfer_osdata_modules (gdb_byte *readbuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct osdata_type {
|
struct osdata_type {
|
||||||
char *type;
|
const char *type;
|
||||||
char *title;
|
const char *title;
|
||||||
char *description;
|
const char *description;
|
||||||
LONGEST (*getter) (gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
LONGEST (*getter) (gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
||||||
} osdata_table[] = {
|
} osdata_table[] = {
|
||||||
{ "cpus", "CPUs", "Listing of all cpus/cores on the system",
|
{ "cpus", "CPUs", "Listing of all cpus/cores on the system",
|
||||||
|
|
|
@ -190,7 +190,7 @@ nto_parse_redirection (char *pargv[], const char **pin, const char **pout,
|
||||||
const char **perr)
|
const char **perr)
|
||||||
{
|
{
|
||||||
char **argv;
|
char **argv;
|
||||||
char *in, *out, *err, *p;
|
const char *in, *out, *err, *p;
|
||||||
int argc, i, n;
|
int argc, i, n;
|
||||||
|
|
||||||
for (n = 0; pargv[n]; n++);
|
for (n = 0; pargv[n]; n++);
|
||||||
|
|
|
@ -81,7 +81,7 @@ static const struct objfile_data *objc_objfile_data;
|
||||||
suitably defined. */
|
suitably defined. */
|
||||||
|
|
||||||
struct symbol *
|
struct symbol *
|
||||||
lookup_struct_typedef (char *name, const struct block *block, int noerr)
|
lookup_struct_typedef (const char *name, const struct block *block, int noerr)
|
||||||
{
|
{
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ lookup_struct_typedef (char *name, const struct block *block, int noerr)
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
lookup_objc_class (struct gdbarch *gdbarch, char *classname)
|
lookup_objc_class (struct gdbarch *gdbarch, const char *classname)
|
||||||
{
|
{
|
||||||
struct type *char_type = builtin_type (gdbarch)->builtin_char;
|
struct type *char_type = builtin_type (gdbarch)->builtin_char;
|
||||||
struct value * function, *classval;
|
struct value * function, *classval;
|
||||||
|
@ -135,7 +135,7 @@ lookup_objc_class (struct gdbarch *gdbarch, char *classname)
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
lookup_child_selector (struct gdbarch *gdbarch, char *selname)
|
lookup_child_selector (struct gdbarch *gdbarch, const char *selname)
|
||||||
{
|
{
|
||||||
struct type *char_type = builtin_type (gdbarch)->builtin_char;
|
struct type *char_type = builtin_type (gdbarch)->builtin_char;
|
||||||
struct value * function, *selstring;
|
struct value * function, *selstring;
|
||||||
|
@ -1233,7 +1233,7 @@ print_object_command (char *args, int from_tty)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct objc_methcall {
|
struct objc_methcall {
|
||||||
char *name;
|
const char *name;
|
||||||
/* Return instance method to be called. */
|
/* Return instance method to be called. */
|
||||||
int (*stop_at) (CORE_ADDR, CORE_ADDR *);
|
int (*stop_at) (CORE_ADDR, CORE_ADDR *);
|
||||||
/* Start of pc range corresponding to method invocation. */
|
/* Start of pc range corresponding to method invocation. */
|
||||||
|
|
|
@ -29,9 +29,9 @@ struct block;
|
||||||
struct parser_state;
|
struct parser_state;
|
||||||
|
|
||||||
extern CORE_ADDR lookup_objc_class (struct gdbarch *gdbarch,
|
extern CORE_ADDR lookup_objc_class (struct gdbarch *gdbarch,
|
||||||
char *classname);
|
const char *classname);
|
||||||
extern CORE_ADDR lookup_child_selector (struct gdbarch *gdbarch,
|
extern CORE_ADDR lookup_child_selector (struct gdbarch *gdbarch,
|
||||||
char *methodname);
|
const char *methodname);
|
||||||
|
|
||||||
extern char *objc_demangle (const char *mangled, int options);
|
extern char *objc_demangle (const char *mangled, int options);
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ extern void start_msglist (void);
|
||||||
extern void add_msglist (struct stoken *str, int addcolon);
|
extern void add_msglist (struct stoken *str, int addcolon);
|
||||||
extern int end_msglist (struct parser_state *);
|
extern int end_msglist (struct parser_state *);
|
||||||
|
|
||||||
struct symbol *lookup_struct_typedef (char *name, const struct block *block,
|
struct symbol *lookup_struct_typedef (const char *name,
|
||||||
|
const struct block *block,
|
||||||
int noerr);
|
int noerr);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1469,7 +1469,7 @@ find_pc_section (CORE_ADDR pc)
|
||||||
/* Return non-zero if PC is in a section called NAME. */
|
/* Return non-zero if PC is in a section called NAME. */
|
||||||
|
|
||||||
int
|
int
|
||||||
pc_in_section (CORE_ADDR pc, char *name)
|
pc_in_section (CORE_ADDR pc, const char *name)
|
||||||
{
|
{
|
||||||
struct obj_section *s;
|
struct obj_section *s;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
|
@ -514,7 +514,7 @@ extern int have_minimal_symbols (void);
|
||||||
extern struct obj_section *find_pc_section (CORE_ADDR pc);
|
extern struct obj_section *find_pc_section (CORE_ADDR pc);
|
||||||
|
|
||||||
/* Return non-zero if PC is in a section called NAME. */
|
/* Return non-zero if PC is in a section called NAME. */
|
||||||
extern int pc_in_section (CORE_ADDR, char *);
|
extern int pc_in_section (CORE_ADDR, const char *);
|
||||||
|
|
||||||
/* Return non-zero if PC is in a SVR4-style procedure linkage table
|
/* Return non-zero if PC is in a SVR4-style procedure linkage table
|
||||||
section. */
|
section. */
|
||||||
|
|
|
@ -72,7 +72,7 @@ int yyparse (void);
|
||||||
|
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
|
||||||
void yyerror (char *);
|
void yyerror (const char *);
|
||||||
|
|
||||||
static char *uptok (const char *, int);
|
static char *uptok (const char *, int);
|
||||||
%}
|
%}
|
||||||
|
@ -1047,7 +1047,7 @@ pop_current_type (void)
|
||||||
|
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
char *oper;
|
const char *oper;
|
||||||
int token;
|
int token;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
};
|
};
|
||||||
|
@ -1714,7 +1714,7 @@ pascal_parse (struct parser_state *par_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
yyerror (char *msg)
|
yyerror (const char *msg)
|
||||||
{
|
{
|
||||||
if (prev_lexptr)
|
if (prev_lexptr)
|
||||||
lexptr = prev_lexptr;
|
lexptr = prev_lexptr;
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern const char *pascal_main_name (void);
|
||||||
|
|
||||||
extern int pascal_parse (struct parser_state *); /* Defined in p-exp.y */
|
extern int pascal_parse (struct parser_state *); /* Defined in p-exp.y */
|
||||||
|
|
||||||
extern void pascal_yyerror (char *); /* Defined in p-exp.y */
|
extern void pascal_yyerror (const char *); /* Defined in p-exp.y */
|
||||||
|
|
||||||
/* Defined in p-typeprint.c */
|
/* Defined in p-typeprint.c */
|
||||||
extern void pascal_print_type (struct type *, const char *, struct ui_file *,
|
extern void pascal_print_type (struct type *, const char *, struct ui_file *,
|
||||||
|
|
|
@ -262,7 +262,7 @@ extern int operator_check_standard (struct expression *exp, int pos,
|
||||||
(struct objfile *objfile, void *data),
|
(struct objfile *objfile, void *data),
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
extern char *op_name_standard (enum exp_opcode);
|
extern const char *op_name_standard (enum exp_opcode);
|
||||||
|
|
||||||
extern struct type *follow_types (struct type *);
|
extern struct type *follow_types (struct type *);
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ enum precedence
|
||||||
|
|
||||||
struct op_print
|
struct op_print
|
||||||
{
|
{
|
||||||
char *string;
|
const char *string;
|
||||||
enum exp_opcode opcode;
|
enum exp_opcode opcode;
|
||||||
/* Precedence of operator. These values are used only by comparisons. */
|
/* Precedence of operator. These values are used only by comparisons. */
|
||||||
enum precedence precedence;
|
enum precedence precedence;
|
||||||
|
@ -352,7 +352,7 @@ struct exp_descriptor
|
||||||
The returned value should never be NULL, even if EXP_OPCODE is
|
The returned value should never be NULL, even if EXP_OPCODE is
|
||||||
an unknown opcode (a string containing an image of the numeric
|
an unknown opcode (a string containing an image of the numeric
|
||||||
value of the opcode can be returned, for instance). */
|
value of the opcode can be returned, for instance). */
|
||||||
char *(*op_name) (enum exp_opcode);
|
const char *(*op_name) (enum exp_opcode);
|
||||||
|
|
||||||
/* Dump the rest of this (prefix) expression after the operator
|
/* Dump the rest of this (prefix) expression after the operator
|
||||||
itself has been printed. See dump_subexp_body_standard in
|
itself has been printed. See dump_subexp_body_standard in
|
||||||
|
|
|
@ -560,7 +560,7 @@ set_next_address (struct gdbarch *gdbarch, CORE_ADDR addr)
|
||||||
int
|
int
|
||||||
print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
|
print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr,
|
||||||
struct ui_file *stream,
|
struct ui_file *stream,
|
||||||
int do_demangle, char *leadin)
|
int do_demangle, const char *leadin)
|
||||||
{
|
{
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
|
|
|
@ -875,7 +875,7 @@ psym_forget_cached_source_info (struct objfile *objfile)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_partial_symbols (struct gdbarch *gdbarch,
|
print_partial_symbols (struct gdbarch *gdbarch,
|
||||||
struct partial_symbol **p, int count, char *what,
|
struct partial_symbol **p, int count, const char *what,
|
||||||
struct ui_file *outfile)
|
struct ui_file *outfile)
|
||||||
{
|
{
|
||||||
fprintf_filtered (outfile, " %s partial symbols:\n", what);
|
fprintf_filtered (outfile, " %s partial symbols:\n", what);
|
||||||
|
|
|
@ -41,7 +41,7 @@ static int bppy_live;
|
||||||
gdbpy_breakpoint_object *bppy_pending_object;
|
gdbpy_breakpoint_object *bppy_pending_object;
|
||||||
|
|
||||||
/* Function that is called when a Python condition is evaluated. */
|
/* Function that is called when a Python condition is evaluated. */
|
||||||
static char * const stop_func = "stop";
|
static const char stop_func[] = "stop";
|
||||||
|
|
||||||
/* This is used to initialize various gdb.bp_* constants. */
|
/* This is used to initialize various gdb.bp_* constants. */
|
||||||
struct pybp_code
|
struct pybp_code
|
||||||
|
@ -400,7 +400,7 @@ bppy_get_location (PyObject *self, void *closure)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bppy_get_expression (PyObject *self, void *closure)
|
bppy_get_expression (PyObject *self, void *closure)
|
||||||
{
|
{
|
||||||
char *str;
|
const char *str;
|
||||||
gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
|
gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
|
||||||
struct watchpoint *wp;
|
struct watchpoint *wp;
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,8 @@
|
||||||
/* Struct representing built-in completion types. */
|
/* Struct representing built-in completion types. */
|
||||||
struct cmdpy_completer
|
struct cmdpy_completer
|
||||||
{
|
{
|
||||||
/* Python symbol name.
|
/* Python symbol name. */
|
||||||
This isn't a const char * for Python 2.4's sake.
|
const char *name;
|
||||||
PyModule_AddIntConstant only takes a char *, sigh. */
|
|
||||||
char *name;
|
|
||||||
/* Completion function. */
|
/* Completion function. */
|
||||||
completer_ftype *completer;
|
completer_ftype *completer;
|
||||||
};
|
};
|
||||||
|
@ -111,8 +109,10 @@ cmdpy_destroyer (struct cmd_list_element *self, void *context)
|
||||||
/* Called by gdb to invoke the command. */
|
/* Called by gdb to invoke the command. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
|
cmdpy_function (struct cmd_list_element *command,
|
||||||
|
char *args_entry, int from_tty)
|
||||||
{
|
{
|
||||||
|
const char *args = args_entry;
|
||||||
cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
|
cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
|
||||||
|
|
||||||
gdbpy_enter enter_py (get_current_arch (), current_language);
|
gdbpy_enter enter_py (get_current_arch (), current_language);
|
||||||
|
|
|
@ -47,7 +47,7 @@ create_event_object (PyTypeObject *py_type)
|
||||||
function acquires a new reference to ATTR. */
|
function acquires a new reference to ATTR. */
|
||||||
|
|
||||||
int
|
int
|
||||||
evpy_add_attribute (PyObject *event, char *name, PyObject *attr)
|
evpy_add_attribute (PyObject *event, const char *name, PyObject *attr)
|
||||||
{
|
{
|
||||||
return PyObject_SetAttrString (event, name, attr);
|
return PyObject_SetAttrString (event, name, attr);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ gdbpy_initialize_event (void)
|
||||||
|
|
||||||
int
|
int
|
||||||
gdbpy_initialize_event_generic (PyTypeObject *type,
|
gdbpy_initialize_event_generic (PyTypeObject *type,
|
||||||
char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
if (PyType_Ready (type) < 0)
|
if (PyType_Ready (type) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -131,9 +131,9 @@ extern int emit_clear_objfiles_event (void);
|
||||||
|
|
||||||
extern void evpy_dealloc (PyObject *self);
|
extern void evpy_dealloc (PyObject *self);
|
||||||
extern int evpy_add_attribute (PyObject *event,
|
extern int evpy_add_attribute (PyObject *event,
|
||||||
char *name, PyObject *attr)
|
const char *name, PyObject *attr)
|
||||||
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
|
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
|
||||||
int gdbpy_initialize_event_generic (PyTypeObject *type, char *name)
|
int gdbpy_initialize_event_generic (PyTypeObject *type, const char *name)
|
||||||
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
|
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
|
||||||
|
|
||||||
#endif /* GDB_PY_EVENT_H */
|
#endif /* GDB_PY_EVENT_H */
|
||||||
|
|
|
@ -38,7 +38,7 @@ static struct PyModuleDef EventModuleDef =
|
||||||
/* Initialize python events. */
|
/* Initialize python events. */
|
||||||
|
|
||||||
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
|
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
|
||||||
add_new_registry (eventregistry_object **registryp, char *name)
|
add_new_registry (eventregistry_object **registryp, const char *name)
|
||||||
{
|
{
|
||||||
*registryp = create_eventregistry_object ();
|
*registryp = create_eventregistry_object ();
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "py-ref.h"
|
#include "py-ref.h"
|
||||||
|
|
||||||
/* Function that is called when a Python finish bp is found out of scope. */
|
/* Function that is called when a Python finish bp is found out of scope. */
|
||||||
static char * const outofscope_func = "out_of_scope";
|
static const char outofscope_func[] = "out_of_scope";
|
||||||
|
|
||||||
/* struct implementing the gdb.FinishBreakpoint object by extending
|
/* struct implementing the gdb.FinishBreakpoint object by extending
|
||||||
the gdb.Breakpoint class. */
|
the gdb.Breakpoint class. */
|
||||||
|
|
|
@ -301,7 +301,7 @@ py_print_value (struct ui_out *out, struct value *val,
|
||||||
This function can return an iterator, or NULL. */
|
This function can return an iterator, or NULL. */
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
get_py_iter_from_func (PyObject *filter, char *func)
|
get_py_iter_from_func (PyObject *filter, const char *func)
|
||||||
{
|
{
|
||||||
if (PyObject_HasAttrString (filter, func))
|
if (PyObject_HasAttrString (filter, func))
|
||||||
{
|
{
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue