Remove displaced_step_inferior_state::next
[external/binutils.git] / gdb / fbsd-nat.h
1 /* Native-dependent code for FreeBSD.
2
3    Copyright (C) 2004-2018 Free Software Foundation, Inc.
4
5    This file is part of GDB.
6
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 3 of the License, or
10    (at your option) any later version.
11
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.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 #ifndef FBSD_NAT_H
21 #define FBSD_NAT_H
22
23 #include "inf-ptrace.h"
24
25 #ifdef TRAP_BRKPT
26 /* MIPS does not set si_code for SIGTRAP.  sparc64 reports
27    non-standard values in si_code for SIGTRAP.  */
28 # if !defined(__mips__) && !defined(__sparc64__)
29 #  define USE_SIGTRAP_SIGINFO
30 # endif
31 #endif
32
33 /* A prototype FreeBSD target.  */
34
35 class fbsd_nat_target : public inf_ptrace_target
36 {
37 public:
38   char *pid_to_exec_file (int pid) override;
39
40   int find_memory_regions (find_memory_region_ftype func, void *data) override;
41
42   bool info_proc (const char *, enum info_proc_what) override;
43
44 #ifdef KERN_PROC_AUXV
45   enum target_xfer_status xfer_partial (enum target_object object,
46                                         const char *annex,
47                                         gdb_byte *readbuf,
48                                         const gdb_byte *writebuf,
49                                         ULONGEST offset, ULONGEST len,
50                                         ULONGEST *xfered_len) override;
51 #endif
52
53 #ifdef PT_LWPINFO
54   bool thread_alive (ptid_t ptid) override;
55   const char *pid_to_str (ptid_t) override;
56
57 #ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME
58   const char *thread_name (struct thread_info *) override;
59 #endif
60
61   void update_thread_list () override;
62
63   thread_control_capabilities get_thread_control_capabilities () override
64   { return tc_schedlock; }
65
66   void resume (ptid_t, int, enum gdb_signal) override;
67
68   ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
69
70   void post_startup_inferior (ptid_t) override;
71   void post_attach (int) override;
72
73 #ifdef USE_SIGTRAP_SIGINFO
74   bool supports_stopped_by_sw_breakpoint () override;
75   bool stopped_by_sw_breakpoint () override;
76 #endif
77
78 #ifdef TDP_RFPPWAIT
79   int follow_fork (int, int) override;
80
81   int insert_fork_catchpoint (int) override;
82   int remove_fork_catchpoint (int) override;
83
84   int insert_vfork_catchpoint (int) override;
85   int remove_vfork_catchpoint (int) override;
86 #endif
87
88 #ifdef PL_FLAG_EXEC
89   int insert_exec_catchpoint (int) override;
90   int remove_exec_catchpoint (int) override;
91 #endif
92
93 #ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
94   int set_syscall_catchpoint (int, bool, int, gdb::array_view<const int>)
95     override;
96 #endif
97 #endif /* PT_LWPINFO */
98 };
99
100 #endif /* fbsd-nat.h */