testsuite, threads: fix LD_LIBRARY_PATH in 'tls-sepdebug.exp'
[binutils-gdb.git] / gdb / memtag.h
blobb176371699cd6b0365ff56e1f092e52aa31e87b2
1 /* GDB generic memory tagging definitions.
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
4 This file is part of GDB.
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.
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.
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/>. */
19 #ifndef MEMTAG_H
20 #define MEMTAG_H
22 #include "bfd.h"
24 struct memtag_section_info
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;
35 /* Helper function to walk through memory tag sections in a core file.
37 Return TRUE if there is a "memtag" section containing ADDRESS. Return FALSE
38 otherwise.
40 If SECTION is provided, search from that section onwards. If SECTION is
41 nullptr, then start a new search.
43 If a "memtag" section containing ADDRESS is found, fill INFO with data
44 about such section. Otherwise leave it unchanged. */
46 bool get_next_core_memtag_section (bfd *abfd, asection *section,
47 CORE_ADDR address,
48 memtag_section_info &info);
50 #endif /* MEMTAG_H */