Change boolean options to bool instead of int
authorChristian Biesinger <cbiesinger@google.com>
Sat, 14 Sep 2019 19:36:58 +0000 (15:36 -0400)
committerChristian Biesinger <cbiesinger@google.com>
Wed, 18 Sep 2019 00:35:12 +0000 (09:35 +0900)
This is for add_setshow_boolean_cmd as well as the gdb::option interface.

gdb/ChangeLog:

2019-09-17  Christian Biesinger  <cbiesinger@google.com>

* ada-lang.c (ada_ignore_descriptive_types_p): Change to bool.
(print_signatures): Likewise.
(trust_pad_over_xvs): Likewise.
* arch/aarch64-insn.c (aarch64_debug): Likewise.
* arch/aarch64-insn.h (aarch64_debug): Likewise.
* arm-linux-nat.c (arm_apcs_32): Likewise.
* arm-linux-tdep.c (arm_apcs_32): Likewise.
* arm-nbsd-nat.c (arm_apcs_32): Likewise.
* arm-tdep.c (arm_debug): Likewise.
(arm_apcs_32): Likewise.
* auto-load.c (debug_auto_load): Likewise.
(auto_load_gdb_scripts): Likewise.
(global_auto_load): Likewise.
(auto_load_local_gdbinit): Likewise.
(auto_load_local_gdbinit_loaded): Likewise.
* auto-load.h (global_auto_load): Likewise.
(auto_load_local_gdbinit): Likewise.
(auto_load_local_gdbinit_loaded): Likewise.
* breakpoint.c (disconnected_dprintf): Likewise.
(breakpoint_proceeded): Likewise.
(automatic_hardware_breakpoints): Likewise.
(always_inserted_mode): Likewise.
(target_exact_watchpoints): Likewise.
(_initialize_breakpoint): Update.
* breakpoint.h (target_exact_watchpoints): Change to bool.
* btrace.c (maint_btrace_pt_skip_pad): Likewise.
* cli/cli-cmds.c (trace_commands): Likewise.
* cli/cli-cmds.h (trace_commands): Likewise.
* cli/cli-decode.c (add_setshow_boolean_cmd): Change int* argument
to bool*.
* cli/cli-logging.c (logging_overwrite): Change to bool.
(logging_redirect): Likewise.
(debug_redirect): Likewise.
* cli/cli-option.h (option_def) <boolean>: Change return type to bool*.
(struct boolean_option_def) <get_var_address_cb_>: Change return type
to bool.
<boolean_option_def>: Update.
(struct flag_option_def): Change default type of Context to bool
from int.
<flag_option_def>: Change return type of var_address_cb_ to bool*.
* cli/cli-setshow.c (do_set_command): Cast to bool* instead of int*.
(get_setshow_command_value_string): Likewise.
* cli/cli-style.c (cli_styling): Change to bool.
(source_styling): Likewise.
* cli/cli-style.h (source_styling): Likewise.
(cli_styling): Likewise.
* cli/cli-utils.h (struct qcs_flags) <quiet, cont, silent>: Change
to bool.
* command.h (var_types): Update comment.
(add_setshow_boolean_cmd): Change int* var argument to bool*.
* compile/compile-cplus-types.c (debug_compile_cplus_types): Change to
bool.
(debug_compile_cplus_scopes): Likewise.
* compile/compile-internal.h (compile_debug): Likewise.
* compile/compile.c (compile_debug): Likewise.
(struct compile_options) <raw>: Likewise.
* cp-support.c (catch_demangler_crashes): Likewise.
* cris-tdep.c (usr_cmd_cris_version_valid): Likewise.
(usr_cmd_cris_dwarf2_cfi): Likewise.
* csky-tdep.c (csky_debug): Likewise.
* darwin-nat.c (enable_mach_exceptions): Likewise.
* dcache.c (dcache_enabled_p): Likewise.
* defs.h (info_verbose): Likewise.
* demangle.c (demangle): Likewise.
(asm_demangle): Likewise.
* dwarf-index-cache.c (debug_index_cache): Likewise.
* dwarf2-frame.c (dwarf2_frame_unwinders_enabled_p): Likewise.
* dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Likewise.
* dwarf2read.c (check_physname): Likewise.
(use_deprecated_index_sections): Likewise.
(dwarf_always_disassemble): Likewise.
* eval.c (overload_resolution): Likewise.
* event-top.c (set_editing_cmd_var): Likewise.
(exec_done_display_p): Likewise.
* event-top.h (set_editing_cmd_var): Likewise.
(exec_done_display_p): Likewise.
* exec.c (write_files): Likewise.
* fbsd-nat.c (debug_fbsd_lwp): Likewise
(debug_fbsd_nat): Likewise.
* frame.h (struct frame_print_options) <print_raw_frame_arguments>:
Likewise.
(struct set_backtrace_options) <backtrace_past_main>: Likewise.
<backtrace_past_entry> Likewise.
* gdb-demangle.h (demangle): Likewise.
(asm_demangle): Likewise.
* gdb_bfd.c (bfd_sharing): Likewise.
* gdbcore.h (write_files): Likewise.
* gdbsupport/common-debug.c (show_debug_regs): Likewise.
* gdbsupport/common-debug.h (show_debug_regs): Likewise.
* gdbthread.h (print_thread_events): Likewise.
* gdbtypes.c (opaque_type_resolution): Likewise.
(strict_type_checking): Likewise.
* gnu-nat.c (gnu_debug_flag): Likewise.
* guile/scm-auto-load.c (auto_load_guile_scripts): Likewise.
* guile/scm-param.c (pascm_variable): Add boolval.
(add_setshow_generic): Update.
(pascm_param_value): Update.
(pascm_set_param_value_x): Update.
* hppa-tdep.c (hppa_debug): Change to bool..
* infcall.c (may_call_functions_p): Likewise.
(coerce_float_to_double_p): Likewise.
(unwind_on_signal_p): Likewise.
(unwind_on_terminating_exception_p): Likewise.
* infcmd.c (startup_with_shell): Likewise.
* inferior.c (print_inferior_events): Likewise.
* inferior.h (startup_with_shell): Likewise.
(print_inferior_events): Likewise.
* infrun.c (step_stop_if_no_debug): Likewise.
(detach_fork): Likewise.
(debug_displaced): Likewise.
(disable_randomization): Likewise.
(non_stop): Likewise.
(non_stop_1): Likewise.
(observer_mode): Likewise.
(observer_mode_1): Likewise.
(set_observer_mode): Update.
(sched_multi): Change to bool.
* infrun.h (debug_displaced): Likewise.
(sched_multi): Likewise.
(step_stop_if_no_debug): Likewise.
(non_stop): Likewise.
(disable_randomization): Likewise.
* linux-tdep.c (use_coredump_filter): Likewise.
(dump_excluded_mappings): Likewise.
* linux-thread-db.c (auto_load_thread_db): Likewise.
(check_thread_db_on_load): Likewise.
* main.c (captured_main_1): Update.
* maint-test-options.c (struct test_options_opts) <flag_opt, xx1_opt,
xx2_opt, boolean_opt>: Change to bool.
* maint-test-settings.c (maintenance_test_settings_boolean): Likewise.
* maint.c (maintenance_profile_p): Likewise.
(per_command_time): Likewise.
(per_command_space): Likewise.
(per_command_symtab): Likewise.
* memattr.c (inaccessible_by_default): Likewise.
* mi/mi-main.c (mi_async): Likewise.
(mi_async_1): Likewise.
* mips-tdep.c (mips64_transfers_32bit_regs_p): Likewise.
* nat/fork-inferior.h (startup_with_shell): Likewise.
* nat/linux-namespaces.c (debug_linux_namespaces): Likewise.
* nat/linux-namespaces.h (debug_linux_namespaces): Likewise.
* nios2-tdep.c (nios2_debug): Likewise.
* or1k-tdep.c (or1k_debug): Likewise.
* parse.c (parser_debug): Likewise.
* parser-defs.h (parser_debug): Likewise.
* printcmd.c (print_symbol_filename): Likewise.
* proc-api.c (procfs_trace): Likewise.
* python/py-auto-load.c (auto_load_python_scripts): Likewise.
* python/py-param.c (union parmpy_variable): Add "bool boolval" field.
(set_parameter_value): Update.
(add_setshow_generic): Update.
* python/py-value.c (copy_py_bool_obj): Change argument from int*
to bool*.
* python/python.c (gdbpy_parameter_value): Cast to bool* instead of
int*.
* ravenscar-thread.c (ravenscar_task_support): Change to bool.
* record-btrace.c (record_btrace_target::store_registers): Update.
* record-full.c (record_full_memory_query): Change to bool.
(record_full_stop_at_limit): Likewise.
* record-full.h (record_full_memory_query): Likewise.
* remote-notif.c (notif_debug): Likewise.
* remote-notif.h (notif_debug): Likewise.
* remote.c (use_range_stepping): Likewise.
(interrupt_on_connect): Likewise.
(remote_break): Likewise.
* ser-tcp.c (tcp_auto_retry): Likewise.
* ser-unix.c (serial_hwflow): Likewise.
* skip.c (debug_skip): Likewise.
* solib-aix.c (solib_aix_debug): Likewise.
* spu-tdep.c (spu_stop_on_load_p): Likewise.
(spu_auto_flush_cache_p): Likewise.
* stack.c (struct backtrace_cmd_options) <full, no_filters, hide>:
Likewise.
(struct info_print_options) <quiet>: Likewise.
* symfile-debug.c (debug_symfile): Likewise.
* symfile.c (auto_solib_add): Likewise.
(separate_debug_file_debug): Likewise.
* symfile.h (auto_solib_add): Likewise.
(separate_debug_file_debug): Likewise.
* symtab.c (basenames_may_differ): Likewise.
(struct filename_partial_match_opts) <dirname, basename>: Likewise.
(struct info_print_options) <quiet, exclude_minsyms>: Likewise.
(struct info_types_options) <quiet>: Likewise.
* symtab.h (demangle): Likewise.
(basenames_may_differ): Likewise.
* target-dcache.c (stack_cache_enabled_1): Likewise.
(code_cache_enabled_1): Likewise.
* target.c (trust_readonly): Likewise.
(may_write_registers): Likewise.
(may_write_memory): Likewise.
(may_insert_breakpoints): Likewise.
(may_insert_tracepoints): Likewise.
(may_insert_fast_tracepoints): Likewise.
(may_stop): Likewise.
(auto_connect_native_target): Likewise.
(target_stop_and_wait): Update.
(target_async_permitted): Change to bool.
(target_async_permitted_1): Likewise.
(may_write_registers_1): Likewise.
(may_write_memory_1): Likewise.
(may_insert_breakpoints_1): Likewise.
(may_insert_tracepoints_1): Likewise.
(may_insert_fast_tracepoints_1): Likewise.
(may_stop_1): Likewise.
* target.h (target_async_permitted): Likewise.
(may_write_registers): Likewise.
(may_write_memory): Likewise.
(may_insert_breakpoints): Likewise.
(may_insert_tracepoints): Likewise.
(may_insert_fast_tracepoints): Likewise.
(may_stop): Likewise.
* thread.c (struct info_threads_opts) <show_global_ids>: Likewise.
(make_thread_apply_all_options_def_group): Change argument from int*
to bool*.
(thread_apply_all_command): Update.
(print_thread_events): Change to bool.
* top.c (confirm): Likewise.
(command_editing_p): Likewise.
(history_expansion_p): Likewise.
(write_history_p): Likewise.
(info_verbose): Likewise.
* top.h (confirm): Likewise.
(history_expansion_p): Likewise.
* tracepoint.c (disconnected_tracing): Likewise.
(circular_trace_buffer): Likewise.
* typeprint.c (print_methods): Likewise.
(print_typedefs): Likewise.
* utils.c (debug_timestamp): Likewise.
(sevenbit_strings): Likewise.
(pagination_enabled): Likewise.
* utils.h (sevenbit_strings): Likewise.
(pagination_enabled): Likewise.
* valops.c (overload_resolution): Likewise.
* valprint.h (struct value_print_options) <prettyformat_arrays,
prettyformat_structs, vtblprint, unionprint, addressprint, objectprint,
stop_print_at_null, print_array_indexes, deref_ref, static_field_print,
pascal_static_field_print, raw, summary, symbol_print, finish_print>:
Likewise.
* windows-nat.c (new_console): Likewise.
(cygwin_exceptions): Likewise.
(new_group): Likewise.
(debug_exec): Likewise.
(debug_events): Likewise.
(debug_memory): Likewise.
(debug_exceptions): Likewise.
(useshell): Likewise.
* windows-tdep.c (maint_display_all_tib): Likewise.
* xml-support.c (debug_xml): Likewise.

115 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/arch/aarch64-insn.c
gdb/arch/aarch64-insn.h
gdb/arm-linux-nat.c
gdb/arm-linux-tdep.c
gdb/arm-nbsd-nat.c
gdb/arm-tdep.c
gdb/auto-load.c
gdb/auto-load.h
gdb/breakpoint.c
gdb/breakpoint.h
gdb/btrace.c
gdb/cli/cli-cmds.c
gdb/cli/cli-cmds.h
gdb/cli/cli-decode.c
gdb/cli/cli-logging.c
gdb/cli/cli-option.h
gdb/cli/cli-setshow.c
gdb/cli/cli-style.c
gdb/cli/cli-style.h
gdb/cli/cli-utils.h
gdb/command.h
gdb/compile/compile-cplus-types.c
gdb/compile/compile-internal.h
gdb/compile/compile.c
gdb/cp-support.c
gdb/cris-tdep.c
gdb/csky-tdep.c
gdb/darwin-nat.c
gdb/dcache.c
gdb/defs.h
gdb/demangle.c
gdb/dwarf-index-cache.c
gdb/dwarf2-frame.c
gdb/dwarf2-frame.h
gdb/dwarf2read.c
gdb/eval.c
gdb/event-top.c
gdb/event-top.h
gdb/exec.c
gdb/fbsd-nat.c
gdb/frame.h
gdb/gdb-demangle.h
gdb/gdb_bfd.c
gdb/gdbcore.h
gdb/gdbsupport/common-debug.c
gdb/gdbsupport/common-debug.h
gdb/gdbthread.h
gdb/gdbtypes.c
gdb/gnu-nat.c
gdb/guile/scm-auto-load.c
gdb/guile/scm-param.c
gdb/hppa-tdep.c
gdb/infcall.c
gdb/infcmd.c
gdb/inferior.c
gdb/inferior.h
gdb/infrun.c
gdb/infrun.h
gdb/linux-tdep.c
gdb/linux-thread-db.c
gdb/main.c
gdb/maint-test-options.c
gdb/maint-test-settings.c
gdb/maint.c
gdb/memattr.c
gdb/mi/mi-main.c
gdb/mips-tdep.c
gdb/nat/fork-inferior.h
gdb/nat/linux-namespaces.c
gdb/nat/linux-namespaces.h
gdb/nios2-tdep.c
gdb/or1k-tdep.c
gdb/parse.c
gdb/parser-defs.h
gdb/printcmd.c
gdb/proc-api.c
gdb/python/py-auto-load.c
gdb/python/py-param.c
gdb/python/py-value.c
gdb/python/python.c
gdb/ravenscar-thread.c
gdb/record-btrace.c
gdb/record-full.c
gdb/record-full.h
gdb/remote-notif.c
gdb/remote-notif.h
gdb/remote.c
gdb/ser-tcp.c
gdb/ser-unix.c
gdb/skip.c
gdb/solib-aix.c
gdb/spu-tdep.c
gdb/stack.c
gdb/symfile-debug.c
gdb/symfile.c
gdb/symfile.h
gdb/symtab.c
gdb/symtab.h
gdb/target-dcache.c
gdb/target.c
gdb/target.h
gdb/thread.c
gdb/top.c
gdb/top.h
gdb/tracepoint.c
gdb/typeprint.c
gdb/utils.c
gdb/utils.h
gdb/valops.c
gdb/valprint.h
gdb/windows-nat.c
gdb/windows-tdep.c
gdb/xml-support.c

index 3bf43d2dfebde9fdfd6ed078e9b3e5f71cbae768..8cb5bfeeb98e3cd2e47ccd290b49ed0d35ba1a0e 100644 (file)
@@ -1,3 +1,254 @@
+2019-09-17  Christian Biesinger  <cbiesinger@google.com>
+
+       * ada-lang.c (ada_ignore_descriptive_types_p): Change to bool.
+       (print_signatures): Likewise.
+       (trust_pad_over_xvs): Likewise.
+       * arch/aarch64-insn.c (aarch64_debug): Likewise.
+       * arch/aarch64-insn.h (aarch64_debug): Likewise.
+       * arm-linux-nat.c (arm_apcs_32): Likewise.
+       * arm-linux-tdep.c (arm_apcs_32): Likewise.
+       * arm-nbsd-nat.c (arm_apcs_32): Likewise.
+       * arm-tdep.c (arm_debug): Likewise.
+       (arm_apcs_32): Likewise.
+       * auto-load.c (debug_auto_load): Likewise.
+       (auto_load_gdb_scripts): Likewise.
+       (global_auto_load): Likewise.
+       (auto_load_local_gdbinit): Likewise.
+       (auto_load_local_gdbinit_loaded): Likewise.
+       * auto-load.h (global_auto_load): Likewise.
+       (auto_load_local_gdbinit): Likewise.
+       (auto_load_local_gdbinit_loaded): Likewise.
+       * breakpoint.c (disconnected_dprintf): Likewise.
+       (breakpoint_proceeded): Likewise.
+       (automatic_hardware_breakpoints): Likewise.
+       (always_inserted_mode): Likewise.
+       (target_exact_watchpoints): Likewise.
+       (_initialize_breakpoint): Update.
+       * breakpoint.h (target_exact_watchpoints): Change to bool.
+       * btrace.c (maint_btrace_pt_skip_pad): Likewise.
+       * cli/cli-cmds.c (trace_commands): Likewise.
+       * cli/cli-cmds.h (trace_commands): Likewise.
+       * cli/cli-decode.c (add_setshow_boolean_cmd): Change int* argument
+       to bool*.
+       * cli/cli-logging.c (logging_overwrite): Change to bool.
+       (logging_redirect): Likewise.
+       (debug_redirect): Likewise.
+       * cli/cli-option.h (option_def) <boolean>: Change return type to bool*.
+       (struct boolean_option_def) <get_var_address_cb_>: Change return type
+       to bool.
+       <boolean_option_def>: Update.
+       (struct flag_option_def): Change default type of Context to bool
+       from int.
+       <flag_option_def>: Change return type of var_address_cb_ to bool*.
+       * cli/cli-setshow.c (do_set_command): Cast to bool* instead of int*.
+       (get_setshow_command_value_string): Likewise.
+       * cli/cli-style.c (cli_styling): Change to bool.
+       (source_styling): Likewise.
+       * cli/cli-style.h (source_styling): Likewise.
+       (cli_styling): Likewise.
+       * cli/cli-utils.h (struct qcs_flags) <quiet, cont, silent>: Change
+       to bool.
+       * command.h (var_types): Update comment.
+       (add_setshow_boolean_cmd): Change int* var argument to bool*.
+       * compile/compile-cplus-types.c (debug_compile_cplus_types): Change to
+       bool.
+       (debug_compile_cplus_scopes): Likewise.
+       * compile/compile-internal.h (compile_debug): Likewise.
+       * compile/compile.c (compile_debug): Likewise.
+       (struct compile_options) <raw>: Likewise.
+       * cp-support.c (catch_demangler_crashes): Likewise.
+       * cris-tdep.c (usr_cmd_cris_version_valid): Likewise.
+       (usr_cmd_cris_dwarf2_cfi): Likewise.
+       * csky-tdep.c (csky_debug): Likewise.
+       * darwin-nat.c (enable_mach_exceptions): Likewise.
+       * dcache.c (dcache_enabled_p): Likewise.
+       * defs.h (info_verbose): Likewise.
+       * demangle.c (demangle): Likewise.
+       (asm_demangle): Likewise.
+       * dwarf-index-cache.c (debug_index_cache): Likewise.
+       * dwarf2-frame.c (dwarf2_frame_unwinders_enabled_p): Likewise.
+       * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Likewise.
+       * dwarf2read.c (check_physname): Likewise.
+       (use_deprecated_index_sections): Likewise.
+       (dwarf_always_disassemble): Likewise.
+       * eval.c (overload_resolution): Likewise.
+       * event-top.c (set_editing_cmd_var): Likewise.
+       (exec_done_display_p): Likewise.
+       * event-top.h (set_editing_cmd_var): Likewise.
+       (exec_done_display_p): Likewise.
+       * exec.c (write_files): Likewise.
+       * fbsd-nat.c (debug_fbsd_lwp): Likewise
+       (debug_fbsd_nat): Likewise.
+       * frame.h (struct frame_print_options) <print_raw_frame_arguments>:
+       Likewise.
+       (struct set_backtrace_options) <backtrace_past_main>: Likewise.
+       <backtrace_past_entry> Likewise.
+       * gdb-demangle.h (demangle): Likewise.
+       (asm_demangle): Likewise.
+       * gdb_bfd.c (bfd_sharing): Likewise.
+       * gdbcore.h (write_files): Likewise.
+       * gdbsupport/common-debug.c (show_debug_regs): Likewise.
+       * gdbsupport/common-debug.h (show_debug_regs): Likewise.
+       * gdbthread.h (print_thread_events): Likewise.
+       * gdbtypes.c (opaque_type_resolution): Likewise.
+       (strict_type_checking): Likewise.
+       * gnu-nat.c (gnu_debug_flag): Likewise.
+       * guile/scm-auto-load.c (auto_load_guile_scripts): Likewise.
+       * guile/scm-param.c (pascm_variable): Add boolval.
+       (add_setshow_generic): Update.
+       (pascm_param_value): Update.
+       (pascm_set_param_value_x): Update.
+       * hppa-tdep.c (hppa_debug): Change to bool..
+       * infcall.c (may_call_functions_p): Likewise.
+       (coerce_float_to_double_p): Likewise.
+       (unwind_on_signal_p): Likewise.
+       (unwind_on_terminating_exception_p): Likewise.
+       * infcmd.c (startup_with_shell): Likewise.
+       * inferior.c (print_inferior_events): Likewise.
+       * inferior.h (startup_with_shell): Likewise.
+       (print_inferior_events): Likewise.
+       * infrun.c (step_stop_if_no_debug): Likewise.
+       (detach_fork): Likewise.
+       (debug_displaced): Likewise.
+       (disable_randomization): Likewise.
+       (non_stop): Likewise.
+       (non_stop_1): Likewise.
+       (observer_mode): Likewise.
+       (observer_mode_1): Likewise.
+       (set_observer_mode): Update.
+       (sched_multi): Change to bool.
+       * infrun.h (debug_displaced): Likewise.
+       (sched_multi): Likewise.
+       (step_stop_if_no_debug): Likewise.
+       (non_stop): Likewise.
+       (disable_randomization): Likewise.
+       * linux-tdep.c (use_coredump_filter): Likewise.
+       (dump_excluded_mappings): Likewise.
+       * linux-thread-db.c (auto_load_thread_db): Likewise.
+       (check_thread_db_on_load): Likewise.
+       * main.c (captured_main_1): Update.
+       * maint-test-options.c (struct test_options_opts) <flag_opt, xx1_opt,
+       xx2_opt, boolean_opt>: Change to bool.
+       * maint-test-settings.c (maintenance_test_settings_boolean): Likewise.
+       * maint.c (maintenance_profile_p): Likewise.
+       (per_command_time): Likewise.
+       (per_command_space): Likewise.
+       (per_command_symtab): Likewise.
+       * memattr.c (inaccessible_by_default): Likewise.
+       * mi/mi-main.c (mi_async): Likewise.
+       (mi_async_1): Likewise.
+       * mips-tdep.c (mips64_transfers_32bit_regs_p): Likewise.
+       * nat/fork-inferior.h (startup_with_shell): Likewise.
+       * nat/linux-namespaces.c (debug_linux_namespaces): Likewise.
+       * nat/linux-namespaces.h (debug_linux_namespaces): Likewise.
+       * nios2-tdep.c (nios2_debug): Likewise.
+       * or1k-tdep.c (or1k_debug): Likewise.
+       * parse.c (parser_debug): Likewise.
+       * parser-defs.h (parser_debug): Likewise.
+       * printcmd.c (print_symbol_filename): Likewise.
+       * proc-api.c (procfs_trace): Likewise.
+       * python/py-auto-load.c (auto_load_python_scripts): Likewise.
+       * python/py-param.c (union parmpy_variable): Add "bool boolval" field.
+       (set_parameter_value): Update.
+       (add_setshow_generic): Update.
+       * python/py-value.c (copy_py_bool_obj): Change argument from int*
+       to bool*.
+       * python/python.c (gdbpy_parameter_value): Cast to bool* instead of
+       int*.
+       * ravenscar-thread.c (ravenscar_task_support): Change to bool.
+       * record-btrace.c (record_btrace_target::store_registers): Update.
+       * record-full.c (record_full_memory_query): Change to bool.
+       (record_full_stop_at_limit): Likewise.
+       * record-full.h (record_full_memory_query): Likewise.
+       * remote-notif.c (notif_debug): Likewise.
+       * remote-notif.h (notif_debug): Likewise.
+       * remote.c (use_range_stepping): Likewise.
+       (interrupt_on_connect): Likewise.
+       (remote_break): Likewise.
+       * ser-tcp.c (tcp_auto_retry): Likewise.
+       * ser-unix.c (serial_hwflow): Likewise.
+       * skip.c (debug_skip): Likewise.
+       * solib-aix.c (solib_aix_debug): Likewise.
+       * spu-tdep.c (spu_stop_on_load_p): Likewise.
+       (spu_auto_flush_cache_p): Likewise.
+       * stack.c (struct backtrace_cmd_options) <full, no_filters, hide>:
+       Likewise.
+       (struct info_print_options) <quiet>: Likewise.
+       * symfile-debug.c (debug_symfile): Likewise.
+       * symfile.c (auto_solib_add): Likewise.
+       (separate_debug_file_debug): Likewise.
+       * symfile.h (auto_solib_add): Likewise.
+       (separate_debug_file_debug): Likewise.
+       * symtab.c (basenames_may_differ): Likewise.
+       (struct filename_partial_match_opts) <dirname, basename>: Likewise.
+       (struct info_print_options) <quiet, exclude_minsyms>: Likewise.
+       (struct info_types_options) <quiet>: Likewise.
+       * symtab.h (demangle): Likewise.
+       (basenames_may_differ): Likewise.
+       * target-dcache.c (stack_cache_enabled_1): Likewise.
+       (code_cache_enabled_1): Likewise.
+       * target.c (trust_readonly): Likewise.
+       (may_write_registers): Likewise.
+       (may_write_memory): Likewise.
+       (may_insert_breakpoints): Likewise.
+       (may_insert_tracepoints): Likewise.
+       (may_insert_fast_tracepoints): Likewise.
+       (may_stop): Likewise.
+       (auto_connect_native_target): Likewise.
+       (target_stop_and_wait): Update.
+       (target_async_permitted): Change to bool.
+       (target_async_permitted_1): Likewise.
+       (may_write_registers_1): Likewise.
+       (may_write_memory_1): Likewise.
+       (may_insert_breakpoints_1): Likewise.
+       (may_insert_tracepoints_1): Likewise.
+       (may_insert_fast_tracepoints_1): Likewise.
+       (may_stop_1): Likewise.
+       * target.h (target_async_permitted): Likewise.
+       (may_write_registers): Likewise.
+       (may_write_memory): Likewise.
+       (may_insert_breakpoints): Likewise.
+       (may_insert_tracepoints): Likewise.
+       (may_insert_fast_tracepoints): Likewise.
+       (may_stop): Likewise.
+       * thread.c (struct info_threads_opts) <show_global_ids>: Likewise.
+       (make_thread_apply_all_options_def_group): Change argument from int*
+       to bool*.
+       (thread_apply_all_command): Update.
+       (print_thread_events): Change to bool.
+       * top.c (confirm): Likewise.
+       (command_editing_p): Likewise.
+       (history_expansion_p): Likewise.
+       (write_history_p): Likewise.
+       (info_verbose): Likewise.
+       * top.h (confirm): Likewise.
+       (history_expansion_p): Likewise.
+       * tracepoint.c (disconnected_tracing): Likewise.
+       (circular_trace_buffer): Likewise.
+       * typeprint.c (print_methods): Likewise.
+       (print_typedefs): Likewise.
+       * utils.c (debug_timestamp): Likewise.
+       (sevenbit_strings): Likewise.
+       (pagination_enabled): Likewise.
+       * utils.h (sevenbit_strings): Likewise.
+       (pagination_enabled): Likewise.
+       * valops.c (overload_resolution): Likewise.
+       * valprint.h (struct value_print_options) <prettyformat_arrays,
+       prettyformat_structs, vtblprint, unionprint, addressprint, objectprint,
+       stop_print_at_null, print_array_indexes, deref_ref, static_field_print,
+       pascal_static_field_print, raw, summary, symbol_print, finish_print>:
+       Likewise.
+       * windows-nat.c (new_console): Likewise.
+       (cygwin_exceptions): Likewise.
+       (new_group): Likewise.
+       (debug_exec): Likewise.
+       (debug_events): Likewise.
+       (debug_memory): Likewise.
+       (debug_exceptions): Likewise.
+       (useshell): Likewise.
+       * windows-tdep.c (maint_display_all_tib): Likewise.
+       * xml-support.c (debug_xml): Likewise.
+
 2019-09-17  Mike Gulick  <mgulick@mathworks.com>
 
        * source.c (prepare_path_for_appending): New function.
index 8cdb62bde034e5f369aa97a2cb2cf66728053036..c34733e754f6fa2bf473317a35c14d132cf0b4ca 100644 (file)
@@ -358,7 +358,7 @@ maint_show_ada_cmd (const char *args, int from_tty)
 
 /* The "maintenance ada set/show ignore-descriptive-type" value.  */
 
-static int ada_ignore_descriptive_types_p = 0;
+static bool ada_ignore_descriptive_types_p = false;
 
                        /* Inferior-specific data.  */
 
@@ -3795,7 +3795,7 @@ sort_choices (struct block_symbol syms[], int nsyms)
 
 /* Whether GDB should display formals and return types for functions in the
    overloads selection menu.  */
-static int print_signatures = 1;
+static bool print_signatures = true;
 
 /* Print the signature for SYM on STREAM according to the FLAGS options.  For
    all but functions, the signature is just the name of the symbol.  For
@@ -9299,7 +9299,7 @@ ada_is_string_type (struct type *type)
 
    Set to True if the debugger should trust the contents of PAD types.
    Otherwise, ignore the PAD type if there is a parallel XVS type.  */
-static int trust_pad_over_xvs = 1;
+static bool trust_pad_over_xvs = true;
 
 /* True if TYPE is a struct type introduced by the compiler to force the
    alignment of a value.  Such types have a single field with a
index e04ad87fefbe2078a4f85470fd25fe61241d6043..48d0be83ff9156450e36e6b213a78a1f21a37f23 100644 (file)
@@ -20,7 +20,7 @@
 #include "aarch64-insn.h"
 
 /* Toggle this file's internal debugging dump.  */
-int aarch64_debug = 0;
+bool aarch64_debug = false;
 
 /* Extract a signed value from a bit field within an instruction
    encoding.
index 4492594c1b9a21b51d6760fe7a21b3b2f3811405..47a825b11420aa5c27e0e9e68c6318abde6c1c9d 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef ARCH_AARCH64_INSN_H
 #define ARCH_AARCH64_INSN_H
 
-extern int aarch64_debug;
+extern bool aarch64_debug;
 
 /* List of opcodes that we need for building the jump pad and relocating
    an instruction.  */
index 6a374bbc74b8d7fd6c89c3bd77f2678cdb23bb26..ef44e68d31987cd5428209fa99fd1be5bec472f4 100644 (file)
@@ -66,7 +66,7 @@
 #define PTRACE_SETHBPREGS 30
 #endif
 
-extern int arm_apcs_32;
+extern bool arm_apcs_32;
 
 class arm_linux_nat_target final : public linux_nat_target
 {
index aec20877d9d2125fb03493494c416d1e405b8a6f..31ea4564dbbaefa15d78c0bddbb3ffa8f5de0be9 100644 (file)
@@ -56,7 +56,7 @@
 #include "user-regs.h"
 #include <ctype.h>
 #include "elf/common.h"
-extern int arm_apcs_32;
+extern bool arm_apcs_32;
 
 /* Under ARM GNU/Linux the traditional way of performing a breakpoint
    is to execute a particular software interrupt, rather than use a
index 2a83553a3fe23e07e07fe64cd24e9fa206a68307..38a9e954b920ac1c678ddfa6d202499eb9645f70 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 static arm_netbsd_nat_target the_arm_netbsd_nat_target;
 
-extern int arm_apcs_32;
+extern bool arm_apcs_32;
 
 static void
 arm_supply_gregset (struct regcache *regcache, struct reg *gregset)
index 5dcc44312201e95fdce0110f0f2ed7333e2a6368..0650485bf04e6ee81c930babd9a1ff07e140a35a 100644 (file)
@@ -65,7 +65,7 @@
 #include "gdbsupport/selftest.h"
 #endif
 
-static int arm_debug;
+static bool arm_debug;
 
 /* Macros for setting and testing a bit in a minimal symbol that marks
    it as Thumb function.  The MSB of the minimal symbol's "info" field
@@ -296,7 +296,7 @@ static CORE_ADDR arm_analyze_prologue (struct gdbarch *gdbarch,
 
 /* Set to true if the 32-bit mode is in use.  */
 
-int arm_apcs_32 = 1;
+bool arm_apcs_32 = true;
 
 /* Return the bit mask in ARM_PS_REGNUM that indicates Thumb mode.  */
 
index 115d5c10e821eb6b33521b7b365c9eb4cf03a2af..9798ab1a06768c95599113015d78baf7e2744002 100644 (file)
@@ -61,7 +61,7 @@ static void maybe_print_script_not_found_warning
    const char *section_name, unsigned offset);
 
 /* Value of the 'set debug auto-load' configuration variable.  */
-static int debug_auto_load = 0;
+static bool debug_auto_load = false;
 
 /* "show" command for the debug_auto_load configuration variable.  */
 
@@ -79,7 +79,7 @@ show_debug_auto_load (struct ui_file *file, int from_tty,
    set auto-load gdb-scripts on|off
    This is true if we should auto-load associated scripts when an objfile
    is opened, false otherwise.  */
-static int auto_load_gdb_scripts = 1;
+static bool auto_load_gdb_scripts = true;
 
 /* "show" command for the auto_load_gdb_scripts configuration variable.  */
 
@@ -110,16 +110,16 @@ auto_load_gdb_scripts_enabled (const struct extension_language_defn *extlang)
    This flag exists to facilitate deferring auto-loading during start-up
    until after ./.gdbinit has been read; it may augment the search directories
    used to find the scripts.  */
-int global_auto_load = 1;
+bool global_auto_load = true;
 
 /* Auto-load .gdbinit file from the current directory?  */
-int auto_load_local_gdbinit = 1;
+bool auto_load_local_gdbinit = true;
 
 /* Absolute pathname to the current directory .gdbinit, if it exists.  */
 char *auto_load_local_gdbinit_pathname = NULL;
 
-/* Boolean value if AUTO_LOAD_LOCAL_GDBINIT_PATHNAME has been loaded.  */
-int auto_load_local_gdbinit_loaded = 0;
+/* if AUTO_LOAD_LOCAL_GDBINIT_PATHNAME has been loaded.  */
+bool auto_load_local_gdbinit_loaded = false;
 
 /* "show" command for the auto_load_local_gdbinit configuration variable.  */
 
index 5d5903e11981fe5c5dc8d2a835e85ca35157101a..ab865e9fa5199f507cb2b63fcb83c3681eaef949 100644 (file)
@@ -25,11 +25,11 @@ struct program_space;
 struct auto_load_pspace_info;
 struct extension_language_defn;
 
-extern int global_auto_load;
+extern bool global_auto_load;
 
-extern int auto_load_local_gdbinit;
+extern bool auto_load_local_gdbinit;
 extern char *auto_load_local_gdbinit_pathname;
-extern int auto_load_local_gdbinit_loaded;
+extern bool auto_load_local_gdbinit_loaded;
 
 extern struct auto_load_pspace_info *
   get_auto_load_pspace_data_for_loading (struct program_space *pspace);
index 9478d2dcf20ffe81a34959c9e120d75703402dd1..8ef3aac0c1aa8baa38b38d6417fba56db783abfc 100644 (file)
@@ -290,7 +290,7 @@ static char *dprintf_channel;
 
 /* True if dprintf commands should continue to operate even if GDB
    has disconnected.  */
-static int disconnected_dprintf = 1;
+static bool disconnected_dprintf = true;
 
 struct command_line *
 breakpoint_commands (struct breakpoint *b)
@@ -301,7 +301,7 @@ breakpoint_commands (struct breakpoint *b)
 /* Flag indicating that a command has proceeded the inferior past the
    current breakpoint.  */
 
-static int breakpoint_proceeded;
+static bool breakpoint_proceeded;
 
 const char *
 bpdisp_text (enum bpdisp disp)
@@ -346,11 +346,11 @@ show_pending_break_support (struct ui_file *file, int from_tty,
                    value);
 }
 
-/* If 1, gdb will automatically use hardware breakpoints for breakpoints
+/* If true, gdb will automatically use hardware breakpoints for breakpoints
    set with "break" but falling in read-only memory.
-   If 0, gdb will warn about such breakpoints, but won't automatically
+   If false, gdb will warn about such breakpoints, but won't automatically
    use hardware breakpoints.  */
-static int automatic_hardware_breakpoints;
+static bool automatic_hardware_breakpoints;
 static void
 show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty,
                                     struct cmd_list_element *c,
@@ -368,7 +368,7 @@ show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty,
    breakpoints until the next resume, and removes them again when the
    target fully stops.  This is a bit safer in case GDB crashes while
    processing user input.  */
-static int always_inserted_mode = 0;
+static bool always_inserted_mode = false;
 
 static void
 show_always_inserted_mode (struct ui_file *file, int from_tty,
@@ -477,7 +477,7 @@ static int executing_breakpoint_commands;
 static int overlay_events_enabled;
 
 /* See description in breakpoint.h. */
-int target_exact_watchpoints = 0;
+bool target_exact_watchpoints = false;
 
 /* Walk the following statement or block through all breakpoints.
    ALL_BREAKPOINTS_SAFE does so even if the statement deletes the
@@ -15954,7 +15954,7 @@ Usage: agent-printf \"format string\", ARG1, ARG2, ARG3, ..., ARGN\n\
 This supports most C printf format specifications, like %s, %d, etc.\n\
 This is useful for formatted output in user-defined commands."));
 
-  automatic_hardware_breakpoints = 1;
+  automatic_hardware_breakpoints = true;
 
   gdb::observers::about_to_proceed.attach (breakpoint_about_to_proceed);
   gdb::observers::thread_exit.attach (remove_threaded_breakpoints);
index 69a043c7676b62c63fadcb3917c709ba655eab36..49380e30c263a24954bf78786dc791c305328826 100644 (file)
@@ -675,7 +675,7 @@ enum watchpoint_triggered
    only one register per watchpoint, thus assuming that all acesses that
    modify a memory location happen at its starting address. */
 
-extern int target_exact_watchpoints;
+extern bool target_exact_watchpoints;
 
 /* Note that the ->silent field is not currently used by any commands
    (though the code is in there if it was to be, and set_raw_breakpoint
index 466607dbfc2231bd3b954a59763fccc1e5bd79b2..1b809fb5c084fe15db7367b048ef3da56c297a22 100644 (file)
@@ -51,7 +51,7 @@ static struct cmd_list_element *maint_btrace_pt_set_cmdlist;
 static struct cmd_list_element *maint_btrace_pt_show_cmdlist;
 
 /* Control whether to skip PAD packets when computing the packet history.  */
-static int maint_btrace_pt_skip_pad = 1;
+static bool maint_btrace_pt_skip_pad = true;
 
 static void btrace_add_pc (struct thread_info *tp);
 
index 4fc656775c9bb40e86133a53f6312ea58db8d270..59c71f675619e7e0259a71ea1716977c95ee646f 100644 (file)
@@ -165,7 +165,7 @@ struct cmd_list_element *showchecklist;
 /* Command tracing state.  */
 
 int source_verbose = 0;
-int trace_commands = 0;
+bool trace_commands = false;
 \f
 /* 'script-extension' option support.  */
 
index 5bfffde04a105e911e245e4d1eab45b29c7a0c08..1a8b9a0d5068dbd61ac01d2e6055442f88991c5b 100644 (file)
@@ -139,7 +139,7 @@ extern gdb::optional<open_script>
 /* Command tracing state.  */
 
 extern int source_verbose;
-extern int trace_commands;
+extern bool trace_commands;
 
 /* Common code for the "with" and "maintenance with" commands.
    SET_CMD_PREFIX is the spelling of the corresponding "set" command
index 7d4b39f467cc7029090b0c37464d1d0a837f2e60..debffbc0f74e7db7565b8209bbf0cd7814db0d7f 100644 (file)
@@ -589,7 +589,7 @@ const char * const boolean_enums[] = { "on", "off", NULL };
    Returns the new command element.  */
 
 cmd_list_element *
-add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var,
+add_setshow_boolean_cmd (const char *name, enum command_class theclass, bool *var,
                         const char *set_doc, const char *show_doc,
                         const char *help_doc,
                         cmd_const_sfunc_ftype *set_func,
index 9e39be197b81b498f2bd28db8af8ab8a0e9649d7..22b540b4812e2ea6ba8ece75df29cf0273753441 100644 (file)
@@ -33,7 +33,7 @@ show_logging_filename (struct ui_file *file, int from_tty,
                    value);
 }
 
-static int logging_overwrite;
+static bool logging_overwrite;
 
 static void
 maybe_warn_already_logging ()
@@ -61,8 +61,8 @@ show_logging_overwrite (struct ui_file *file, int from_tty,
 }
 
 /* Value as configured by the user.  */
-static int logging_redirect;
-static int debug_redirect;
+static bool logging_redirect;
+static bool debug_redirect;
 
 static void
 set_logging_redirect (const char *args,
index d231d8b1adbf9a5713aae1f97c3a02b395fd574e..3fd0c0cdae94c757a46fa314fdf18b806909e2e3 100644 (file)
@@ -82,7 +82,7 @@ public:
      returns the address of some member.  */
   union
     {
-      int *(*boolean) (const option_def &, void *ctx);
+      bool *(*boolean) (const option_def &, void *ctx);
       unsigned int *(*uinteger) (const option_def &, void *ctx);
       int *(*integer) (const option_def &, void *ctx);
       const char **(*enumeration) (const option_def &, void *ctx);
@@ -155,7 +155,7 @@ template<typename Context>
 struct boolean_option_def : option_def
 {
   boolean_option_def (const char *long_option_,
-                     int *(*get_var_address_cb_) (Context *),
+                     bool *(*get_var_address_cb_) (Context *),
                      show_value_ftype *show_cmd_cb_,
                      const char *set_doc_,
                      const char *show_doc_ = nullptr,
@@ -165,7 +165,7 @@ struct boolean_option_def : option_def
                  show_cmd_cb_,
                  set_doc_, show_doc_, help_doc_)
   {
-    var_address.boolean = detail::get_var_address<int, Context>;
+    var_address.boolean = detail::get_var_address<bool, Context>;
   }
 };
 
@@ -173,11 +173,11 @@ struct boolean_option_def : option_def
    hood, but unlike boolean options, flag options don't take an on/off
    argument.  */
 
-template<typename Context = int>
+template<typename Context = bool>
 struct flag_option_def : boolean_option_def<Context>
 {
   flag_option_def (const char *long_option_,
-                    int *(*var_address_cb_) (Context *),
+                    bool *(*var_address_cb_) (Context *),
                     const char *set_doc_,
                     const char *help_doc_ = nullptr)
     : boolean_option_def<Context> (long_option_,
index 40538832b5da39599569a565ce790d8b68973ea0..d8391597acf9d4772604b8076c363dcda019ff58 100644 (file)
@@ -416,9 +416,9 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
 
        if (val < 0)
          error (_("\"on\" or \"off\" expected."));
-       if (val != *(int *) c->var)
+       if (val != *(bool *) c->var)
          {
-           *(int *) c->var = val;
+           *(bool *) c->var = val;
 
            option_changed = 1;
          }
@@ -588,7 +588,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
          break;
        case var_boolean:
          {
-           const char *opt = *(int *) c->var ? "on" : "off";
+           const char *opt = *(bool *) c->var ? "on" : "off";
 
            gdb::observers::command_param_changed.notify (name, opt);
          }
@@ -645,7 +645,7 @@ get_setshow_command_value_string (cmd_list_element *c)
        stb.puts (*(char **) c->var);
       break;
     case var_boolean:
-      stb.puts (*(int *) c->var ? "on" : "off");
+      stb.puts (*(bool *) c->var ? "on" : "off");
       break;
     case var_auto_boolean:
       switch (*(enum auto_boolean*) c->var)
index e594e38cd6ddfebb3fec118c1b2abedff2c0b9a0..ea301774d22896f60d1a3973f86a56126a35668c 100644 (file)
 /* True if styling is enabled.  */
 
 #if defined (__MSDOS__) || defined (__CYGWIN__)
-int cli_styling = 0;
+bool cli_styling = false;
 #else
-int cli_styling = 1;
+bool cli_styling = true;
 #endif
 
 /* True if source styling is enabled.  Note that this is only
    consulted when cli_styling is true.  */
 
-int source_styling = 1;
+bool source_styling = true;
 
 /* Name of colors; must correspond to ui_file_style::basic_color.  */
 static const char * const cli_colors[] = {
index cdcea84f0ee3dbb6d52056eab6dc56d15038d241..826162f5788e51fe6a9394581071bce225ddd621 100644 (file)
@@ -110,9 +110,9 @@ extern cli_style_option title_style;
 
 
 /* True if source styling is enabled.  */
-extern int source_styling;
+extern bool source_styling;
 
 /* True if styling is enabled.  */
-extern int cli_styling;
+extern bool cli_styling;
 
 #endif /* CLI_CLI_STYLE_H */
index cbe8ff66e15da48dae50da5f0d45f29afff8971d..33b8663e9ae9ddc9ee79b6ee3246daa8102dfaa1 100644 (file)
@@ -215,9 +215,9 @@ check_for_argument (char **str, const char *arg)
 
 struct qcs_flags
 {
-  int quiet = false;
-  int cont = false;
-  int silent = false;
+  bool quiet = false;
+  bool cont = false;
+  bool silent = false;
 };
 
 /* Validate FLAGS.  Throws an error if both FLAGS->CONT and
index 2c608048d5471daa37bd245b65335982abb86785..cf190ef649d26bfe726969ce8493902036f18d2c 100644 (file)
@@ -62,8 +62,8 @@ cmd_types;
 /* Types of "set" or "show" command.  */
 typedef enum var_types
   {
-    /* "on" or "off".  *VAR is an integer which is nonzero for on,
-       zero for off.  */
+    /* "on" or "off".  *VAR is a bool which is true for on,
+       false for off.  */
     var_boolean,
 
     /* "on" / "true" / "enable" or "off" / "false" / "disable" or
@@ -331,7 +331,7 @@ extern void add_setshow_auto_boolean_cmd (const char *name,
 extern cmd_list_element *
   add_setshow_boolean_cmd (const char *name,
                           enum command_class theclass,
-                          int *var,
+                          bool *var,
                           const char *set_doc, const char *show_doc,
                           const char *help_doc,
                           cmd_const_sfunc_ftype *set_func,
index 3a7c8b01f7d0906c87bcdc92262684e845f2c1b8..042c2afbe90e0ad0abbaf357937c674c13d75f45 100644 (file)
@@ -41,11 +41,11 @@ const char *compile_cplus_instance::m_default_cflags = "-std=gnu++11";
 
 /* Flag to enable internal debugging.  */
 
-static int debug_compile_cplus_types = 0;
+static bool debug_compile_cplus_types = false;
 
 /* Flag to enable internal scope switching debugging.  */
 
-static int debug_compile_cplus_scopes = 0;
+static bool debug_compile_cplus_scopes = false;
 
 /* Forward declarations.  */
 
index 406a369d683d5333b05ab147d5320e42a5a87385..9c0e98941089d3f9ee07f9de9d0e29dd724cfd38 100644 (file)
@@ -21,7 +21,7 @@
 
 /* Debugging flag for the "compile" family of commands.  */
 
-extern int compile_debug;
+extern bool compile_debug;
 
 struct block;
 
index 87970d2c9485942dad05f4bfd42bdb1092c48ea7..5c3400ffec89d1b30ca4663fcb91819d3e1a8034 100644 (file)
@@ -56,7 +56,7 @@ static struct cmd_list_element *compile_command_list;
 
 /* Debug flag for "compile" commands.  */
 
-int compile_debug;
+bool compile_debug;
 
 /* Object of this type are stored in the compiler's symbol_err_map.  */
 
@@ -241,7 +241,7 @@ show_compile_debug (struct ui_file *file, int from_tty,
 struct compile_options
 {
   /* For -raw.  */
-  int raw = false;
+  bool raw = false;
 };
 
 using compile_flag_option_def
index b8b0fcc0ae264f16e7b07e2ac5c7fe6d961d56b9..cd732b60e7d9c6a7d89588dada4666756d161794 100644 (file)
@@ -1469,10 +1469,10 @@ cp_lookup_rtti_type (const char *name, const struct block *block)
 
 #ifdef HAVE_WORKING_FORK
 
-/* If nonzero, attempt to catch crashes in the demangler and print
+/* If true, attempt to catch crashes in the demangler and print
    useful debugging information.  */
 
-static int catch_demangler_crashes = 1;
+static bool catch_demangler_crashes = true;
 
 /* Stack context and environment for demangler crash recovery.  */
 
index 8eda05806f819f9fda0de37f55f222748b5daaff..706f65db28ed3393156839cf77e579ef705068a3 100644 (file)
@@ -148,7 +148,7 @@ extern const struct cris_spec_reg cris_spec_regs[];
 static unsigned int usr_cmd_cris_version;
 
 /* Indicates whether to trust the above variable.  */
-static int usr_cmd_cris_version_valid = 0;
+static bool usr_cmd_cris_version_valid = false;
 
 static const char cris_mode_normal[] = "normal";
 static const char cris_mode_guru[] = "guru";
@@ -163,7 +163,7 @@ static const char *const cris_modes[] = {
 static const char *usr_cmd_cris_mode = cris_mode_normal;
 
 /* Whether to make use of Dwarf-2 CFI (default on).  */
-static int usr_cmd_cris_dwarf2_cfi = 1;
+static bool usr_cmd_cris_dwarf2_cfi = true;
 
 /* Sigtramp identification code copied from i386-linux-tdep.c.  */
 
index 54b856af067ddc23589a486d9c6ab835defe8f49..a6f78a187cff8651c621ec1e3740d4b1ea6e6f12 100644 (file)
@@ -59,7 +59,7 @@
 #include <vector>
 
 /* Control debugging information emitted in this file.  */
-static int csky_debug = 0;
+static bool csky_debug = false;
 
 static struct reggroup *cr_reggroup;
 static struct reggroup *fr_reggroup;
index 8f71def069de255a2f6f2fa90684bf23a8b9edb6..ceef36473d01be48cbc94287418eeedeccfc8c45 100644 (file)
@@ -120,7 +120,7 @@ static vm_size_t mach_page_size;
 
 /* If Set, catch all mach exceptions (before they are converted to signals
    by the kernel).  */
-static int enable_mach_exceptions;
+static bool enable_mach_exceptions;
 
 /* Inferior that should report a fake stop event.  */
 static struct inferior *darwin_inf_fake_stop;
index 1716def4c4a08188ecfce039658aa52af385e1e3..509782c319ac9b4b4609b4f371e23536d3dcba70 100644 (file)
@@ -126,7 +126,7 @@ static int dcache_read_line (DCACHE *dcache, struct dcache_block *db);
 
 static struct dcache_block *dcache_alloc (DCACHE *dcache, CORE_ADDR addr);
 
-static int dcache_enabled_p = 0; /* OBSOLETE */
+static bool dcache_enabled_p = false; /* OBSOLETE */
 
 static void
 show_dcache_enabled_p (struct ui_file *file, int from_tty,
index c9a38b60a6d0525de2c41e415e1631052dbfee58..f12ba366ccf07fffcb1c01b4bee0b8a6b4f76a79 100644 (file)
@@ -314,7 +314,7 @@ struct ui;
 
 extern int input_interactive_p (struct ui *);
 
-extern int info_verbose;
+extern bool info_verbose;
 
 /* From printcmd.c */
 
index 29f46968a29c5b0c6539dd8945ffd390e5f5a5d8..cfe3421b23c9e2f29a7589fb11ec37a75b783b0e 100644 (file)
@@ -44,7 +44,7 @@
 #endif
 
 /* See documentation in gdb-demangle.h.  */
-int demangle = 1;
+bool demangle = true;
 
 static void
 show_demangle (struct ui_file *file, int from_tty,
@@ -57,7 +57,7 @@ show_demangle (struct ui_file *file, int from_tty,
 }
 
 /* See documentation in gdb-demangle.h.  */
-int asm_demangle = 0;
+bool asm_demangle = false;
 
 static void
 show_asm_demangle (struct ui_file *file, int from_tty,
index e56cb59343c6837f062ee550aa301384a7540a32..d00d6511abb43c60499cef4d8defe1cfa6fa7aec 100644 (file)
@@ -32,8 +32,8 @@
 #include <string>
 #include <stdlib.h>
 
-/* When set to 1, show debug messages about the index cache.  */
-static int debug_index_cache = 0;
+/* When set to true, show debug messages about the index cache.  */
+static bool debug_index_cache = false;
 
 /* The index cache directory, used for "set/show index-cache directory".  */
 static char *index_cache_directory = NULL;
index 7839942b8c7f5c3ff38b8acb6921ffb24f97d817..e18b35e7dba09d2022336c4f01540b0a49071c42 100644 (file)
@@ -171,7 +171,7 @@ static CORE_ADDR read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
 \f
 
 /* See dwarf2-frame.h.  */
-int dwarf2_frame_unwinders_enabled_p = 1;
+bool dwarf2_frame_unwinders_enabled_p = true;
 
 /* Store the length the expression for the CFA in the `cfa_reg' field,
    which is unused in that case.  */
index 6caf82ae0fc9e4346b4972c50dc170c9b9b2f703..3c54f0950e0b05e37c4eae0ab418ce1c35455915 100644 (file)
@@ -201,7 +201,7 @@ struct dwarf2_frame_state
    registered with the gdbarch.  Not all architectures can or do use the
    DWARF unwinders.  Setting this to true on a target that does not
    otherwise support the DWARF unwinders has no effect.  */
-extern int dwarf2_frame_unwinders_enabled_p;
+extern bool dwarf2_frame_unwinders_enabled_p;
 
 /* Set the architecture-specific register state initialization
    function for GDBARCH to INIT_REG.  */
index a2b80ebbc15b2f450046436b74bb53d0498cdc08..ea9904c416291a8f3e4bb2809e3cf230e30cd6c1 100644 (file)
@@ -102,11 +102,11 @@ static unsigned int dwarf_die_debug = 0;
 /* When non-zero, dump line number entries as they are read in.  */
 static unsigned int dwarf_line_debug = 0;
 
-/* When non-zero, cross-check physname against demangler.  */
-static int check_physname = 0;
+/* When true, cross-check physname against demangler.  */
+static bool check_physname = false;
 
-/* When non-zero, do not reject deprecated .gdb_index sections.  */
-static int use_deprecated_index_sections = 0;
+/* When true, do not reject deprecated .gdb_index sections.  */
+static bool use_deprecated_index_sections = false;
 
 static const struct objfile_key<dwarf2_per_objfile> dwarf2_objfile_data_key;
 
@@ -25837,7 +25837,7 @@ show_dwarf_cmd (const char *args, int from_tty)
   cmd_show_list (show_dwarf_cmdlist, from_tty, "");
 }
 
-int dwarf_always_disassemble;
+bool dwarf_always_disassemble;
 
 static void
 show_dwarf_always_disassemble (struct ui_file *file, int from_tty,
index aed89e5f85a1a6806ec4b25df6f76d6d38e4336f..f8915b99578e6dfcad6b943c43a3336ed6f37423 100644 (file)
@@ -43,7 +43,7 @@
 #include <ctype.h>
 
 /* This is defined in valops.c */
-extern int overload_resolution;
+extern bool overload_resolution;
 
 /* Prototypes for local functions.  */
 
index 2132fb550dc261825914d51a7da28ea8c6bce02c..0b05b2f85a52e6ca0a5c79885f8ed30bcf24e766 100644 (file)
@@ -86,11 +86,11 @@ static void async_sigterm_handler (gdb_client_data arg);
    ezannoni: as of 1999-04-29 I expect that this
    variable will not be used after gdb is changed to use the event
    loop as default engine, and event-top.c is merged into top.c.  */
-int set_editing_cmd_var;
+bool set_editing_cmd_var;
 
 /* This is used to display the notification of the completion of an
    asynchronous execution command.  */
-int exec_done_display_p = 0;
+bool exec_done_display_p = false;
 
 /* Used by the stdin event handler to compensate for missed stdin events.
    Setting this to a non-zero value inside an stdin callback makes the callback
index 4c3e6cb8612a9b7f21e789105d78f773d53fc7d1..1dc7b13d4f8adb5f515fed5114bf4f04628cd46b 100644 (file)
@@ -52,8 +52,8 @@ extern void async_enable_stdin (void);
 /* Exported variables from event-top.c.
    FIXME: these should really go into top.h.  */
 
-extern int set_editing_cmd_var;
-extern int exec_done_display_p;
+extern bool set_editing_cmd_var;
+extern bool exec_done_display_p;
 extern struct prompts the_prompts;
 extern void (*after_char_processing_hook) (void);
 extern int call_stdin_event_handler_again_p;
index 3098fcaadd5c5ca5e8819d8ccbfcc57ec4a5765a..4e4cacffda07e97a3d17a14fddded7d700cb3d02 100644 (file)
@@ -84,7 +84,7 @@ static exec_target exec_ops;
 
 /* Whether to open exec and core files read-only or read-write.  */
 
-int write_files = 0;
+bool write_files = false;
 static void
 show_write_files (struct ui_file *file, int from_tty,
                  struct cmd_list_element *c, const char *value)
index 5f121fc6f2aca006cd65b62f1ae4dd28d1eaa5ca..0274ff542eaf419a605884a2a18f0e51ba8bdd59 100644 (file)
@@ -832,8 +832,8 @@ fbsd_nat_target::xfer_partial (enum target_object object,
 }
 
 #ifdef PT_LWPINFO
-static int debug_fbsd_lwp;
-static int debug_fbsd_nat;
+static bool debug_fbsd_lwp;
+static bool debug_fbsd_nat;
 
 static void
 show_fbsd_lwp_debug (struct ui_file *file, int from_tty,
index 09842c92a345c0cbf734738a37b0ba004a8c1049..624bc87c9d3fabb7c608d1890c61217641432ab1 100644 (file)
@@ -808,9 +808,9 @@ struct frame_print_options
   const char *print_frame_info = print_frame_info_auto;
   const char *print_entry_values = print_entry_values_default;
 
-  /* If non-zero, don't invoke pretty-printers for frame
+  /* If true, don't invoke pretty-printers for frame
      arguments.  */
-  int print_raw_frame_arguments;
+  bool print_raw_frame_arguments;
 };
 
 /* The values behind the global "set print ..." settings.  */
@@ -931,11 +931,11 @@ struct set_backtrace_options
 {
   /* Flag to indicate whether backtraces should continue past
      main.  */
-  int backtrace_past_main = 0;
+  bool backtrace_past_main = false;
 
   /* Flag to indicate whether backtraces should continue past
      entry.  */
-  int backtrace_past_entry = 0;
+  bool backtrace_past_entry = false;
 
   /* Upper bound on the number of backtrace levels.  Note this is not
      exposed as a command option, because "backtrace" and "frame
index 9c944a5017f9b54fc4693abd1a2708f613266052..327a63313b40947b9199e2db585edb30d7b2d287 100644 (file)
 #ifndef GDB_DEMANGLE_H
 #define GDB_DEMANGLE_H
 
-/* Nonzero means that encoded C++/ObjC names should be printed out in their
+/* True means that encoded C++/ObjC names should be printed out in their
    C++/ObjC form rather than raw.  */
-extern int demangle;
+extern bool demangle;
 
-/* Nonzero means that encoded C++/ObjC names should be printed out in their
+/* True means that encoded C++/ObjC names should be printed out in their
    C++/ObjC form even in assembler language displays.  If this is set, but
-   DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls.  */
-extern int asm_demangle;
+   DEMANGLE is false, names are printed raw, i.e. DEMANGLE controls.  */
+extern bool asm_demangle;
 
 /* Check if a character is one of the commonly used C++ marker characters.  */
 extern int is_cplus_marker (int);
index d3b4c749f5066e81a0b7049c7e55e677ab717a6a..a17460a8a00d4e665a9a4b5bc11d4f18642a953a 100644 (file)
@@ -137,7 +137,7 @@ static htab_t gdb_bfd_cache;
 /* When true gdb will reuse an existing bfd object if the filename,
    modification time, and file size all match.  */
 
-static int bfd_sharing = 1;
+static bool bfd_sharing = true;
 static void
 show_bfd_sharing  (struct ui_file *file, int from_tty,
                   struct cmd_list_element *c, const char *value)
index 6f9b4d88ecdb858567d778543ff0e5ef49fb23af..cac91c097bab310693788d5de69a6f9d3931d41d 100644 (file)
@@ -137,7 +137,7 @@ extern void specify_exec_file_hook (void (*hook) (const char *filename));
 
 /* Whether to open exec and core files read-only or read-write.  */
 
-extern int write_files;
+extern bool write_files;
 
 /* Open and set up the core file bfd.  */
 
index 97c90032ebd9855335f1ca3a8ecedcacdd2deadc..7e7e5c3f018955ba98c78d08f3deae057805314a 100644 (file)
@@ -22,7 +22,7 @@
 
 /* See gdbsupport/common-debug.h.  */
 
-int show_debug_regs;
+bool show_debug_regs;
 
 /* See gdbsupport/common-debug.h.  */
 
index d5bfc9eb3ae239cb23e569a0d3b7bfa7d00fc209..5584f0984421634fa73da1c7eb561a5f0ddb689e 100644 (file)
 #ifndef COMMON_COMMON_DEBUG_H
 #define COMMON_COMMON_DEBUG_H
 
-/* Set to nonzero to enable debugging of hardware breakpoint/
+/* Set to true to enable debugging of hardware breakpoint/
    watchpoint support code.  */
 
-extern int show_debug_regs;
+extern bool show_debug_regs;
 
 /* Print a formatted message to the appropriate channel for
    debugging output for the client.  */
index 04230d3c170e74afe8f16910c9448a035d2b5abe..0daea9c2dac2a369d4fae11773708f00dadf20cd 100644 (file)
@@ -623,7 +623,7 @@ extern void thread_command (const char *tidstr, int from_tty);
 
 /* Print notices on thread events (attach, detach, etc.), set with
    `set print thread-events'.  */
-extern int print_thread_events;
+extern bool print_thread_events;
 
 /* Prints the list of threads and their details on UIOUT.  If
    REQUESTED_THREADS, a list of GDB ids/ranges, is not NULL, only
index 4bc02e08f96127455ba62f1536d3e72823f9945b..afda89e43fc99b568370640bb9b2812aa4790959 100644 (file)
@@ -116,7 +116,7 @@ const struct floatformat *floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN] = {
 
 /* Should opaque types be resolved?  */
 
-static int opaque_type_resolution = 1;
+static bool opaque_type_resolution = true;
 
 /* A flag to enable printing of debugging information of C++
    overloading.  */
@@ -125,7 +125,7 @@ unsigned int overload_debug = 0;
 
 /* A flag to enable strict type checking.  */
 
-static int strict_type_checking = 1;
+static bool strict_type_checking = true;
 
 /* A function to show whether opaque types are resolved.  */
 
index 80e78e859be8c3f1ece63330044f803e5bcb8c4c..b55c75b097607458f722aa8291e774e0a489697f 100644 (file)
@@ -93,7 +93,7 @@ int proc_wait_pid = 0;
 /* The number of wait requests we've sent, and expect replies from.  */
 int proc_waits_pending = 0;
 
-int gnu_debug_flag = 0;
+bool gnu_debug_flag = false;
 
 /* Forward decls */
 
index cadf987b6f219e2a3bf5f8d684299d3fe14663a0..4685969348098c8211b711d1ee373380474b22ca 100644 (file)
@@ -30,7 +30,7 @@
    set auto-load guile-scripts on|off
    This is true if we should auto-load associated Guile scripts when an
    objfile is opened, false otherwise.  */
-static int auto_load_guile_scripts = 1;
+static bool auto_load_guile_scripts = true;
 
 /* "show" command for the auto_load_guile_scripts configuration variable.  */
 
index 53120cb23e0950ebdb3e64bcbff7067a2e11791a..6d24c2c37b7f8b29cd1cb5ca8d057dd11e528612 100644 (file)
 
 union pascm_variable
 {
-  /* Hold an integer value, for boolean and integer types.  */
+  /* Hold an boolean value.  */
+  bool boolval;
+
+  /* Hold an integer value.  */
   int intval;
 
   /* Hold an auto_boolean.  */
@@ -365,7 +368,7 @@ add_setshow_generic (enum var_types param_type, enum command_class cmd_class,
     {
     case var_boolean:
       add_setshow_boolean_cmd (cmd_name, cmd_class,
-                              &self->value.intval,
+                              &self->value.boolval,
                               set_doc, show_doc, help_doc,
                               set_func, show_func,
                               set_list, show_list);
@@ -606,7 +609,7 @@ pascm_param_value (enum var_types type, void *var,
 
     case var_boolean:
       {
-       if (* (int *) var)
+       if (* (bool *) var)
          return SCM_BOOL_T;
        else
          return SCM_BOOL_F;
@@ -717,7 +720,7 @@ pascm_set_param_value_x (enum var_types type, union pascm_variable *var,
     case var_boolean:
       SCM_ASSERT_TYPE (gdbscm_is_bool (value), value, arg_pos, func_name,
                       _("boolean"));
-      var->intval = gdbscm_is_true (value);
+      var->boolval = gdbscm_is_true (value);
       break;
 
     case var_auto_boolean:
index be30359638c37fab2bd3ac3e9e4389333e43a7ad..b1f71883ec38d68d3c4d986f5be1cac4356a6870 100644 (file)
@@ -41,7 +41,7 @@
 #include "hppa-tdep.h"
 #include <algorithm>
 
-static int hppa_debug = 0;
+static bool hppa_debug = false;
 
 /* Some local constants.  */
 static const int hppa32_num_regs = 128;
index 23f17ee0e236d2a2d9d644cf663914777f1d6fc8..726f14d525fb3d338f2a34b702bc604f9d2e2f72 100644 (file)
@@ -55,7 +55,7 @@
    asynchronous inferior function call implementation, and that in
    turn means restructuring the code so that it is event driven.  */
 
-static int may_call_functions_p = 1;
+static bool may_call_functions_p = true;
 static void
 show_may_call_functions_p (struct ui_file *file, int from_tty,
                           struct cmd_list_element *c,
@@ -86,7 +86,7 @@ show_may_call_functions_p (struct ui_file *file, int from_tty,
    trust the debug information; the user can override this behavior
    with "set coerce-float-to-double 0".  */
 
-static int coerce_float_to_double_p = 1;
+static bool coerce_float_to_double_p = true;
 static void
 show_coerce_float_to_double_p (struct ui_file *file, int from_tty,
                               struct cmd_list_element *c, const char *value)
@@ -104,7 +104,7 @@ show_coerce_float_to_double_p (struct ui_file *file, int from_tty,
 
    The default is to stop in the frame where the signal was received.  */
 
-static int unwind_on_signal_p = 0;
+static bool unwind_on_signal_p = false;
 static void
 show_unwind_on_signal_p (struct ui_file *file, int from_tty,
                         struct cmd_list_element *c, const char *value)
@@ -127,7 +127,7 @@ show_unwind_on_signal_p (struct ui_file *file, int from_tty,
    The default is to unwind the frame if a std::terminate call is
    made.  */
 
-static int unwind_on_terminating_exception_p = 1;
+static bool unwind_on_terminating_exception_p = true;
 
 static void
 show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty,
index d7a7e6f93369062d3766a7e2b53322954f25a336..dc82ef043fe85deaef3419e7171e6148af06f977 100644 (file)
@@ -105,7 +105,7 @@ int stopped_by_random_signal;
 
 /* See inferior.h.  */
 
-int startup_with_shell = 1;
+bool startup_with_shell = true;
 
 \f
 /* Accessor routines.  */
index 2d58a11ba85aa0c79479f49719df17928f5a1dc0..cf2175494d166620abd014aab1199b0cbf0f096e 100644 (file)
@@ -46,7 +46,7 @@ struct inferior *inferior_list = NULL;
 static int highest_inferior_num;
 
 /* See inferior.h.  */
-int print_inferior_events = 1;
+bool print_inferior_events = true;
 
 /* The Current Inferior.  This is a strong reference.  I.e., whenever
    an inferior is the current inferior, its refcount is
index 9cfb03cdbb38eb63220cf16ff68729c1d04e24c8..3a64a7cfeaeaba36d66332cfd421bed657d376b2 100644 (file)
@@ -244,7 +244,7 @@ extern void prepare_execution_command (struct target_ops *target,
 
    The catch-exec traps expected during start-up will be one more if
    the target is started up with a shell.  */
-extern int startup_with_shell;
+extern bool startup_with_shell;
 
 /* Nonzero if stopped due to completion of a stack dummy routine.  */
 
@@ -257,7 +257,7 @@ extern int stopped_by_random_signal;
 
 /* Print notices on inferior events (attach, detach, etc.), set with
    `set print inferior-events'.  */
-extern int print_inferior_events;
+extern bool print_inferior_events;
 
 /* Anything but NO_STOP_QUIETLY means we expect a trap and the caller
    will handle it themselves.  STOP_QUIETLY is used when running in
index a9588f896a5f6f489402faf67073a3a44b4639b0..be29cbe4f51ff97a4d10ee6ff0cf23fbdbe230d6 100644 (file)
@@ -136,7 +136,7 @@ mark_infrun_async_event_handler (void)
 /* When set, stop the 'step' command if we enter a function which has
    no line number information.  The normal behavior is that we step
    over such function.  */
-int step_stop_if_no_debug = 0;
+bool step_stop_if_no_debug = false;
 static void
 show_step_stop_if_no_debug (struct ui_file *file, int from_tty,
                            struct cmd_list_element *c, const char *value)
@@ -155,9 +155,9 @@ static ptid_t previous_inferior_ptid;
    Exactly which branch is detached depends on 'set follow-fork-mode'
    setting.  */
 
-static int detach_fork = 1;
+static bool detach_fork = true;
 
-int debug_displaced = 0;
+bool debug_displaced = false;
 static void
 show_debug_displaced (struct ui_file *file, int from_tty,
                      struct cmd_list_element *c, const char *value)
@@ -176,7 +176,7 @@ show_debug_infrun (struct ui_file *file, int from_tty,
 
 /* Support for disabling address space randomization.  */
 
-int disable_randomization = 1;
+bool disable_randomization = true;
 
 static void
 show_disable_randomization (struct ui_file *file, int from_tty,
@@ -205,8 +205,8 @@ set_disable_randomization (const char *args, int from_tty,
 
 /* User interface for non-stop mode.  */
 
-int non_stop = 0;
-static int non_stop_1 = 0;
+bool non_stop = false;
+static bool non_stop_1 = false;
 
 static void
 set_non_stop (const char *args, int from_tty,
@@ -234,8 +234,8 @@ show_non_stop (struct ui_file *file, int from_tty,
    non-stop, in which all GDB operations that might affect the
    target's execution have been disabled.  */
 
-int observer_mode = 0;
-static int observer_mode_1 = 0;
+bool observer_mode = false;
+static bool observer_mode_1 = false;
 
 static void
 set_observer_mode (const char *args, int from_tty,
@@ -256,7 +256,7 @@ set_observer_mode (const char *args, int from_tty,
   /* We can insert fast tracepoints in or out of observer mode,
      but enable them if we're going into this mode.  */
   if (observer_mode)
-    may_insert_fast_tracepoints = 1;
+    may_insert_fast_tracepoints = true;
   may_stop = !observer_mode;
   update_target_permissions ();
 
@@ -265,7 +265,7 @@ set_observer_mode (const char *args, int from_tty,
   if (observer_mode)
     {
       pagination_enabled = 0;
-      non_stop = non_stop_1 = 1;
+      non_stop = non_stop_1 = true;
     }
 
   if (from_tty)
@@ -289,13 +289,11 @@ show_observer_mode (struct ui_file *file, int from_tty,
 void
 update_observer_mode (void)
 {
-  int newval;
-
-  newval = (!may_insert_breakpoints
-           && !may_insert_tracepoints
-           && may_insert_fast_tracepoints
-           && !may_stop
-           && non_stop);
+  bool newval = (!may_insert_breakpoints
+                && !may_insert_tracepoints
+                && may_insert_fast_tracepoints
+                && !may_stop
+                && non_stop);
 
   /* Let the user know if things change.  */
   if (newval != observer_mode)
@@ -2089,7 +2087,7 @@ set_schedlock_func (const char *args, int from_tty, struct cmd_list_element *c)
 /* True if execution commands resume all threads of all processes by
    default; otherwise, resume only threads of the current inferior
    process.  */
-int sched_multi = 0;
+bool sched_multi = false;
 
 /* Try to setup for software single stepping over the specified location.
    Return 1 if target_resume() should use hardware single step.
index 30374ee51c4116ed9798beb52b02d7b1deec1cc8..2b2a3a3e44462ac826d5af17acf869d406a5dbbd 100644 (file)
@@ -30,7 +30,7 @@ struct return_value_info;
 extern unsigned int debug_infrun;
 
 /* True if we are debugging displaced stepping.  */
-extern int debug_displaced;
+extern bool debug_displaced;
 
 /* Nonzero if we want to give control to the user when we're notified
    of shared library events by the dynamic linker.  */
@@ -39,24 +39,24 @@ extern int stop_on_solib_events;
 /* True if execution commands resume all threads of all processes by
    default; otherwise, resume only threads of the current inferior
    process.  */
-extern int sched_multi;
+extern bool sched_multi;
 
 /* When set, stop the 'step' command if we enter a function which has
    no line number information.  The normal behavior is that we step
    over such function.  */
-extern int step_stop_if_no_debug;
+extern bool step_stop_if_no_debug;
 
 /* If set, the inferior should be controlled in non-stop mode.  In
    this mode, each thread is controlled independently.  Execution
    commands apply only to the selected thread by default, and stop
    events stop only the thread that had the event -- the other threads
    are kept running freely.  */
-extern int non_stop;
+extern bool non_stop;
 
 /* When set (default), the target should attempt to disable the
    operating system's address space randomization feature when
    starting an inferior.  */
-extern int disable_randomization;
+extern bool disable_randomization;
 
 /* Returns a unique identifier for the current stop.  This can be used
    to tell whether a command has proceeded the inferior past the
index 7d0c3e9fc9577a5d2fbc45122dec4108ee3949e2..ff888a90678b0cbb3932a609cd347eeb9c3367ce 100644 (file)
@@ -91,12 +91,12 @@ struct smaps_vmflags
 /* Whether to take the /proc/PID/coredump_filter into account when
    generating a corefile.  */
 
-static int use_coredump_filter = 1;
+static bool use_coredump_filter = true;
 
 /* Whether the value of smaps_vmflags->exclude_coredump should be
    ignored, including mappings marked with the VM_DONTDUMP flag in
    the dump.  */
-static int dump_excluded_mappings = 0;
+static bool dump_excluded_mappings = false;
 
 /* This enum represents the signals' numbers on a generic architecture
    running the Linux kernel.  The definition of "generic" comes from
index 1d32e9195c041d5653c8bdfcc906d0f351fee8f1..100434e2c9d748f2a90b3597f73bcf406ed1565e 100644 (file)
@@ -110,13 +110,13 @@ public:
 
 static char *libthread_db_search_path;
 
-/* Set to non-zero if thread_db auto-loading is enabled
+/* Set to true if thread_db auto-loading is enabled
    by the "set auto-load libthread-db" command.  */
-static int auto_load_thread_db = 1;
+static bool auto_load_thread_db = true;
 
-/* Set to non-zero if load-time libthread_db tests have been enabled
+/* Set to true if load-time libthread_db tests have been enabled
    by the "maintenence set check-libthread-db" command.  */
-static int check_thread_db_on_load = 0;
+static bool check_thread_db_on_load = false;
 
 /* "show" command for the auto_load_thread_db configuration variable.  */
 
index 6b75fced23626e3c2b0c0361d78b183d88f086be..7fab8ff8dad5789a1585c462e5cc425c5f3295c1 100644 (file)
@@ -594,6 +594,9 @@ captured_main_1 (struct captured_main_args *context)
       OPT_READNOW,
       OPT_READNEVER
     };
+    /* This struct requires int* in the struct, but write_files is a bool.
+       So use this temporary int that we write back after argument parsing.  */
+    int write_files_1 = 0;
     static struct option long_options[] =
     {
       {"tui", no_argument, 0, OPT_TUI},
@@ -658,7 +661,7 @@ captured_main_1 (struct captured_main_args *context)
       {"w", no_argument, NULL, OPT_WINDOWS},
       {"windows", no_argument, NULL, OPT_WINDOWS},
       {"statistics", no_argument, 0, OPT_STATISTICS},
-      {"write", no_argument, &write_files, 1},
+      {"write", no_argument, &write_files_1, 1},
       {"args", no_argument, &set_args, 1},
       {"l", required_argument, 0, 'l'},
       {"return-child-result", no_argument, &return_child_result, 1},
@@ -842,6 +845,7 @@ captured_main_1 (struct captured_main_args *context)
                   gdb_program_name);
          }
       }
+    write_files = (write_files_1 != 0);
 
     if (batch_flag)
       {
index 7039f932f1d2378d0192404c5db5ac06808d523e..9bda34a3fd2431665642f0004446d1dd3c6fd909 100644 (file)
@@ -126,10 +126,10 @@ static const char *const test_options_enum_values_choices[] =
 
 struct test_options_opts
 {
-  int flag_opt = 0;
-  int xx1_opt = 0;
-  int xx2_opt = 0;
-  int boolean_opt = 0;
+  bool flag_opt = false;
+  bool xx1_opt = false;
+  bool xx2_opt = false;
+  bool boolean_opt = false;
   const char *enum_opt = test_options_enum_values_xxx;
   unsigned int uint_opt = 0;
   int zuint_unl_opt = 0;
index a1c43ee91734a919811f3f668142b9b5d55fe0ca..86d201a3c6f2db38cdac6e8a1d526d78c73ac4a5 100644 (file)
@@ -50,7 +50,7 @@ maintenance_show_test_settings_cmd (const char *args, int from_tty)
 /* Control variables for all the "maintenance set/show test-settings
    xxx" commands.  */
 
-static int maintenance_test_settings_boolean;
+static bool maintenance_test_settings_boolean;
 
 static auto_boolean maintenance_test_settings_auto_boolean = AUTO_BOOLEAN_AUTO;
 
index 1a621a17191f89e83805898accb356a5a4733163..b8eb93827c8f7494815a41721487f298589ab1b5 100644 (file)
@@ -770,7 +770,7 @@ maintenance_with_cmd_completer (struct cmd_list_element *ignore,
 
 /* Profiling support.  */
 
-static int maintenance_profile_p;
+static bool maintenance_profile_p;
 static void
 show_maintenance_profile_p (struct ui_file *file, int from_tty,
                            struct cmd_list_element *c, const char *value)
@@ -841,17 +841,17 @@ maintenance_set_profile_cmd (const char *args, int from_tty,
 }
 #endif
 \f
-/* If nonzero, display time usage both at startup and for each command.  */
+/* If true, display time usage both at startup and for each command.  */
 
-static int per_command_time;
+static bool per_command_time;
 
-/* If nonzero, display space usage both at startup and for each command.  */
+/* If true, display space usage both at startup and for each command.  */
 
-static int per_command_space;
+static bool per_command_space;
 
-/* If nonzero, display basic symtab stats for each command.  */
+/* If true, display basic symtab stats for each command.  */
 
-static int per_command_symtab;
+static bool per_command_symtab;
 
 /* mt per-command commands.  */
 
index e695f6e07e775063738f6e3ee37984a82678ba75..0475780b29f837eb1588d92c1f4a39fc19d88537 100644 (file)
@@ -53,7 +53,7 @@ static bool target_mem_regions_valid;
 /* If this flag is set, gdb will assume that memory ranges not
    specified by the memory map have type MEM_NONE, and will
    emit errors on all accesses to that memory.  */
-static int inaccessible_by_default = 1;
+static bool inaccessible_by_default = true;
 
 static void
 show_inaccessible_by_default (struct ui_file *file, int from_tty,
index 5dc436bfd8c5a87d81aa6455d9ab1bb467103554..2ece360205666dd676b375054722486136d43b31 100644 (file)
@@ -101,11 +101,11 @@ static void output_register (struct frame_info *, int regnum, int format,
                             int skip_unavailable);
 
 /* Controls whether the frontend wants MI in async mode.  */
-static int mi_async = 0;
+static bool mi_async = false;
 
 /* The set command writes to this variable.  If the inferior is
    executing, mi_async is *not* updated.  */
-static int mi_async_1 = 0;
+static bool mi_async_1 = false;
 
 static void
 set_mi_async_command (const char *args, int from_tty,
index 3fb53bc76da4dea995d4c85270209d9aa7046d97..37a1b2a0b8f372554babca69889da144f416aa76 100644 (file)
@@ -858,7 +858,7 @@ static int heuristic_fence_post = 0;
    register N.  NOTE: This defines the pseudo register type so need to
    rebuild the architecture vector.  */
 
-static int mips64_transfers_32bit_regs_p = 0;
+static bool mips64_transfers_32bit_regs_p = false;
 
 static void
 set_mips64_transfers_32bit_regs (const char *args, int from_tty,
index 1d0519fb26c36d7f6676d3b47b029c9eae76d859..065496c38279105e101c781c6db893a13d8cea7c 100644 (file)
@@ -72,7 +72,7 @@ extern ptid_t startup_inferior (pid_t pid, int ntraps,
 
    The catch-exec traps expected during start-up will be one more if
    the target is started up with a shell.  */
-extern int startup_with_shell;
+extern bool startup_with_shell;
 
 /* Perform any necessary tasks before a fork/vfork takes place.  ARGS
    is a string containing all the arguments received by the inferior.
index e49bc1ade36f73710cbe21911449b5710e762fc2..8cadea9be2665d878cdb2afb403d647e81f8197e 100644 (file)
@@ -31,7 +31,7 @@
 #include "gdbsupport/scope-exit.h"
 
 /* See nat/linux-namespaces.h.  */
-int debug_linux_namespaces;
+bool debug_linux_namespaces;
 
 /* Handle systems without fork.  */
 
index 166b11cbdca20c9367a8e03680ab5e84d5417131..fe7e8a452ee579a615f374f309632b64ee0859ba 100644 (file)
@@ -20,9 +20,9 @@
 #ifndef NAT_LINUX_NAMESPACES_H
 #define NAT_LINUX_NAMESPACES_H
 
-/* Set to nonzero to enable debugging of Linux namespaces code.  */
+/* Set to true to enable debugging of Linux namespaces code.  */
 
-extern int debug_linux_namespaces;
+extern bool debug_linux_namespaces;
 
 /* Enumeration of Linux namespace types.  */
 
index 8d685d4acaa3717db99445f966fafa10a9598804..cb17e4f3750be302b66d6dcef0806f2758ecfef9 100644 (file)
@@ -52,7 +52,7 @@
 
 /* Control debugging information emitted in this file.  */
 
-static int nios2_debug = 0;
+static bool nios2_debug = false;
 
 /* The following structures are used in the cache for prologue
    analysis; see the reg_value and reg_saved tables in
index 8f6f6e196090f0c39d3f347a41531b4eeebd37b0..6a6dce1527340d58ad078f29c29dc227de20c7f0 100644 (file)
@@ -50,7 +50,7 @@
 
 /* Global debug flag.  */
 
-static int or1k_debug = 0;
+static bool or1k_debug = false;
 
 static void
 show_or1k_debug (struct ui_file *file, int from_tty,
index a1ab75297a161e07d579c644d52662fa09e9fd23..a17cae6b55195b95d2eec126639fc8a484bfec7b 100644 (file)
@@ -74,8 +74,8 @@ show_expressiondebug (struct ui_file *file, int from_tty,
 }
 
 
-/* Non-zero if an expression parser should set yydebug.  */
-int parser_debug;
+/* True if an expression parser should set yydebug.  */
+bool parser_debug;
 
 static void
 show_parserdebug (struct ui_file *file, int from_tty,
index 33670b29c4cd49e82a03c5384b82406d6e74f2f7..64aa9b8b1e0c71340450a8cbe87ecd5c1ad900e9 100644 (file)
@@ -32,7 +32,7 @@ struct language_defn;
 struct internalvar;
 class innermost_block_tracker;
 
-extern int parser_debug;
+extern bool parser_debug;
 
 /* A class that can be used to build a "struct expression".  */
 
index 22356bfd6dbda27c563482421f281b0024b92d83..b3f7b59863b32f7cc93c113ee8b55473352c1f1e 100644 (file)
@@ -100,7 +100,7 @@ show_max_symbolic_offset (struct ui_file *file, int from_tty,
 
 /* Append the source filename and linenumber of the symbol when
    printing a symbolic value as `<symbol at filename:linenum>' if set.  */
-static int print_symbol_filename = 0;
+static bool print_symbol_filename = false;
 static void
 show_print_symbol_filename (struct ui_file *file, int from_tty,
                            struct cmd_list_element *c, const char *value)
index cb2eaf8cb190280139edda8049cb32d3061567d7..214b26f40cf1fcefbe6ed5c25bf9d6123173f9e4 100644 (file)
@@ -50,7 +50,7 @@ struct trans {
   const char *desc;             /* Short description of value */
 };
 
-static int   procfs_trace    = 0;
+static bool  procfs_trace   = false;
 static FILE *procfs_file     = NULL;
 static char *procfs_filename;
 
index c7b9afdb11248f23b955ed3d46400827f8a37a5d..ade2aa1b3778b5125125d1979330bd9ee0467f53 100644 (file)
@@ -29,7 +29,7 @@
    set auto-load python-scripts on|off
    This is true if we should auto-load associated Python scripts when an
    objfile is opened, false otherwise.  */
-static int auto_load_python_scripts = 1;
+static bool auto_load_python_scripts = true;
 
 /* "show" command for the auto_load_python_scripts configuration variable.  */
 
index afeff581ee4be76731c101fa4c8252627b2650fd..4794366583acba2b500c7c5f1fa48ad447a909d4 100644 (file)
@@ -55,7 +55,10 @@ struct parm_constant parm_constants[] =
 /* A union that can hold anything described by enum var_types.  */
 union parmpy_variable
 {
-  /* Hold an integer value, for boolean and integer types.  */
+  /* Hold a boolean value.  */
+  bool boolval;
+
+  /* Hold an integer value.  */
   int intval;
 
   /* Hold an auto_boolean.  */
@@ -198,7 +201,7 @@ set_parameter_value (parmpy_object *self, PyObject *value)
       cmp = PyObject_IsTrue (value);
       if (cmp < 0)
          return -1;
-      self->value.intval = cmp;
+      self->value.boolval = cmp;
       break;
 
     case var_auto_boolean:
@@ -475,7 +478,7 @@ add_setshow_generic (int parmclass, enum command_class cmdclass,
     case var_boolean:
 
       add_setshow_boolean_cmd (cmd_name, cmdclass,
-                              &self->value.intval, set_doc, show_doc,
+                              &self->value.boolval, set_doc, show_doc,
                               help_doc, get_set_value, get_show_value,
                               set_list, show_list);
 
index ede4c0e759a97900b389da629dfc54b44f274596..1428b7abe5c7b0038ac561c96d3571e363c8780c 100644 (file)
@@ -580,7 +580,7 @@ valpy_string (PyObject *self, PyObject *args, PyObject *kw)
                           encoding, errors);
 }
 
-/* Given a Python object, copy its truth value to a C int (the value
+/* Given a Python object, copy its truth value to a C bool (the value
    pointed by dest).
    If src_obj is NULL, then *dest is not modified.
 
@@ -588,7 +588,7 @@ valpy_string (PyObject *self, PyObject *args, PyObject *kw)
    in case of error.  */
 
 static bool
-copy_py_bool_obj (int *dest, PyObject *src_obj)
+copy_py_bool_obj (bool *dest, PyObject *src_obj)
 {
   if (src_obj)
     {
index 9c8c635f72b60a6c632d9d18a482aba7926cfd72..ddf0e72d26f797b1b67d33b5d3b6eea797dc98a3 100644 (file)
@@ -441,7 +441,7 @@ gdbpy_parameter_value (enum var_types type, void *var)
 
     case var_boolean:
       {
-       if (* (int *) var)
+       if (* (bool *) var)
          Py_RETURN_TRUE;
        else
          Py_RETURN_FALSE;
index f217d949f618a461765be8e7676963be6845fa3a..0cc7e1dc75a7ba4571db30f7eb5e05615caa52d1 100644 (file)
@@ -57,8 +57,8 @@
    is running, switching to its corresponding ptid, and then performing
    the operation on that ptid using the target beneath us.  */
 
-/* If non-null, ravenscar task support is enabled.  */
-static int ravenscar_task_support = 1;
+/* If true, ravenscar task support is enabled.  */
+static bool ravenscar_task_support = true;
 
 static const char running_thread_name[] = "__gnat_running_thread_table";
 
index 65d6a254ff06c0c0b83ae5f115e65e11194a080e..d402d8733dd3889b8dccae8375e20d412b91393b 100644 (file)
@@ -1560,7 +1560,7 @@ record_btrace_target::store_registers (struct regcache *regcache, int regno)
       && record_is_replaying (regcache->ptid ()))
     error (_("Cannot write registers while replaying."));
 
-  gdb_assert (may_write_registers != 0);
+  gdb_assert (may_write_registers);
 
   this->beneath ()->store_registers (regcache, regno);
 }
index e83ce01b71539445230379365ed6de57f97439c5..c1d124f51926bfd8f2491f81f293f3097bcf1fef 100644 (file)
@@ -159,7 +159,7 @@ struct record_full_entry
 
 /* If true, query if PREC cannot record memory
    change of next instruction.  */
-int record_full_memory_query = 0;
+bool record_full_memory_query = false;
 
 struct record_full_core_buf_entry
 {
@@ -196,8 +196,8 @@ static struct record_full_entry *record_full_list = &record_full_first;
 static struct record_full_entry *record_full_arch_list_head = NULL;
 static struct record_full_entry *record_full_arch_list_tail = NULL;
 
-/* 1 ask user. 0 auto delete the last struct record_full_entry.  */
-static int record_full_stop_at_limit = 1;
+/* true ask user. false auto delete the last struct record_full_entry.  */
+static bool record_full_stop_at_limit = true;
 /* Maximum allowed number of insns in execution log.  */
 static unsigned int record_full_insn_max_num
        = DEFAULT_RECORD_FULL_INSN_MAX_NUM;
index 8d1693af11d22a276a0132f58da22c4efe35a9fd..d1eff9760e23a1403853abdf2f5881890e64c8bd 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef RECORD_FULL_H
 #define RECORD_FULL_H
 
-extern int record_full_memory_query;
+extern bool record_full_memory_query;
 
 extern int record_full_arch_list_add_reg (struct regcache *regcache, int num);
 extern int record_full_arch_list_add_mem (CORE_ADDR addr, int len);
index 2680618b3fa7a7a615eba4e9f58ae7597caa32e3..2ff7b3b66c6c8ee686c1910a3f5ce1c7e5b1e52e 100644 (file)
@@ -41,7 +41,7 @@
 #include "infrun.h"
 #include "gdbcmd.h"
 
-int notif_debug = 0;
+bool notif_debug = false;
 
 /* Supported clients of notifications.  */
 
index f9b0b2c61805636a6eec1491e7cd547eac4a430f..c735cc2918a51647c39a28dc7db7f84bb09183ac 100644 (file)
@@ -129,6 +129,6 @@ remote_notif_state *remote_notif_state_allocate (remote_target *remote);
 
 extern struct notif_client notif_client_stop;
 
-extern int notif_debug;
+extern bool notif_debug;
 
 #endif /* REMOTE_NOTIF_H */
index ae06c4ba79155ed37478e1d45af8148f6c3c5ce6..e39366d8b209ac15d155ccae6bc2c3a1f47a18d8 100644 (file)
@@ -1038,7 +1038,7 @@ static struct cmd_list_element *remote_show_cmdlist;
 
 /* Controls whether GDB is willing to use range stepping.  */
 
-static int use_range_stepping = 1;
+static bool use_range_stepping = true;
 
 /* The max number of chars in debug output.  The rest of chars are
    omitted.  */
@@ -1492,12 +1492,12 @@ show_interrupt_sequence (struct ui_file *file, int from_tty,
    to the remote target when gdb connects to it.
    This is mostly needed when you debug the Linux kernel: The Linux kernel
    expects BREAK g which is Magic SysRq g for connecting gdb.  */
-static int interrupt_on_connect = 0;
+static bool interrupt_on_connect = false;
 
 /* This variable is used to implement the "set/show remotebreak" commands.
    Since these commands are now deprecated in favor of "set/show remote
    interrupt-sequence", it no longer has any effect on the code.  */
-static int remote_break;
+static bool remote_break;
 
 static void
 set_remotebreak (const char *args, int from_tty, struct cmd_list_element *c)
index 7498319cc41c11a7c100019a075ba7444de42076..079f24828e921d087b273a9c0613204df69c3c6a 100644 (file)
@@ -72,7 +72,7 @@ static struct cmd_list_element *tcp_show_cmdlist;
 
 /* Whether to auto-retry refused connections.  */
 
-static int tcp_auto_retry = 1;
+static bool tcp_auto_retry = true;
 
 /* Timeout period for connections, in seconds.  */
 
index 049dfd5261f78ec916debf3a3582e4a6a7e0256d..c49bd84eb63c84481060aeb1a51cc0c8fd477d91 100644 (file)
@@ -41,7 +41,7 @@ struct hardwire_ttystate
 
 #ifdef CRTSCTS
 /* Boolean to explicitly enable or disable h/w flow control.  */
-static int serial_hwflow;
+static bool serial_hwflow;
 static void
 show_serial_hwflow (struct ui_file *file, int from_tty,
                    struct cmd_list_element *c, const char *value)
index 5258f50ab1fb8d314acec32a30e904ca5e8f6083..a549aca897c8489e60cdc1fafd798851d15d9500 100644 (file)
@@ -39,7 +39,7 @@
 
 /* True if we want to print debug printouts related to file/function
    skipping. */
-static int debug_skip = 0;
+static bool debug_skip = false;
 
 class skiplist_entry
 {
index 0c8a18267c95103cec28afa6fc4d9b7ffad208d9..1a25a0d4a93117c81f8927da812796076c4bbcb9 100644 (file)
@@ -30,7 +30,7 @@
 
 /* Variable controlling the output of the debugging traces for
    this module.  */
-static int solib_aix_debug;
+static bool solib_aix_debug;
 
 /* Our private data in struct so_list.  */
 
index ddaee54b306ae4ef115cac781c1ddc410db4af91..d01f3af30093bce5eb464e890a2817d542907fce 100644 (file)
@@ -52,9 +52,9 @@ static struct cmd_list_element *setspucmdlist = NULL;
 static struct cmd_list_element *showspucmdlist = NULL;
 
 /* Whether to stop for new SPE contexts.  */
-static int spu_stop_on_load_p = 0;
+static bool spu_stop_on_load_p = false;
 /* Whether to automatically flush the SW-managed cache.  */
-static int spu_auto_flush_cache_p = 1;
+static bool spu_auto_flush_cache_p = true;
 
 
 /* The tdep structure.  */
index 10a88e99aba013298bdf85184654c99a19c8bb35..0f7fbf5e6efc531aaad968edaf34916be2642061 100644 (file)
@@ -183,9 +183,9 @@ pretty-printers for that value.")
 
 struct backtrace_cmd_options
 {
-  int full = 0;
-  int no_filters = 0;
-  int hide = 0;
+  bool full = false;
+  bool no_filters = false;
+  bool hide = false;
 };
 
 using bt_flag_option_def
@@ -2423,7 +2423,7 @@ print_frame_local_vars (struct frame_info *frame,
 
 struct info_print_options
 {
-  int quiet = false;
+  bool quiet = false;
   char *type_regexp = nullptr;
 
   ~info_print_options ()
index 9a5d0fa0a66bbfc077399eb10d2934a3bbb0d439..37959bf0d408dc96c89843f9f134bc56fb01c9be 100644 (file)
@@ -48,8 +48,8 @@ struct debug_sym_fns_data
 static const struct objfile_key<debug_sym_fns_data>
   symfile_debug_objfile_data_key;
 
-/* If non-zero all calls to the symfile functions are logged.  */
-static int debug_symfile = 0;
+/* If true all calls to the symfile functions are logged.  */
+static bool debug_symfile = false;
 
 /* Return non-zero if symfile debug logging is installed.  */
 
index 259a30aa043a7877a18551cee904b7c053097b6f..5252c727aa5bc705d826539b1677db82eb6a8ae0 100644 (file)
@@ -143,7 +143,7 @@ static const char *print_symbol_loading = print_symbol_loading_full;
 
 /* See symfile.h.  */
 
-int auto_solib_add = 1;
+bool auto_solib_add = true;
 \f
 
 /* Return non-zero if symbol-loading messages should be printed.
@@ -1265,7 +1265,7 @@ symbol_file_clear (int from_tty)
 
 /* See symfile.h.  */
 
-int separate_debug_file_debug = 0;
+bool separate_debug_file_debug = false;
 
 static int
 separate_debug_file_exists (const std::string &name, unsigned long crc,
index 6fa6db4750e957ee7c57c52a972bdf322602cdf1..642a5e223a32576fc2445415a5fb7bdf526d54e7 100644 (file)
@@ -439,7 +439,7 @@ extern section_addr_info
 
                        /*   Variables   */
 
-/* If non-zero, shared library symbols will be added automatically
+/* If true, shared library symbols will be added automatically
    when the inferior is created, new libraries are loaded, or when
    attaching to the inferior.  This is almost always what users will
    want to have happen; but for very large programs, the startup time
@@ -449,7 +449,7 @@ extern section_addr_info
    library symbols are not loaded, commands like "info fun" will *not*
    report all the functions that are actually present.  */
 
-extern int auto_solib_add;
+extern bool auto_solib_add;
 
 /* From symfile.c */
 
@@ -625,6 +625,6 @@ extern gdb_bfd_ref_ptr find_separate_debug_file_in_section (struct objfile *);
 
 /* True if we are printing debug output about separate debug info files.  */
 
-extern int separate_debug_file_debug;
+extern bool separate_debug_file_debug;
 
 #endif /* !defined(SYMFILE_H) */
index 4b528b4270aae146e76f54fe8a5fb305534eefc9..e2edad4fb1119c05120c222f375e614f481a1fd9 100644 (file)
@@ -241,10 +241,10 @@ static unsigned int new_symbol_cache_size = DEFAULT_SYMBOL_CACHE_SIZE;
    the original value from here.  */
 static unsigned int symbol_cache_size = DEFAULT_SYMBOL_CACHE_SIZE;
 
-/* Non-zero if a file may be known by two different basenames.
+/* True if a file may be known by two different basenames.
    This is the uncommon case, and significantly slows down gdb.
    Default set to "off" to not slow down the common case.  */
-int basenames_may_differ = 0;
+bool basenames_may_differ = false;
 
 /* Allow the user to configure the debugger behavior with respect
    to multiple-choice menus when more than one symbol matches during
@@ -4131,10 +4131,10 @@ operator_chars (const char *p, const char **end)
 struct filename_partial_match_opts
 {
   /* Only match the directory name part.   */
-  int dirname = false;
+  bool dirname = false;
 
   /* Only match the basename part.  */
-  int basename = false;
+  bool basename = false;
 };
 
 /* Data structure to maintain printing state for output_source_filename.  */
@@ -4912,8 +4912,8 @@ symtab_symbol_info (bool quiet, bool exclude_minsyms,
 
 struct info_print_options
 {
-  int quiet = false;
-  int exclude_minsyms = false;
+  bool quiet = false;
+  bool exclude_minsyms = false;
   char *type_regexp = nullptr;
 
   ~info_print_options ()
@@ -5010,7 +5010,7 @@ info_functions_command (const char *args, int from_tty)
 
 struct info_types_options
 {
-  int quiet = false;
+  bool quiet = false;
 };
 
 /* The options used by the 'info types' command.  */
index c54b8ee4b7a2f775dc8a766d64f49fab345eb35c..d0465987749511b43211a7ab91fa7673f5ad9388 100644 (file)
@@ -544,7 +544,7 @@ extern const char *symbol_demangled_name
 
 #define SYMBOL_PRINT_NAME(symbol)                                      \
   (demangle ? SYMBOL_NATURAL_NAME (symbol) : SYMBOL_LINKAGE_NAME (symbol))
-extern int demangle;
+extern bool demangle;
 
 /* Macro that returns the name to be used when sorting and searching symbols.
    In C++, we search for the demangled form of a name,
@@ -2064,7 +2064,7 @@ extern unsigned int symtab_create_debug;
 
 extern unsigned int symbol_lookup_debug;
 
-extern int basenames_may_differ;
+extern bool basenames_may_differ;
 
 int compare_filenames_for_search (const char *filename,
                                  const char *search_name);
index 98d5c1f83b6e3931f86759fdfcc05fbaffe934f1..c8a415512c5b3d06e6b4b65bcdb8f981ba43110e 100644 (file)
@@ -77,7 +77,7 @@ target_dcache_get_or_init (void)
 }
 
 /* The option sets this.  */
-static int stack_cache_enabled_1 = 1;
+static bool stack_cache_enabled_1 = true;
 /* And set_stack_cache updates this.
    The reason for the separation is so that we don't flush the cache for
    on->on transitions.  */
@@ -114,7 +114,7 @@ stack_cache_enabled_p (void)
 
 /* The option sets this.  */
 
-static int code_cache_enabled_1 = 1;
+static bool code_cache_enabled_1 = true;
 
 /* And set_code_cache updates this.
    The reason for the separation is so that we don't flush the cache for
index a19a9bce133a3e28f2689146f86e7354fa7d95a4..599e22a724ceddbcd96deeeb5fac146505dbcbc8 100644 (file)
@@ -128,10 +128,10 @@ current_top_target ()
 
 static struct cmd_list_element *targetlist = NULL;
 
-/* Nonzero if we should trust readonly sections from the
+/* True if we should trust readonly sections from the
    executable when reading memory.  */
 
-static int trust_readonly = 0;
+static bool trust_readonly = false;
 
 /* Nonzero if we should show true memory content including
    memory breakpoint inserted by gdb.  */
@@ -142,17 +142,17 @@ static int show_memory_breakpoints = 0;
    operations; they are useful for targets that need to prevent
    inadvertant disruption, such as in non-stop mode.  */
 
-int may_write_registers = 1;
+bool may_write_registers = true;
 
-int may_write_memory = 1;
+bool may_write_memory = true;
 
-int may_insert_breakpoints = 1;
+bool may_insert_breakpoints = true;
 
-int may_insert_tracepoints = 1;
+bool may_insert_tracepoints = true;
 
-int may_insert_fast_tracepoints = 1;
+bool may_insert_fast_tracepoints = true;
 
-int may_stop = 1;
+bool may_stop = true;
 
 /* Non-zero if we want to see trace of target level stuff.  */
 
@@ -2374,7 +2374,7 @@ target_require_runnable (void)
 
 /* Whether GDB is allowed to fall back to the default run target for
    "run", "attach", etc. when no target is connected yet.  */
-static int auto_connect_native_target = 1;
+static bool auto_connect_native_target = true;
 
 static void
 show_auto_connect_native_target (struct ui_file *file, int from_tty,
@@ -3356,9 +3356,9 @@ void
 target_stop_and_wait (ptid_t ptid)
 {
   struct target_waitstatus status;
-  int was_non_stop = non_stop;
+  bool was_non_stop = non_stop;
 
-  non_stop = 1;
+  non_stop = true;
   target_stop (ptid);
 
   memset (&status, 0, sizeof (status));
@@ -3841,11 +3841,11 @@ target_thread_events (int enable)
 
 /* Controls if targets can report that they can/are async.  This is
    just for maintainers to use when debugging gdb.  */
-int target_async_permitted = 1;
+bool target_async_permitted = true;
 
 /* The set command writes to this variable.  If the inferior is
    executing, target_async_permitted is *not* updated.  */
-static int target_async_permitted_1 = 1;
+static bool target_async_permitted_1 = true;
 
 static void
 maint_set_target_async_command (const char *args, int from_tty,
@@ -3933,12 +3933,12 @@ maint_show_target_non_stop_command (struct ui_file *file, int from_tty,
 
 /* Temporary copies of permission settings.  */
 
-static int may_write_registers_1 = 1;
-static int may_write_memory_1 = 1;
-static int may_insert_breakpoints_1 = 1;
-static int may_insert_tracepoints_1 = 1;
-static int may_insert_fast_tracepoints_1 = 1;
-static int may_stop_1 = 1;
+static bool may_write_registers_1 = true;
+static bool may_write_memory_1 = true;
+static bool may_insert_breakpoints_1 = true;
+static bool may_insert_tracepoints_1 = true;
+static bool may_insert_fast_tracepoints_1 = true;
+static bool may_stop_1 = true;
 
 /* Make the user-set values match the real values again.  */
 
index 4e2e75cb8067f5edf0d0f4f84b8de1f43122766a..c2f62031749d46271cb1cd953a267d340c09fde1 100644 (file)
@@ -1802,7 +1802,7 @@ extern int target_has_execution_current (void);
   (current_top_target ()->get_thread_control_capabilities () & tc_schedlock)
 
 /* Controls whether async mode is permitted.  */
-extern int target_async_permitted;
+extern bool target_async_permitted;
 
 /* Can the target support asynchronous execution?  */
 #define target_can_async_p() (current_top_target ()->can_async_p ())
@@ -2482,12 +2482,12 @@ extern int remote_timeout;
 extern scoped_restore_tmpl<int>
     make_scoped_restore_show_memory_breakpoints (int show);
 
-extern int may_write_registers;
-extern int may_write_memory;
-extern int may_insert_breakpoints;
-extern int may_insert_tracepoints;
-extern int may_insert_fast_tracepoints;
-extern int may_stop;
+extern bool may_write_registers;
+extern bool may_write_memory;
+extern bool may_insert_breakpoints;
+extern bool may_insert_tracepoints;
+extern bool may_insert_fast_tracepoints;
+extern bool may_stop;
 
 extern void update_target_permissions (void);
 
index 4a7fe689dbb8b80d40136ace4f7fea842c63fd42..17bc642b84debe5c8cadedfed428765de70191f0 100644 (file)
@@ -1204,7 +1204,7 @@ print_thread_info (struct ui_out *uiout, const char *requested_threads,
 struct info_threads_opts
 {
   /* For "-gid".  */
-  int show_global_ids = 0;
+  bool show_global_ids = false;
 };
 
 static const gdb::option::option_def info_threads_option_defs[] = {
@@ -1574,7 +1574,7 @@ static const gdb::option::option_def thr_qcs_flags_option_defs[] = {
    ASCENDING and FLAGS as context.  */
 
 static inline std::array<gdb::option::option_def_group, 2>
-make_thread_apply_all_options_def_group (int *ascending,
+make_thread_apply_all_options_def_group (bool *ascending,
                                         qcs_flags *flags)
 {
   return {{
@@ -1603,7 +1603,7 @@ make_thread_apply_options_def_group (qcs_flags *flags)
 static void
 thread_apply_all_command (const char *cmd, int from_tty)
 {
-  int ascending = false;
+  bool ascending = false;
   qcs_flags flags;
 
   auto group = make_thread_apply_all_options_def_group (&ascending,
@@ -1951,7 +1951,7 @@ thread_find_command (const char *arg, int from_tty)
 }
 
 /* Print notices when new threads are attached and detached.  */
-int print_thread_events = 1;
+bool print_thread_events = true;
 static void
 show_print_thread_events (struct ui_file *file, int from_tty,
                          struct cmd_list_element *c, const char *value)
index 2b53640af061e7f0bb1085433627150fbb4af7db..49e6daae94972ecef3094b400a004363543156de 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -115,7 +115,7 @@ extern char lang_frame_mismatch_warn[];             /* language.c */
 /* Flag for whether we want to confirm potentially dangerous
    operations.  Default is yes.  */
 
-int confirm = 1;
+bool confirm = true;
 
 static void
 show_confirm (struct ui_file *file, int from_tty,
@@ -850,15 +850,15 @@ gdb_readline_no_editing (const char *prompt)
 /* Variables which control command line editing and history
    substitution.  These variables are given default values at the end
    of this file.  */
-static int command_editing_p;
+static bool command_editing_p;
 
 /* NOTE 1999-04-29: This variable will be static again, once we modify
    gdb to use the event loop as the default command loop and we merge
    event-top.c into this file, top.c.  */
 
-/* static */ int history_expansion_p;
+/* static */ bool history_expansion_p;
 
-static int write_history_p;
+static bool write_history_p;
 static void
 show_write_history_p (struct ui_file *file, int from_tty,
                      struct cmd_list_element *c, const char *value)
@@ -1876,7 +1876,7 @@ show_history (const char *args, int from_tty)
   cmd_show_list (showhistlist, from_tty, "");
 }
 
-int info_verbose = 0;          /* Default verbose msgs off.  */
+bool info_verbose = false;     /* Default verbose msgs off.  */
 
 /* Called by do_set_command.  An elaborate joke.  */
 void
index 32a898b82f5b485d00dec93d72629378a541132d..176104f1fd15efb9e9fb61a3daf20dddb5979f7e 100644 (file)
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -217,7 +217,7 @@ extern void ui_register_input_event_handler (struct ui *ui);
 extern void ui_unregister_input_event_handler (struct ui *ui);
 
 /* From top.c.  */
-extern int confirm;
+extern bool confirm;
 extern int inhibit_gdbinit;
 
 /* Print the GDB version banner to STREAM.  If INTERACTIVE is false,
@@ -280,7 +280,7 @@ extern void gdb_init (char *);
 /* Variables from top.c.  */
 extern int source_line_number;
 extern std::string source_file_name;
-extern int history_expansion_p;
+extern bool history_expansion_p;
 extern int server_command;
 extern char *lim_at_start;
 
index 2d5b9c705effbe2780f607e673fe62b72e8369e8..c2c5f4224622b3c141c819b0d26432309acd3bd3 100644 (file)
@@ -131,12 +131,12 @@ static struct cmd_list_element *tfindlist;
 /* List of expressions to collect by default at each tracepoint hit.  */
 char *default_collect;
 
-static int disconnected_tracing;
+static bool disconnected_tracing;
 
 /* This variable controls whether we ask the target for a linear or
    circular trace buffer.  */
 
-static int circular_trace_buffer;
+static bool circular_trace_buffer;
 
 /* This variable is the requested trace buffer size, or -1 to indicate
    that we don't care and leave it up to the target to set a size.  */
index c87f6d13e02ec5aa191027ce3f5795c6352df639..41d95c2afb23dcb804f21e5b271e20184f74879b 100644 (file)
@@ -727,7 +727,7 @@ show_print_type (const char *args, int from_tty)
   cmd_show_list (showprinttypelist, from_tty, "");
 }
 
-static int print_methods = 1;
+static bool print_methods = true;
 
 static void
 set_print_type_methods (const char *args,
@@ -744,7 +744,7 @@ show_print_type_methods (struct ui_file *file, int from_tty,
                    value);
 }
 
-static int print_typedefs = 1;
+static bool print_typedefs = true;
 
 static void
 set_print_type_typedefs (const char *args,
index f642cf470f4da37a75c2405d82cf402d71f8c060..b2535ebefd3805c27ebcc41b94d2a0cdc0eaeab1 100644 (file)
@@ -99,13 +99,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
 
 /* A flag indicating whether to timestamp debugging messages.  */
 
-static int debug_timestamp = 0;
+static bool debug_timestamp = false;
 
-/* Nonzero means that strings with character values >0x7F should be printed
-   as octal escapes.  Zero means just print the value (e.g. it's an
+/* True means that strings with character values >0x7F should be printed
+   as octal escapes.  False means just print the value (e.g. it's an
    international character, and the terminal or window can cope.)  */
 
-int sevenbit_strings = 0;
+bool sevenbit_strings = false;
 static void
 show_sevenbit_strings (struct ui_file *file, int from_tty,
                       struct cmd_list_element *c, const char *value)
@@ -119,7 +119,7 @@ show_sevenbit_strings (struct ui_file *file, int from_tty,
 
 const char *warning_pre_print = "\nwarning: ";
 
-int pagination_enabled = 1;
+bool pagination_enabled = true;
 static void
 show_pagination_enabled (struct ui_file *file, int from_tty,
                         struct cmd_list_element *c, const char *value)
index fd724444aa03534466cc0c487e8240d0da6b2ce6..7cdc73ef54f3d3150b5cdbf4ac70efcedaa27047 100644 (file)
@@ -32,7 +32,7 @@ extern void initialize_utils (void);
 
 /* String utilities.  */
 
-extern int sevenbit_strings;
+extern bool sevenbit_strings;
 
 /* Modes of operation for strncmp_iw_with_mode.  */
 
@@ -316,7 +316,7 @@ extern void wrap_here (const char *);
 
 extern void reinitialize_more_filter (void);
 
-extern int pagination_enabled;
+extern bool pagination_enabled;
 
 extern struct ui_file **current_ui_gdb_stdout_ptr (void);
 extern struct ui_file **current_ui_gdb_stdin_ptr (void);
index 0f6ff7b0a5722cd678388b1d016763217d690c26..fc7a4c5918d977dccddee01f8a435bda6ddf8cee 100644 (file)
@@ -97,7 +97,7 @@ static CORE_ADDR allocate_space_in_inferior (int);
 
 static struct value *cast_into_complex (struct type *, struct value *);
 
-int overload_resolution = 0;
+bool overload_resolution = false;
 static void
 show_overload_resolution (struct ui_file *file, int from_tty,
                          struct cmd_list_element *c, 
index 07014c11b9f9df347e761260c74e93a4eb93b82d..6d57554594c2a022eda2477a4ec17253511f7daa 100644 (file)
@@ -30,23 +30,23 @@ struct value_print_options
   enum val_prettyformat prettyformat;
 
   /* Controls pretty formatting of arrays.  */
-  int prettyformat_arrays;
+  bool prettyformat_arrays;
 
   /* Controls pretty formatting of structures.  */
-  int prettyformat_structs;
+  bool prettyformat_structs;
 
   /* Controls printing of virtual tables.  */
-  int vtblprint;
+  bool vtblprint;
 
   /* Controls printing of nested unions.  */
-  int unionprint;
+  bool unionprint;
 
   /* Controls printing of addresses.  */
-  int addressprint;
+  bool addressprint;
 
   /* Controls looking up an object's derived type using what we find
      in its vtables.  */
-  int objectprint;
+  bool objectprint;
 
   /* Maximum number of chars to print for a string pointer value or vector
      contents, or UINT_MAX for no limit.  Note that "set print elements 0"
@@ -66,40 +66,40 @@ struct value_print_options
   int format;
 
   /* Stop printing at null character?  */
-  int stop_print_at_null;
+  bool stop_print_at_null;
 
   /* True if we should print the index of each element when printing
      an array.  */
-  int print_array_indexes;
+  bool print_array_indexes;
 
-  /* If nonzero, then dereference references, otherwise just print
+  /* If true, then dereference references, otherwise just print
      them like pointers.  */
-  int deref_ref;
+  bool deref_ref;
 
-  /* If nonzero, print static fields.  */
-  int static_field_print;
+  /* If true, print static fields.  */
+  bool static_field_print;
 
-  /* If nonzero, print static fields for Pascal.  FIXME: C++ has a
+  /* If true, print static fields for Pascal.  FIXME: C++ has a
      flag, why not share with Pascal too?  */
-  int pascal_static_field_print;
+  bool pascal_static_field_print;
 
-  /* If non-zero don't do Python pretty-printing.  */
-  int raw;
+  /* If true, don't do Python pretty-printing.  */
+  bool raw;
 
-  /* If nonzero, print the value in "summary" form.
-     If raw and summary are both non-zero, don't print non-scalar values
+  /* If true, print the value in "summary" form.
+     If raw and summary are both true, don't print non-scalar values
      ("..." is printed instead).  */
-  int summary;
+  bool summary;
 
-  /* If nonzero, when printing a pointer, print the symbol to which it
+  /* If true, when printing a pointer, print the symbol to which it
      points, if any.  */
-  int symbol_print;
+  bool symbol_print;
 
   /* Maximum print depth when printing nested aggregates.  */
   int max_depth;
 
   /* Whether "finish" should print the value.  */
-  int finish_print;
+  bool finish_print;
 };
 
 /* Create an option_def_group for the value_print options, with OPTS
index 3431181a88cb630fc19dd8b68e9dfc37bb636a74..c4fde913af33bae7affd26a6ecc16362a02f8a1a 100644 (file)
@@ -245,16 +245,16 @@ static int saw_create;
 static int open_process_used = 0;
 
 /* User options.  */
-static int new_console = 0;
+static bool new_console = false;
 #ifdef __CYGWIN__
-static int cygwin_exceptions = 0;
+static bool cygwin_exceptions = false;
 #endif
-static int new_group = 1;
-static int debug_exec = 0;             /* show execution */
-static int debug_events = 0;           /* show events from kernel */
-static int debug_memory = 0;           /* show target memory accesses */
-static int debug_exceptions = 0;       /* show target exceptions */
-static int useshell = 0;               /* use shell for subprocesses */
+static bool new_group = true;
+static bool debug_exec = false;                /* show execution */
+static bool debug_events = false;      /* show events from kernel */
+static bool debug_memory = false;      /* show target memory accesses */
+static bool debug_exceptions = false;  /* show target exceptions */
+static bool useshell = false;          /* use shell for subprocesses */
 
 /* This vector maps GDB's idea of a register's number into an offset
    in the windows exception context vector.
index 42083e789a580811070645ddbaaae267b9608470..bb69a79996ac8ad798d48190fbacc61a79cb556a 100644 (file)
@@ -100,7 +100,7 @@ static const int MAX_TIB64 =
   sizeof (thread_information_64) / sizeof (uint64_t);
 static const int FULL_TIB_SIZE = 0x1000;
 
-static int maint_display_all_tib = 0;
+static bool maint_display_all_tib = false;
 
 /* Define Thread Local Base pointer type.  */
 
index 8b79d69a6d58e067cf627f753e04bb5895287fc0..eaf99efa6b972047231c36c2372d4231e4e7bb66 100644 (file)
@@ -26,7 +26,7 @@
 #include <string>
 
 /* Debugging flag.  */
-static int debug_xml;
+static bool debug_xml;
 
 /* The contents of this file are only useful if XML support is
    available.  */
This page took 0.096413 seconds and 4 git commands to generate.