mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
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:
parent
edd79ddd00
commit
e9e4358a93
7 changed files with 19 additions and 10 deletions
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "AbbreviationsMap.h"
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Debug::Dwarf {
|
||||
|
@ -15,6 +16,9 @@ class DwarfInfo;
|
|||
class DIE;
|
||||
|
||||
class CompilationUnit {
|
||||
AK_MAKE_NONCOPYABLE(CompilationUnit);
|
||||
AK_MAKE_NONMOVABLE(CompilationUnit);
|
||||
|
||||
public:
|
||||
CompilationUnit(const DwarfInfo& dwarf_info, u32 offset, const CompilationUnitHeader&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue