diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2024-05-16 14:04:24 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-07-15 14:34:12 -0400 |
commit | 93016848f9458ebaec5a92950f7c97e66bb5732e (patch) | |
tree | 11aa3bddc44ef2f3d29569b9e370bc68944b3480 /gdb/objfiles.c | |
parent | 574b77fccb8b7420c2ae4ab758d472c75c396a33 (diff) | |
download | binutils-93016848f9458ebaec5a92950f7c97e66bb5732e.zip binutils-93016848f9458ebaec5a92950f7c97e66bb5732e.tar.gz binutils-93016848f9458ebaec5a92950f7c97e66bb5732e.tar.bz2 |
gdb: use objfile::pspace in objfile::unlink
I think it would make sense to use objfile::pspace instead of the
current program space here. It reduces the risks of calling this
method with the wrong current program space set.
Change-Id: Id4f3644719f232640c83a1c7f4aa92eaa6af6c5c
Approved-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 3d50db4..822376b 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -463,7 +463,7 @@ objfile::make (gdb_bfd_ref_ptr bfd_, const char *name_, objfile_flags flags_, void objfile::unlink () { - current_program_space->remove_objfile (this); + this->pspace ()->remove_objfile (this); } /* Free all separate debug objfile of OBJFILE, but don't free OBJFILE |