1 /* Internal interfaces for the GNU/Linux specific target code for gdbserver.
2 Copyright 2002, Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #ifdef HAVE_LINUX_REGSETS
22 typedef void (*regset_fill_func
) (void *);
23 typedef void (*regset_store_func
) (const void *);
32 int get_request
, set_request
;
34 enum regset_type type
;
35 regset_fill_func fill_function
;
36 regset_store_func store_function
;
38 extern struct regset_info target_regsets
[];
41 struct linux_target_ops
45 int (*cannot_fetch_register
) (int);
47 /* Returns 0 if we can store the register, 1 if we can not
48 store the register, and 2 if failure to store the register
50 int (*cannot_store_register
) (int);
51 CORE_ADDR (*get_pc
) (void);
52 void (*set_pc
) (CORE_ADDR newpc
);
53 const char *breakpoint
;
55 CORE_ADDR (*breakpoint_reinsert_addr
) (void);
58 int decr_pc_after_break
;
59 int (*breakpoint_at
) (CORE_ADDR pc
);
62 extern struct linux_target_ops the_low_target
;
64 #define get_process(inf) ((struct process_info *)(inf))
65 #define get_thread_process(thr) (get_process (inferior_target_data (thr)))
66 #define get_process_thread(proc) ((struct thread_info *) \
67 find_inferior_id (&all_threads, \
68 get_process (proc)->tid))
72 struct inferior_list_entry head
;
77 /* If this flag is set, the next SIGSTOP will be ignored (the process will
78 be immediately resumed). */
81 /* If this flag is set, the process is known to be stopped right now (stop
82 event already received in a wait()). */
85 /* If this flag is set, we have sent a SIGSTOP to this process and are
86 waiting for it to stop. */
89 /* If this flag is set, STATUS_PENDING is a waitstatus that has not yet
94 /* If this flag is set, the pending status is a (GDB-placed) breakpoint. */
95 int pending_is_breakpoint
;
96 CORE_ADDR pending_stop_pc
;
98 /* If this is non-zero, it is a breakpoint to be reinserted at our next
99 stop (SIGTRAP stops only). */
100 CORE_ADDR bp_reinsert
;
102 /* If this flag is set, the last continue operation on this process
103 was a single-step. */
106 /* If this is non-zero, it points to a chain of signals which need to
107 be delivered to this process. */
108 struct pending_signals
*pending_signals
;
110 extern struct inferior_list all_processes
;
112 void linux_attach_lwp (int pid
, int tid
);
114 int thread_db_init (void);