Use unique_ptr for objfiles
A while back, I changed objfiles to be held via a shared_ptr. The idea at the time was that this was a step toward writing to the index cache in the background, and this would let gdb keep a reference alive to do so. However, since then we've rewritten the DWARF reader, and the new index can do this without requiring a shared pointer -- in fact there are patches pending to implement this. This patch switches objfile management to unique_ptr, which makes more sense now. Regression tested on x86-64 Fedora 34.
This commit is contained in:
parent
ebad7c6613
commit
e2904e1ff0
4 changed files with 9 additions and 11 deletions
|
@ -409,7 +409,7 @@ public:
|
|||
remove it from the program space's list. In some cases, you may
|
||||
need to hold a reference to an objfile that is independent of its
|
||||
existence on the program space's list; for this case, the
|
||||
destructor must be public so that shared_ptr can reference
|
||||
destructor must be public so that unique_ptr can reference
|
||||
it. */
|
||||
~objfile ();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue