aarch64-newlib-tdep.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Target-dependent code for Newlib AArch64.
  2. Copyright (C) 2011-2022 Free Software Foundation, Inc.
  3. Contributed by ARM Ltd.
  4. This file is part of GDB.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #include "defs.h"
  16. #include "gdbarch.h"
  17. #include "aarch64-tdep.h"
  18. #include "osabi.h"
  19. /* Implement the 'init_osabi' method of struct gdb_osabi_handler. */
  20. static void
  21. aarch64_newlib_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
  22. {
  23. aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
  24. /* Jump buffer - support for longjmp.
  25. Offset of original PC in jump buffer (in registers). */
  26. tdep->jb_pc = 11;
  27. }
  28. void _initialize_aarch64_newlib_tdep ();
  29. void
  30. _initialize_aarch64_newlib_tdep ()
  31. {
  32. gdbarch_register_osabi (bfd_arch_aarch64, 0, GDB_OSABI_NEWLIB,
  33. aarch64_newlib_init_abi);
  34. }