GDB (API)
/home/stan/gdb/src/gdb/cris-linux-tdep.c
Go to the documentation of this file.
00001 /* Target-dependent code for GNU/Linux on CRIS processors, for GDB.
00002 
00003    Copyright (C) 2001-2013 Free Software Foundation, Inc.
00004 
00005    Contributed by Axis Communications AB.
00006    Written by Hendrik Ruijter, Stefan Andersson, Orjan Friberg,
00007    Edgar Iglesias and Ricard Wanderlof.
00008 
00009    This file is part of GDB.
00010 
00011    This program is free software; you can redistribute it and/or modify
00012    it under the terms of the GNU General Public License as published by
00013    the Free Software Foundation; either version 3 of the License, or
00014    (at your option) any later version.
00015 
00016    This program is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019    GNU General Public License for more details.
00020 
00021    You should have received a copy of the GNU General Public License
00022    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00023 
00024 #include "defs.h"
00025 #include "osabi.h"
00026 #include "linux-tdep.h"
00027 #include "solib-svr4.h"
00028 #include "symtab.h"
00029 
00030 #include "cris-tdep.h"
00031 
00032 static void
00033 cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
00034 {
00035   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
00036 
00037   linux_init_abi (info, gdbarch);
00038 
00039   if (tdep->cris_version == 32)
00040     /* Threaded debugging is only supported on CRISv32 for now.  */
00041     set_gdbarch_fetch_tls_load_module_address (gdbarch,
00042                                                svr4_fetch_objfile_link_map);
00043 
00044   set_solib_svr4_fetch_link_map_offsets (gdbarch,
00045                                          svr4_ilp32_fetch_link_map_offsets);
00046 
00047 }
00048 
00049 /* Provide a prototype to silence -Wmissing-prototypes.  */
00050 extern initialize_file_ftype _initialize_cris_linux_tdep;
00051 
00052 void
00053 _initialize_cris_linux_tdep (void)
00054 {
00055   gdbarch_register_osabi (bfd_arch_cris, 0, GDB_OSABI_LINUX,
00056                           cris_linux_init_abi);
00057 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines