1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:08:10 +00:00

LibELF+LibDebug: Remove use of ByteBuffer::wrap()

This commit is contained in:
Andreas Kling 2020-12-19 13:14:00 +01:00
parent 685d5f4e25
commit 7c94856c12
4 changed files with 12 additions and 13 deletions

View file

@ -40,17 +40,17 @@ DwarfInfo::DwarfInfo(NonnullRefPtr<const ELF::Loader> elf)
populate_compilation_units();
}
ByteBuffer DwarfInfo::section_data(const String& section_name)
ReadonlyBytes DwarfInfo::section_data(const String& section_name) const
{
auto section = m_elf->image().lookup_section(section_name);
if (section.is_undefined())
return {};
return section.wrapping_byte_buffer();
return section.bytes();
}
void DwarfInfo::populate_compilation_units()
{
if (m_debug_info_data.is_null())
if (!m_debug_info_data.data())
return;
InputMemoryStream stream { m_debug_info_data };