summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-08-29 11:26:40 +0100
committerPedro Alves <palves@redhat.com>2016-09-07 17:10:32 +0100
commit9a7f4b909df410e4f28576f270dd993b73bcdb51 (patch)
tree05d7c2bc18da3126ad57cfde4c66cbe633de55f9
parented23ab28663bec93ae6e230aebb2dd64d58d4c43 (diff)
downloadbinutils-gdb-users/palves/cxx-target_ops.tar.gz
Use bool throughoutusers/palves/cxx-target_ops
Should probably squash?
-rw-r--r--gdb/bsd-uthread.c6
-rw-r--r--gdb/corelow.c22
-rw-r--r--gdb/ctf.c8
-rw-r--r--gdb/darwin-nat.c8
-rw-r--r--gdb/darwin-nat.h4
-rw-r--r--gdb/exec.c4
-rw-r--r--gdb/inf-child.c22
-rw-r--r--gdb/inf-child.h20
-rw-r--r--gdb/inf-ptrace.c2
-rw-r--r--gdb/inf-ptrace.h2
-rw-r--r--gdb/linux-nat.c30
-rw-r--r--gdb/linux-nat.h36
-rw-r--r--gdb/ravenscar-thread.c16
-rw-r--r--gdb/record-btrace.c42
-rw-r--r--gdb/record-full.c50
-rw-r--r--gdb/remote-sim.c32
-rw-r--r--gdb/remote.c194
-rw-r--r--gdb/spu-multiarch.c9
-rw-r--r--gdb/target-delegates.c556
-rw-r--r--gdb/target.c4
-rw-r--r--gdb/target.h162
-rw-r--r--gdb/tracefile-tfile.c8
-rw-r--r--gdb/tracefile.c10
-rw-r--r--gdb/tracefile.h10
-rw-r--r--gdb/windows-nat.c15
-rw-r--r--gdb/x86-linux-nat.c2
-rw-r--r--gdb/x86-linux-nat.h10
-rw-r--r--gdb/x86-nat.h6
28 files changed, 625 insertions, 665 deletions
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index 3d20301a134..b4b07bcd2d5 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -57,7 +57,7 @@ struct bsd_uthread_target FINAL : public target_ops
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;
@@ -425,7 +425,7 @@ bsd_uthread_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
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 ());
@@ -441,7 +441,7 @@ bsd_uthread_target::thread_alive (ptid_t ptid)
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);
diff --git a/gdb/corelow.c b/gdb/corelow.c
index c57406ee5b0..9a793b9515b 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -80,16 +80,16 @@ Use a core file as a target. Specify the filename of the core file.");
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;
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;
int info_proc (const char *, enum info_proc_what) OVERRIDE;
};
@@ -961,12 +961,12 @@ core_target::xfer_partial (enum target_object object, const char *annex,
exactly lively, are they? On the other hand, if we don't claim
that each & every one is alive, then we don't get any of them
to appear in an "info thread" command, which is quite a useful
- behaviour.
- */
-int
+ behavior. */
+
+bool
core_target::thread_alive (ptid_t ptid)
{
- return 1;
+ return true;
}
/* Ask the current architecture what it knows about this core file.
@@ -1030,19 +1030,19 @@ core_target::thread_name (struct thread_info *thr)
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);
diff --git a/gdb/ctf.c b/gdb/ctf.c
index 3f998d955bf..035100962d6 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -60,7 +60,7 @@ Specify the filename of the CTF directory.");
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;
struct traceframe_info *traceframe_info () OVERRIDE;
};
@@ -1452,11 +1452,11 @@ ctf_target::xfer_partial (enum target_object object,
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. */
@@ -1487,7 +1487,7 @@ ctf_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
def = bt_ctf_get_field (event, scope, "val");
*val = bt_ctf_get_uint64 (def);
- found = 1;
+ found = true;
}
}
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 2eae7005128..746d2c8aa57 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1764,10 +1764,10 @@ darwin_nat_target::pid_to_str (ptid_t ptid)
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
@@ -2111,10 +2111,10 @@ darwin_nat_target::get_ada_task_ptid (long lwp, long thread)
return null_ptid;
}
-int
+bool
darwin_nat_target::supports_multi_process ()
{
- return 1;
+ return true;
}
/* -Wmissing-prototypes */
diff --git a/gdb/darwin-nat.h b/gdb/darwin-nat.h
index beaf4aa0019..4ee4feb941c 100644
--- a/gdb/darwin-nat.h
+++ b/gdb/darwin-nat.h
@@ -40,7 +40,7 @@ class darwin_nat_target : public inf_child_target
void resume (ptid_t, int , enum gdb_signal) OVERRIDE;
- int thread_alive (ptid_t ptid) OVERRIDE;
+ bool thread_alive (ptid_t ptid) OVERRIDE;
char *pid_to_str (ptid_t) OVERRIDE;
@@ -53,7 +53,7 @@ class darwin_nat_target : public inf_child_target
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;
};
diff --git a/gdb/exec.c b/gdb/exec.c
index ed48866dfe5..fa08bebc4b7 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -84,7 +84,7 @@ Specify the filename of the executable file.");
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;
};
@@ -1091,7 +1091,7 @@ exec_set_section_address (const char *filename, int index, CORE_ADDR address)
}
}
-int
+bool
exec_target::has_memory ()
{
/* We can provide memory if we have any file/target sections to read
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 8298738584d..722243c455b 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -193,10 +193,10 @@ inf_child_target::post_startup_inferior (ptid_t ptid)
operation by a debugger. */
}
-int
+bool
inf_child_target::can_run ()
{
- return 1;
+ return true;
}
bool
@@ -219,31 +219,31 @@ inf_child_target::pid_to_exec_file (int pid)
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);
@@ -401,19 +401,19 @@ inf_child_target::fileio_readlink (struct inferior *inf, const char *filename,
#endif
}
-int
+bool
inf_child_target::use_agent (int 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 ();
diff --git a/gdb/inf-child.h b/gdb/inf-child.h
index 4991e983281..b98455a9e9a 100644
--- a/gdb/inf-child.h
+++ b/gdb/inf-child.h
@@ -59,7 +59,7 @@ struct inf_child_target
void mourn_inferior () OVERRIDE;
- int can_run () OVERRIDE;
+ bool can_run () OVERRIDE;
bool can_create_inferior () OVERRIDE;
void create_inferior (char *, char *, char **, int) OVERRIDE = 0;
@@ -71,16 +71,16 @@ struct inf_child_target
/* 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; }
+ bool can_async_p () OVERRIDE { return false; }
+ bool supports_non_stop () 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,
@@ -97,9 +97,9 @@ struct inf_child_target
char *fileio_readlink (struct inferior *inf,
const char *filename,
int *target_errno) OVERRIDE;
- int use_agent (int use) OVERRIDE;
+ bool use_agent (int 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"
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index f2d4ae0a0af..a0dd2850108 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -603,7 +603,7 @@ inf_ptrace_target::xfer_partial (enum target_object object,
/* 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? */
diff --git a/gdb/inf-ptrace.h b/gdb/inf-ptrace.h
index a9bfa04250c..46404c55d1f 100644
--- a/gdb/inf-ptrace.h
+++ b/gdb/inf-ptrace.h
@@ -56,7 +56,7 @@ struct inf_ptrace_target : public inf_child_target
void mourn_inferior () OVERRIDE;
- int thread_alive (ptid_t ptid) OVERRIDE;
+ bool thread_alive (ptid_t ptid) OVERRIDE;
char *pid_to_str (ptid_t) OVERRIDE;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index d907f7a9ac1..34f0f95b36f 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2460,7 +2460,7 @@ check_stopped_by_watchpoint (struct lwp_info *lp)
/* 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);
@@ -2470,7 +2470,7 @@ linux_nat_target::stopped_by_watchpoint ()
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);
@@ -2821,7 +2821,7 @@ save_stop_reason (struct lwp_info *lp)
/* 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);
@@ -2833,7 +2833,7 @@ linux_nat_target::stopped_by_sw_breakpoint ()
/* Implement the supports_stopped_by_sw_breakpoint method. */
-int
+bool
linux_nat_target::supports_stopped_by_sw_breakpoint ()
{
return USE_SIGTRAP_SIGINFO;
@@ -2842,7 +2842,7 @@ linux_nat_target::supports_stopped_by_sw_breakpoint ()
/* 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);
@@ -2854,7 +2854,7 @@ linux_nat_target::stopped_by_hw_breakpoint ()
/* Implement the supports_stopped_by_hw_breakpoint method. */
-int
+bool
linux_nat_target::supports_stopped_by_hw_breakpoint ()
{
return USE_SIGTRAP_SIGINFO;
@@ -3945,7 +3945,7 @@ linux_nat_target::xfer_partial (enum target_object object,
return xfer;
}
-int
+bool
linux_nat_target::thread_alive (ptid_t ptid)
{
/* As long as a PTID is in lwp list, consider it alive. */
@@ -4345,7 +4345,7 @@ linux_nat_target::static_tracepoint_markers_by_strid (const char *strid)
/* target_is_async_p implementation. */
-int
+bool
linux_nat_target::is_async_p ()
{
return linux_is_async_p ();
@@ -4353,7 +4353,7 @@ linux_nat_target::is_async_p ()
/* target_can_async_p implementation. */
-int
+bool
linux_nat_target::can_async_p ()
{
/* NOTE: palves 2008-03-21: We're only async when the user requests
@@ -4362,7 +4362,7 @@ linux_nat_target::can_async_p ()
return target_async_permitted;
}
-int
+bool
linux_nat_target::supports_non_stop ()
{
return 1;
@@ -4370,7 +4370,7 @@ linux_nat_target::supports_non_stop ()
/* to_always_non_stop_p implementation. */
-int
+bool
linux_nat_target::always_non_stop_p ()
{
return 1;
@@ -4381,13 +4381,13 @@ linux_nat_target::always_non_stop_p ()
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
@@ -4641,13 +4641,13 @@ linux_nat_target::core_of_thread (ptid_t ptid)
/* 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);
}
diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
index 0f3e1586d08..ec3c70bb54b 100644
--- a/gdb/linux-nat.h
+++ b/gdb/linux-nat.h
@@ -56,7 +56,7 @@ public:
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;
@@ -66,23 +66,23 @@ public:
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;
@@ -94,13 +94,13 @@ public:
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,
@@ -140,11 +140,11 @@ public:
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. */
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index b6f7421a739..fc7ce48fbc9 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -71,7 +71,7 @@ struct ravenscar_thread_target : public target_ops
void prepare_to_store (struct regcache *) OVERRIDE;
- int thread_alive (ptid_t ptid) OVERRIDE;
+ bool thread_alive (ptid_t ptid) OVERRIDE;
void update_thread_list () OVERRIDE;
@@ -83,11 +83,11 @@ struct ravenscar_thread_target : public target_ops
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{ 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); }
};
/* This module's target-specific operations. */
@@ -274,11 +274,11 @@ ravenscar_thread_target::extra_thread_info (struct thread_info *tp)
return "Ravenscar task";
}
-int
+bool
ravenscar_thread_target::thread_alive (ptid_t ptid)
{
/* Ravenscar tasks are non-terminating. */
- return 1;
+ return true;
}
char *
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index ec3f677d442..151f022c61d 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -81,8 +81,8 @@ public:
void call_history_from (ULONGEST begin, int size, int flags) OVERRIDE;
void call_history_range (ULONGEST begin, ULONGEST end, int 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,
@@ -111,18 +111,18 @@ public:
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;
@@ -1413,21 +1413,21 @@ record_btrace_target::call_history_from (ULONGEST from, int size,
/* The to_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 to_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);
@@ -2701,15 +2701,15 @@ record_btrace_target::stop (ptid_t ptid)
/* The to_can_execute_reverse method of target record-btrace. */
-int
+bool
record_btrace_target::can_execute_reverse ()
{
- return 1;
+ return true;
}
/* The to_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))
@@ -2725,18 +2725,18 @@ record_btrace_target::stopped_by_sw_breakpoint ()
/* The to_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 to_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))
@@ -2752,11 +2752,11 @@ record_btrace_target::stopped_by_hw_breakpoint ()
/* The to_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 ();
}
@@ -2776,7 +2776,7 @@ record_btrace_target::update_thread_list ()
/* The to_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. */
diff --git a/gdb/record-full.c b/gdb/record-full.c
index cabd2ba78ae..4ac747b1ae6 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -223,16 +223,16 @@ public:
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;
@@ -241,8 +241,8 @@ public:
void info_record () OVERRIDE;
void save_record (const char *filename) 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;
@@ -298,7 +298,7 @@ public:
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 *the_record_full_target;
@@ -1480,7 +1480,7 @@ record_full_base_target::wait (ptid_t ptid, struct target_waitstatus *status,
return return_ptid;
}
-int
+bool
record_full_base_target::stopped_by_watchpoint ()
{
if (RECORD_FULL_IS_REPLAY)
@@ -1489,18 +1489,18 @@ record_full_base_target::stopped_by_watchpoint ()
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 to_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;
@@ -1509,15 +1509,15 @@ record_full_base_target::stopped_by_sw_breakpoint ()
/* The to_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 to_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;
@@ -1526,10 +1526,10 @@ record_full_base_target::stopped_by_hw_breakpoint ()
/* The to_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. */
@@ -1865,10 +1865,10 @@ record_full_target::remove_breakpoint (struct gdbarch *gdbarch,
/* "to_can_execute_reverse" method for process record target. */
-int
+bool
record_full_base_target::can_execute_reverse ()
{
- return 1;
+ return true;
}
/* "to_get_bookmark" method for process record and prec over core. */
@@ -1985,7 +1985,7 @@ record_full_base_target::delete_record ()
/* The "to_record_is_replaying" target method. */
-int
+bool
record_full_base_target::record_is_replaying (ptid_t ptid)
{
return RECORD_FULL_IS_REPLAY;
@@ -1993,7 +1993,7 @@ record_full_base_target::record_is_replaying (ptid_t ptid)
/* The "to_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
@@ -2266,10 +2266,10 @@ record_full_core_target::remove_breakpoint (struct gdbarch *gdbarch,
/* "to_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
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 14e01cdf473..aad9b62eea2 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -127,20 +127,20 @@ struct gdbsim_target
void interrupt (ptid_t) OVERRIDE;
- int thread_alive (ptid_t ptid) OVERRIDE;
+ bool thread_alive (ptid_t ptid) OVERRIDE;
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); }
};
@@ -1291,20 +1291,20 @@ sim_command_completer (struct cmd_list_element *ignore, const char *text,
/* 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
@@ -1318,28 +1318,28 @@ gdbsim_target::pid_to_str (ptid_t ptid)
/* 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
diff --git a/gdb/remote.c b/gdb/remote.c
index 96d1330b7d3..a8bcbe3d5eb 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -117,18 +117,18 @@ Specify the serial device it is connected to\n\
enum remove_bp_reason) OVERRIDE;
- int stopped_by_sw_breakpoint () OVERRIDE;
- int supports_stopped_by_sw_breakpoint () OVERRIDE;
+ bool stopped_by_sw_breakpoint () OVERRIDE;
+ bool supports_stopped_by_sw_breakpoint () OVERRIDE;
- int stopped_by_hw_breakpoint () OVERRIDE;
+ bool stopped_by_hw_breakpoint () OVERRIDE;
- int supports_stopped_by_hw_breakpoint () OVERRIDE;
+ bool supports_stopped_by_hw_breakpoint () OVERRIDE;
- int stopped_by_watchpoint () OVERRIDE;
+ bool stopped_by_watchpoint () OVERRIDE;
- int stopped_data_address (CORE_ADDR *) OVERRIDE;
+ bool stopped_data_address (CORE_ADDR *) OVERRIDE;
- int watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) OVERRIDE;
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) OVERRIDE;
int can_use_hw_breakpoint (enum bptype, int, int) OVERRIDE;
@@ -136,7 +136,7 @@ Specify the serial device it is connected to\n\
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) OVERRIDE;
- int region_ok_for_hw_watchpoint (CORE_ADDR, int) OVERRIDE;
+ bool region_ok_for_hw_watchpoint (CORE_ADDR, int) OVERRIDE;
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) OVERRIDE;
@@ -156,7 +156,7 @@ Specify the serial device it is connected to\n\
void program_signals (int, unsigned char *) OVERRIDE;
- int thread_alive (ptid_t ptid) OVERRIDE;
+ bool thread_alive (ptid_t ptid) OVERRIDE;
const char *thread_name (struct thread_info *) OVERRIDE;
@@ -196,13 +196,13 @@ Specify the serial device it is connected to\n\
CORE_ADDR load_module_addr,
CORE_ADDR offset) OVERRIDE;
- int has_all_memory () OVERRIDE { return default_child_has_all_memory (); }
- int has_memory () OVERRIDE { return default_child_has_memory (); }
- int has_stack () OVERRIDE { return default_child_has_stack (); }
- int has_registers () OVERRIDE { return default_child_has_registers (); }
- int has_execution (ptid_t ptid) OVERRIDE { return default_child_has_execution (ptid); }
+ bool has_all_memory () OVERRIDE { return default_child_has_all_memory (); }
+ bool has_memory () OVERRIDE { return default_child_has_memory (); }
+ bool has_stack () OVERRIDE { return default_child_has_stack (); }
+ bool has_registers () OVERRIDE { return default_child_has_registers (); }
+ bool has_execution (ptid_t ptid) OVERRIDE { return default_child_has_execution (ptid); }
- int can_execute_reverse () OVERRIDE;
+ bool can_execute_reverse () OVERRIDE;
VEC(mem_region_s) *memory_map () OVERRIDE;
@@ -216,9 +216,9 @@ Specify the serial device it is connected to\n\
const gdb_byte *pattern, ULONGEST pattern_len,
CORE_ADDR *found_addrp) OVERRIDE;
- int can_async_p () OVERRIDE;
+ bool can_async_p () OVERRIDE;
- int is_async_p () OVERRIDE;
+ bool is_async_p () OVERRIDE;
void async (int) OVERRIDE;
@@ -230,13 +230,13 @@ Specify the serial device it is connected to\n\
void terminal_ours () OVERRIDE;
- int supports_non_stop () OVERRIDE;
+ bool supports_non_stop () OVERRIDE;
- int supports_multi_process () OVERRIDE;
+ bool supports_multi_process () OVERRIDE;
- int supports_disable_randomization () OVERRIDE;
+ bool supports_disable_randomization () OVERRIDE;
- int filesystem_is_local () OVERRIDE;
+ bool filesystem_is_local () OVERRIDE;
int fileio_open (struct inferior *inf, const char *filename,
@@ -262,19 +262,19 @@ Specify the serial device it is connected to\n\
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 (struct trace_state_variable *tsv) OVERRIDE;
@@ -296,7 +296,7 @@ Specify the serial device it is connected to\n\
int trace_find (enum trace_find_type type, int num,
CORE_ADDR addr1, CORE_ADDR addr2, int *tpp) OVERRIDE;
- int get_trace_state_variable_value (int tsv, LONGEST *val) OVERRIDE;
+ bool get_trace_state_variable_value (int tsv, LONGEST *val) OVERRIDE;
int save_trace_data (const char *filename) OVERRIDE;
@@ -314,8 +314,8 @@ Specify the serial device it is connected to\n\
void set_trace_buffer_size (LONGEST val) OVERRIDE;
- int set_trace_notes (const char *user, const char *notes,
- const char *stopnotes) OVERRIDE;
+ bool set_trace_notes (const char *user, const char *notes,
+ const char *stopnotes) OVERRIDE;
int core_of_thread (ptid_t ptid) OVERRIDE;
@@ -323,22 +323,22 @@ Specify the serial device it is connected to\n\
CORE_ADDR memaddr, ULONGEST size) OVERRIDE;
- int get_tib_address (ptid_t ptid, CORE_ADDR *addr) OVERRIDE;
+ bool get_tib_address (ptid_t ptid, CORE_ADDR *addr) OVERRIDE;
void set_permissions () OVERRIDE;
- int static_tracepoint_marker_at (CORE_ADDR,
- struct static_tracepoint_marker *marker) OVERRIDE;
+ bool static_tracepoint_marker_at (CORE_ADDR,
+ struct static_tracepoint_marker *marker) OVERRIDE;
VEC(static_tracepoint_marker_p) *
static_tracepoint_markers_by_strid (const char *id) OVERRIDE;
struct traceframe_info *traceframe_info () OVERRIDE;
- int use_agent (int use) OVERRIDE;
- int can_use_agent () OVERRIDE;
+ bool use_agent (int use) OVERRIDE;
+ bool can_use_agent () OVERRIDE;
- int supports_btrace (enum btrace_format) OVERRIDE;
+ bool supports_btrace (enum btrace_format) OVERRIDE;
struct btrace_target_info *enable_btrace (ptid_t ptid,
const struct btrace_config *conf) OVERRIDE;
@@ -352,7 +352,7 @@ Specify the serial device it is connected to\n\
enum btrace_read_type type) OVERRIDE;
const struct btrace_config *btrace_conf (const struct btrace_target_info *) OVERRIDE;
- int augmented_libraries_svr4_read () OVERRIDE;
+ bool augmented_libraries_svr4_read () OVERRIDE;
int follow_fork (int, int) OVERRIDE;
void follow_exec (struct inferior *, char *) OVERRIDE;
int insert_fork_catchpoint (int) OVERRIDE;
@@ -391,7 +391,7 @@ public:
void attach (const char *, int) OVERRIDE;
void post_attach (int) OVERRIDE;
- int supports_disable_randomization () OVERRIDE;
+ bool supports_disable_randomization () OVERRIDE;
};
/* Temp hacks for tracepoint encoding migration. */
@@ -2498,7 +2498,7 @@ remote_thread_always_alive (ptid_t ptid)
/* Return nonzero if the thread PTID is still alive on the remote
system. */
-int
+bool
remote_target::thread_alive (ptid_t ptid)
{
struct remote_state *rs = get_remote_state ();
@@ -3659,7 +3659,7 @@ remote_target::extra_thread_info (struct thread_info *tp)
}
-int
+bool
remote_target::static_tracepoint_marker_at (CORE_ADDR addr,
struct static_tracepoint_marker *marker)
{
@@ -9313,7 +9313,7 @@ remote_target::mourn_inferior ()
}
}
-int
+bool
extended_remote_target::supports_disable_randomization ()
{
return packet_support (PACKET_QDisableRandomization) == PACKET_ENABLE;
@@ -9682,7 +9682,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len,
_("remote_insert_watchpoint: reached end of function"));
}
-int
+bool
remote_target::watchpoint_addr_within_range (CORE_ADDR addr,
CORE_ADDR start, int length)
{
@@ -9734,17 +9734,17 @@ int remote_hw_watchpoint_limit = -1;
int remote_hw_watchpoint_length_limit = -1;
int remote_hw_breakpoint_limit = -1;
-int
+bool
remote_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
{
if (remote_hw_watchpoint_length_limit == 0)
- return 0;
+ return false;
else if (remote_hw_watchpoint_length_limit < 0)
- return 1;
+ return true;
else if (len <= remote_hw_watchpoint_length_limit)
- return 1;
+ return true;
else
- return 0;
+ return false;
}
int
@@ -9775,7 +9775,7 @@ remote_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot)
/* The to_stopped_by_sw_breakpoint method of target remote. */
-int
+bool
remote_target::stopped_by_sw_breakpoint ()
{
struct thread_info *thread = inferior_thread ();
@@ -9787,7 +9787,7 @@ remote_target::stopped_by_sw_breakpoint ()
/* The to_supports_stopped_by_sw_breakpoint method of target
remote. */
-int
+bool
remote_target::supports_stopped_by_sw_breakpoint ()
{
return (packet_support (PACKET_swbreak_feature) == PACKET_ENABLE);
@@ -9795,7 +9795,7 @@ remote_target::supports_stopped_by_sw_breakpoint ()
/* The to_stopped_by_hw_breakpoint method of target remote. */
-int
+bool
remote_target::stopped_by_hw_breakpoint ()
{
struct thread_info *thread = inferior_thread ();
@@ -9807,13 +9807,13 @@ remote_target::stopped_by_hw_breakpoint ()
/* The to_supports_stopped_by_hw_breakpoint method of target
remote. */
-int
+bool
remote_target::supports_stopped_by_hw_breakpoint ()
{
return (packet_support (PACKET_hwbreak_feature) == PACKET_ENABLE);
}
-int
+bool
remote_target::stopped_by_watchpoint ()
{
struct thread_info *thread = inferior_thread ();
@@ -9822,7 +9822,7 @@ remote_target::stopped_by_watchpoint ()
&& thread->priv->stop_reason == TARGET_STOPPED_BY_WATCHPOINT);
}
-int
+bool
remote_target::stopped_data_address (CORE_ADDR *addr_p)
{
struct thread_info *thread = inferior_thread ();
@@ -9831,10 +9831,10 @@ remote_target::stopped_data_address (CORE_ADDR *addr_p)
&& thread->priv->stop_reason == TARGET_STOPPED_BY_WATCHPOINT)
{
*addr_p = thread->priv->watch_data_address;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
@@ -10867,7 +10867,7 @@ remote_target::get_thread_local_address (ptid_t ptid, CORE_ADDR lm,
/* Provide thread local base, i.e. Thread Information Block address.
Returns 1 if ptid is found and thread_local_base is non zero. */
-int
+bool
remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
{
if (packet_support (PACKET_qGetTIBAddr) != PACKET_DISABLE)
@@ -10893,7 +10893,7 @@ remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
unpack_varlen_hex (rs->buf, &result);
if (addr)
*addr = (CORE_ADDR) result;
- return 1;
+ return true;
}
else if (result == PACKET_UNKNOWN)
error (_("Remote target doesn't support qGetTIBAddr packet"));
@@ -10903,7 +10903,7 @@ remote_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr)
else
error (_("qGetTIBAddr not supported or disabled on this target"));
/* Not reached. */
- return 0;
+ return false;
}
/* Support for inferring a target description based on the current
@@ -11625,7 +11625,7 @@ remote_target::fileio_fstat (int fd, struct stat *st, int *remote_errno)
/* Implementation of to_filesystem_is_local. */
-int
+bool
remote_target::filesystem_is_local ()
{
/* Valgrind GDB presents itself as a remote target but works
@@ -11667,11 +11667,11 @@ remote_target::filesystem_is_local ()
warning_issued = 1;
}
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
static int
@@ -11978,30 +11978,30 @@ remote_command (char *args, int from_tty)
help_list (remote_cmdlist, "remote ", all_commands, gdb_stdout);
}
-int
+bool
remote_target::can_execute_reverse ()
{
if (packet_support (PACKET_bs) == PACKET_ENABLE
|| packet_support (PACKET_bc) == PACKET_ENABLE)
- return 1;
+ return true;
else
- return 0;
+ return false;
}
-int
+bool
remote_target::supports_non_stop ()
{
- return 1;
+ return true;
}
-int
+bool
remote_target::supports_disable_randomization ()
{
/* Only supported in extended mode. */
- return 0;
+ return false;
}
-int
+bool
remote_target::supports_multi_process ()
{
struct remote_state *rs = get_remote_state ();
@@ -12015,7 +12015,7 @@ remote_supports_cond_tracepoints ()
return packet_support (PACKET_ConditionalTracepoints) == PACKET_ENABLE;
}
-int
+bool
remote_target::supports_evaluation_of_breakpoint_conditions ()
{
return packet_support (PACKET_ConditionalBreakpoints) == PACKET_ENABLE;
@@ -12039,20 +12039,20 @@ remote_supports_install_in_trace ()
return packet_support (PACKET_InstallInTrace) == PACKET_ENABLE;
}
-int
+bool
remote_target::supports_enable_disable_tracepoint ()
{
return (packet_support (PACKET_EnableDisableTracepoints_feature)
== PACKET_ENABLE);
}
-int
+bool
remote_target::supports_string_tracing ()
{
return packet_support (PACKET_tracenz_feature) == PACKET_ENABLE;
}
-int
+bool
remote_target::can_run_breakpoint_commands ()
{
return packet_support (PACKET_BreakpointCommands) == PACKET_ENABLE;
@@ -12302,7 +12302,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
do_cleanups (old_chain);
}
-int
+bool
remote_target::can_download_tracepoint ()
{
struct remote_state *rs = get_remote_state ();
@@ -12313,20 +12313,20 @@ remote_target::can_download_tracepoint ()
symbols, and fetched and merged the target's tracepoint list with
ours. */
if (rs->starting_up)
- return 0;
+ return false;
ts = current_trace_status ();
status = get_trace_status (ts);
if (status == -1 || !ts->running_known || !ts->running)
- return 0;
+ return false;
/* If we are in a tracing experiment, but remote stub doesn't support
installing tracepoint in trace, we have to return. */
if (!remote_supports_install_in_trace ())
- return 0;
+ return false;
- return 1;
+ return true;
}
@@ -12636,7 +12636,7 @@ remote_target::trace_find (enum trace_find_type type, int num,
return target_frameno;
}
-int
+bool
remote_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
{
struct remote_state *rs = get_remote_state ();
@@ -12654,10 +12654,10 @@ remote_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
{
unpack_varlen_hex (reply + 1, &uval);
*val = (LONGEST) uval;
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
int
@@ -12856,7 +12856,7 @@ remote_target::set_trace_buffer_size (LONGEST val)
}
}
-int
+bool
remote_target::set_trace_notes (const char *user, const char *notes,
const char *stop_notes)
{
@@ -12894,15 +12894,15 @@ remote_target::set_trace_notes (const char *user, const char *notes,
putpkt (rs->buf);
reply = remote_get_noisy_reply (&target_buf, &target_buf_size);
if (*reply == '\0')
- return 0;
+ return false;
if (strcmp (reply, "OK") != 0)
error (_("Bogus reply from target: %s"), reply);
- return 1;
+ return true;
}
-int
+bool
remote_target::use_agent (int use)
{
if (packet_support (PACKET_QAgent) != PACKET_DISABLE)
@@ -12917,14 +12917,14 @@ remote_target::use_agent (int use)
if (strcmp (rs->buf, "OK") == 0)
{
::use_agent = use;
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
-int
+bool
remote_target::can_use_agent ()
{
return (packet_support (PACKET_QAgent) != PACKET_DISABLE);
@@ -12951,18 +12951,18 @@ remote_btrace_reset (void)
/* Check whether the target supports branch tracing. */
-int
+bool
remote_target::supports_btrace (enum btrace_format format)
{
if (packet_support (PACKET_Qbtrace_off) != PACKET_ENABLE)
- return 0;
+ return false;
if (packet_support (PACKET_qXfer_btrace) != PACKET_ENABLE)
- return 0;
+ return false;
switch (format)
{
case BTRACE_FORMAT_NONE:
- return 0;
+ return false;
case BTRACE_FORMAT_BTS:
return (packet_support (PACKET_Qbtrace_bts) == PACKET_ENABLE);
@@ -12973,7 +12973,7 @@ remote_target::supports_btrace (enum btrace_format format)
#if defined (HAVE_LIBIPT)
return (packet_support (PACKET_Qbtrace_pt) == PACKET_ENABLE);
#else /* !defined (HAVE_LIBIPT) */
- return 0;
+ return false;
#endif /* !defined (HAVE_LIBIPT) */
}
@@ -13269,7 +13269,7 @@ remote_target::btrace_conf (const struct btrace_target_info *tinfo)
return &tinfo->conf;
}
-int
+bool
remote_target::augmented_libraries_svr4_read ()
{
return (packet_support (PACKET_augmented_libraries_svr4_read_feature)
@@ -13354,27 +13354,27 @@ remote_target::execution_direction ()
return rs->last_resume_exec_dir;
}
-int
+bool
remote_target::can_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_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);
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index a994d26cf35..e301a1a462b 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -52,7 +52,7 @@ struct spu_multiarch_target FINAL : public target_ops
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,
@@ -66,7 +66,7 @@ struct spu_multiarch_target FINAL : public target_ops
const gdb_byte *pattern, ULONGEST pattern_len,
CORE_ADDR *found_addrp) OVERRIDE;
- int region_ok_for_hw_watchpoint (CORE_ADDR, int) OVERRIDE;
+ bool region_ok_for_hw_watchpoint (CORE_ADDR, int) OVERRIDE;
struct gdbarch *thread_architecture (ptid_t) OVERRIDE;
};
@@ -161,14 +161,15 @@ spu_multiarch_target::thread_architecture (ptid_t ptid)
}
/* Override the to_region_ok_for_hw_watchpoint routine. */
-int
+
+bool
spu_multiarch_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
{
struct target_ops *ops_beneath = find_target_beneath (this);
/* We cannot watch SPU local store. */
if (SPUADDR_SPU (addr) != -1)
- return 0;
+ return false;
return ops_beneath->region_ok_for_hw_watchpoint (addr, len);
}
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 743123d7168..b9b12a772b1 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -23,10 +23,10 @@ struct dummy_target : public target_ops
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;
@@ -35,13 +35,13 @@ struct dummy_target : public target_ops
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;
- 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 stopped_data_address (CORE_ADDR *arg0) OVERRIDE;
+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) OVERRIDE;
+ bool region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) 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;
@@ -62,11 +62,10 @@ struct dummy_target : public target_ops
int remove_exec_catchpoint (int arg0) OVERRIDE;
void follow_exec (struct inferior *arg0, char *arg1) OVERRIDE;
int set_syscall_catchpoint (int arg0, int arg1, int arg2, int arg3, int *arg4) OVERRIDE;
- int has_exited (int arg0, int arg1, int *arg2) 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;
char *pid_to_str (ptid_t arg0) OVERRIDE;
char *extra_thread_info (struct thread_info *arg0) OVERRIDE;
@@ -80,12 +79,12 @@ struct dummy_target : public target_ops
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;
@@ -100,20 +99,20 @@ struct dummy_target : public target_ops
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 (struct trace_state_variable *arg0) OVERRIDE;
void enable_tracepoint (struct bp_location *arg0) OVERRIDE;
void disable_tracepoint (struct bp_location *arg0) OVERRIDE;
@@ -123,7 +122,7 @@ struct dummy_target : public target_ops
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;
@@ -132,17 +131,17 @@ struct dummy_target : public target_ops
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;
- int static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1) OVERRIDE;
+ bool static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1) OVERRIDE;
VEC(static_tracepoint_marker_p) *static_tracepoint_markers_by_strid (const char *arg0) OVERRIDE;
struct traceframe_info *traceframe_info () OVERRIDE;
- int use_agent (int arg0) OVERRIDE;
- int can_use_agent () OVERRIDE;
- int supports_btrace (enum btrace_format arg0) OVERRIDE;
+ bool use_agent (int arg0) OVERRIDE;
+ bool can_use_agent () OVERRIDE;
+ bool supports_btrace (enum btrace_format arg0) 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;
@@ -152,8 +151,8 @@ struct dummy_target : public target_ops
void info_record () OVERRIDE;
void save_record (const char *arg0) 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;
@@ -164,7 +163,7 @@ struct dummy_target : public target_ops
void call_history (int arg0, int arg1) OVERRIDE;
void call_history_from (ULONGEST arg0, int arg1, int arg2) OVERRIDE;
void call_history_range (ULONGEST arg0, ULONGEST arg1, int 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;
@@ -190,10 +189,10 @@ struct debug_target : public target_ops
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;
@@ -202,13 +201,13 @@ struct debug_target : public target_ops
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;
- 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 stopped_data_address (CORE_ADDR *arg0) OVERRIDE;
+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) OVERRIDE;
+ bool region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) 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;
@@ -229,11 +228,10 @@ struct debug_target : public target_ops
int remove_exec_catchpoint (int arg0) OVERRIDE;
void follow_exec (struct inferior *arg0, char *arg1) OVERRIDE;
int set_syscall_catchpoint (int arg0, int arg1, int arg2, int arg3, int *arg4) OVERRIDE;
- int has_exited (int arg0, int arg1, int *arg2) 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;
char *pid_to_str (ptid_t arg0) OVERRIDE;
char *extra_thread_info (struct thread_info *arg0) OVERRIDE;
@@ -247,12 +245,12 @@ struct debug_target : public target_ops
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;
@@ -267,20 +265,20 @@ struct debug_target : public target_ops
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 (struct trace_state_variable *arg0) OVERRIDE;
void enable_tracepoint (struct bp_location *arg0) OVERRIDE;
void disable_tracepoint (struct bp_location *arg0) OVERRIDE;
@@ -290,7 +288,7 @@ struct debug_target : public target_ops
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;
@@ -299,17 +297,17 @@ struct debug_target : public target_ops
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;
- int static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1) OVERRIDE;
+ bool static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1) OVERRIDE;
VEC(static_tracepoint_marker_p) *static_tracepoint_markers_by_strid (const char *arg0) OVERRIDE;
struct traceframe_info *traceframe_info () OVERRIDE;
- int use_agent (int arg0) OVERRIDE;
- int can_use_agent () OVERRIDE;
- int supports_btrace (enum btrace_format arg0) OVERRIDE;
+ bool use_agent (int arg0) OVERRIDE;
+ bool can_use_agent () OVERRIDE;
+ bool supports_btrace (enum btrace_format arg0) 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;
@@ -319,8 +317,8 @@ struct debug_target : public target_ops
void info_record () OVERRIDE;
void save_record (const char *arg0) 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;
@@ -331,7 +329,7 @@ struct debug_target : public target_ops
void call_history (int arg0, int arg1) OVERRIDE;
void call_history_from (ULONGEST arg0, int arg1, int arg2) OVERRIDE;
void call_history_range (ULONGEST arg0, ULONGEST arg1, int 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;
@@ -609,102 +607,102 @@ debug_target::remove_breakpoint (struct gdbarch *arg0, struct bp_target_info *ar
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;
}
@@ -944,27 +942,27 @@ debug_target::remove_mask_watchpoint (CORE_ADDR arg0, CORE_ADDR arg1, enum targe
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;
}
@@ -978,7 +976,7 @@ target_ops::have_steppable_watchpoint ()
int
dummy_target::have_steppable_watchpoint ()
{
- return 0;
+ return false;
}
int
@@ -1003,7 +1001,7 @@ target_ops::have_continuable_watchpoint ()
bool
dummy_target::have_continuable_watchpoint ()
{
- return 0;
+ return false;
}
bool
@@ -1019,48 +1017,48 @@ debug_target::have_continuable_watchpoint ()
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 ());
@@ -1070,27 +1068,27 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int
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;
}
-int
+bool
target_ops::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1)
{
return this->beneath->region_ok_for_hw_watchpoint (arg0, arg1);
}
-int
+bool
dummy_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1)
{
return default_region_ok_for_hw_watchpoint (this, arg0, arg1);
}
-int
+bool
debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath->shortname ());
result = this->beneath->region_ok_for_hw_watchpoint (arg0, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->region_ok_for_hw_watchpoint (", this->beneath->shortname ());
@@ -1098,27 +1096,27 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1)
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;
}
-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 ());
@@ -1130,7 +1128,7 @@ debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2
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;
}
@@ -1197,7 +1195,7 @@ target_ops::supports_terminal_ours ()
bool
dummy_target::supports_terminal_ours ()
{
- return 0;
+ return false;
}
bool
@@ -1624,36 +1622,6 @@ debug_target::set_syscall_catchpoint (int arg0, int arg1, int arg2, int arg3, in
return result;
}
-int
-target_ops::has_exited (int arg0, int arg1, int *arg2)
-{
- return this->beneath->has_exited (arg0, arg1, arg2);
-}
-
-int
-dummy_target::has_exited (int arg0, int arg1, int *arg2)
-{
- return 0;
-}
-
-int
-debug_target::has_exited (int arg0, int arg1, int *arg2)
-{
- int result;
- fprintf_unfiltered (gdb_stdlog, "-> %s->has_exited (...)\n", this->beneath->shortname ());
- result = this->beneath->has_exited (arg0, arg1, arg2);
- fprintf_unfiltered (gdb_stdlog, "<- %s->has_exited (", this->beneath->shortname ());
- target_debug_print_int (arg0);
- fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int (arg1);
- fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int_p (arg2);
- fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
- fputs_unfiltered ("\n", gdb_stdlog);
- return result;
-}
-
void
target_ops::mourn_inferior ()
{
@@ -1721,28 +1689,28 @@ debug_target::program_signals (int arg0, unsigned char * arg1)
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;
}
@@ -2054,52 +2022,52 @@ debug_target::attach_no_wait ()
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;
}
@@ -2147,52 +2115,52 @@ debug_target::thread_events (int arg0)
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;
}
@@ -2587,27 +2555,27 @@ debug_target::search_memory (CORE_ADDR arg0, ULONGEST arg1, const gdb_byte *arg2
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;
}
@@ -2637,152 +2605,152 @@ debug_target::execution_direction ()
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;
}
@@ -2839,27 +2807,27 @@ debug_target::thread_address_space (ptid_t arg0)
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;
}
@@ -2907,27 +2875,27 @@ debug_target::download_tracepoint (struct bp_location *arg0)
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;
}
@@ -3145,22 +3113,22 @@ debug_target::trace_find (enum trace_find_type arg0, int arg1, CORE_ADDR arg2, C
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 ());
@@ -3168,7 +3136,7 @@ debug_target::get_trace_state_variable_value (int arg0, LONGEST *arg1)
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;
}
@@ -3369,22 +3337,22 @@ debug_target::set_trace_buffer_size (LONGEST arg0)
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 ());
@@ -3394,7 +3362,7 @@ debug_target::set_trace_notes (const char *arg0, const char *arg1, const char *a
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;
}
@@ -3455,22 +3423,22 @@ debug_target::verify_memory (const gdb_byte *arg0, CORE_ADDR arg1, ULONGEST arg2
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 ());
@@ -3478,7 +3446,7 @@ debug_target::get_tib_address (ptid_t arg0, CORE_ADDR *arg1)
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;
}
@@ -3503,22 +3471,22 @@ debug_target::set_permissions ()
fputs_unfiltered (")\n", gdb_stdlog);
}
-int
+bool
target_ops::static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1)
{
return this->beneath->static_tracepoint_marker_at (arg0, arg1);
}
-int
+bool
dummy_target::static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepoint_marker *arg1)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->static_tracepoint_marker_at (...)\n", this->beneath->shortname ());
result = this->beneath->static_tracepoint_marker_at (arg0, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->static_tracepoint_marker_at (", this->beneath->shortname ());
@@ -3526,7 +3494,7 @@ debug_target::static_tracepoint_marker_at (CORE_ADDR arg0, struct static_tracepo
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_struct_static_tracepoint_marker_p (arg1);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
@@ -3582,79 +3550,79 @@ debug_target::traceframe_info ()
return result;
}
-int
+bool
target_ops::use_agent (int arg0)
{
return this->beneath->use_agent (arg0);
}
-int
+bool
dummy_target::use_agent (int arg0)
{
tcomplain ();
}
-int
+bool
debug_target::use_agent (int 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);
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;
}
-int
+bool
target_ops::supports_btrace (enum btrace_format arg0)
{
return this->beneath->supports_btrace (arg0);
}
-int
+bool
dummy_target::supports_btrace (enum btrace_format arg0)
{
- return 0;
+ return false;
}
-int
+bool
debug_target::supports_btrace (enum btrace_format arg0)
{
- int result;
+ bool result;
fprintf_unfiltered (gdb_stdlog, "-> %s->supports_btrace (...)\n", this->beneath->shortname ());
result = this->beneath->supports_btrace (arg0);
fprintf_unfiltered (gdb_stdlog, "<- %s->supports_btrace (", this->beneath->shortname ());
target_debug_print_enum_btrace_format (arg0);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_int (result);
+ target_debug_print_bool (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}
@@ -3870,48 +3838,48 @@ debug_target::delete_record ()
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 ());
@@ -3919,7 +3887,7 @@ debug_target::record_will_replay (ptid_t arg0, int arg1)
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;
}
@@ -4160,27 +4128,27 @@ debug_target::call_history_range (ULONGEST arg0, ULONGEST arg1, int arg2)
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;
}
diff --git a/gdb/target.c b/gdb/target.c
index 072b0097bfb..0079a3f2767 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2644,10 +2644,10 @@ target_ops::create_inferior (char *, char *, char **, int)
gdb_assert (0);;
}
-int
+bool
target_ops::can_run ()
{
- return 0;
+ return true;
}
int
diff --git a/gdb/target.h b/gdb/target.h
index b5eaf4bd0a5..7d0600e4438 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -496,11 +496,11 @@ struct target_ops
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
@@ -509,11 +509,11 @@ struct target_ops
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);
@@ -543,29 +543,26 @@ struct target_ops
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
target_* macro. */
- virtual int region_ok_for_hw_watchpoint (CORE_ADDR, int)
+ virtual bool 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 int masked_watch_num_registers (
- CORE_ADDR, CORE_ADDR)
+ 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);
/* Return 1 for sure target can do single step. Return -1 for
@@ -574,7 +571,7 @@ struct target_ops
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 ()
@@ -614,18 +611,15 @@ struct target_ops
TARGET_DEFAULT_RETURN (1);
virtual void follow_exec (struct inferior *, char *)
TARGET_DEFAULT_IGNORE ();
- virtual int set_syscall_catchpoint (
- int, int, int, int, int *)
+ virtual int set_syscall_catchpoint (int, int, int, int, int *)
TARGET_DEFAULT_RETURN (1);
- virtual int has_exited (int, int, int *)
- TARGET_DEFAULT_RETURN (0);
virtual void mourn_inferior ()
TARGET_DEFAULT_FUNC (default_mourn_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. */
@@ -639,8 +633,8 @@ struct target_ops
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 char *pid_to_str (ptid_t)
@@ -666,11 +660,11 @@ struct target_ops
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 ()
@@ -679,22 +673,22 @@ struct target_ops
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);
@@ -826,8 +820,8 @@ struct target_ops
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
@@ -837,31 +831,31 @@ struct target_ops
/* 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.
@@ -887,8 +881,8 @@ struct target_ops
/* 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
@@ -954,8 +948,8 @@ struct target_ops
/* 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 (struct trace_state_variable *tsv)
@@ -1003,8 +997,8 @@ struct target_ops
/* 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 ());
@@ -1038,9 +1032,9 @@ struct target_ops
/* 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:
@@ -1062,7 +1056,7 @@ struct target_ops
/* 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. */
@@ -1071,9 +1065,9 @@ struct target_ops
/* Look for a static tracepoint marker at ADDR, and fill in MARKER
with its details. Return 1 on success, 0 on failure. */
- virtual int static_tracepoint_marker_at (CORE_ADDR,
+ virtual bool static_tracepoint_marker_at (CORE_ADDR,
struct static_tracepoint_marker *marker)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (false);
/* Return a vector of all tracepoints markers string id ID, or all
markers if ID is NULL. */
@@ -1089,16 +1083,16 @@ struct target_ops
/* Ask the target to use or not to use agent according to USE. Return 1
successful, 0 otherwise. */
- virtual int use_agent (int use)
+ virtual bool use_agent (int 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);
/* Check whether the target supports branch tracing. */
- virtual int supports_btrace (enum btrace_format)
- TARGET_DEFAULT_RETURN (0);
+ virtual bool supports_btrace (enum btrace_format)
+ TARGET_DEFAULT_RETURN (false);
/* Enable branch tracing for PTID using CONF configuration.
Return a branch trace target information struct for reading and for
@@ -1147,13 +1141,13 @@ struct target_ops
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 ()
@@ -1182,14 +1176,12 @@ struct target_ops
FROM.
If SIZE < 0, disassemble abs (SIZE) instructions before FROM; otherwise,
disassemble SIZE instructions after FROM. */
- virtual void insn_history_from (
- ULONGEST from, int size, int flags)
+ virtual void insn_history_from (ULONGEST from, int size, int flags)
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Disassemble a section of the recorded execution trace from instruction
BEGIN (inclusive) to instruction END (inclusive). */
- virtual void insn_history_range (
- ULONGEST begin, ULONGEST end, int flags)
+ virtual void insn_history_range (ULONGEST begin, ULONGEST end, int flags)
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Print a function trace of the recorded execution trace.
@@ -1210,10 +1202,10 @@ struct target_ops
virtual void call_history_range (ULONGEST begin, ULONGEST end, int 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
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index c3424f20aa5..41cca8e0816 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -64,7 +64,7 @@ Use a trace file as a target. Specify the filename of the trace file.");
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;
struct traceframe_info *traceframe_info () OVERRIDE;
void get_tracepoint_status (struct breakpoint *tp,
@@ -1039,11 +1039,11 @@ tfile_target::xfer_partial (enum target_object object,
/* 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
@@ -1064,7 +1064,7 @@ tfile_target::get_trace_state_variable_value (int tsvnum, LONGEST *val)
*val = extract_signed_integer ((gdb_byte *) val, 8,
gdbarch_byte_order
(target_gdbarch ()));
- found = 1;
+ found = true;
}
pos += (4 + 8);
}
diff --git a/gdb/tracefile.c b/gdb/tracefile.c
index 8a3faced286..17073fc7856 100644
--- a/gdb/tracefile.c
+++ b/gdb/tracefile.c
@@ -425,7 +425,7 @@ tracefile_fetch_registers (struct regcache *regcache, int regno)
/* This is the implementation of target_ops method to_has_all_memory. */
-int
+bool
tracefile_target::has_all_memory ()
{
return 1;
@@ -433,7 +433,7 @@ tracefile_target::has_all_memory ()
/* This is the implementation of target_ops method to_has_memory. */
-int
+bool
tracefile_target::has_memory ()
{
return 1;
@@ -443,7 +443,7 @@ tracefile_target::has_memory ()
The target has a stack when GDB has already selected one trace
frame. */
-int
+bool
tracefile_target::has_stack ()
{
return get_traceframe_number () != -1;
@@ -453,7 +453,7 @@ tracefile_target::has_stack ()
The target has registers when GDB has already selected one trace
frame. */
-int
+bool
tracefile_target::has_registers ()
{
return get_traceframe_number () != -1;
@@ -462,7 +462,7 @@ tracefile_target::has_registers ()
/* 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;
diff --git a/gdb/tracefile.h b/gdb/tracefile.h
index 00c628341b5..6b87b473e15 100644
--- a/gdb/tracefile.h
+++ b/gdb/tracefile.h
@@ -119,11 +119,11 @@ class tracefile_target : public target_ops
tracefile_target ();
int get_trace_status (struct 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);
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index b577fdb55f8..04b745eb608 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -330,7 +330,7 @@ struct windows_nat_target : public x86_nat_target<inf_child_target>
void mourn_inferior () OVERRIDE;
- int thread_alive (ptid_t ptid) OVERRIDE;
+ bool thread_alive (ptid_t ptid) OVERRIDE;
char *pid_to_str (ptid_t) OVERRIDE;
@@ -340,7 +340,7 @@ struct windows_nat_target : public x86_nat_target<inf_child_target>
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;
};
@@ -2597,19 +2597,19 @@ windows_nat_target::xfer_partial (enum target_object object,
/* 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
@@ -2785,7 +2785,7 @@ cygwin_get_dr7 (void)
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;
@@ -2793,8 +2793,7 @@ windows_nat_target::thread_alive (ptid_t ptid)
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;
}
/* -Wmissing-prototypes */
diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c
index b771af5910b..0f75cb38fd4 100644
--- a/gdb/x86-linux-nat.c
+++ b/gdb/x86-linux-nat.c
@@ -255,7 +255,7 @@ x86_linux_nat_target::read_description ()
}
-int
+bool
x86_linux_nat_target::supports_btrace (enum btrace_format format)
{
return linux_supports_btrace (this, format);
diff --git a/gdb/x86-linux-nat.h b/gdb/x86-linux-nat.h
index 4b9a3b82816..93a918361b9 100644
--- a/gdb/x86-linux-nat.h
+++ b/gdb/x86-linux-nat.h
@@ -34,7 +34,7 @@ struct x86_linux_nat_target : public x86_nat_target<linux_nat_target>
const struct target_desc *read_description () OVERRIDE;
/* Add btrace methods. */
- int supports_btrace (enum btrace_format format) OVERRIDE;
+ bool supports_btrace (enum btrace_format format) OVERRIDE;
struct btrace_target_info *enable_btrace (ptid_t ptid,
const struct btrace_config *conf) OVERRIDE;
@@ -49,16 +49,16 @@ struct x86_linux_nat_target : public x86_nat_target<linux_nat_target>
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); }
};
diff --git a/gdb/x86-nat.h b/gdb/x86-nat.h
index d598f676e00..b069d583799 100644
--- a/gdb/x86-nat.h
+++ b/gdb/x86-nat.h
@@ -74,7 +74,7 @@ struct x86_nat_target : public T
int can_use_hw_breakpoint (enum bptype type, int cnt, int othertype) OVERRIDE
{ return x86_can_use_hw_breakpoint (type, cnt, othertype); }
- int region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) OVERRIDE
+ bool region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) OVERRIDE
{ return x86_region_ok_for_hw_watchpoint (addr, len); }
int insert_watchpoint (CORE_ADDR addr, int len,
@@ -95,10 +95,10 @@ struct x86_nat_target : public T
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); }
};