1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:38:12 +00:00

Kernel: Set the absolute path as name for executable regions.

This commit is contained in:
Andreas Kling 2019-06-01 17:50:22 +02:00
parent 2e14e5891c
commit 00f291b090

View file

@ -333,13 +333,8 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
ProcessPagingScope paging_scope(*this); ProcessPagingScope paging_scope(*this);
auto vmo = VMObject::create_file_backed(descriptor->inode()); auto vmo = VMObject::create_file_backed(descriptor->inode());
#if 0
// FIXME: I would like to do this, but it would instantiate all the damn inodes.
vmo->set_name(descriptor->absolute_path()); vmo->set_name(descriptor->absolute_path());
#else RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), metadata.size, vmo.copy_ref(), 0, vmo->name(), PROT_READ);
vmo->set_name("ELF image");
#endif
RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), metadata.size, vmo.copy_ref(), 0, "executable", PROT_READ);
ASSERT(region); ASSERT(region);
if (this != &current->process()) { if (this != &current->process()) {