GDB (xrefs)

/tmp/gdb-8.1/gdb/cris-linux-tdep.c
Go to the documentation of this file.
1 /* Target-dependent code for GNU/Linux on CRIS processors, for GDB.
2
3 Copyright (C) 2001-2018 Free Software Foundation, Inc.
4
5 Contributed by Axis Communications AB.
6 Written by Hendrik Ruijter, Stefan Andersson, Orjan Friberg,
7 Edgar Iglesias and Ricard Wanderlof.
8
9 This file is part of GDB.
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23
24 #include "defs.h"
25 #include "osabi.h"
26 #include "linux-tdep.h"
27 #include "solib-svr4.h"
28 #include "symtab.h"
29
30 #include "cris-tdep.h"
31
32 static void
33 cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
34 {
35 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
36
37 linux_init_abi (info, gdbarch);
38
39 if (tdep->cris_version == 32)
40 /* Threaded debugging is only supported on CRISv32 for now. */
41 set_gdbarch_fetch_tls_load_module_address (gdbarch,
42 svr4_fetch_objfile_link_map);
43
44 set_solib_svr4_fetch_link_map_offsets (gdbarch,
45 svr4_ilp32_fetch_link_map_offsets);
46
47 }
48
49 void
50 _initialize_cris_linux_tdep (void)
51 {
52 gdbarch_register_osabi (bfd_arch_cris, 0, GDB_OSABI_LINUX,
53 cris_linux_init_abi);
54 }
gdbarch
Definition: gdbarch.c:127
set_gdbarch_fetch_tls_load_module_address
void set_gdbarch_fetch_tls_load_module_address(struct gdbarch *gdbarch, gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
Definition: gdbarch.c:3038
GDB_OSABI_LINUX
Definition: defs.h:517
gdbarch_tdep
Definition: aarch64-tdep.h:55
linux_init_abi
void linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: linux-tdep.c:2492
svr4_ilp32_fetch_link_map_offsets
struct link_map_offsets * svr4_ilp32_fetch_link_map_offsets(void)
Definition: solib-svr4.c:3183
cris-tdep.h
defs.h
gdbarch_tdep
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
Definition: gdbarch.c:1491
cris_linux_init_abi
static void cris_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: cris-linux-tdep.c:33
svr4_fetch_objfile_link_map
CORE_ADDR svr4_fetch_objfile_link_map(struct objfile *objfile)
Definition: solib-svr4.c:1579
symtab.h
solib-svr4.h
osabi.h
set_solib_svr4_fetch_link_map_offsets
void set_solib_svr4_fetch_link_map_offsets(struct gdbarch *gdbarch, struct link_map_offsets *(*flmo)(void))
Definition: solib-svr4.c:3137
_initialize_cris_linux_tdep
void _initialize_cris_linux_tdep(void)
Definition: cris-linux-tdep.c:50
gdbarch_tdep::cris_version
unsigned int cris_version
Definition: cris-tdep.h:29
gdbarch_register_osabi
void gdbarch_register_osabi(enum bfd_architecture arch, unsigned long machine, enum gdb_osabi osabi, void(*init_osabi)(struct gdbarch_info, struct gdbarch *))
Definition: osabi.c:143
linux-tdep.h
gdbarch_info
Definition: gdbarch.h:1626