+2018-05-02 Pedro Alves <palves@redhat.com>
+
+ * target.h (target_ops)
+ <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
+ stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
+ stopped_by_watchpoint, have_continuable_watchpoint,
+ stopped_data_address, watchpoint_addr_within_range,
+ can_accel_watchpoint_condition, can_run, thread_alive,
+ has_all_memory, has_memory, has_stack, has_registers,
+ has_execution, can_async_p, is_async_p, supports_non_stop,
+ always_non_stop_p, can_execute_reverse, supports_multi_process,
+ supports_enable_disable_tracepoint,
+ supports_disable_randomization, supports_string_tracing,
+ supports_evaluation_of_breakpoint_conditions,
+ can_run_breakpoint_commands, filesystem_is_local,
+ can_download_tracepoint, get_trace_state_variable_value,
+ set_trace_notes, get_tib_address, use_agent, can_use_agent,
+ record_is_replaying, record_will_replay,
+ augmented_libraries_svr4_read>: Adjust to return bool.
+ * aarch64-linux-nat.c: All implementations adjusted.
+ * aix-thread.c: All implementations adjusted.
+ * arm-linux-nat.c: All implementations adjusted.
+ * breakpoint.c: All implementations adjusted.
+ * bsd-kvm.c: All implementations adjusted.
+ * bsd-uthread.c: All implementations adjusted.
+ * corelow.c: All implementations adjusted.
+ * ctf.c: All implementations adjusted.
+ * darwin-nat.c: All implementations adjusted.
+ * darwin-nat.h: All implementations adjusted.
+ * exec.c: All implementations adjusted.
+ * fbsd-nat.c: All implementations adjusted.
+ * fbsd-nat.h: All implementations adjusted.
+ * gnu-nat.c: All implementations adjusted.
+ * gnu-nat.h: All implementations adjusted.
+ * go32-nat.c: All implementations adjusted.
+ * ia64-linux-nat.c: All implementations adjusted.
+ * inf-child.c: All implementations adjusted.
+ * inf-child.h: All implementations adjusted.
+ * inf-ptrace.c: All implementations adjusted.
+ * inf-ptrace.h: All implementations adjusted.
+ * linux-nat.c: All implementations adjusted.
+ * linux-nat.h: All implementations adjusted.
+ * mips-linux-nat.c: All implementations adjusted.
+ * nto-procfs.c: All implementations adjusted.
+ * ppc-linux-nat.c: All implementations adjusted.
+ * procfs.c: All implementations adjusted.
+ * ravenscar-thread.c: All implementations adjusted.
+ * record-btrace.c: All implementations adjusted.
+ * record-full.c: All implementations adjusted.
+ * remote-sim.c: All implementations adjusted.
+ * remote.c: All implementations adjusted.
+ * s390-linux-nat.c: All implementations adjusted.
+ * sol-thread.c: All implementations adjusted.
+ * spu-multiarch.c: All implementations adjusted.
+ * target-delegates.c: All implementations adjusted.
+ * target.c: All implementations adjusted.
+ * target.h: All implementations adjusted.
+ * tracefile-tfile.c: All implementations adjusted.
+ * tracefile.c: All implementations adjusted.
+ * tracefile.h: All implementations adjusted.
+ * windows-nat.c: All implementations adjusted.
+ * x86-linux-nat.h: All implementations adjusted.
+ * x86-nat.h: All implementations adjusted.
+
2018-05-02 Pedro Alves <palves@redhat.com>
* make-target-delegates (scan_target_h): Don't trim lines here.
struct expression *) override;
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
- int stopped_by_watchpoint () override;
- int stopped_data_address (CORE_ADDR *) override;
- int watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
+ bool stopped_by_watchpoint () override;
+ bool stopped_data_address (CORE_ADDR *) override;
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
int can_do_single_step () override;
/* Implement the "stopped_data_address" target_ops method. */
-int
+bool
aarch64_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
{
siginfo_t siginfo;
struct aarch64_debug_reg_state *state;
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
- return 0;
+ return false;
/* This must be a hardware breakpoint. */
if (siginfo.si_signo != SIGTRAP
|| (siginfo.si_code & 0xffff) != TRAP_HWBKPT)
- return 0;
+ return false;
/* Check if the address matches any watched address. */
state = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid));
&& addr_trap < addr_watch + len)
{
*addr_p = addr_trap;
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
/* Implement the "stopped_by_watchpoint" target_ops method. */
-int
+bool
aarch64_linux_nat_target::stopped_by_watchpoint ()
{
CORE_ADDR addr;
/* Implement the "watchpoint_addr_within_range" target_ops method. */
-int
+bool
aarch64_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
CORE_ADDR start, int length)
{
void mourn_inferior () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
/* Return whether thread PID is still valid. */
-int
+bool
aix_thread_target::thread_alive (ptid_t ptid)
{
struct target_ops *beneath = find_target_beneath (this);
const struct target_desc *read_description () override;
#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
- int supports_stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
#endif
};
#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
/* Implement the supports_stopped_by_hw_breakpoints method. */
-int
+bool
amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint ()
{
- return 1;
+ return true;
}
#endif
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) 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;
const struct target_desc *read_description () override;
};
}
/* What was the data address the target was stopped on accessing. */
-int
+bool
arm_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
{
siginfo_t siginfo;
int slot;
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
- return 0;
+ return false;
/* This must be a hardware breakpoint. */
if (siginfo.si_signo != SIGTRAP
|| (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
- return 0;
+ return false;
/* We must be able to set hardware watchpoints. */
if (arm_linux_get_hw_watchpoint_count () == 0)
/* If we are in a positive slot then we're looking at a breakpoint and not
a watchpoint. */
if (slot >= 0)
- return 0;
+ return false;
*addr_p = (CORE_ADDR) (uintptr_t) siginfo.si_addr;
- return 1;
+ return true;
}
/* Has the target been stopped by hitting a watchpoint? */
-int
+bool
arm_linux_nat_target::stopped_by_watchpoint ()
{
CORE_ADDR addr;
return stopped_data_address (&addr);
}
-int
+bool
arm_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
CORE_ADDR start,
int length)
int
watchpoints_triggered (struct target_waitstatus *ws)
{
- int stopped_by_watchpoint = target_stopped_by_watchpoint ();
+ bool stopped_by_watchpoint = target_stopped_by_watchpoint ();
CORE_ADDR addr;
struct breakpoint *b;
ULONGEST *xfered_len) override;
void files_info () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
- int has_memory () override { return 1; }
- int has_stack () override { return 1; }
- int has_registers () override { return 1; }
+ bool has_memory () override { return true; }
+ bool has_stack () override { return true; }
+ bool has_registers () override { return true; }
};
/* Target ops for libkvm interface. */
print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC, 1);
}
-int
+bool
bsd_kvm_target::thread_alive (ptid_t ptid)
{
- return 1;
+ return true;
}
const char *
ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
void resume (ptid_t, int, enum gdb_signal) override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
void update_thread_list () override;
beneath->resume (ptid, step, sig);
}
-int
+bool
bsd_uthread_target::thread_alive (ptid_t ptid)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
state = read_memory_unsigned_integer (addr + offset, 4, byte_order);
if (state == BSD_UTHREAD_PS_DEAD)
- return 0;
+ return false;
}
return beneath->thread_alive (ptid);
ULONGEST *xfered_len) override;
void files_info () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const struct target_desc *read_description () override;
const char *pid_to_str (ptid_t) override;
const char *thread_name (struct thread_info *) override;
- int has_memory () override;
- int has_stack () override;
- int has_registers () override;
+ bool has_memory () override;
+ bool has_stack () override;
+ bool has_registers () override;
bool info_proc (const char *, enum info_proc_what) override;
};
to appear in an "info thread" command, which is quite a useful
behaviour.
*/
-int
+bool
core_target::thread_alive (ptid_t ptid)
{
- return 1;
+ return true;
}
/* Ask the current architecture what it knows about this core file.
return NULL;
}
-int
+bool
core_target::has_memory ()
{
return (core_bfd != NULL);
}
-int
+bool
core_target::has_stack ()
{
return (core_bfd != NULL);
}
-int
+bool
core_target::has_registers ()
{
return (core_bfd != NULL);
void files_info () override;
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;
traceframe_info_up traceframe_info () override;
};
trace variable is found, set the value of it to *VAL and return
true, otherwise return false. */
-int
+bool
ctf_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
{
struct bt_iter_pos *pos;
- int found = 0;
+ bool found = false;
gdb_assert (ctf_iter != NULL);
/* Save the current position. */
def = bt_ctf_get_field (event, scope, "val");
*val = bt_ctf_get_uint64 (def);
- found = 1;
+ found = true;
}
}
return normal_pid_to_str (ptid);
}
-int
+bool
darwin_nat_target::thread_alive (ptid_t ptid)
{
- return 1;
+ return true;
}
/* If RDADDR is not NULL, read inferior task's LEN bytes from ADDR and
return null_ptid;
}
-int
+bool
darwin_nat_target::supports_multi_process ()
{
- return 1;
+ return true;
}
void
void resume (ptid_t, int , enum gdb_signal) override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
ULONGEST offset, ULONGEST len,
ULONGEST *xfered_len) override;
- int supports_multi_process () override;
+ bool supports_multi_process () override;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
};
struct target_section_table *get_section_table () override;
void files_info () override;
- int has_memory () override;
+ bool has_memory () override;
char *make_corefile_notes (bfd *, int *) override;
int find_memory_regions (find_memory_region_ftype func, void *data) override;
};
}
}
-int
+bool
exec_target::has_memory ()
{
/* We can provide memory if we have any file/target sections to read
/* Return true if PTID is still active in the inferior. */
-int
+bool
fbsd_nat_target::thread_alive (ptid_t ptid)
{
if (ptid_lwp_p (ptid))
if (ptrace (PT_LWPINFO, ptid_get_lwp (ptid), (caddr_t) &pl, sizeof pl)
== -1)
- return 0;
+ return false;
#ifdef PL_FLAG_EXITED
if (pl.pl_flags & PL_FLAG_EXITED)
- return 0;
+ return false;
#endif
}
- return 1;
+ return true;
}
/* Convert PTID to a string. Returns the string in a static
#ifdef USE_SIGTRAP_SIGINFO
/* Implement the "stopped_by_sw_breakpoint" target_ops method. */
-int
+bool
fbsd_nat_target::stopped_by_sw_breakpoint ()
{
struct ptrace_lwpinfo pl;
if (ptrace (PT_LWPINFO, get_ptrace_pid (inferior_ptid), (caddr_t) &pl,
sizeof pl) == -1)
- return 0;
+ return false;
return ((pl.pl_flags & PL_FLAG_SI)
&& pl.pl_siginfo.si_signo == SIGTRAP
/* Implement the "supports_stopped_by_sw_breakpoint" target_ops
method. */
-int
+bool
fbsd_nat_target::supports_stopped_by_sw_breakpoint ()
{
- return 1;
+ return true;
}
#endif
#endif
#ifdef PT_LWPINFO
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
#ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME
void post_attach (int) override;
#ifdef USE_SIGTRAP_SIGINFO
- int supports_stopped_by_sw_breakpoint () override;
- int stopped_by_sw_breakpoint () override;
+ bool supports_stopped_by_sw_breakpoint () override;
+ bool stopped_by_sw_breakpoint () override;
#endif
#ifdef TDP_RFPPWAIT
error (_("stop target function not implemented"));
}
-int
+bool
gnu_nat_target::thread_alive (ptid_t ptid)
{
inf_update_procs (gnu_current_inf);
void create_inferior (const char *, const std::string &,
char **, int) override;
void mourn_inferior () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
void stop (ptid_t) override;
};
void mourn_inferior () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
};
{
}
-int
+bool
go32_nat_target::thread_alive (ptid_t ptid)
{
return !ptid_equal (ptid, null_ptid);
void resume (ptid_t, int, enum gdb_signal) override;
#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
- int supports_stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
#endif
};
#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
/* Implement the supports_stopped_by_hw_breakpoints method. */
-int
+bool
i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint ()
{
- return 1;
+ return true;
}
#endif
has determined that a hardware watchpoint has indeed been hit.
The CPU will then be able to execute one instruction without
triggering a watchpoint. */
- int have_steppable_watchpoint () { return 1; }
+ bool have_steppable_watchpoint () { return 1; }
int can_use_hw_breakpoint (enum bptype, int, int) override;
- int stopped_by_watchpoint () override;
- int stopped_data_address (CORE_ADDR *) override;
+ bool stopped_by_watchpoint () override;
+ bool stopped_data_address (CORE_ADDR *) override;
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
enable_watchpoints_in_psr (lp->ptid);
}
-int
+bool
ia64_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
{
CORE_ADDR psr;
struct regcache *regcache = get_current_regcache ();
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
- return 0;
+ return false;
if (siginfo.si_signo != SIGTRAP
|| (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
- return 0;
+ return false;
regcache_cooked_read_unsigned (regcache, IA64_PSR_REGNUM, &psr);
psr |= IA64_PSR_DD; /* Set the dd bit - this will disable the watchpoint
regcache_cooked_write_unsigned (regcache, IA64_PSR_REGNUM, psr);
*addr_p = (CORE_ADDR) siginfo.si_addr;
- return 1;
+ return true;
}
-int
+bool
ia64_linux_nat_target::stopped_by_watchpoint ()
{
CORE_ADDR addr;
operation by a debugger. */
}
-int
+bool
inf_child_target::can_run ()
{
- return 1;
+ return true;
}
bool
return NULL;
}
-int
+bool
inf_child_target::has_all_memory ()
{
return default_child_has_all_memory ();
}
-int
+bool
inf_child_target::has_memory ()
{
return default_child_has_memory ();
}
-int
+bool
inf_child_target::has_stack ()
{
return default_child_has_stack ();
}
-int
+bool
inf_child_target::has_registers ()
{
return default_child_has_registers ();
}
-int
+bool
inf_child_target::has_execution (ptid_t ptid)
{
return default_child_has_execution (ptid);
#endif
}
-int
-inf_child_target::use_agent (int use)
+bool
+inf_child_target::use_agent (bool use)
{
if (agent_loaded_p ())
{
::use_agent = use;
- return 1;
+ return true;
}
else
- return 0;
+ return false;
}
-int
+bool
inf_child_target::can_use_agent ()
{
return agent_loaded_p ();
void mourn_inferior () override;
- int can_run () override;
+ bool can_run () override;
bool can_create_inferior () override;
void create_inferior (const char *, const std::string &,
/* We must default these because they must be implemented by any
target that can run. */
- int can_async_p () override { return 0; }
- int supports_non_stop () override { return 0; }
- int supports_disable_randomization () override { return 0; }
+ bool can_async_p () override { return false; }
+ bool supports_non_stop () override { return false; }
+ bool supports_disable_randomization () override { return false; }
char *pid_to_exec_file (int pid) override;
- int has_all_memory () override;
- int has_memory () override;
- int has_stack () override;
- int has_registers () override;
- int has_execution (ptid_t) override;
+ bool has_all_memory () override;
+ bool has_memory () override;
+ bool has_stack () override;
+ bool has_registers () override;
+ bool has_execution (ptid_t) override;
int fileio_open (struct inferior *inf, const char *filename,
int flags, int mode, int warn_if_slow,
gdb::optional<std::string> fileio_readlink (struct inferior *inf,
const char *filename,
int *target_errno) override;
- int use_agent (int use) override;
+ bool use_agent (bool use) override;
- int can_use_agent () override;
+ bool can_use_agent () override;
protected:
/* Unpush the target if it wasn't explicitly open with "target native"
/* Return non-zero if the thread specified by PTID is alive. */
-int
+bool
inf_ptrace_target::thread_alive (ptid_t ptid)
{
/* ??? Is kill the right way to do this? */
void mourn_inferior () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
/* Returns true if the LWP had stopped for a watchpoint. */
-int
+bool
linux_nat_target::stopped_by_watchpoint ()
{
struct lwp_info *lp = find_lwp_pid (inferior_ptid);
return lp->stop_reason == TARGET_STOPPED_BY_WATCHPOINT;
}
-int
+bool
linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
{
struct lwp_info *lp = find_lwp_pid (inferior_ptid);
/* Returns true if the LWP had stopped for a software breakpoint. */
-int
+bool
linux_nat_target::stopped_by_sw_breakpoint ()
{
struct lwp_info *lp = find_lwp_pid (inferior_ptid);
/* Implement the supports_stopped_by_sw_breakpoint method. */
-int
+bool
linux_nat_target::supports_stopped_by_sw_breakpoint ()
{
return USE_SIGTRAP_SIGINFO;
/* Returns true if the LWP had stopped for a hardware
breakpoint/watchpoint. */
-int
+bool
linux_nat_target::stopped_by_hw_breakpoint ()
{
struct lwp_info *lp = find_lwp_pid (inferior_ptid);
/* Implement the supports_stopped_by_hw_breakpoint method. */
-int
+bool
linux_nat_target::supports_stopped_by_hw_breakpoint ()
{
return USE_SIGTRAP_SIGINFO;
offset, len, xfered_len);
}
-int
+bool
linux_nat_target::thread_alive (ptid_t ptid)
{
/* As long as a PTID is in lwp list, consider it alive. */
/* target_is_async_p implementation. */
-int
+bool
linux_nat_target::is_async_p ()
{
return linux_is_async_p ();
/* target_can_async_p implementation. */
-int
+bool
linux_nat_target::can_async_p ()
{
/* We're always async, unless the user explicitly prevented it with the
return target_async_permitted;
}
-int
+bool
linux_nat_target::supports_non_stop ()
{
return 1;
/* to_always_non_stop_p implementation. */
-int
+bool
linux_nat_target::always_non_stop_p ()
{
return 1;
int linux_multi_process = 1;
-int
+bool
linux_nat_target::supports_multi_process ()
{
return linux_multi_process;
}
-int
+bool
linux_nat_target::supports_disable_randomization ()
{
#ifdef HAVE_PERSONALITY
/* Implementation of to_filesystem_is_local. */
-int
+bool
linux_nat_target::filesystem_is_local ()
{
struct inferior *inf = current_inferior ();
if (inf->fake_pid_p || inf->pid == 0)
- return 1;
+ return true;
return linux_ns_same (inf->pid, LINUX_NS_MNT);
}
void kill () override;
void mourn_inferior () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
void update_thread_list () override;
struct address_space *thread_address_space (ptid_t) 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 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;
- int supports_stopped_by_hw_breakpoint () override;
+ bool stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
void thread_events (int) override;
- int can_async_p () override;
- int is_async_p () override;
+ bool can_async_p () override;
+ bool is_async_p () override;
- int supports_non_stop () override;
- int always_non_stop_p () override;
+ bool supports_non_stop () override;
+ bool always_non_stop_p () override;
void async (int) override;
void stop (ptid_t) override;
- int supports_multi_process () override;
+ bool supports_multi_process () override;
- int supports_disable_randomization () override;
+ bool supports_disable_randomization () override;
int core_of_thread (ptid_t ptid) override;
- int filesystem_is_local () override;
+ bool filesystem_is_local () override;
int fileio_open (struct inferior *inf, const char *filename,
int flags, int mode, int warn_if_slow,
virtual void low_resume (ptid_t ptid, int step, enum gdb_signal sig)
{ inf_ptrace_target::resume (ptid, step, sig); }
- virtual int low_stopped_by_watchpoint ()
- { return 0; }
+ virtual bool low_stopped_by_watchpoint ()
+ { return false; }
- virtual int low_stopped_data_address (CORE_ADDR *addr_p)
- { return 0; }
+ virtual bool low_stopped_data_address (CORE_ADDR *addr_p)
+ { return false; }
};
/* The final/concrete instance. */
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) 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 region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
stopped by watchpoint. The watchhi R and W bits indicate the watch
register triggered. */
-int
+bool
mips_linux_nat_target::stopped_by_watchpoint ()
{
int n;
if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
&watch_readback,
&watch_readback_valid, 1))
- return 0;
+ return false;
num_valid = mips_linux_watch_get_num_valid (&watch_readback);
for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++)
if (mips_linux_watch_get_watchhi (&watch_readback, n) & (R_MASK | W_MASK))
- return 1;
+ return true;
- return 0;
+ return false;
}
/* Target to_stopped_data_address implementation. Set the address
where the watch triggered (if known). Return 1 if the address was
known. */
-int
+bool
mips_linux_nat_target::stopped_data_address (CORE_ADDR *paddr)
{
/* On mips we don't know the low order 3 bits of the data address,
so we must return false. */
- return 0;
+ return false;
}
/* Target to_region_ok_for_hw_watchpoint implementation. Return 1 if
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
- int stopped_by_watchpoint () override;
+ bool stopped_by_watchpoint () override;
void kill () override;
void pass_signals (int, unsigned char *) override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
void update_thread_list () override;
devctl (ctl_fd, DCMD_PROC_CURTHREAD, &tid, sizeof (tid), 0);
}
-/* Return nonzero if the thread TH is still alive. */
-int
+/* Return true if the thread TH is still alive. */
+
+bool
nto_procfs_target::thread_alive (ptid_t ptid)
{
pid_t tid;
pid = ptid_get_pid (ptid);
if (kill (pid, 0) == -1)
- return 0;
+ return false;
status.tid = tid;
if ((err = devctl (ctl_fd, DCMD_PROC_TIDSTATUS,
&status, sizeof (status), 0)) != EOK)
- return 0;
+ return false;
/* Thread is alive or dead but not yet joined,
or dead and there is an alive (or dead unjoined) thread with
return 0;
}
-int
+bool
nto_procfs_target::can_use_hw_breakpoint (enum bptype type,
int cnt, int othertype)
{
return procfs_hw_watchpoint (addr, len, type);
}
-int
+bool
nto_procfs_target::stopped_by_watchpoint ()
{
/* NOTE: nto_stopped_by_watchpoint will be called ONLY while we are
int remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, enum target_hw_bp_type)
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_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *)
+ bool can_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *)
override;
int masked_watch_num_registers (CORE_ADDR, CORE_ADDR) override;
/* Return non-zero if the target is capable of using hardware to evaluate
the condition expression, thus only triggering the watchpoint when it is
true. */
-int
+bool
ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len,
int rw,
struct expression *cond)
xfree (t);
}
-int
+bool
ppc_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
{
siginfo_t siginfo;
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
- return 0;
+ return false;
if (siginfo.si_signo != SIGTRAP
|| (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
- return 0;
+ return false;
if (have_ptrace_hwdebug_interface ())
{
if (hw_breaks[i].hw_break && hw_breaks[i].slot == slot
&& hw_breaks[i].hw_break->trigger_type
== PPC_BREAKPOINT_TRIGGER_EXECUTE)
- return 0;
+ return false;
}
}
*addr_p = (CORE_ADDR) (uintptr_t) siginfo.si_addr;
- return 1;
+ return true;
}
-int
+bool
ppc_linux_nat_target::stopped_by_watchpoint ()
{
CORE_ADDR addr;
return stopped_data_address (&addr);
}
-int
+bool
ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
CORE_ADDR start,
int length)
void update_thread_list () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
override;
#endif
- int stopped_by_watchpoint () override;
+ bool stopped_by_watchpoint () override;
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
int can_use_hw_breakpoint (enum bptype, int, int) override;
- int stopped_data_address (CORE_ADDR *) override;
+ bool stopped_data_address (CORE_ADDR *) override;
};
static procfs_target the_procfs_target;
really seem to be doing his job. Got to investigate how to tell
when a thread is really gone. */
-int
+bool
procfs_target::thread_alive (ptid_t ptid)
{
int proc, thread;
thread = ptid_get_lwp (ptid);
/* If I don't know it, it ain't alive! */
if ((pi = find_procinfo (proc, thread)) == NULL)
- return 0;
+ return false;
/* If I can't get its status, it ain't alive!
What's more, I need to forget about it! */
if (!proc_get_status (pi))
{
destroy_procinfo (pi);
- return 0;
+ return false;
}
/* I couldn't have got its status if it weren't alive, so it's
alive. */
- return 1;
+ return true;
}
/* Convert PTID to a string. Returns the string in a static
/* Returns non-zero if process is stopped on a hardware watchpoint
fault, else returns zero. */
-int
+bool
procfs_target::stopped_by_watchpoint ()
{
procinfo *pi;
if (proc_why (pi) == PR_FAULTED)
{
if (proc_what (pi) == FLTWATCH)
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
/* Returns 1 if the OS knows the position of the triggered watchpoint,
procfs_stopped_by_watchpoint returned 1, thus no further checks are
done. The function also assumes that ADDR is not NULL. */
-int
+bool
procfs_target::stopped_data_address (CORE_ADDR *addr)
{
procinfo *pi;
void prepare_to_store (struct regcache *) override;
- int stopped_by_sw_breakpoint () override;
+ bool stopped_by_sw_breakpoint () override;
- int stopped_by_hw_breakpoint () override;
+ bool 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 thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
int core_of_thread (ptid_t ptid) override;
void mourn_inferior () 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
+ 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); }
};
return "Ravenscar task";
}
-int
+bool
ravenscar_thread_target::thread_alive (ptid_t ptid)
{
/* Ravenscar tasks are non-terminating. */
- return 1;
+ return true;
}
const char *
/* Implement the to_stopped_by_sw_breakpoint target_ops "method". */
-int
+bool
ravenscar_thread_target::stopped_by_sw_breakpoint ()
{
ptid_t saved_ptid = inferior_ptid;
struct target_ops *beneath = find_target_beneath (this);
- int result;
+ bool result;
inferior_ptid = get_base_thread_from_ravenscar_task (saved_ptid);
result = beneath->stopped_by_sw_breakpoint ();
/* Implement the to_stopped_by_hw_breakpoint target_ops "method". */
-int
+bool
ravenscar_thread_target::stopped_by_hw_breakpoint ()
{
ptid_t saved_ptid = inferior_ptid;
struct target_ops *beneath = find_target_beneath (this);
- int result;
+ bool result;
inferior_ptid = get_base_thread_from_ravenscar_task (saved_ptid);
result = beneath->stopped_by_hw_breakpoint ();
/* Implement the to_stopped_by_watchpoint target_ops "method". */
-int
+bool
ravenscar_thread_target::stopped_by_watchpoint ()
{
ptid_t saved_ptid = inferior_ptid;
struct target_ops *beneath = find_target_beneath (this);
- int result;
+ bool result;
inferior_ptid = get_base_thread_from_ravenscar_task (saved_ptid);
result = beneath->stopped_by_watchpoint ();
/* Implement the to_stopped_data_address target_ops "method". */
-int
+bool
ravenscar_thread_target::stopped_data_address (CORE_ADDR *addr_p)
{
ptid_t saved_ptid = inferior_ptid;
struct target_ops *beneath = find_target_beneath (this);
- int result;
+ bool result;
inferior_ptid = get_base_thread_from_ravenscar_task (saved_ptid);
result = beneath->stopped_data_address (addr_p);
void call_history_range (ULONGEST begin, ULONGEST end, record_print_flags flags)
override;
- int record_is_replaying (ptid_t ptid) override;
- int record_will_replay (ptid_t ptid, int dir) override;
+ bool record_is_replaying (ptid_t ptid) override;
+ bool record_will_replay (ptid_t ptid, int dir) override;
void record_stop_replaying () override;
enum target_xfer_status xfer_partial (enum target_object object,
void stop (ptid_t) override;
void update_thread_list () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
void goto_record_begin () override;
void goto_record_end () override;
void goto_record (ULONGEST insn) override;
- int can_execute_reverse () override;
+ bool can_execute_reverse () 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;
- int supports_stopped_by_hw_breakpoint () override;
+ bool stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
enum exec_direction_kind execution_direction () override;
void prepare_to_generate_core () override;
/* The record_is_replaying method of target record-btrace. */
-int
+bool
record_btrace_target::record_is_replaying (ptid_t ptid)
{
struct thread_info *tp;
ALL_NON_EXITED_THREADS (tp)
if (ptid_match (tp->ptid, ptid) && btrace_is_replaying (tp))
- return 1;
+ return true;
- return 0;
+ return false;
}
/* The record_will_replay method of target record-btrace. */
-int
+bool
record_btrace_target::record_will_replay (ptid_t ptid, int dir)
{
return dir == EXEC_REVERSE || record_is_replaying (ptid);
/* The can_execute_reverse method of target record-btrace. */
-int
+bool
record_btrace_target::can_execute_reverse ()
{
- return 1;
+ return true;
}
/* The stopped_by_sw_breakpoint method of target record-btrace. */
-int
+bool
record_btrace_target::stopped_by_sw_breakpoint ()
{
if (record_is_replaying (minus_one_ptid))
/* The supports_stopped_by_sw_breakpoint method of target
record-btrace. */
-int
+bool
record_btrace_target::supports_stopped_by_sw_breakpoint ()
{
if (record_is_replaying (minus_one_ptid))
- return 1;
+ return true;
return this->beneath->supports_stopped_by_sw_breakpoint ();
}
/* The stopped_by_sw_breakpoint method of target record-btrace. */
-int
+bool
record_btrace_target::stopped_by_hw_breakpoint ()
{
if (record_is_replaying (minus_one_ptid))
/* The supports_stopped_by_hw_breakpoint method of target
record-btrace. */
-int
+bool
record_btrace_target::supports_stopped_by_hw_breakpoint ()
{
if (record_is_replaying (minus_one_ptid))
- return 1;
+ return true;
return this->beneath->supports_stopped_by_hw_breakpoint ();
}
/* The thread_alive method of target record-btrace. */
-int
+bool
record_btrace_target::thread_alive (ptid_t ptid)
{
/* We don't add or remove threads during replay. */
void close () override;
void async (int) override;
ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
- int stopped_by_watchpoint () override;
- int stopped_data_address (CORE_ADDR *) override;
+ bool stopped_by_watchpoint () override;
+ bool stopped_data_address (CORE_ADDR *) 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;
- int supports_stopped_by_hw_breakpoint () override;
+ bool stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
- int can_execute_reverse () override;
+ bool can_execute_reverse () override;
/* Add bookmark target methods. */
gdb_byte *get_bookmark (const char *, int) override;
void save_record (const char *filename) override;
bool supports_delete_record () override;
void delete_record () override;
- int record_is_replaying (ptid_t ptid) override;
- int record_will_replay (ptid_t ptid, int dir) override;
+ bool record_is_replaying (ptid_t ptid) override;
+ bool record_will_replay (ptid_t ptid, int dir) override;
void record_stop_replaying () override;
void goto_record_begin () override;
void goto_record_end () override;
struct bp_target_info *,
enum remove_bp_reason) override;
- int has_execution (ptid_t) override;
+ bool has_execution (ptid_t) override;
};
static record_full_target record_full_ops;
return return_ptid;
}
-int
+bool
record_full_base_target::stopped_by_watchpoint ()
{
if (RECORD_FULL_IS_REPLAY)
return beneath->stopped_by_watchpoint ();
}
-int
+bool
record_full_base_target::stopped_data_address (CORE_ADDR *addr_p)
{
if (RECORD_FULL_IS_REPLAY)
- return 0;
+ return false;
else
return this->beneath->stopped_data_address (addr_p);
}
/* The stopped_by_sw_breakpoint method of target record-full. */
-int
+bool
record_full_base_target::stopped_by_sw_breakpoint ()
{
return record_full_stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT;
/* The supports_stopped_by_sw_breakpoint method of target
record-full. */
-int
+bool
record_full_base_target::supports_stopped_by_sw_breakpoint ()
{
- return 1;
+ return true;
}
/* The stopped_by_hw_breakpoint method of target record-full. */
-int
+bool
record_full_base_target::stopped_by_hw_breakpoint ()
{
return record_full_stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT;
/* The supports_stopped_by_sw_breakpoint method of target
record-full. */
-int
+bool
record_full_base_target::supports_stopped_by_hw_breakpoint ()
{
- return 1;
+ return true;
}
/* Record registers change (by user or by GDB) to list as an instruction. */
/* "can_execute_reverse" method for process record target. */
-int
+bool
record_full_base_target::can_execute_reverse ()
{
- return 1;
+ return true;
}
/* "get_bookmark" method for process record and prec over core. */
/* The "record_is_replaying" target method. */
-int
+bool
record_full_base_target::record_is_replaying (ptid_t ptid)
{
return RECORD_FULL_IS_REPLAY;
/* The "record_will_replay" target method. */
-int
+bool
record_full_base_target::record_will_replay (ptid_t ptid, int dir)
{
/* We can currently only record when executing forwards. Should we be able
/* "has_execution" method for prec over corefile. */
-int
+bool
record_full_core_target::has_execution (ptid_t the_ptid)
{
- return 1;
+ return true;
}
/* Record log save-file format
void interrupt () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
- int has_all_memory () override;
- int has_memory () override;
+ bool has_all_memory () override;
+ bool has_memory () override;
- int has_stack () override
+ bool has_stack () override
{ return default_child_has_stack (); }
- int has_registers () override
+ bool has_registers () override
{ return default_child_has_registers (); }
- int has_execution (ptid_t ptid) override
+ bool has_execution (ptid_t ptid) override
{ return default_child_has_execution (ptid); }
};
/* Check to see if a thread is still alive. */
-int
+bool
gdbsim_target::thread_alive (ptid_t ptid)
{
struct sim_inferior_data *sim_data
= get_sim_inferior_data_by_ptid (ptid, SIM_INSTANCE_NOT_NEEDED);
if (sim_data == NULL)
- return 0;
+ return false;
if (ptid_equal (ptid, sim_data->remote_sim_ptid))
/* The simulators' task is always alive. */
- return 1;
+ return true;
- return 0;
+ return false;
}
/* Convert a thread ID to a string. Returns the string in a static
/* Simulator memory may be accessed after the program has been loaded. */
-int
+bool
gdbsim_target::has_all_memory ()
{
struct sim_inferior_data *sim_data
= get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED);
if (!sim_data->program_loaded)
- return 0;
+ return false;
- return 1;
+ return true;
}
-int
+bool
gdbsim_target::has_memory ()
{
struct sim_inferior_data *sim_data
= get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED);
if (!sim_data->program_loaded)
- return 0;
+ return false;
- return 1;
+ return true;
}
void
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;
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;
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;
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;
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,
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;
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;
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;
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;
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;
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;
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. */
/* 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 ();
}
}
-int
+bool
extended_remote_target::supports_disable_randomization ()
{
return packet_support (PACKET_QDisableRandomization) == PACKET_ENABLE;
_("remote_insert_watchpoint: reached end of function"));
}
-int
+bool
remote_target::watchpoint_addr_within_range (CORE_ADDR addr,
CORE_ADDR start, int length)
{
/* The to_stopped_by_sw_breakpoint method of target remote. */
-int
+bool
remote_target::stopped_by_sw_breakpoint ()
{
struct thread_info *thread = inferior_thread ();
/* 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);
/* The to_stopped_by_hw_breakpoint method of target remote. */
-int
+bool
remote_target::stopped_by_hw_breakpoint ()
{
struct thread_info *thread = inferior_thread ();
/* 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 ();
== TARGET_STOPPED_BY_WATCHPOINT));
}
-int
+bool
remote_target::stopped_data_address (CORE_ADDR *addr_p)
{
struct thread_info *thread = inferior_thread ();
== TARGET_STOPPED_BY_WATCHPOINT))
{
*addr_p = get_remote_thread_info (thread)->watch_data_address;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* 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)
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"));
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
/* Implementation of to_filesystem_is_local. */
-int
+bool
remote_target::filesystem_is_local ()
{
/* Valgrind GDB presents itself as a remote target but works
warning_issued = 1;
}
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
static int
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 ();
return packet_support (PACKET_ConditionalTracepoints) == PACKET_ENABLE;
}
-int
+bool
remote_target::supports_evaluation_of_breakpoint_conditions ()
{
return packet_support (PACKET_ConditionalBreakpoints) == PACKET_ENABLE;
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;
}
}
-int
+bool
remote_target::can_download_tracepoint ()
{
struct remote_state *rs = get_remote_state ();
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;
}
return target_frameno;
}
-int
+bool
remote_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
{
struct remote_state *rs = get_remote_state ();
{
unpack_varlen_hex (reply + 1, &uval);
*val = (LONGEST) uval;
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
int
}
}
-int
+bool
remote_target::set_trace_notes (const char *user, const char *notes,
const char *stop_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)
{
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);
return &tinfo->conf;
}
-int
+bool
remote_target::augmented_libraries_svr4_read ()
{
return (packet_support (PACKET_augmented_libraries_svr4_read_feature)
return NULL;
}
-int
+bool
remote_target::can_async_p ()
{
struct remote_state *rs = get_remote_state ();
/* 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);
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
override;
int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
- int have_continuable_watchpoint () { return 1; }
- int stopped_by_watchpoint () override;
- int watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
+ bool have_continuable_watchpoint () { return 1; }
+ bool stopped_by_watchpoint () override;
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
per_info.lowcore.words.access_id);
}
-int
+bool
s390_linux_nat_target::stopped_by_watchpoint ()
{
struct s390_debug_reg_state *state
= s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
per_lowcore_bits per_lowcore;
ptrace_area parea;
- int result;
if (show_debug_regs)
s390_show_debug_regs (s390_inferior_tid (), "stop");
/* Speed up common case. */
if (VEC_empty (s390_watch_area, state->watch_areas))
- return 0;
+ return false;
parea.len = sizeof (per_lowcore);
parea.process_addr = (addr_t) & per_lowcore;
if (ptrace (PTRACE_PEEKUSR_AREA, s390_inferior_tid (), &parea, 0) < 0)
perror_with_name (_("Couldn't retrieve watchpoint status"));
- result = (per_lowcore.perc_storage_alteration == 1
- && per_lowcore.perc_store_real_address == 0);
+ bool result = (per_lowcore.perc_storage_alteration == 1
+ && per_lowcore.perc_store_real_address == 0);
if (result)
{
ULONGEST offset, ULONGEST len,
ULONGEST *xfered_len) override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
void update_thread_list () override;
};
/* Return true if PTID is still active in the inferior. */
-int
+bool
sol_thread_target::thread_alive (ptid_t ptid)
{
if (ptid_tid_p (ptid))
pid = ptid_get_tid (ptid);
if ((val = p_td_ta_map_id2thr (main_ta, pid, &th)) != TD_OK)
- return 0; /* Thread not found. */
+ return false; /* Thread not found. */
if ((val = p_td_thr_validate (&th)) != TD_OK)
- return 0; /* Thread not valid. */
- return 1; /* Known thread. */
+ return false; /* Thread not valid. */
+ return true; /* Known thread. */
}
else
{
void mourn_inferior () override;
- void fetch_registers (struct regcache *, int) override;
+ void fetch_registers (struct regcache *, int) override;
void store_registers (struct regcache *, int) override;
enum target_xfer_status xfer_partial (enum target_object object,
}
/* Override the to_region_ok_for_hw_watchpoint routine. */
+
int
spu_multiarch_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
{
void files_info () override;
int insert_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) override;
int remove_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1, enum remove_bp_reason arg2) override;
- int stopped_by_sw_breakpoint () override;
- int supports_stopped_by_sw_breakpoint () override;
- int stopped_by_hw_breakpoint () override;
- int supports_stopped_by_hw_breakpoint () override;
+ bool stopped_by_sw_breakpoint () override;
+ bool supports_stopped_by_sw_breakpoint () override;
+ bool stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
int can_use_hw_breakpoint (enum bptype arg0, int arg1, int arg2) override;
int ranged_break_num_registers () override;
int insert_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) override;
int insert_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_type arg2, struct expression *arg3) override;
int insert_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2) override;
int remove_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2) override;
- int stopped_by_watchpoint () override;
+ bool stopped_by_watchpoint () override;
int have_steppable_watchpoint () override;
bool have_continuable_watchpoint () override;
- int stopped_data_address (CORE_ADDR *arg0) override;
- int watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override;
+ bool stopped_data_address (CORE_ADDR *arg0) override;
+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override;
int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) override;
- int can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override;
+ bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override;
int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override;
int can_do_single_step () override;
bool supports_terminal_ours () override;
void mourn_inferior () override;
void pass_signals (int arg0, unsigned char * arg1) override;
void program_signals (int arg0, unsigned char * arg1) override;
- int thread_alive (ptid_t arg0) override;
+ bool thread_alive (ptid_t arg0) override;
void update_thread_list () override;
const char *pid_to_str (ptid_t arg0) override;
const char *extra_thread_info (thread_info *arg0) override;
struct target_section_table *get_section_table () override;
thread_control_capabilities get_thread_control_capabilities () override;
bool attach_no_wait () override;
- int can_async_p () override;
- int is_async_p () override;
+ bool can_async_p () override;
+ bool is_async_p () override;
void async (int arg0) override;
void thread_events (int arg0) override;
- int supports_non_stop () override;
- int always_non_stop_p () override;
+ bool supports_non_stop () override;
+ bool always_non_stop_p () override;
int find_memory_regions (find_memory_region_ftype arg0, void *arg1) override;
char *make_corefile_notes (bfd *arg0, int *arg1) override;
gdb_byte *get_bookmark (const char *arg0, int arg1) override;
ptid_t get_ada_task_ptid (long arg0, long arg1) override;
int auxv_parse (gdb_byte **arg0, gdb_byte *arg1, CORE_ADDR *arg2, CORE_ADDR *arg3) override;
int search_memory (CORE_ADDR arg0, ULONGEST arg1, const gdb_byte *arg2, ULONGEST arg3, CORE_ADDR *arg4) override;
- int can_execute_reverse () override;
+ bool can_execute_reverse () override;
enum exec_direction_kind execution_direction () override;
- int supports_multi_process () override;
- int supports_enable_disable_tracepoint () override;
- int supports_disable_randomization () override;
- int supports_string_tracing () override;
- int supports_evaluation_of_breakpoint_conditions () override;
- int can_run_breakpoint_commands () override;
+ bool supports_multi_process () override;
+ bool supports_enable_disable_tracepoint () override;
+ bool supports_disable_randomization () override;
+ bool supports_string_tracing () override;
+ bool supports_evaluation_of_breakpoint_conditions () override;
+ bool can_run_breakpoint_commands () override;
struct gdbarch *thread_architecture (ptid_t arg0) override;
struct address_space *thread_address_space (ptid_t arg0) override;
- int filesystem_is_local () override;
+ bool filesystem_is_local () override;
void trace_init () override;
void download_tracepoint (struct bp_location *arg0) override;
- int can_download_tracepoint () override;
+ bool can_download_tracepoint () override;
void download_trace_state_variable (const trace_state_variable &arg0) override;
void enable_tracepoint (struct bp_location *arg0) override;
void disable_tracepoint (struct bp_location *arg0) override;
void get_tracepoint_status (struct breakpoint *arg0, struct uploaded_tp *arg1) override;
void trace_stop () override;
int trace_find (enum trace_find_type arg0, int arg1, CORE_ADDR arg2, CORE_ADDR arg3, int *arg4) override;
- int get_trace_state_variable_value (int arg0, LONGEST *arg1) override;
+ bool get_trace_state_variable_value (int arg0, LONGEST *arg1) override;
int save_trace_data (const char *arg0) override;
int upload_tracepoints (struct uploaded_tp **arg0) override;
int upload_trace_state_variables (struct uploaded_tsv **arg0) override;
void set_disconnected_tracing (int arg0) override;
void set_circular_trace_buffer (int arg0) override;
void set_trace_buffer_size (LONGEST arg0) override;
- int set_trace_notes (const char *arg0, const char *arg1, const char *arg2) override;
+ bool set_trace_notes (const char *arg0, const char *arg1, const char *arg2) override;
int core_of_thread (ptid_t arg0) override;
int verify_memory (const gdb_byte *arg0, CORE_ADDR arg1, ULONGEST arg2) override;
- int get_tib_address (ptid_t arg0, CORE_ADDR *arg1) override;
+ bool get_tib_address (ptid_t arg0, CORE_ADDR *arg1) override;
void set_permissions () override;
bool static_tracepoint_marker_at (CORE_ADDR arg0, static_tracepoint_marker *arg1) override;
std::vector<static_tracepoint_marker> static_tracepoint_markers_by_strid (const char *arg0) override;
traceframe_info_up traceframe_info () override;
- int use_agent (int arg0) override;
- int can_use_agent () override;
+ bool use_agent (bool arg0) override;
+ bool can_use_agent () override;
struct btrace_target_info *enable_btrace (ptid_t arg0, const struct btrace_config *arg1) override;
void disable_btrace (struct btrace_target_info *arg0) override;
void teardown_btrace (struct btrace_target_info *arg0) override;
void save_record (const char *arg0) override;
bool supports_delete_record () override;
void delete_record () override;
- int record_is_replaying (ptid_t arg0) override;
- int record_will_replay (ptid_t arg0, int arg1) override;
+ bool record_is_replaying (ptid_t arg0) override;
+ bool record_will_replay (ptid_t arg0, int arg1) override;
void record_stop_replaying () override;
void goto_record_begin () override;
void goto_record_end () override;
void call_history (int arg0, record_print_flags arg1) override;
void call_history_from (ULONGEST arg0, int arg1, record_print_flags arg2) override;
void call_history_range (ULONGEST arg0, ULONGEST arg1, record_print_flags arg2) override;
- int augmented_libraries_svr4_read () override;
+ bool augmented_libraries_svr4_read () override;
const struct frame_unwind *get_unwinder () override;
const struct frame_unwind *get_tailcall_unwinder () override;
void prepare_to_generate_core () override;
void files_info () override;
int insert_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) override;
int remove_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1, enum remove_bp_reason arg2) override;
- int stopped_by_sw_breakpoint () override;
- int supports_stopped_by_sw_breakpoint () override;
- int stopped_by_hw_breakpoint () override;
- int supports_stopped_by_hw_breakpoint () override;
+ bool stopped_by_sw_breakpoint () override;
+ bool supports_stopped_by_sw_breakpoint () override;
+ bool stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
int can_use_hw_breakpoint (enum bptype arg0, int arg1, int arg2) override;
int ranged_break_num_registers () override;
int insert_hw_breakpoint (struct gdbarch *arg0, struct bp_target_info *arg1) override;
int insert_watchpoint (CORE_ADDR arg0, int arg1, enum target_hw_bp_type arg2, struct expression *arg3) override;
int insert_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2) override;
int remove_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum target_hw_bp_type arg2) override;
- int stopped_by_watchpoint () override;
+ bool stopped_by_watchpoint () override;
int have_steppable_watchpoint () override;
bool have_continuable_watchpoint () override;
- int stopped_data_address (CORE_ADDR *arg0) override;
- int watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override;
+ bool stopped_data_address (CORE_ADDR *arg0) override;
+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override;
int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) override;
- int can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override;
+ bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override;
int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override;
int can_do_single_step () override;
bool supports_terminal_ours () override;
void mourn_inferior () override;
void pass_signals (int arg0, unsigned char * arg1) override;
void program_signals (int arg0, unsigned char * arg1) override;
- int thread_alive (ptid_t arg0) override;
+ bool thread_alive (ptid_t arg0) override;
void update_thread_list () override;
const char *pid_to_str (ptid_t arg0) override;
const char *extra_thread_info (thread_info *arg0) override;
struct target_section_table *get_section_table () override;
thread_control_capabilities get_thread_control_capabilities () override;
bool attach_no_wait () override;
- int can_async_p () override;
- int is_async_p () override;
+ bool can_async_p () override;
+ bool is_async_p () override;
void async (int arg0) override;
void thread_events (int arg0) override;
- int supports_non_stop () override;
- int always_non_stop_p () override;
+ bool supports_non_stop () override;
+ bool always_non_stop_p () override;
int find_memory_regions (find_memory_region_ftype arg0, void *arg1) override;
char *make_corefile_notes (bfd *arg0, int *arg1) override;
gdb_byte *get_bookmark (const char *arg0, int arg1) override;
ptid_t get_ada_task_ptid (long arg0, long arg1) override;
int auxv_parse (gdb_byte **arg0, gdb_byte *arg1, CORE_ADDR *arg2, CORE_ADDR *arg3) override;
int search_memory (CORE_ADDR arg0, ULONGEST arg1, const gdb_byte *arg2, ULONGEST arg3, CORE_ADDR *arg4) override;
- int can_execute_reverse () override;
+ bool can_execute_reverse () override;
enum exec_direction_kind execution_direction () override;
- int supports_multi_process () override;
- int supports_enable_disable_tracepoint () override;
- int supports_disable_randomization () override;
- int supports_string_tracing () override;
- int supports_evaluation_of_breakpoint_conditions () override;
- int can_run_breakpoint_commands () override;
+ bool supports_multi_process () override;
+ bool supports_enable_disable_tracepoint () override;
+ bool supports_disable_randomization () override;
+ bool supports_string_tracing () override;
+ bool supports_evaluation_of_breakpoint_conditions () override;
+ bool can_run_breakpoint_commands () override;
struct gdbarch *thread_architecture (ptid_t arg0) override;
struct address_space *thread_address_space (ptid_t arg0) override;
- int filesystem_is_local () override;
+ bool filesystem_is_local () override;
void trace_init () override;
void download_tracepoint (struct bp_location *arg0) override;
- int can_download_tracepoint () override;
+ bool can_download_tracepoint () override;
void download_trace_state_variable (const trace_state_variable &arg0) override;
void enable_tracepoint (struct bp_location *arg0) override;
void disable_tracepoint (struct bp_location *arg0) override;
void get_tracepoint_status (struct breakpoint *arg0, struct uploaded_tp *arg1) override;
void trace_stop () override;
int trace_find (enum trace_find_type arg0, int arg1, CORE_ADDR arg2, CORE_ADDR arg3, int *arg4) override;
- int get_trace_state_variable_value (int arg0, LONGEST *arg1) override;
+ bool get_trace_state_variable_value (int arg0, LONGEST *arg1) override;
int save_trace_data (const char *arg0) override;
int upload_tracepoints (struct uploaded_tp **arg0) override;
int upload_trace_state_variables (struct uploaded_tsv **arg0) override;
void set_disconnected_tracing (int arg0) override;
void set_circular_trace_buffer (int arg0) override;
void set_trace_buffer_size (LONGEST arg0) override;
- int set_trace_notes (const char *arg0, const char *arg1, const char *arg2) override;
+ bool set_trace_notes (const char *arg0, const char *arg1, const char *arg2) override;
int core_of_thread (ptid_t arg0) override;
int verify_memory (const gdb_byte *arg0, CORE_ADDR arg1, ULONGEST arg2) override;
- int get_tib_address (ptid_t arg0, CORE_ADDR *arg1) override;
+ bool get_tib_address (ptid_t arg0, CORE_ADDR *arg1) override;
void set_permissions () override;
bool static_tracepoint_marker_at (CORE_ADDR arg0, static_tracepoint_marker *arg1) override;
std::vector<static_tracepoint_marker> static_tracepoint_markers_by_strid (const char *arg0) override;
traceframe_info_up traceframe_info () override;
- int use_agent (int arg0) override;
- int can_use_agent () override;
+ bool use_agent (bool arg0) override;
+ bool can_use_agent () override;
struct btrace_target_info *enable_btrace (ptid_t arg0, const struct btrace_config *arg1) override;
void disable_btrace (struct btrace_target_info *arg0) override;
void teardown_btrace (struct btrace_target_info *arg0) override;
void save_record (const char *arg0) override;
bool supports_delete_record () override;
void delete_record () override;
- int record_is_replaying (ptid_t arg0) override;
- int record_will_replay (ptid_t arg0, int arg1) override;
+ bool record_is_replaying (ptid_t arg0) override;
+ bool record_will_replay (ptid_t arg0, int arg1) override;
void record_stop_replaying () override;
void goto_record_begin () override;
void goto_record_end () override;
void call_history (int arg0, record_print_flags arg1) override;
void call_history_from (ULONGEST arg0, int arg1, record_print_flags arg2) override;
void call_history_range (ULONGEST arg0, ULONGEST arg1, record_print_flags arg2) override;
- int augmented_libraries_svr4_read () override;
+ bool augmented_libraries_svr4_read () override;
const struct frame_unwind *get_unwinder () override;
const struct frame_unwind *get_tailcall_unwinder () override;
void prepare_to_generate_core () override;
return result;
}
-int
+bool
target_ops::stopped_by_sw_breakpoint ()
{
return this->beneath->stopped_by_sw_breakpoint ();
}
-int
+bool
dummy_target::stopped_by_sw_breakpoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::stopped_by_sw_breakpoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_by_sw_breakpoint (...)\n", this->beneath->shortname ());
result = this->beneath->stopped_by_sw_breakpoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_by_sw_breakpoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::supports_stopped_by_sw_breakpoint ()
{
return this->beneath->supports_stopped_by_sw_breakpoint ();
}
-int
+bool
dummy_target::supports_stopped_by_sw_breakpoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_stopped_by_sw_breakpoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_stopped_by_sw_breakpoint (...)\n", this->beneath->shortname ());
result = this->beneath->supports_stopped_by_sw_breakpoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_stopped_by_sw_breakpoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::stopped_by_hw_breakpoint ()
{
return this->beneath->stopped_by_hw_breakpoint ();
}
-int
+bool
dummy_target::stopped_by_hw_breakpoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::stopped_by_hw_breakpoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_by_hw_breakpoint (...)\n", this->beneath->shortname ());
result = this->beneath->stopped_by_hw_breakpoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_by_hw_breakpoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::supports_stopped_by_hw_breakpoint ()
{
return this->beneath->supports_stopped_by_hw_breakpoint ();
}
-int
+bool
dummy_target::supports_stopped_by_hw_breakpoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_stopped_by_hw_breakpoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_stopped_by_hw_breakpoint (...)\n", this->beneath->shortname ());
result = this->beneath->supports_stopped_by_hw_breakpoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_stopped_by_hw_breakpoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::stopped_by_watchpoint ()
{
return this->beneath->stopped_by_watchpoint ();
}
-int
+bool
dummy_target::stopped_by_watchpoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::stopped_by_watchpoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_by_watchpoint (...)\n", this->beneath->shortname ());
result = this->beneath->stopped_by_watchpoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_by_watchpoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
int
dummy_target::have_steppable_watchpoint ()
{
- return 0;
+ return false;
}
int
bool
dummy_target::have_continuable_watchpoint ()
{
- return 0;
+ return false;
}
bool
return result;
}
-int
+bool
target_ops::stopped_data_address (CORE_ADDR *arg0)
{
return this->beneath->stopped_data_address (arg0);
}
-int
+bool
dummy_target::stopped_data_address (CORE_ADDR *arg0)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::stopped_data_address (CORE_ADDR *arg0)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->stopped_data_address (...)\n", this->beneath->shortname ());
result = this->beneath->stopped_data_address (arg0);
fprintf_unfiltered (gdb_stdlog, "<- %s->stopped_data_address (", this->beneath->shortname ());
target_debug_print_CORE_ADDR_p (arg0);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
{
return this->beneath->watchpoint_addr_within_range (arg0, arg1, arg2);
}
-int
+bool
dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
{
return default_watchpoint_addr_within_range (this, arg0, arg1, arg2);
}
-int
+bool
debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath->shortname ());
result = this->beneath->watchpoint_addr_within_range (arg0, arg1, arg2);
fprintf_unfiltered (gdb_stdlog, "<- %s->watchpoint_addr_within_range (", this->beneath->shortname ());
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg2);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
{
return this->beneath->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3);
}
-int
+bool
dummy_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->can_accel_watchpoint_condition (...)\n", this->beneath->shortname ());
result = this->beneath->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3);
fprintf_unfiltered (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath->shortname ());
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_struct_expression_p (arg3);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
bool
dummy_target::supports_terminal_ours ()
{
- return 0;
+ return false;
}
bool
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::thread_alive (ptid_t arg0)
{
return this->beneath->thread_alive (arg0);
}
-int
+bool
dummy_target::thread_alive (ptid_t arg0)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::thread_alive (ptid_t arg0)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->thread_alive (...)\n", this->beneath->shortname ());
result = this->beneath->thread_alive (arg0);
fprintf_unfiltered (gdb_stdlog, "<- %s->thread_alive (", this->beneath->shortname ());
target_debug_print_ptid_t (arg0);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::can_async_p ()
{
return this->beneath->can_async_p ();
}
-int
+bool
dummy_target::can_async_p ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::can_async_p ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->can_async_p (...)\n", this->beneath->shortname ());
result = this->beneath->can_async_p ();
fprintf_unfiltered (gdb_stdlog, "<- %s->can_async_p (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::is_async_p ()
{
return this->beneath->is_async_p ();
}
-int
+bool
dummy_target::is_async_p ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::is_async_p ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->is_async_p (...)\n", this->beneath->shortname ());
result = this->beneath->is_async_p ();
fprintf_unfiltered (gdb_stdlog, "<- %s->is_async_p (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::supports_non_stop ()
{
return this->beneath->supports_non_stop ();
}
-int
+bool
dummy_target::supports_non_stop ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_non_stop ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_non_stop (...)\n", this->beneath->shortname ());
result = this->beneath->supports_non_stop ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_non_stop (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::always_non_stop_p ()
{
return this->beneath->always_non_stop_p ();
}
-int
+bool
dummy_target::always_non_stop_p ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::always_non_stop_p ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->always_non_stop_p (...)\n", this->beneath->shortname ());
result = this->beneath->always_non_stop_p ();
fprintf_unfiltered (gdb_stdlog, "<- %s->always_non_stop_p (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::can_execute_reverse ()
{
return this->beneath->can_execute_reverse ();
}
-int
+bool
dummy_target::can_execute_reverse ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::can_execute_reverse ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->can_execute_reverse (...)\n", this->beneath->shortname ());
result = this->beneath->can_execute_reverse ();
fprintf_unfiltered (gdb_stdlog, "<- %s->can_execute_reverse (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::supports_multi_process ()
{
return this->beneath->supports_multi_process ();
}
-int
+bool
dummy_target::supports_multi_process ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_multi_process ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_multi_process (...)\n", this->beneath->shortname ());
result = this->beneath->supports_multi_process ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_multi_process (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::supports_enable_disable_tracepoint ()
{
return this->beneath->supports_enable_disable_tracepoint ();
}
-int
+bool
dummy_target::supports_enable_disable_tracepoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_enable_disable_tracepoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_enable_disable_tracepoint (...)\n", this->beneath->shortname ());
result = this->beneath->supports_enable_disable_tracepoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_enable_disable_tracepoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::supports_disable_randomization ()
{
return this->beneath->supports_disable_randomization ();
}
-int
+bool
dummy_target::supports_disable_randomization ()
{
return find_default_supports_disable_randomization (this);
}
-int
+bool
debug_target::supports_disable_randomization ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_disable_randomization (...)\n", this->beneath->shortname ());
result = this->beneath->supports_disable_randomization ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_disable_randomization (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::supports_string_tracing ()
{
return this->beneath->supports_string_tracing ();
}
-int
+bool
dummy_target::supports_string_tracing ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_string_tracing ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_string_tracing (...)\n", this->beneath->shortname ());
result = this->beneath->supports_string_tracing ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_string_tracing (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::supports_evaluation_of_breakpoint_conditions ()
{
return this->beneath->supports_evaluation_of_breakpoint_conditions ();
}
-int
+bool
dummy_target::supports_evaluation_of_breakpoint_conditions ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_evaluation_of_breakpoint_conditions ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_evaluation_of_breakpoint_conditions (...)\n", this->beneath->shortname ());
result = this->beneath->supports_evaluation_of_breakpoint_conditions ();
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_evaluation_of_breakpoint_conditions (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::can_run_breakpoint_commands ()
{
return this->beneath->can_run_breakpoint_commands ();
}
-int
+bool
dummy_target::can_run_breakpoint_commands ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::can_run_breakpoint_commands ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->can_run_breakpoint_commands (...)\n", this->beneath->shortname ());
result = this->beneath->can_run_breakpoint_commands ();
fprintf_unfiltered (gdb_stdlog, "<- %s->can_run_breakpoint_commands (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::filesystem_is_local ()
{
return this->beneath->filesystem_is_local ();
}
-int
+bool
dummy_target::filesystem_is_local ()
{
- return 1;
+ return true;
}
-int
+bool
debug_target::filesystem_is_local ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->filesystem_is_local (...)\n", this->beneath->shortname ());
result = this->beneath->filesystem_is_local ();
fprintf_unfiltered (gdb_stdlog, "<- %s->filesystem_is_local (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::can_download_tracepoint ()
{
return this->beneath->can_download_tracepoint ();
}
-int
+bool
dummy_target::can_download_tracepoint ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::can_download_tracepoint ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->can_download_tracepoint (...)\n", this->beneath->shortname ());
result = this->beneath->can_download_tracepoint ();
fprintf_unfiltered (gdb_stdlog, "<- %s->can_download_tracepoint (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::get_trace_state_variable_value (int arg0, LONGEST *arg1)
{
return this->beneath->get_trace_state_variable_value (arg0, arg1);
}
-int
+bool
dummy_target::get_trace_state_variable_value (int arg0, LONGEST *arg1)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::get_trace_state_variable_value (int arg0, LONGEST *arg1)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->get_trace_state_variable_value (...)\n", this->beneath->shortname ());
result = this->beneath->get_trace_state_variable_value (arg0, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->get_trace_state_variable_value (", this->beneath->shortname ());
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_LONGEST_p (arg1);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::set_trace_notes (const char *arg0, const char *arg1, const char *arg2)
{
return this->beneath->set_trace_notes (arg0, arg1, arg2);
}
-int
+bool
dummy_target::set_trace_notes (const char *arg0, const char *arg1, const char *arg2)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::set_trace_notes (const char *arg0, const char *arg1, const char *arg2)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->set_trace_notes (...)\n", this->beneath->shortname ());
result = this->beneath->set_trace_notes (arg0, arg1, arg2);
fprintf_unfiltered (gdb_stdlog, "<- %s->set_trace_notes (", this->beneath->shortname ());
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_const_char_p (arg2);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
+bool
target_ops::get_tib_address (ptid_t arg0, CORE_ADDR *arg1)
{
return this->beneath->get_tib_address (arg0, arg1);
}
-int
+bool
dummy_target::get_tib_address (ptid_t arg0, CORE_ADDR *arg1)
{
tcomplain ();
}
-int
+bool
debug_target::get_tib_address (ptid_t arg0, CORE_ADDR *arg1)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->get_tib_address (...)\n", this->beneath->shortname ());
result = this->beneath->get_tib_address (arg0, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->get_tib_address (", this->beneath->shortname ());
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_CORE_ADDR_p (arg1);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
return result;
}
-int
-target_ops::use_agent (int arg0)
+bool
+target_ops::use_agent (bool arg0)
{
return this->beneath->use_agent (arg0);
}
-int
-dummy_target::use_agent (int arg0)
+bool
+dummy_target::use_agent (bool arg0)
{
tcomplain ();
}
-int
-debug_target::use_agent (int arg0)
+bool
+debug_target::use_agent (bool arg0)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->use_agent (...)\n", this->beneath->shortname ());
result = this->beneath->use_agent (arg0);
fprintf_unfiltered (gdb_stdlog, "<- %s->use_agent (", this->beneath->shortname ());
- target_debug_print_int (arg0);
+ target_debug_print_bool (arg0);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::can_use_agent ()
{
return this->beneath->can_use_agent ();
}
-int
+bool
dummy_target::can_use_agent ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::can_use_agent ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->can_use_agent (...)\n", this->beneath->shortname ());
result = this->beneath->can_use_agent ();
fprintf_unfiltered (gdb_stdlog, "<- %s->can_use_agent (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::record_is_replaying (ptid_t arg0)
{
return this->beneath->record_is_replaying (arg0);
}
-int
+bool
dummy_target::record_is_replaying (ptid_t arg0)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::record_is_replaying (ptid_t arg0)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->record_is_replaying (...)\n", this->beneath->shortname ());
result = this->beneath->record_is_replaying (arg0);
fprintf_unfiltered (gdb_stdlog, "<- %s->record_is_replaying (", this->beneath->shortname ());
target_debug_print_ptid_t (arg0);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
-int
+bool
target_ops::record_will_replay (ptid_t arg0, int arg1)
{
return this->beneath->record_will_replay (arg0, arg1);
}
-int
+bool
dummy_target::record_will_replay (ptid_t arg0, int arg1)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::record_will_replay (ptid_t arg0, int arg1)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->record_will_replay (...)\n", this->beneath->shortname ());
result = this->beneath->record_will_replay (arg0, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->record_will_replay (", this->beneath->shortname ());
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg1);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::augmented_libraries_svr4_read ()
{
return this->beneath->augmented_libraries_svr4_read ();
}
-int
+bool
dummy_target::augmented_libraries_svr4_read ()
{
- return 0;
+ return false;
}
-int
+bool
debug_target::augmented_libraries_svr4_read ()
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->augmented_libraries_svr4_read (...)\n", this->beneath->shortname ());
result = this->beneath->augmented_libraries_svr4_read ();
fprintf_unfiltered (gdb_stdlog, "<- %s->augmented_libraries_svr4_read (", this->beneath->shortname ());
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
gdb_assert_not_reached ("target_ops::create_inferior called");
}
-int
+bool
target_ops::can_run ()
{
- return 0;
+ return false;
}
int
done from the target, so GDB needs to be able to tell whether
it should ignore the event and whether it should adjust the PC.
See adjust_pc_after_break. */
- virtual int stopped_by_sw_breakpoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool stopped_by_sw_breakpoint ()
+ TARGET_DEFAULT_RETURN (false);
/* Returns true if the above method is supported. */
- virtual int supports_stopped_by_sw_breakpoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_stopped_by_sw_breakpoint ()
+ TARGET_DEFAULT_RETURN (false);
/* Returns true if the target stopped for a hardware breakpoint.
Likewise, if the target supports hardware breakpoints, this
require PC adjustment, GDB needs to be able to tell whether the
hardware breakpoint event is a delayed event for a breakpoint
that is already gone and should thus be ignored. */
- virtual int stopped_by_hw_breakpoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool stopped_by_hw_breakpoint ()
+ TARGET_DEFAULT_RETURN (false);
/* Returns true if the above method is supported. */
- virtual int supports_stopped_by_hw_breakpoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_stopped_by_hw_breakpoint ()
+ TARGET_DEFAULT_RETURN (false);
virtual int can_use_hw_breakpoint (enum bptype, int, int)
TARGET_DEFAULT_RETURN (0);
virtual int remove_mask_watchpoint (CORE_ADDR, CORE_ADDR,
enum target_hw_bp_type)
TARGET_DEFAULT_RETURN (1);
- virtual int stopped_by_watchpoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool stopped_by_watchpoint ()
+ TARGET_DEFAULT_RETURN (false);
virtual int have_steppable_watchpoint ()
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (false);
virtual bool have_continuable_watchpoint ()
- TARGET_DEFAULT_RETURN (0);
- virtual int stopped_data_address (CORE_ADDR *)
- TARGET_DEFAULT_RETURN (0);
- virtual int watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int)
+ TARGET_DEFAULT_RETURN (false);
+ virtual bool stopped_data_address (CORE_ADDR *)
+ TARGET_DEFAULT_RETURN (false);
+ virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int)
TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
/* Documentation of this routine is provided with the corresponding
virtual int region_ok_for_hw_watchpoint (CORE_ADDR, int)
TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint);
- virtual int can_accel_watchpoint_condition (CORE_ADDR, int, int,
- struct expression *)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool can_accel_watchpoint_condition (CORE_ADDR, int, int,
+ struct expression *)
+ TARGET_DEFAULT_RETURN (false);
virtual int masked_watch_num_registers (CORE_ADDR, CORE_ADDR)
TARGET_DEFAULT_RETURN (-1);
TARGET_DEFAULT_RETURN (-1);
virtual bool supports_terminal_ours ()
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (false);
virtual void terminal_init ()
TARGET_DEFAULT_IGNORE ();
virtual void terminal_inferior ()
/* Note that can_run is special and can be invoked on an unpushed
target. Targets defining this method must also define
to_can_async_p and to_supports_non_stop. */
- virtual int can_run ();
+ virtual bool can_run ();
/* Documentation of this routine is provided with the corresponding
target_* macro. */
unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
TARGET_DEFAULT_IGNORE ();
- virtual int thread_alive (ptid_t ptid)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool thread_alive (ptid_t ptid)
+ TARGET_DEFAULT_RETURN (false);
virtual void update_thread_list ()
TARGET_DEFAULT_IGNORE ();
virtual const char *pid_to_str (ptid_t)
enum strata to_stratum;
/* Provide default values for all "must have" methods. */
- virtual int has_all_memory () { return 0; }
- virtual int has_memory () { return 0; }
- virtual int has_stack () { return 0; }
- virtual int has_registers () { return 0; }
- virtual int has_execution (ptid_t) { return 0; }
+ virtual bool has_all_memory () { return false; }
+ virtual bool has_memory () { return false; }
+ virtual bool has_stack () { return false; }
+ virtual bool has_registers () { return false; }
+ virtual bool has_execution (ptid_t) { return false; }
/* Control thread execution. */
virtual thread_control_capabilities get_thread_control_capabilities ()
TARGET_DEFAULT_RETURN (0);
/* This method must be implemented in some situations. See the
comment on 'can_run'. */
- virtual int can_async_p ()
- TARGET_DEFAULT_RETURN (0);
- virtual int is_async_p ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool can_async_p ()
+ TARGET_DEFAULT_RETURN (false);
+ virtual bool is_async_p ()
+ TARGET_DEFAULT_RETURN (false);
virtual void async (int)
TARGET_DEFAULT_NORETURN (tcomplain ());
virtual void thread_events (int)
TARGET_DEFAULT_IGNORE ();
/* This method must be implemented in some situations. See the
comment on 'can_run'. */
- virtual int supports_non_stop ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_non_stop ()
+ TARGET_DEFAULT_RETURN (false);
/* Return true if the target operates in non-stop mode even with
"set non-stop off". */
- virtual int always_non_stop_p ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool always_non_stop_p ()
+ TARGET_DEFAULT_RETURN (false);
/* find_memory_regions support method for gcore */
virtual int find_memory_regions (find_memory_region_ftype func, void *data)
TARGET_DEFAULT_FUNC (dummy_find_memory_regions);
TARGET_DEFAULT_FUNC (default_search_memory);
/* Can target execute in reverse? */
- virtual int can_execute_reverse ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool can_execute_reverse ()
+ TARGET_DEFAULT_RETURN (false);
/* The direction the target is currently executing. Must be
implemented on targets that support reverse execution and async
/* Does this target support debugging multiple processes
simultaneously? */
- virtual int supports_multi_process ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_multi_process ()
+ TARGET_DEFAULT_RETURN (false);
/* Does this target support enabling and disabling tracepoints while a trace
experiment is running? */
- virtual int supports_enable_disable_tracepoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_enable_disable_tracepoint ()
+ TARGET_DEFAULT_RETURN (false);
/* Does this target support disabling address space randomization? */
- virtual int supports_disable_randomization ()
+ virtual bool supports_disable_randomization ()
TARGET_DEFAULT_FUNC (find_default_supports_disable_randomization);
/* Does this target support the tracenz bytecode for string collection? */
- virtual int supports_string_tracing ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_string_tracing ()
+ TARGET_DEFAULT_RETURN (false);
/* Does this target support evaluation of breakpoint conditions on its
end? */
- virtual int supports_evaluation_of_breakpoint_conditions ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_evaluation_of_breakpoint_conditions ()
+ TARGET_DEFAULT_RETURN (false);
/* Does this target support evaluation of breakpoint commands on its
end? */
- virtual int can_run_breakpoint_commands ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool can_run_breakpoint_commands ()
+ TARGET_DEFAULT_RETURN (false);
/* Determine current architecture of thread PTID.
/* Return nonzero if the filesystem seen by the current inferior
is the local filesystem, zero otherwise. */
- virtual int filesystem_is_local ()
- TARGET_DEFAULT_RETURN (1);
+ virtual bool filesystem_is_local ()
+ TARGET_DEFAULT_RETURN (true);
/* Open FILENAME on the target, in the filesystem as seen by INF,
using FLAGS and MODE. If INF is NULL, use the filesystem seen
/* Is the target able to download tracepoint locations in current
state? */
- virtual int can_download_tracepoint ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool can_download_tracepoint ()
+ TARGET_DEFAULT_RETURN (false);
/* Send full details of a trace state variable to the target. */
virtual void download_trace_state_variable (const trace_state_variable &tsv)
/* Get the value of the trace state variable number TSV, returning
1 if the value is known and writing the value itself into the
location pointed to by VAL, else returning 0. */
- virtual int get_trace_state_variable_value (int tsv, LONGEST *val)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool get_trace_state_variable_value (int tsv, LONGEST *val)
+ TARGET_DEFAULT_RETURN (false);
virtual int save_trace_data (const char *filename)
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Add/change textual notes about the trace run, returning 1 if
successful, 0 otherwise. */
- virtual int set_trace_notes (const char *user, const char *notes,
- const char *stopnotes)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool set_trace_notes (const char *user, const char *notes,
+ const char *stopnotes)
+ TARGET_DEFAULT_RETURN (false);
/* Return the processor core that thread PTID was last seen on.
This information is updated only when:
/* Return the address of the start of the Thread Information Block
a Windows OS specific feature. */
- virtual int get_tib_address (ptid_t ptid, CORE_ADDR *addr)
+ virtual bool get_tib_address (ptid_t ptid, CORE_ADDR *addr)
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Send the new settings of write permission variables. */
virtual traceframe_info_up traceframe_info ()
TARGET_DEFAULT_NORETURN (tcomplain ());
- /* Ask the target to use or not to use agent according to USE. Return 1
- successful, 0 otherwise. */
- virtual int use_agent (int use)
+ /* Ask the target to use or not to use agent according to USE.
+ Return true if successful, false otherwise. */
+ virtual bool use_agent (bool use)
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Is the target able to use agent in current state? */
- virtual int can_use_agent ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool can_use_agent ()
+ TARGET_DEFAULT_RETURN (false);
/* Enable branch tracing for PTID using CONF configuration.
Return a branch trace target information struct for reading and for
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Query if the record target is currently replaying PTID. */
- virtual int record_is_replaying (ptid_t ptid)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool record_is_replaying (ptid_t ptid)
+ TARGET_DEFAULT_RETURN (false);
/* Query if the record target will replay PTID if it were resumed in
execution direction DIR. */
- virtual int record_will_replay (ptid_t ptid, int dir)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool record_will_replay (ptid_t ptid, int dir)
+ TARGET_DEFAULT_RETURN (false);
/* Stop replaying. */
virtual void record_stop_replaying ()
virtual void call_history_range (ULONGEST begin, ULONGEST end, record_print_flags flags)
TARGET_DEFAULT_NORETURN (tcomplain ());
- /* Nonzero if TARGET_OBJECT_LIBRARIES_SVR4 may be read with a
+ /* True if TARGET_OBJECT_LIBRARIES_SVR4 may be read with a
non-empty annex. */
- virtual int augmented_libraries_svr4_read ()
- TARGET_DEFAULT_RETURN (0);
+ virtual bool augmented_libraries_svr4_read ()
+ TARGET_DEFAULT_RETURN (false);
/* Those unwinders are tried before any other arch unwinders. If
SELF doesn't have unwinders, it should delegate to the
return NULL;
}
- int has_registers () override
+ bool has_registers () override
{
- return 1;
+ return true;
}
- int has_stack () override
+ bool has_stack () override
{
- return 1;
+ return true;
}
- int has_memory () override
+ bool has_memory () override
{
- return 1;
+ return true;
}
void prepare_to_store (regcache *regs) override
void files_info () override;
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;
traceframe_info_up traceframe_info () override;
void get_tracepoint_status (struct breakpoint *tp,
/* Iterate through the blocks of a trace frame, looking for a 'V'
block with a matching tsv number. */
-int
+bool
tfile_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
{
int pos;
- int found = 0;
+ bool found = false;
/* Iterate over blocks in current frame and find the last 'V'
block in which tsv number is TSVNUM. In one trace frame, there
*val = extract_signed_integer ((gdb_byte *) val, 8,
gdbarch_byte_order
(target_gdbarch ()));
- found = 1;
+ found = true;
}
pos += (4 + 8);
}
/* This is the implementation of target_ops method to_has_all_memory. */
-int
+bool
tracefile_target::has_all_memory ()
{
return 1;
/* This is the implementation of target_ops method to_has_memory. */
-int
+bool
tracefile_target::has_memory ()
{
return 1;
The target has a stack when GDB has already selected one trace
frame. */
-int
+bool
tracefile_target::has_stack ()
{
return get_traceframe_number () != -1;
The target has registers when GDB has already selected one trace
frame. */
-int
+bool
tracefile_target::has_registers ()
{
return get_traceframe_number () != -1;
/* This is the implementation of target_ops method to_thread_alive.
tracefile has one thread faked by GDB. */
-int
+bool
tracefile_target::thread_alive (ptid_t ptid)
{
return 1;
tracefile_target ();
int get_trace_status (trace_status *ts) override;
- int has_all_memory () override;
- int has_memory () override;
- int has_stack () override;
- int has_registers () override;
- int thread_alive (ptid_t ptid) override;
+ bool has_all_memory () override;
+ bool has_memory () override;
+ bool has_stack () override;
+ bool has_registers () override;
+ bool thread_alive (ptid_t ptid) override;
};
extern void tracefile_fetch_registers (struct regcache *regcache, int regno);
void mourn_inferior () override;
- int thread_alive (ptid_t ptid) override;
+ bool thread_alive (ptid_t ptid) override;
const char *pid_to_str (ptid_t) override;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
- int get_tib_address (ptid_t ptid, CORE_ADDR *addr) override;
+ bool get_tib_address (ptid_t ptid, CORE_ADDR *addr) override;
const char *thread_name (struct thread_info *) override;
};
/* Provide thread local base, i.e. Thread Information Block address.
Returns 1 if ptid is found and sets *ADDR to thread_local_base. */
-int
+bool
windows_nat_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
{
windows_thread_info *th;
th = thread_rec (ptid_get_tid (ptid), 0);
if (th == NULL)
- return 0;
+ return false;
if (addr != NULL)
*addr = th->thread_local_base;
- return 1;
+ return true;
}
ptid_t
by "polling" it. If WaitForSingleObject returns WAIT_OBJECT_0
it means that the thread has died. Otherwise it is assumed to be alive. */
-int
+bool
windows_nat_target::thread_alive (ptid_t ptid)
{
int tid;
gdb_assert (ptid_get_tid (ptid) != 0);
tid = ptid_get_tid (ptid);
- return WaitForSingleObject (thread_rec (tid, FALSE)->h, 0) == WAIT_OBJECT_0
- ? FALSE : TRUE;
+ return WaitForSingleObject (thread_rec (tid, FALSE)->h, 0) != WAIT_OBJECT_0;
}
void
stopped-by-watchpoint info as soon as an lwp stops (via the low_
methods) and caches the result, to be returned via the normal
non-low methods. */
- int stopped_by_watchpoint () override
+ bool stopped_by_watchpoint () override
{ return linux_nat_target::stopped_by_watchpoint (); }
- int stopped_data_address (CORE_ADDR *addr_p) override
+ bool stopped_data_address (CORE_ADDR *addr_p) override
{ return linux_nat_target::stopped_data_address (addr_p); }
- int low_stopped_by_watchpoint () override
+ bool low_stopped_by_watchpoint () override
{ return x86_nat_target::stopped_by_watchpoint (); }
- int low_stopped_data_address (CORE_ADDR *addr_p) override
+ bool low_stopped_data_address (CORE_ADDR *addr_p) override
{ return x86_nat_target::stopped_data_address (addr_p); }
};
struct bp_target_info *bp_tgt) override
{ return x86_remove_hw_breakpoint (gdbarch, bp_tgt); }
- int stopped_by_watchpoint () override
+ bool stopped_by_watchpoint () override
{ return x86_stopped_by_watchpoint (); }
- int stopped_data_address (CORE_ADDR *addr_p) override
+ bool stopped_data_address (CORE_ADDR *addr_p) override
{ return x86_stopped_data_address (addr_p); }
/* A target must provide an implementation of the
"supports_stopped_by_hw_breakpoint" target method before this
callback will be used. */
- int stopped_by_hw_breakpoint () override
+ bool stopped_by_hw_breakpoint () override
{ return x86_stopped_by_hw_breakpoint (); }
};