mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibCoreDump: CoreDumpReader => CoreDump::Reader
As mentioned in 2d39da5
the usual pattern is that LibFoo provides a Foo
namespace - LibCoreDump doesn't, so this renames CoreDumpReader to
Reader and puts it in the CoreDump namespace. :^)
This commit is contained in:
parent
1ed72cc580
commit
8ec1da2fca
5 changed files with 34 additions and 26 deletions
|
@ -32,7 +32,7 @@
|
|||
#include <AK/QuickSort.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCoreDump/CoreDumpReader.h>
|
||||
#include <LibCoreDump/Reader.h>
|
||||
#include <LibELF/Image.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -95,7 +95,7 @@ static String symbolicate(FlatPtr eip, const ELF::Core::MemoryRegionInfo* region
|
|||
return String::format("[%s] %s", name.characters(), lib_data->lib_elf.symbolicate(eip - region->region_start, &offset).characters());
|
||||
}
|
||||
|
||||
static String symbolicate_from_coredump(CoreDumpReader& coredump, u32 ptr, [[maybe_unused]] u32& offset)
|
||||
static String symbolicate_from_coredump(CoreDump::Reader& coredump, u32 ptr, [[maybe_unused]] u32& offset)
|
||||
{
|
||||
auto* region = coredump.region_containing((FlatPtr)ptr);
|
||||
if (!region) {
|
||||
|
@ -277,7 +277,7 @@ Result<NonnullOwnPtr<Profile>, String> Profile::load_from_perfcore_file(const St
|
|||
auto& object = json.value().as_object();
|
||||
auto executable_path = object.get("executable").to_string();
|
||||
|
||||
auto coredump = CoreDumpReader::create(String::formatted("/tmp/profiler_coredumps/{}", object.get("pid").as_u32()));
|
||||
auto coredump = CoreDump::Reader::create(String::formatted("/tmp/profiler_coredumps/{}", object.get("pid").as_u32()));
|
||||
if (!coredump)
|
||||
return String { "Could not open coredump" };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue