3 Copyright 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 /* Structure that identifies the target process. */
32 typedef struct ps_prochandle * gdb_ps_prochandle_t;
33 typedef void * gdb_ps_read_buf_t;
34 typedef void * gdb_ps_write_buf_t;
35 typedef size_t gdb_ps_size_t;
37 extern int thread_db_noisy;
39 /* Determine if register is a member of GREGSET_T. */
40 extern int is_gp_reg (int regnum);
42 /* Determine if register is a floating point register, specifically
43 a member of FPREGSET_T. */
44 extern int is_fp_reg (int regnum);
46 /* Determine if register is an "extended register" (the meaning of which
47 is architecture and perhaps even OS or libc dependent). */
48 extern int is_extended_reg (int regnum);
50 /* Insert a register into a gregset. */
51 extern int reg_to_gregset (struct gdbserv *serv,
52 const struct gdbserv_reg *reg,
56 /* Extract a register from a gregset. */
57 extern int reg_from_gregset (struct gdbserv *serv,
58 struct gdbserv_reg *reg,
60 const GREGSET_T gregset);
62 /* Insert a register into an fpregset. */
63 extern int reg_to_fpregset (struct gdbserv *serv,
64 const struct gdbserv_reg *reg,
66 FPREGSET_T *fpregset);
68 /* Extract a register from an fpregset. */
69 extern int reg_from_fpregset (struct gdbserv *serv,
70 struct gdbserv_reg *reg,
72 const FPREGSET_T *fpregset);
74 /* Insert a register into an extended regset. */
75 extern int reg_to_xregset (struct gdbserv *serv,
76 const struct gdbserv_reg *reg,
80 /* Extract a register from an extended regset. */
81 extern int reg_from_xregset (struct gdbserv *serv,
82 struct gdbserv_reg *reg,
86 /* Software singlestep for mips. */
87 #if defined (MIPS_LINUX_TARGET) || defined (MIPS64_LINUX_TARGET)
88 extern int mips_singlestep (struct gdbserv *serv, pid_t pid, int sig);
91 /* Fetch the value of PC for debugging purposes. */
92 extern unsigned long debug_get_pc (struct gdbserv *serv, pid_t pid);
94 /* Adjust PC value after trap has been hit. */
95 extern int decr_pc_after_break (struct gdbserv *serv, pid_t pid);
98 extern int handle_waitstatus (struct child_process *process, union wait w);
101 /* read from data segment */
102 ps_err_e ps_pdread (gdb_ps_prochandle_t ph,
104 gdb_ps_read_buf_t buf,
107 /* write to data segment */
108 ps_err_e ps_pdwrite (gdb_ps_prochandle_t ph,
110 gdb_ps_write_buf_t buf,