forked from Imagelibrary/binutils-gdb
Use bool in thread_events
This changes target_ops::thread_events and target_thread_events to use 'bool'. The callers were already doing this. Tested by rebuilding. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -269,7 +269,7 @@ struct amd_dbgapi_target final : public target_ops
|
|||||||
|
|
||||||
struct gdbarch *thread_architecture (ptid_t) override;
|
struct gdbarch *thread_architecture (ptid_t) override;
|
||||||
|
|
||||||
void thread_events (int enable) override;
|
void thread_events (bool enable) override;
|
||||||
|
|
||||||
std::string pid_to_str (ptid_t ptid) override;
|
std::string pid_to_str (ptid_t ptid) override;
|
||||||
|
|
||||||
@@ -1805,7 +1805,7 @@ amd_dbgapi_target::thread_architecture (ptid_t ptid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
amd_dbgapi_target::thread_events (int enable)
|
amd_dbgapi_target::thread_events (bool enable)
|
||||||
{
|
{
|
||||||
m_report_thread_events = enable;
|
m_report_thread_events = enable;
|
||||||
beneath ()->thread_events (enable);
|
beneath ()->thread_events (enable);
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ struct simple_pid_list
|
|||||||
static struct simple_pid_list *stopped_pids;
|
static struct simple_pid_list *stopped_pids;
|
||||||
|
|
||||||
/* Whether target_thread_events is in effect. */
|
/* Whether target_thread_events is in effect. */
|
||||||
static int report_thread_events;
|
static bool report_thread_events;
|
||||||
|
|
||||||
static int kill_lwp (int lwpid, int signo);
|
static int kill_lwp (int lwpid, int signo);
|
||||||
|
|
||||||
@@ -4618,7 +4618,7 @@ linux_nat_target::fileio_unlink (struct inferior *inf, const char *filename,
|
|||||||
/* Implementation of the to_thread_events method. */
|
/* Implementation of the to_thread_events method. */
|
||||||
|
|
||||||
void
|
void
|
||||||
linux_nat_target::thread_events (int enable)
|
linux_nat_target::thread_events (bool enable)
|
||||||
{
|
{
|
||||||
report_thread_events = enable;
|
report_thread_events = enable;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
bool stopped_by_hw_breakpoint () override;
|
bool stopped_by_hw_breakpoint () override;
|
||||||
bool supports_stopped_by_hw_breakpoint () override;
|
bool supports_stopped_by_hw_breakpoint () override;
|
||||||
|
|
||||||
void thread_events (int) override;
|
void thread_events (bool) override;
|
||||||
|
|
||||||
bool supports_set_thread_options (gdb_thread_options options) override;
|
bool supports_set_thread_options (gdb_thread_options options) override;
|
||||||
|
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ public:
|
|||||||
|
|
||||||
int async_wait_fd () override;
|
int async_wait_fd () override;
|
||||||
|
|
||||||
void thread_events (int) override;
|
void thread_events (bool) override;
|
||||||
|
|
||||||
bool supports_set_thread_options (gdb_thread_options) override;
|
bool supports_set_thread_options (gdb_thread_options) override;
|
||||||
|
|
||||||
@@ -15191,7 +15191,7 @@ remote_target::async (bool enable)
|
|||||||
/* Implementation of the to_thread_events method. */
|
/* Implementation of the to_thread_events method. */
|
||||||
|
|
||||||
void
|
void
|
||||||
remote_target::thread_events (int enable)
|
remote_target::thread_events (bool enable)
|
||||||
{
|
{
|
||||||
struct remote_state *rs = get_remote_state ();
|
struct remote_state *rs = get_remote_state ();
|
||||||
size_t size = get_remote_packet_size ();
|
size_t size = get_remote_packet_size ();
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ struct dummy_target : public target_ops
|
|||||||
void async (bool arg0) override;
|
void async (bool arg0) override;
|
||||||
int async_wait_fd () override;
|
int async_wait_fd () override;
|
||||||
bool has_pending_events () override;
|
bool has_pending_events () override;
|
||||||
void thread_events (int arg0) override;
|
void thread_events (bool arg0) override;
|
||||||
bool supports_set_thread_options (gdb_thread_options arg0) override;
|
bool supports_set_thread_options (gdb_thread_options arg0) override;
|
||||||
bool supports_non_stop () override;
|
bool supports_non_stop () override;
|
||||||
bool always_non_stop_p () override;
|
bool always_non_stop_p () override;
|
||||||
@@ -282,7 +282,7 @@ struct debug_target : public target_ops
|
|||||||
void async (bool arg0) override;
|
void async (bool arg0) override;
|
||||||
int async_wait_fd () override;
|
int async_wait_fd () override;
|
||||||
bool has_pending_events () override;
|
bool has_pending_events () override;
|
||||||
void thread_events (int arg0) override;
|
void thread_events (bool arg0) override;
|
||||||
bool supports_set_thread_options (gdb_thread_options arg0) override;
|
bool supports_set_thread_options (gdb_thread_options arg0) override;
|
||||||
bool supports_non_stop () override;
|
bool supports_non_stop () override;
|
||||||
bool always_non_stop_p () override;
|
bool always_non_stop_p () override;
|
||||||
@@ -2165,24 +2165,24 @@ debug_target::has_pending_events ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
target_ops::thread_events (int arg0)
|
target_ops::thread_events (bool arg0)
|
||||||
{
|
{
|
||||||
this->beneath ()->thread_events (arg0);
|
this->beneath ()->thread_events (arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dummy_target::thread_events (int arg0)
|
dummy_target::thread_events (bool arg0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
debug_target::thread_events (int arg0)
|
debug_target::thread_events (bool arg0)
|
||||||
{
|
{
|
||||||
target_debug_printf_nofunc ("-> %s->thread_events (...)", this->beneath ()->shortname ());
|
target_debug_printf_nofunc ("-> %s->thread_events (...)", this->beneath ()->shortname ());
|
||||||
this->beneath ()->thread_events (arg0);
|
this->beneath ()->thread_events (arg0);
|
||||||
target_debug_printf_nofunc ("<- %s->thread_events (%s)",
|
target_debug_printf_nofunc ("<- %s->thread_events (%s)",
|
||||||
this->beneath ()->shortname (),
|
this->beneath ()->shortname (),
|
||||||
target_debug_print_int (arg0).c_str ());
|
target_debug_print_bool (arg0).c_str ());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -4286,7 +4286,7 @@ target_async (bool enable)
|
|||||||
/* See target.h. */
|
/* See target.h. */
|
||||||
|
|
||||||
void
|
void
|
||||||
target_thread_events (int enable)
|
target_thread_events (bool enable)
|
||||||
{
|
{
|
||||||
current_inferior ()->top_target ()->thread_events (enable);
|
current_inferior ()->top_target ()->thread_events (enable);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -755,7 +755,7 @@ struct target_ops
|
|||||||
potential optimization is missed. */
|
potential optimization is missed. */
|
||||||
virtual bool has_pending_events ()
|
virtual bool has_pending_events ()
|
||||||
TARGET_DEFAULT_RETURN (false);
|
TARGET_DEFAULT_RETURN (false);
|
||||||
virtual void thread_events (int)
|
virtual void thread_events (bool)
|
||||||
TARGET_DEFAULT_IGNORE ();
|
TARGET_DEFAULT_IGNORE ();
|
||||||
/* Returns true if the target supports setting thread options
|
/* Returns true if the target supports setting thread options
|
||||||
OPTIONS, false otherwise. */
|
OPTIONS, false otherwise. */
|
||||||
@@ -1920,7 +1920,7 @@ extern bool target_is_async_p ();
|
|||||||
extern void target_async (bool enable);
|
extern void target_async (bool enable);
|
||||||
|
|
||||||
/* Enables/disables thread create and exit events. */
|
/* Enables/disables thread create and exit events. */
|
||||||
extern void target_thread_events (int enable);
|
extern void target_thread_events (bool enable);
|
||||||
|
|
||||||
/* Returns true if the target supports setting thread options
|
/* Returns true if the target supports setting thread options
|
||||||
OPTIONS. */
|
OPTIONS. */
|
||||||
|
|||||||
Reference in New Issue
Block a user