mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
gdbserver/linux-low: turn some more static functions into private methods
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn some more static methods in linux-low into private methods of linux_process_target. * linux-low.cc (get_pc): Turn into... (linux_process_target::get_pc): ...this. (save_stop_reason): Turn into... (linux_process_target::save_stop_reason): ...this. (thread_still_has_status_pending_p): Turn into... (linux_process_target::thread_still_has_status_pending): ...this. (status_pending_p_callback): Turn into... (linux_process_target::status_pending_p_callback): ...this. (resume_stopped_resumed_lwps): Turn into... (linux_process_target::resume_stopped_resumed_lwps): ...this. (install_software_single_step_breakpoints): Turn into... (linux_process_target::install_software_single_step_breakpoints): ...this. (single_step): Turn into... (linux_process_target::single_step): ...this. (linux_resume_one_lwp_throw): Turn into... (linux_process_target::resume_one_lwp_throw): ...this. (linux_resume_one_lwp): Turn into... (linux_process_target::resume_one_lwp): ...this. (resume_status_pending_p): Turn into... (linux_process_target::resume_status_pending): ...this. (need_step_over_p): Turn into... (linux_process_target::thread_needs_step_over): ...this. (linux_resume_one_thread): Turn into... (linux_process_target::resume_one_thread): ...this. (proceed_one_lwp): Turn into... (linux_process_target::proceed_one_lwp): ...this. (unsuspend_and_proceed_one_lwp): Turn into... (linux_process_target::unsuspend_and_proceed_one_lwp): ...this. Update the calls/references to the above functions below. (linux_process_target::handle_extended_wait) (linux_process_target::filter_event) (linux_process_target::wait_for_event_filtered) (linux_process_target::wait_1) (linux_process_target::move_out_of_jump_pad) (linux_process_target::start_step_over) (linux_process_target::resume) (linux_process_target::proceed_all_lwps) (regsets_store_inferior_registers) (linux_process_target::store_register) * linux-low.h (class linux_process_target) <get_pc> <save_stop_reason> <thread_still_has_status_pending> <status_pending_p_callback> <resume_stopped_resumed_lwps> <install_software_single_step_breakpoints> <single_step> <resume_one_lwp_throw> <resume_one_lwp> <resume_status_pending> <thread_needs_step_over> <resume_one_thread> <proceed_one_lwp> <unsuspend_and_proceed_one_lwp>: Declare.
This commit is contained in:
@@ -580,6 +580,84 @@ private:
|
||||
void usr_store_inferior_registers (const regs_info *regs_info,
|
||||
regcache *regcache, int regno, int all);
|
||||
|
||||
/* Return the PC as read from the regcache of LWP, without any
|
||||
adjustment. */
|
||||
CORE_ADDR get_pc (lwp_info *lwp);
|
||||
|
||||
/* Called when the LWP stopped for a signal/trap. If it stopped for a
|
||||
trap check what caused it (breakpoint, watchpoint, trace, etc.),
|
||||
and save the result in the LWP's stop_reason field. If it stopped
|
||||
for a breakpoint, decrement the PC if necessary on the lwp's
|
||||
architecture. Returns true if we now have the LWP's stop PC. */
|
||||
bool save_stop_reason (lwp_info *lwp);
|
||||
|
||||
/* Resume execution of LWP. If STEP is nonzero, single-step it. If
|
||||
SIGNAL is nonzero, give it that signal. */
|
||||
void resume_one_lwp_throw (lwp_info *lwp, int step, int signal,
|
||||
siginfo_t *info);
|
||||
|
||||
/* Like resume_one_lwp_throw, but no error is thrown if the LWP
|
||||
disappears while we try to resume it. */
|
||||
void resume_one_lwp (lwp_info *lwp, int step, int signal, siginfo_t *info);
|
||||
|
||||
/* This function is called once per thread. We check the thread's
|
||||
last resume request, which will tell us whether to resume, step, or
|
||||
leave the thread stopped. Any signal the client requested to be
|
||||
delivered has already been enqueued at this point.
|
||||
|
||||
If any thread that GDB wants running is stopped at an internal
|
||||
breakpoint that needs stepping over, we start a step-over operation
|
||||
on that particular thread, and leave all others stopped. */
|
||||
void proceed_one_lwp (thread_info *thread, lwp_info *except);
|
||||
|
||||
/* This function is called once per thread. We check the thread's
|
||||
resume request, which will tell us whether to resume, step, or
|
||||
leave the thread stopped; and what signal, if any, it should be
|
||||
sent.
|
||||
|
||||
For threads which we aren't explicitly told otherwise, we preserve
|
||||
the stepping flag; this is used for stepping over gdbserver-placed
|
||||
breakpoints.
|
||||
|
||||
If pending_flags was set in any thread, we queue any needed
|
||||
signals, since we won't actually resume. We already have a pending
|
||||
event to report, so we don't need to preserve any step requests;
|
||||
they should be re-issued if necessary. */
|
||||
void resume_one_thread (thread_info *thread, bool leave_all_stopped);
|
||||
|
||||
/* Return true if this lwp has an interesting status pending. */
|
||||
bool status_pending_p_callback (thread_info *thread, ptid_t ptid);
|
||||
|
||||
/* Resume LWPs that are currently stopped without any pending status
|
||||
to report, but are resumed from the core's perspective. */
|
||||
void resume_stopped_resumed_lwps (thread_info *thread);
|
||||
|
||||
/* Unsuspend THREAD, except EXCEPT, and proceed. */
|
||||
void unsuspend_and_proceed_one_lwp (thread_info *thread, lwp_info *except);
|
||||
|
||||
/* Return true if this lwp still has an interesting status pending.
|
||||
If not (e.g., it had stopped for a breakpoint that is gone), return
|
||||
false. */
|
||||
bool thread_still_has_status_pending (thread_info *thread);
|
||||
|
||||
/* Return true if this lwp is to-be-resumed and has an interesting
|
||||
status pending. */
|
||||
bool resume_status_pending (thread_info *thread);
|
||||
|
||||
/* Return true if this lwp that GDB wants running is stopped at an
|
||||
internal breakpoint that we need to step over. It assumes that
|
||||
any required STOP_PC adjustment has already been propagated to
|
||||
the inferior's regcache. */
|
||||
bool thread_needs_step_over (thread_info *thread);
|
||||
|
||||
/* Single step via hardware or software single step.
|
||||
Return 1 if hardware single stepping, 0 if software single stepping
|
||||
or can't single step. */
|
||||
int single_step (lwp_info* lwp);
|
||||
|
||||
/* Install breakpoints for software single stepping. */
|
||||
void install_software_single_step_breakpoints (lwp_info *lwp);
|
||||
|
||||
protected:
|
||||
/* The architecture-specific "low" methods are listed below. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user