[01/14] gdb: use objfile::pspace in objfile::unlink
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
fail
|
Patch failed to apply
|
Commit Message
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
---
gdb/objfiles.c | 2 +-
gdb/objfiles.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -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
@@ -439,7 +439,7 @@ struct objfile
static objfile *make (gdb_bfd_ref_ptr bfd_, const char *name_,
objfile_flags flags_, objfile *parent = nullptr);
- /* Remove an objfile from the current program space, and free
+ /* Remove this objfile from its program space's objfile list, and frees
it. */
void unlink ();