target_ops: Use bool throughout
[deliverable/binutils-gdb.git] / gdb / x86-linux-nat.h
CommitLineData
040baaf6
GB
1/* Native-dependent code for GNU/Linux x86 (i386 and x86-64).
2
e2882c85 3 Copyright (C) 1999-2018 Free Software Foundation, Inc.
040baaf6
GB
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 X86_LINUX_NAT_H
21#define X86_LINUX_NAT_H 1
22
0e2d6fa6 23#include "gdb_proc_service.h" /* For ps_err_e. */
f6ac5f3d
PA
24#include "linux-nat.h"
25#include "x86-nat.h"
26
27struct x86_linux_nat_target : public x86_nat_target<linux_nat_target>
28{
29 virtual ~x86_linux_nat_target () override = 0;
30
31 /* Override the GNU/Linux inferior startup hook. */
32 void post_startup_inferior (ptid_t) override;
33
34 /* Add the description reader. */
35 const struct target_desc *read_description () override;
36
37 struct btrace_target_info *enable_btrace (ptid_t ptid,
38 const struct btrace_config *conf) override;
39 void disable_btrace (struct btrace_target_info *tinfo) override;
40 void teardown_btrace (struct btrace_target_info *tinfo) override;
41 enum btrace_error read_btrace (struct btrace_data *data,
42 struct btrace_target_info *btinfo,
43 enum btrace_read_type type) override;
44 const struct btrace_config *btrace_conf (const struct btrace_target_info *) override;
45
46 /* These two are rewired to low_ versions. linux-nat.c queries
47 stopped-by-watchpoint info as soon as an lwp stops (via the low_
48 methods) and caches the result, to be returned via the normal
49 non-low methods. */
57810aa7 50 bool stopped_by_watchpoint () override
f6ac5f3d
PA
51 { return linux_nat_target::stopped_by_watchpoint (); }
52
57810aa7 53 bool stopped_data_address (CORE_ADDR *addr_p) override
f6ac5f3d
PA
54 { return linux_nat_target::stopped_data_address (addr_p); }
55
57810aa7 56 bool low_stopped_by_watchpoint () override
f6ac5f3d
PA
57 { return x86_nat_target::stopped_by_watchpoint (); }
58
57810aa7 59 bool low_stopped_data_address (CORE_ADDR *addr_p) override
f6ac5f3d
PA
60 { return x86_nat_target::stopped_data_address (addr_p); }
61};
0e2d6fa6 62
040baaf6
GB
63\f
64
65/* Helper for ps_get_thread_area. Sets BASE_ADDR to a pointer to
66 the thread local storage (or its descriptor) and returns PS_OK
67 on success. Returns PS_ERR on failure. */
68
69extern ps_err_e x86_linux_get_thread_area (pid_t pid, void *addr,
70 unsigned int *base_addr);
71\f
72
040baaf6
GB
73/* Add an x86 GNU/Linux target. */
74
f6ac5f3d 75extern void x86_linux_add_target (linux_nat_target *t);
040baaf6
GB
76
77#endif
This page took 0.473267 seconds and 4 git commands to generate.