regtest: add a fdleak filter for write on write on linux arm64
[valgrind.git] / coregrind / pub_core_basics.h
blobabc5a066a3e3de68b80673e2f9e3d4d0fe8127a5
2 /*--------------------------------------------------------------------*/
3 /*--- Header included by every core C file. pub_core_basics.h ---*/
4 /*--------------------------------------------------------------------*/
6 /*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
10 Copyright (C) 2000-2017 Julian Seward
11 jseward@acm.org
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 The GNU General Public License is contained in the file COPYING.
29 #ifndef __PUB_CORE_BASICS_H
30 #define __PUB_CORE_BASICS_H
32 //--------------------------------------------------------------------
33 // PURPOSE: This header should be imported by every single C file
34 // in the core. It contains the basic types and other things needed
35 // everywhere.
36 //--------------------------------------------------------------------
38 #include "pub_tool_basics.h"
40 /* ---------------------------------------------------------------------
41 A struct to hold starting values for stack unwinding.
42 ------------------------------------------------------------------ */
44 /* This really shouldn't be here. But putting it elsewhere leads to a
45 veritable swamp of new module cycles. */
47 /* To support CFA-based stack unwinding, and stack unwinding in
48 general, we need to be able to get hold of the values of specific
49 registers, in order to start the unwinding process. This is
50 unavoidably arch and platform dependent. Here is a struct which
51 holds the relevant values. All platforms must have a program
52 counter and a stack pointer register, but the other fields (frame
53 pointer? link register? misc other regs?) are ad-hoc. Note, the
54 common fields are 64-bit, so as to make this host-independent. */
56 typedef
57 struct {
58 ULong r_pc; /* x86:EIP, amd64:RIP, ppc:CIA, arm:R15, mips:pc */
59 ULong r_sp; /* x86:ESP, amd64:RSP, ppc:R1, arm:R13, mips:sp */
60 union {
61 struct {
62 UInt r_ebp;
63 } X86;
64 struct {
65 ULong r_rbp;
66 } AMD64;
67 struct {
68 UInt r_lr;
69 } PPC32;
70 struct {
71 ULong r_lr;
72 } PPC64;
73 struct {
74 UInt r14;
75 UInt r12;
76 UInt r11;
77 UInt r7;
78 } ARM;
79 struct {
80 ULong x29; /* FP */
81 ULong x30; /* LR */
82 } ARM64;
83 struct {
84 ULong r_fp;
85 ULong r_lr;
86 ULong r_f0;
87 ULong r_f1;
88 ULong r_f2;
89 ULong r_f3;
90 ULong r_f4;
91 ULong r_f5;
92 ULong r_f6;
93 ULong r_f7;
94 } S390X;
95 struct {
96 UInt r30; /* Stack frame pointer or subroutine variable */
97 UInt r31; /* Return address of the last subroutine call */
98 UInt r28;
99 } MIPS32;
100 struct {
101 ULong r30; /* Stack frame pointer or subroutine variable */
102 ULong r31; /* Return address of the last subroutine call */
103 ULong r28;
104 } MIPS64;
105 } misc;
107 UnwindStartRegs;
110 #endif // __PUB_CORE_BASICS_H
112 /*--------------------------------------------------------------------*/
113 /*--- end ---*/
114 /*--------------------------------------------------------------------*/