]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/memtag.h
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / memtag.h
1 /* GDB generic memory tagging definitions.
2 Copyright (C) 2022-2023 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
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
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef MEMTAG_H
20 #define MEMTAG_H
21
22 #include "bfd.h"
23
24 struct memtag_section_info
25 {
26 /* The start address of the tagged memory range. */
27 CORE_ADDR start_address;
28 /* The final address of the tagged memory range. */
29 CORE_ADDR end_address;
30 /* The section containing tags for the memory range
31 [start_address, end_address). */
32 asection *memtag_section;
33 };
34
35 /* Helper function to walk through memory tag sections in a core file.
36
37 Return TRUE if there is a "memtag" section containing ADDRESS. Return FALSE
38 otherwise.
39
40 If SECTION is provided, search from that section onwards. If SECTION is
41 nullptr, then start a new search.
42
43 If a "memtag" section containing ADDRESS is found, fill INFO with data
44 about such section. Otherwise leave it unchanged. */
45
46 bool get_next_core_memtag_section (bfd *abfd, asection *section,
47 CORE_ADDR address,
48 memtag_section_info &info);
49
50 #endif /* MEMTAG_H */