gdb/cris-linux-tdep.c - gdb

Functions defined

Source code

  1. /* Target-dependent code for GNU/Linux on CRIS processors, for GDB.

  2.    Copyright (C) 2001-2015 Free Software Foundation, Inc.

  3.    Contributed by Axis Communications AB.
  4.    Written by Hendrik Ruijter, Stefan Andersson, Orjan Friberg,
  5.    Edgar Iglesias and Ricard Wanderlof.

  6.    This file is part of GDB.

  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.    This program is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.

  15.    You should have received a copy of the GNU General Public License
  16.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  17. #include "defs.h"
  18. #include "osabi.h"
  19. #include "linux-tdep.h"
  20. #include "solib-svr4.h"
  21. #include "symtab.h"

  22. #include "cris-tdep.h"

  23. static void
  24. cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
  25. {
  26.   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);

  27.   linux_init_abi (info, gdbarch);

  28.   if (tdep->cris_version == 32)
  29.     /* Threaded debugging is only supported on CRISv32 for now.  */
  30.     set_gdbarch_fetch_tls_load_module_address (gdbarch,
  31.                                                svr4_fetch_objfile_link_map);

  32.   set_solib_svr4_fetch_link_map_offsets (gdbarch,
  33.                                          svr4_ilp32_fetch_link_map_offsets);

  34. }

  35. /* Provide a prototype to silence -Wmissing-prototypes.  */
  36. extern initialize_file_ftype _initialize_cris_linux_tdep;

  37. void
  38. _initialize_cris_linux_tdep (void)
  39. {
  40.   gdbarch_register_osabi (bfd_arch_cris, 0, GDB_OSABI_LINUX,
  41.                           cris_linux_init_abi);
  42. }