diff options
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 166 |
1 files changed, 83 insertions, 83 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 1374fd3..09c23a3 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -125,18 +125,18 @@ Specify the serial device it is connected to\n\ enum remove_bp_reason) override; - int stopped_by_sw_breakpoint () override; - int supports_stopped_by_sw_breakpoint () override; + bool stopped_by_sw_breakpoint () override; + bool supports_stopped_by_sw_breakpoint () override; - int stopped_by_hw_breakpoint () override; + bool stopped_by_hw_breakpoint () override; - int supports_stopped_by_hw_breakpoint () override; + bool supports_stopped_by_hw_breakpoint () override; - int stopped_by_watchpoint () override; + bool stopped_by_watchpoint () override; - int stopped_data_address (CORE_ADDR *) override; + bool stopped_data_address (CORE_ADDR *) override; - int watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; + bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; int can_use_hw_breakpoint (enum bptype, int, int) override; @@ -165,7 +165,7 @@ Specify the serial device it is connected to\n\ void program_signals (int, unsigned char *) override; - int thread_alive (ptid_t ptid) override; + bool thread_alive (ptid_t ptid) override; const char *thread_name (struct thread_info *) override; @@ -209,13 +209,13 @@ Specify the serial device it is connected to\n\ CORE_ADDR load_module_addr, CORE_ADDR offset) override; - int has_all_memory () override { return default_child_has_all_memory (); } - int has_memory () override { return default_child_has_memory (); } - int has_stack () override { return default_child_has_stack (); } - int has_registers () override { return default_child_has_registers (); } - int has_execution (ptid_t ptid) override { return default_child_has_execution (ptid); } + bool has_all_memory () override { return default_child_has_all_memory (); } + bool has_memory () override { return default_child_has_memory (); } + bool has_stack () override { return default_child_has_stack (); } + bool has_registers () override { return default_child_has_registers (); } + bool has_execution (ptid_t ptid) override { return default_child_has_execution (ptid); } - int can_execute_reverse () override; + bool can_execute_reverse () override; std::vector<mem_region> memory_map () override; @@ -229,9 +229,9 @@ Specify the serial device it is connected to\n\ const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp) override; - int can_async_p () override; + bool can_async_p () override; - int is_async_p () override; + bool is_async_p () override; void async (int) override; @@ -243,13 +243,13 @@ Specify the serial device it is connected to\n\ void terminal_ours () override; - int supports_non_stop () override; + bool supports_non_stop () override; - int supports_multi_process () override; + bool supports_multi_process () override; - int supports_disable_randomization () override; + bool supports_disable_randomization () override; - int filesystem_is_local () override; + bool filesystem_is_local () override; int fileio_open (struct inferior *inf, const char *filename, @@ -275,19 +275,19 @@ Specify the serial device it is connected to\n\ const char *filename, int *target_errno) override; - int supports_enable_disable_tracepoint () override; + bool supports_enable_disable_tracepoint () override; - int supports_string_tracing () override; + bool supports_string_tracing () override; - int supports_evaluation_of_breakpoint_conditions () override; + bool supports_evaluation_of_breakpoint_conditions () override; - int can_run_breakpoint_commands () override; + bool can_run_breakpoint_commands () override; void trace_init () override; void download_tracepoint (struct bp_location *location) override; - int can_download_tracepoint () override; + bool can_download_tracepoint () override; void download_trace_state_variable (const trace_state_variable &tsv) override; @@ -309,7 +309,7 @@ Specify the serial device it is connected to\n\ int trace_find (enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp) override; - int get_trace_state_variable_value (int tsv, LONGEST *val) override; + bool get_trace_state_variable_value (int tsv, LONGEST *val) override; int save_trace_data (const char *filename) override; @@ -327,8 +327,8 @@ Specify the serial device it is connected to\n\ void set_trace_buffer_size (LONGEST val) override; - int set_trace_notes (const char *user, const char *notes, - const char *stopnotes) override; + bool set_trace_notes (const char *user, const char *notes, + const char *stopnotes) override; int core_of_thread (ptid_t ptid) override; @@ -336,7 +336,7 @@ Specify the serial device it is connected to\n\ CORE_ADDR memaddr, ULONGEST size) override; - int get_tib_address (ptid_t ptid, CORE_ADDR *addr) override; + bool get_tib_address (ptid_t ptid, CORE_ADDR *addr) override; void set_permissions () override; @@ -349,8 +349,8 @@ Specify the serial device it is connected to\n\ traceframe_info_up traceframe_info () override; - int use_agent (int use) override; - int can_use_agent () override; + bool use_agent (bool use) override; + bool can_use_agent () override; struct btrace_target_info *enable_btrace (ptid_t ptid, const struct btrace_config *conf) override; @@ -364,7 +364,7 @@ Specify the serial device it is connected to\n\ enum btrace_read_type type) override; const struct btrace_config *btrace_conf (const struct btrace_target_info *) override; - int augmented_libraries_svr4_read () override; + bool augmented_libraries_svr4_read () override; int follow_fork (int, int) override; void follow_exec (struct inferior *, char *) override; int insert_fork_catchpoint (int) override; @@ -404,7 +404,7 @@ public: void attach (const char *, int) override; void post_attach (int) override; - int supports_disable_randomization () override; + bool supports_disable_randomization () override; }; /* Per-program-space data key. */ @@ -2518,7 +2518,7 @@ remote_thread_always_alive (ptid_t ptid) /* Return nonzero if the thread PTID is still alive on the remote system. */ -int +bool remote_target::thread_alive (ptid_t ptid) { struct remote_state *rs = get_remote_state (); @@ -9700,7 +9700,7 @@ remote_target::mourn_inferior () } } -int +bool extended_remote_target::supports_disable_randomization () { return packet_support (PACKET_QDisableRandomization) == PACKET_ENABLE; @@ -10158,7 +10158,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, _("remote_insert_watchpoint: reached end of function")); } -int +bool remote_target::watchpoint_addr_within_range (CORE_ADDR addr, CORE_ADDR start, int length) { @@ -10251,7 +10251,7 @@ remote_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot) /* The to_stopped_by_sw_breakpoint method of target remote. */ -int +bool remote_target::stopped_by_sw_breakpoint () { struct thread_info *thread = inferior_thread (); @@ -10264,7 +10264,7 @@ remote_target::stopped_by_sw_breakpoint () /* The to_supports_stopped_by_sw_breakpoint method of target remote. */ -int +bool remote_target::supports_stopped_by_sw_breakpoint () { return (packet_support (PACKET_swbreak_feature) == PACKET_ENABLE); @@ -10272,7 +10272,7 @@ remote_target::supports_stopped_by_sw_breakpoint () /* The to_stopped_by_hw_breakpoint method of target remote. */ -int +bool remote_target::stopped_by_hw_breakpoint () { struct thread_info *thread = inferior_thread (); @@ -10285,13 +10285,13 @@ remote_target::stopped_by_hw_breakpoint () /* The to_supports_stopped_by_hw_breakpoint method of target remote. */ -int +bool remote_target::supports_stopped_by_hw_breakpoint () { return (packet_support (PACKET_hwbreak_feature) == PACKET_ENABLE); } -int +bool remote_target::stopped_by_watchpoint () { struct thread_info *thread = inferior_thread (); @@ -10301,7 +10301,7 @@ remote_target::stopped_by_watchpoint () == TARGET_STOPPED_BY_WATCHPOINT)); } -int +bool remote_target::stopped_data_address (CORE_ADDR *addr_p) { struct thread_info *thread = inferior_thread (); @@ -10311,10 +10311,10 @@ remote_target::stopped_data_address (CORE_ADDR *addr_p) == TARGET_STOPPED_BY_WATCHPOINT)) { *addr_p = get_remote_thread_info (thread)->watch_data_address; - return 1; + return true; } - return 0; + return false; } @@ -11330,7 +11330,7 @@ remote_target::get_thread_local_address (ptid_t ptid, CORE_ADDR lm, /* Provide thread local base, i.e. Thread Information Block address. Returns 1 if ptid is found and thread_local_base is non zero. */ -int +bool remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr) { if (packet_support (PACKET_qGetTIBAddr) != PACKET_DISABLE) @@ -11356,7 +11356,7 @@ remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr) unpack_varlen_hex (rs->buf, &result); if (addr) *addr = (CORE_ADDR) result; - return 1; + return true; } else if (result == PACKET_UNKNOWN) error (_("Remote target doesn't support qGetTIBAddr packet")); @@ -11366,7 +11366,7 @@ remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr) else error (_("qGetTIBAddr not supported or disabled on this target")); /* Not reached. */ - return 0; + return false; } /* Support for inferring a target description based on the current @@ -12085,7 +12085,7 @@ remote_target::fileio_fstat (int fd, struct stat *st, int *remote_errno) /* Implementation of to_filesystem_is_local. */ -int +bool remote_target::filesystem_is_local () { /* Valgrind GDB presents itself as a remote target but works @@ -12127,11 +12127,11 @@ remote_target::filesystem_is_local () warning_issued = 1; } - return 1; + return true; } } - return 0; + return false; } static int @@ -12416,30 +12416,30 @@ remote_command (const char *args, int from_tty) help_list (remote_cmdlist, "remote ", all_commands, gdb_stdout); } -int +bool remote_target::can_execute_reverse () { if (packet_support (PACKET_bs) == PACKET_ENABLE || packet_support (PACKET_bc) == PACKET_ENABLE) - return 1; + return true; else - return 0; + return false; } -int +bool remote_target::supports_non_stop () { - return 1; + return true; } -int +bool remote_target::supports_disable_randomization () { /* Only supported in extended mode. */ - return 0; + return false; } -int +bool remote_target::supports_multi_process () { struct remote_state *rs = get_remote_state (); @@ -12453,7 +12453,7 @@ remote_supports_cond_tracepoints () return packet_support (PACKET_ConditionalTracepoints) == PACKET_ENABLE; } -int +bool remote_target::supports_evaluation_of_breakpoint_conditions () { return packet_support (PACKET_ConditionalBreakpoints) == PACKET_ENABLE; @@ -12477,20 +12477,20 @@ remote_supports_install_in_trace () return packet_support (PACKET_InstallInTrace) == PACKET_ENABLE; } -int +bool remote_target::supports_enable_disable_tracepoint () { return (packet_support (PACKET_EnableDisableTracepoints_feature) == PACKET_ENABLE); } -int +bool remote_target::supports_string_tracing () { return packet_support (PACKET_tracenz_feature) == PACKET_ENABLE; } -int +bool remote_target::can_run_breakpoint_commands () { return packet_support (PACKET_BreakpointCommands) == PACKET_ENABLE; @@ -12711,7 +12711,7 @@ remote_target::download_tracepoint (struct bp_location *loc) } } -int +bool remote_target::can_download_tracepoint () { struct remote_state *rs = get_remote_state (); @@ -12722,20 +12722,20 @@ remote_target::can_download_tracepoint () symbols, and fetched and merged the target's tracepoint list with ours. */ if (rs->starting_up) - return 0; + return false; ts = current_trace_status (); status = get_trace_status (ts); if (status == -1 || !ts->running_known || !ts->running) - return 0; + return false; /* If we are in a tracing experiment, but remote stub doesn't support installing tracepoint in trace, we have to return. */ if (!remote_supports_install_in_trace ()) - return 0; + return false; - return 1; + return true; } @@ -13053,7 +13053,7 @@ remote_target::trace_find (enum trace_find_type type, int num, return target_frameno; } -int +bool remote_target::get_trace_state_variable_value (int tsvnum, LONGEST *val) { struct remote_state *rs = get_remote_state (); @@ -13071,10 +13071,10 @@ remote_target::get_trace_state_variable_value (int tsvnum, LONGEST *val) { unpack_varlen_hex (reply + 1, &uval); *val = (LONGEST) uval; - return 1; + return true; } } - return 0; + return false; } int @@ -13266,7 +13266,7 @@ remote_target::set_trace_buffer_size (LONGEST val) } } -int +bool remote_target::set_trace_notes (const char *user, const char *notes, const char *stop_notes) { @@ -13304,16 +13304,16 @@ remote_target::set_trace_notes (const char *user, const char *notes, putpkt (rs->buf); reply = remote_get_noisy_reply (); if (*reply == '\0') - return 0; + return false; if (strcmp (reply, "OK") != 0) error (_("Bogus reply from target: %s"), reply); - return 1; + return true; } -int -remote_target::use_agent (int use) +bool +remote_target::use_agent (bool use) { if (packet_support (PACKET_QAgent) != PACKET_DISABLE) { @@ -13327,14 +13327,14 @@ remote_target::use_agent (int use) if (strcmp (rs->buf, "OK") == 0) { ::use_agent = use; - return 1; + return true; } } - return 0; + return false; } -int +bool remote_target::can_use_agent () { return (packet_support (PACKET_QAgent) != PACKET_DISABLE); @@ -13635,7 +13635,7 @@ remote_target::btrace_conf (const struct btrace_target_info *tinfo) return &tinfo->conf; } -int +bool remote_target::augmented_libraries_svr4_read () { return (packet_support (PACKET_augmented_libraries_svr4_read_feature) @@ -13745,7 +13745,7 @@ remote_target::thread_handle_to_thread_info (const gdb_byte *thread_handle, return NULL; } -int +bool remote_target::can_async_p () { struct remote_state *rs = get_remote_state (); @@ -13753,20 +13753,20 @@ remote_target::can_async_p () /* We don't go async if the user has explicitly prevented it with the "maint set target-async" command. */ if (!target_async_permitted) - return 0; + return false; /* We're async whenever the serial device is. */ return serial_can_async_p (rs->remote_desc); } -int +bool remote_target::is_async_p () { struct remote_state *rs = get_remote_state (); if (!target_async_permitted) /* We only enable async when the user specifically asks for it. */ - return 0; + return false; /* We're async whenever the serial device is. */ return serial_is_async_p (rs->remote_desc); |