3 Copyright 1998, 2000, 2001, 2002 Red Hat, Inc.
5 This file is part of RDA, the Red Hat Debug Agent (and library).
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 Alternative licenses for RDA may be arranged by contacting Red Hat,
25 /* GDBSERV internal data structures. */
27 /* Clients/targets SHOULD NOT include this file!!!! */
34 #include "gdbserv-input.h"
35 #include "gdbserv-output.h"
36 #include "gdbserv-client.h"
37 #include "gdbserv-target.h"
39 /* The server's current state. */
42 GDBSERV_STATE_UNINITIALIZED = 0,
43 GDBSERV_STATE_RESETTING,
44 GDBSERV_STATE_RUNNING,
46 GDBSERV_STATE_EXITING,
52 struct gdbserv_input input;
53 struct gdbserv_output output;
54 struct gdbserv_target *target;
55 struct gdbserv_client *client;
57 /* Several GDBSERV objects for a stack of targets (well,
58 technically, they right now form a cycle). These links take you
59 closer TO and further FROM the target. */
63 enum gdbserv_state state;
65 /* The thread (and signal) that were supplied by the target for the
66 event that triggered the stop. */
67 struct gdbserv_thread *event_thread;
70 /* The thread for examining current state. */
71 struct gdbserv_thread *general_thread;
73 /* The thread to resume. If NULL, the entire system is resumed. */
74 struct gdbserv_thread *continue_thread;
76 /* Selected thread for thread query. */
77 struct gdbserv_thread *query_thread;
81 unsigned long program_argc;
82 unsigned long last_arg_len;
83 unsigned long last_arg_num;
88 /* Present an unpacked packet to the gdbserv state machine */
89 void gdbserv_data_packet (struct gdbserv *gdbserv);