1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibELF: Remove ELF::Loader and move everyone to ELF::Image

This commit gets rid of ELF::Loader entirely since its very ambiguous
purpose was actually to load executables for the kernel, and that is
now handled by the kernel itself.

This patch includes some drive-by cleanup in LibDebug and CrashDaemon
enabled by the fact that we no longer need to keep the ref-counted
ELF::Loader around.
This commit is contained in:
Andreas Kling 2020-12-25 02:14:56 +01:00
parent 7551a66f73
commit 1e4c010643
24 changed files with 178 additions and 318 deletions

View file

@ -33,14 +33,16 @@
#include <LibDebug/Dwarf/DIE.h>
#include <LibDebug/Dwarf/DwarfInfo.h>
#include <LibDebug/Dwarf/LineProgram.h>
#include <LibELF/Loader.h>
#include <LibELF/Image.h>
#include <sys/arch/i386/regs.h>
namespace Debug {
class DebugInfo {
public:
explicit DebugInfo(NonnullRefPtr<const ELF::Loader> elf);
explicit DebugInfo(NonnullOwnPtr<const ELF::Image>);
const ELF::Image& elf() const { return *m_elf; }
struct SourcePosition {
FlyString file_path;
@ -117,8 +119,8 @@ private:
void parse_scopes_impl(const Dwarf::DIE& die);
OwnPtr<VariableInfo> create_variable_info(const Dwarf::DIE& variable_die, const PtraceRegisters&) const;
NonnullRefPtr<const ELF::Loader> m_elf;
NonnullRefPtr<Dwarf::DwarfInfo> m_dwarf_info;
NonnullOwnPtr<const ELF::Image> m_elf;
Dwarf::DwarfInfo m_dwarf_info;
Vector<VariablesScope> m_scopes;
Vector<Dwarf::LineProgram::LineInfo> m_sorted_lines;