Introduce program_space::remove_objfile
authorTom Tromey <tom@tromey.com>
Fri, 1 Nov 2019 22:42:29 +0000 (16:42 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 12 Dec 2019 22:50:53 +0000 (15:50 -0700)
commit234529260a90b6ac6ed38ddac45d6ed15149e8f8
treee071a1122c41679020c08c4e19bde65c1a949750
parent7cac64af7bc6a7f7a86f90a1465f7c3d2b6f07e8
Introduce program_space::remove_objfile

This introduces a new method, program_space::remove_objfile, and
changes the objfile destructor not to unlink an objfile from the
program space's list.

This is cleaner because, like the previous patch, it treats the
program space more like a container for objfiles.  Also, this makes it
possible to keep an objfile alive even though it has been unlinked
from the program space's list, which is important for processing in a
worker thread.

gdb/ChangeLog
2019-12-12  Tom Tromey  <tom@tromey.com>

* progspace.h (struct program_space) <remove_objfile>: Declare.
* progspace.c (program_space::remove_objfile): New method.
* objfiles.c (unlink_objfile): Remove.
(objfile::unlink): Call remove_objfile.
(objfile): Don't call unlink_objfile.

Change-Id: I22f768827723dce21886fae9b3664532c8349e68
gdb/ChangeLog
gdb/objfiles.c
gdb/progspace.c
gdb/progspace.h
This page took 0.02456 seconds and 4 git commands to generate.