mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel: Symbolicate userspace backtraces using ELFLoader.
Stash away the ELFLoader used to load an executable in Process so we can use it for symbolicating userspace addresses later on. This will make debugging userspace programs a lot nicer. :^)
This commit is contained in:
parent
e20aecefba
commit
174639b7f0
6 changed files with 56 additions and 11 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <Kernel/Thread.h>
|
||||
#include <Kernel/Lock.h>
|
||||
|
||||
class ELFLoader;
|
||||
class FileDescriptor;
|
||||
class PageDirectory;
|
||||
class Region;
|
||||
|
@ -248,6 +249,8 @@ public:
|
|||
unsigned syscall_count() const { return m_syscall_count; }
|
||||
void did_syscall() { ++m_syscall_count; }
|
||||
|
||||
const ELFLoader* elf_loader() const { return m_elf_loader.ptr(); }
|
||||
|
||||
private:
|
||||
friend class MemoryManager;
|
||||
friend class Scheduler;
|
||||
|
@ -327,6 +330,7 @@ private:
|
|||
unsigned m_syscall_count { 0 };
|
||||
|
||||
RetainPtr<ProcessTracer> m_tracer;
|
||||
OwnPtr<ELFLoader> m_elf_loader;
|
||||
|
||||
Lock m_big_lock { "Process" };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue