mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 04:15:23 +03:00
Kernel: Fix some clang-tidy whines in CoreDump
This commit is contained in:
parent
53c6c29158
commit
3c9cebea6e
Notes:
sideshowbarker
2024-07-18 21:56:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3c9cebea6e4
@ -69,7 +69,7 @@ CoreDump::~CoreDump()
|
||||
RefPtr<FileDescription> CoreDump::create_target_file(const Process& process, const String& output_path)
|
||||
{
|
||||
LexicalPath lexical_path(output_path);
|
||||
auto output_directory = lexical_path.dirname();
|
||||
const auto& output_directory = lexical_path.dirname();
|
||||
auto dump_directory = VFS::the().open_directory(output_directory, VFS::the().root_custody());
|
||||
if (dump_directory.is_error()) {
|
||||
dbgln("Can't find directory '{}' for core dump", output_directory);
|
||||
@ -141,7 +141,7 @@ KResult CoreDump::write_program_headers(size_t notes_size)
|
||||
|
||||
phdr.p_type = PT_LOAD;
|
||||
phdr.p_offset = offset;
|
||||
phdr.p_vaddr = reinterpret_cast<uint32_t>(region.vaddr().as_ptr());
|
||||
phdr.p_vaddr = region.vaddr().get();
|
||||
phdr.p_paddr = 0;
|
||||
|
||||
phdr.p_filesz = region.page_count() * PAGE_SIZE;
|
||||
@ -264,8 +264,8 @@ ByteBuffer CoreDump::create_notes_regions_data() const
|
||||
info.header.type = ELF::Core::NotesEntryHeader::Type::MemoryRegionInfo;
|
||||
|
||||
auto& region = m_process->space().regions()[region_index];
|
||||
info.region_start = reinterpret_cast<uint32_t>(region.vaddr().as_ptr());
|
||||
info.region_end = reinterpret_cast<uint32_t>(region.vaddr().as_ptr() + region.size());
|
||||
info.region_start = region.vaddr().get();
|
||||
info.region_end = region.vaddr().offset(region.size()).get();
|
||||
info.program_header_index = region_index;
|
||||
|
||||
memory_region_info_buffer.append((void*)&info, sizeof(info));
|
||||
|
Loading…
Reference in New Issue
Block a user