[gdb/testsuite] Fix gdb.cp/namespace.exp with read1
[binutils-gdb.git] / gdb / cris-linux-tdep.c
blobd46f3e8464898e3c7a7045b2ab360dbbf4fb28e1
1 /* Target-dependent code for GNU/Linux on CRIS processors, for GDB.
3 Copyright (C) 2001-2024 Free Software Foundation, Inc.
5 Contributed by Axis Communications AB.
6 Written by Hendrik Ruijter, Stefan Andersson, Orjan Friberg,
7 Edgar Iglesias and Ricard Wanderlof.
9 This file is part of GDB.
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.
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.
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/>. */
24 #include "defs.h"
25 #include "osabi.h"
26 #include "linux-tdep.h"
27 #include "solib-svr4.h"
28 #include "symtab.h"
29 #include "gdbarch.h"
31 #include "cris-tdep.h"
33 static void
34 cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
36 cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
38 linux_init_abi (info, gdbarch, 0);
40 if (tdep->cris_version == 32)
41 /* Threaded debugging is only supported on CRISv32 for now. */
42 set_gdbarch_fetch_tls_load_module_address (gdbarch,
43 svr4_fetch_objfile_link_map);
45 set_solib_svr4_fetch_link_map_offsets (gdbarch,
46 linux_ilp32_fetch_link_map_offsets);
50 void _initialize_cris_linux_tdep ();
51 void
52 _initialize_cris_linux_tdep ()
54 gdbarch_register_osabi (bfd_arch_cris, 0, GDB_OSABI_LINUX,
55 cris_linux_init_abi);