[PATCH 0/2] Cleanup and bug fix related to thread iteration and proceed calls

Andrew Burgess <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
After commit:

  commit 2e9aaf9455118cee476ea6c4e6aa78477fa84a8e
  Date:   Wed May 13 09:57:06 2026 -0600

      Remove for_each_thread

I spotted a couple of places where we could simplify the code by not
iterating over all_threads, this is patch #1.

And this led me to spot an actual bug in the MI code.  Not a bug
introduced by the above commit, this is something that has been in GDB
for a while.  This is patch #2.

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb: use inferior::threads instead of all_threads and a PID filter
  gdb: share some thread proceed related code between CLI and MI

 gdb/infcmd.c                                  | 62 ++++++++----
 gdb/inferior.h                                | 11 +++
 gdb/mi/mi-main.c                              | 49 +++-------
 gdb/testsuite/gdb.mi/mi-corefile-and-live.c   | 37 +++++++
 gdb/testsuite/gdb.mi/mi-corefile-and-live.exp | 97 +++++++++++++++++++
 5 files changed, 202 insertions(+), 54 deletions(-)
 create mode 100644 gdb/testsuite/gdb.mi/mi-corefile-and-live.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-corefile-and-live.exp


base-commit: f94273aeb37908c32aa26530ff56e862f0060daf
-- 
2.25.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.