This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Implement -list-thread-groups.

diff --git a/gdb/thread.c b/gdb/thread.c
index b1e318d..a32dff4 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -636,9 +636,10 @@ set_stop_requested (ptid_t ptid, int stop)
use from MI. If REQUESTED_THREAD is not -1, it's the GDB id of the thread
that should be printed. Otherwise, all threads are
- printed. */
+ printed. + If PID is not -1, only prints threads from the process PID. */

For completeness and consistency, how about adding "Otherwise, threads from all attached PIDs are printed."

-print_thread_info (struct ui_out *uiout, int requested_thread)
+print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
struct thread_info *tp;
ptid_t current_ptid;
@@ -646,6 +647,8 @@ print_thread_info (struct ui_out *uiout, int requested_thread)
char *extra_info;
int current_thread = -1;
+ gdb_assert (requested_thead == -1 || pid == -1);

I'm puzzled by this assert. You don't think we'll ever want to specify both the pid and the thread?

Otherwise, these changes to thread.c seem fine.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]