]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
infrun.c: add for_each_just_stopped_thread
authorPedro Alves <palves@redhat.com>
Wed, 15 Oct 2014 19:18:30 +0000 (20:18 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 15 Oct 2014 19:18:30 +0000 (20:18 +0100)
commit0cbcdb96eaba80fe8e94ccc2b6f1f382a467a04e
treea8f4f1973e983a529178017050a32169a138d23f
parent963f9c80cb3f12fb779cf3189072ac48946da96c
infrun.c: add for_each_just_stopped_thread

This is a preparatory/cleanup patch that does two things:

- Renames 'delete_step_thread_step_resume_breakpoint'.  The
  "step_resume" part is misnomer these days, as the function deletes
  other kinds of breakpoints, not just the step-resume breakpoint.  A
  following patch will want to make it delete yet another kind of
  breakpoint, even.

- Splits out the logic of which threads get those breakpoints deleted
  to a separate "for_each"-style function, so that the same following
  patch may use it with a different callback.

Tested on x86_64 Fedora 20.

gdb/
2014-10-15  Pedro Alves  <palves@redhat.com>

* infrun.c (delete_step_resume_breakpoint_callback): Delete.
(delete_thread_infrun_breakpoints): New function, with parts
salvaged from delete_step_resume_breakpoint_callback.
(delete_step_thread_step_resume_breakpoint): Delete.
(for_each_just_stopped_thread_callback_func): New typedef.
(for_each_just_stopped_thread): New function.
(delete_just_stopped_threads_infrun_breakpoints): New function.
(delete_step_thread_step_resume_breakpoint_cleanup): Rename to ...
(delete_just_stopped_threads_infrun_breakpoints_cleanup):
... this.  Adjust.
(wait_for_inferior, fetch_inferior_event): Adjust to renames.
gdb/ChangeLog
gdb/infrun.c