GDB (xrefs)
Loading...
Searching...
No Matches
aarch64-ravenscar-thread.c
Go to the documentation of this file.
1/* Ravenscar Aarch64 target support.
2
3 Copyright (C) 2017-2023 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#include "defs.h"
21#include "gdbcore.h"
22#include "regcache.h"
23#include "aarch64-tdep.h"
24#include "inferior.h"
25#include "ravenscar-thread.h"
27#include "gdbarch.h"
28
29#define NO_OFFSET -1
30
31/* See aarch64-tdep.h for register numbers. */
32
33static const int aarch64_context_offsets[] =
34{
35 /* X0 - X28 */
41 8, 16, 24, 32,
42 40, 48, 56, 64,
43 72,
44
45 /* FP, LR, SP, PC, CPSR */
46 /* Note that as task switch is synchronous, PC is in fact the LR here */
47 80, 88, 96, 88,
49
50 /* V0 - V31 */
51 128, 144, 160, 176,
52 192, 208, 224, 240,
53 256, 272, 288, 304,
54 320, 336, 352, 368,
55 384, 400, 416, 432,
56 448, 464, 480, 496,
57 512, 528, 544, 560,
58 576, 592, 608, 624,
59
60 /* FPSR, FPCR */
61 112, 116,
62};
63
64#define V_INIT_OFFSET 640
65
66/* The ravenscar_arch_ops vector for most Aarch64 targets. */
67
70 -1, -1,
72 /* The FPU context buffer starts with the FPSR register. */
75
76/* Register aarch64_ravenscar_ops in GDBARCH. */
77
78void
#define V_INIT_OFFSET
static const int aarch64_context_offsets[]
#define NO_OFFSET
void register_aarch64_ravenscar_ops(struct gdbarch *gdbarch)
static struct ravenscar_arch_ops aarch64_ravenscar_ops(aarch64_context_offsets, -1, -1, V_INIT_OFFSET, aarch64_context_offsets[AARCH64_FPSR_REGNUM], AARCH64_V0_REGNUM, AARCH64_FPCR_REGNUM)
@ AARCH64_FPSR_REGNUM
Definition aarch64.h:125
@ AARCH64_FPCR_REGNUM
Definition aarch64.h:126
@ AARCH64_V0_REGNUM
Definition aarch64.h:121
void set_gdbarch_ravenscar_ops(struct gdbarch *gdbarch, struct ravenscar_arch_ops *ravenscar_ops)
Definition gdbarch.c:5099