* A few more improvements to gx jit prototype.
[deliverable/binutils-gdb.git] / gdb / gdbthread.h
CommitLineData
da0baf42 1/* Multi-process/thread control defs for GDB, the GNU debugger.
87feff9d 2 Copyright 1987, 88, 89, 90, 91, 92, 1993, 1998
25286543 3
da0baf42
SG
4 Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
5 Free Software Foundation, Inc.
25286543 6
da0baf42
SG
7This file is part of GDB.
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2 of the License, or
12(at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
6c9638b4 21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25286543 22
fdfa3315
SG
23#ifndef GDBTHREAD_H
24#define GDBTHREAD_H
25286543
SG
25
26extern void init_thread_list PARAMS ((void));
27
de43d7d0 28extern void add_thread PARAMS ((int pid));
25286543 29
87feff9d
JM
30extern void delete_thread PARAMS ((int));
31
32extern int thread_id_to_pid PARAMS ((int));
33
de43d7d0
SG
34extern int in_thread_list PARAMS ((int pid));
35
36extern int pid_to_thread_id PARAMS ((int pid));
37
38extern int valid_thread_id PARAMS ((int thread));
25286543 39
88a294b1
JL
40extern void load_infrun_state PARAMS ((int, CORE_ADDR *, CORE_ADDR *, char **,
41 int *, struct breakpoint **,
42 struct breakpoint **, CORE_ADDR *,
43 CORE_ADDR *, CORE_ADDR *, int *, int *));
44
45extern void save_infrun_state PARAMS ((int, CORE_ADDR, CORE_ADDR, char *,
46 int, struct breakpoint *,
47 struct breakpoint *, CORE_ADDR,
48 CORE_ADDR, CORE_ADDR, int, int));
49
2847920a
MS
50/* Commands with a prefix of `thread'. */
51extern struct cmd_list_element *thread_cmd_list;
52
9ee59844
JM
53/* Support for external (remote) systems with threads (processes) */
54/* For example real time operating systems */
55
56#define OPAQUETHREADBYTES 8
57/* a 64 bit opaque identifier */
58typedef unsigned char threadref[OPAQUETHREADBYTES] ;
59/* WARNING: This threadref data structure comes from the remote O.S., libstub
60 protocol encoding, and remote.c. it is not particularly changable */
61
62/* Right now, the internal structure is int. We want it to be bigger.
63 Plan to fix this.
64 */
65typedef int gdb_threadref ; /* internal GDB thread reference */
66
67/* gdb_ext_thread_info is an internal GDB data structure which is
68 equivalint to the reply of the remote threadinfo packet */
69
70struct gdb_ext_thread_info
71{
72 threadref threadid ; /* External form of thread reference */
73 int active ; /* Has state interesting to GDB? , regs, stack */
74 char display[256] ; /* Brief state display, name, blocked/syspended */
75 char shortname[32] ; /* To be used to name threads */
76 char more_display[256] ; /* Long info, statistics, queue depth, whatever */
77} ;
78
79/* The volume of remote transfers can be limited by submitting
80 a mask containing bits specifying the desired information.
81 Use a union of these values as the 'selection' parameter to
82 get_thread_info. FIXME: Make these TAG names more thread specific.
83 */
84#define TAG_THREADID 1
85#define TAG_EXISTS 2
86#define TAG_DISPLAY 4
87#define TAG_THREADNAME 8
88#define TAG_MOREDISPLAY 16
89
90/* Always initialize an instance of this structure using run time assignments */
91/* Because we are likely to add entrtries to it. */
92/* Alternatly, WE COULD ADD THESE TO THE TARGET VECTOR */
93
94struct target_thread_vector
95{
96 int (*find_new_threads)PARAMS((void)) ;
97 int (*get_thread_info) PARAMS((
98 gdb_threadref * ref,
99 int selection,
100 struct gdb_ext_thread_info * info
101 )) ;
102 /* to_thread_alive - Already in the target vector */
103 /* to_switch_thread - Done via select frame */
104} ;
105
106extern void bind_target_thread_vector PARAMS((struct target_thread_vector * vec)) ;
107
108extern struct target_thread_vector * unbind_target_thread_vector(void) ;
109
110extern int target_get_thread_info PARAMS((
111 gdb_threadref * ref,
112 int selection,
113 struct gdb_ext_thread_info * info)) ;
114
115
fdfa3315 116#endif /* GDBTHREAD_H */
This page took 0.416564 seconds and 4 git commands to generate.