summaryrefslogtreecommitdiff
path: root/Libraries/LibDebug/DebugInfo.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-25 02:14:56 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-25 02:14:56 +0100
commit1e4c01064351d2f8ce3d55a173c5022d2601ad40 (patch)
tree07397a8f13d69ea15a191a0a16e58cedd35d8a10 /Libraries/LibDebug/DebugInfo.h
parent7551a66f738ccd5f3f78e25493b46479ad50851d (diff)
downloadserenity-1e4c01064351d2f8ce3d55a173c5022d2601ad40.zip
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.
Diffstat (limited to 'Libraries/LibDebug/DebugInfo.h')
-rw-r--r--Libraries/LibDebug/DebugInfo.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/Libraries/LibDebug/DebugInfo.h b/Libraries/LibDebug/DebugInfo.h
index cb4fe30b8a..bcb5db3cbc 100644
--- a/Libraries/LibDebug/DebugInfo.h
+++ b/Libraries/LibDebug/DebugInfo.h
@@ -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;