This is the mail archive of the gdb-patches@sourceware.org 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: [RFA] Implement -thread-info.


 > --- a/gdb/mi/mi-cmds.c
 > +++ b/gdb/mi/mi-cmds.c
 > @@ -130,8 +130,7 @@ struct mi_cmd mi_cmds[] =
 >    { "target-list-current-targets", { NULL, 0 }, NULL, NULL },
 >    { "target-list-parameters", { NULL, 0 }, NULL, NULL },
 >    { "target-select", { NULL, 0 }, mi_cmd_target_select},
 > -  { "thread-info", { NULL, 0 }, NULL, NULL },
 > -  { "thread-list-all-threads", { NULL, 0 }, NULL, NULL },
 > +  { "thread-info", { NULL, 0 }, NULL, mi_cmd_thread_info },
 >    { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids},
 >    { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select},
 >    { "trace-actions", { NULL, 0 }, NULL, NULL },

I was thinking:

*** mi-cmds.c.~1.30.~	2008-01-04 10:24:35.000000000 +1300
--- mi-cmds.c	2008-02-26 13:47:53.000000000 +1300
*************** struct mi_cmd mi_cmds[] =
*** 133,138 ****
--- 133,139 ----
    { "thread-info", { NULL, 0 }, NULL, NULL },
    { "thread-list-all-threads", { NULL, 0 }, NULL, NULL },
    { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids},
+   { "thread-info", { "info threads", 0 }, NULL, NULL },
    { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select},
    { "trace-actions", { NULL, 0 }, NULL, NULL },
    { "trace-delete", { NULL, 0 }, NULL, NULL },

like for "info break".

I realise that -thread-info can give info about one thread but presumably
the change could allow "info threads" to do that too (just as is already
done for "info break").  Then you just need

+   { "thread-info", { "info threads", 1 }, NULL, NULL },

WDYT?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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