1 /**[txh]********************************************************************
3 Copyright (c) 2004 by Salvador E. Tropea.
4 Covered by the GPL license.
6 Module: Thread commands.
8 GDB/MI commands for the "Thread Commands" section.@p
11 gdb command: Implemented?
13 -thread-list-all-threads Yes, implemented as "info threads"
18 ***************************************************************************/
22 /* Low level versions. */
24 void mi_thread_list_ids(mi_h *h)
26 mi_send(h,"-thread-list-ids\n");
29 void mi_thread_select(mi_h *h, int id)
31 mi_send(h,"-thread-select %d\n",id);
34 void mi_thread_list_all_threads(mi_h *h)
36 mi_send(h,"info threads\n");
39 /* High level versions. */
41 /**[txh]********************************************************************
44 List available thread ids.
46 Command: -thread-list-ids
49 ***************************************************************************/
51 int gmi_thread_list_ids(mi_h *h, int **list)
53 mi_thread_list_ids(h);
54 return mi_res_thread_ids(h,list);
57 /**[txh]********************************************************************
62 Command: -thread-select
63 Return: A new mi_frames or NULL on error.
65 ***************************************************************************/
67 mi_frames *gmi_thread_select(mi_h *h, int id)
69 mi_thread_select(h,id);
70 return mi_res_frame(h);
73 /**[txh]********************************************************************
76 Get a list of frames for each available thread. Implemented using "info
79 Command: -thread-list-all-threads
80 Return: A kist of frames, NULL on error
82 ***************************************************************************/
84 mi_frames *gmi_thread_list_all_threads(mi_h *h)
86 mi_thread_list_all_threads(h);
87 return mi_res_frames_list(h);