LibDebug: Store LibDebug objects on the heap & make them non-copyable

This fixes an issue were some LibDebug objects (for example,
Dwarf::CompilationUnit) held a reference to their parent
Dwarf::DwarfInfo object, which was constructed on the stack and later
moved to the heap.
This commit is contained in:
Itamar 2021-06-18 14:31:03 +03:00 committed by Andreas Kling
commit e9e4358a93
Notes: sideshowbarker 2024-07-18 12:01:46 +09:00
7 changed files with 19 additions and 10 deletions

View file

@ -20,6 +20,9 @@
namespace Debug {
class DebugInfo {
AK_MAKE_NONCOPYABLE(DebugInfo);
AK_MAKE_NONMOVABLE(DebugInfo);
public:
explicit DebugInfo(NonnullOwnPtr<const ELF::Image>, String source_root = {}, FlatPtr base_address = 0);