This permits callers to search for other memory tag section types.
memtag_section_info info;
info.memtag_section = nullptr;
- while (get_next_core_memtag_section (core_bfd, info.memtag_section,
+ while (get_next_core_memtag_section (core_bfd, "memtag", info.memtag_section,
address, info))
{
size_t adjusted_length
return false;
memtag_section_info info;
- return get_next_core_memtag_section (core_bfd, nullptr, address, info);
+ return get_next_core_memtag_section (core_bfd, "memtag", nullptr, address,
+ info);
}
/* See linux-tdep.h. */
/* See memtag.h */
bool
-get_next_core_memtag_section (bfd *abfd, asection *section,
- CORE_ADDR address, memtag_section_info &info)
+get_next_core_memtag_section (bfd *abfd, const char *section_name,
+ asection *section, CORE_ADDR address,
+ memtag_section_info &info)
{
/* If the caller provided no SECTION to start from, search from the
beginning. */
if (section == nullptr)
- section = bfd_get_section_by_name (abfd, "memtag");
+ section = bfd_get_section_by_name (abfd, section_name);
/* Go through all the memtag sections and figure out if ADDRESS
falls within one of the memory ranges that contain tags. */
/* Helper function to walk through memory tag sections in a core file.
- Return TRUE if there is a "memtag" section containing ADDRESS. Return FALSE
- otherwise.
+ Return TRUE if there is a memory tag section named SECTION_NAME
+ containing ADDRESS. Return FALSE otherwise.
If SECTION is provided, search from that section onwards. If SECTION is
nullptr, then start a new search.
- If a "memtag" section containing ADDRESS is found, fill INFO with data
+ If a memory tag section containing ADDRESS is found, fill INFO with data
about such section. Otherwise leave it unchanged. */
-bool get_next_core_memtag_section (bfd *abfd, asection *section,
- CORE_ADDR address,
+bool get_next_core_memtag_section (bfd *abfd, const char *section_name,
+ asection *section, CORE_ADDR address,
memtag_section_info &info);
#endif /* MEMTAG_H */