/* * Copyright (C) 2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/device_binary_format/elf/zebin_elf.h" #include "shared/source/utilities/arrayref.h" #include "shared/source/utilities/stackvec.h" #include #include #include #include namespace NEO { namespace Debug { struct GPUSegments { struct Segment { uintptr_t gpuAddress = std::numeric_limits::max(); ArrayRef data; }; using KernelNameToSectionIdMap = std::unordered_map; Segment varData; Segment constData; StackVec kernels; KernelNameToSectionIdMap nameToSectIdMap; }; void patch(uint64_t addr, uint64_t value, NEO::Elf::RELOC_TYPE_ZEBIN type); void patchDebugZebin(std::vector &debugZebin, const GPUSegments &segmentData); std::vector createDebugZebin(ArrayRef zebin, const GPUSegments &segmentData); std::vector getDebugZebin(ArrayRef zebin, const GPUSegments &segmentData); } // namespace Debug } // namespace NEO