aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-02-22 09:47:37 -0700
committerTom Tromey <tromey@adacore.com>2021-02-22 09:47:37 -0700
commit15908a11ba92bcc30a92b70ee75e2576d915e0c1 (patch)
treed1c0d3641e03d26ae3c013956833bac05a2fc851 /gdb/solib-svr4.c
parentf53fc42716c042e560a824244fecab215ba036d1 (diff)
downloadbinutils-15908a11ba92bcc30a92b70ee75e2576d915e0c1.zip
binutils-15908a11ba92bcc30a92b70ee75e2576d915e0c1.tar.gz
binutils-15908a11ba92bcc30a92b70ee75e2576d915e0c1.tar.bz2
Change target_bfd_reopen to take a gdb_bfd_ref_ptr
While looking at Andrew's recent target sections series, I saw that target_bfd_reopen took a "bfd *", leading to a call to new_reference. However, because the only caller of target_bfd_reopen is already using gdb_bfd_ref_ptr, this code can be simplified and the explicit call to new_reference can be removed. gdb/ChangeLog 2021-02-22 Tom Tromey <tromey@adacore.com> * solib-svr4.c (enable_break): Update. * bfd-target.c (class target_bfd) <target_bfd>: Change parameter type. (target_bfd_reopen): Change parameter type. * bfd-target.h (target_bfd_reopen): Change parameter type.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 0416faa..5d0d380 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -2333,9 +2333,8 @@ enable_break (struct svr4_info *info, int from_tty)
goto bkpt_at_symbol;
/* Now convert the TMP_BFD into a target. That way target, as
- well as BFD operations can be used. target_bfd_reopen
- acquires its own reference. */
- tmp_bfd_target = target_bfd_reopen (tmp_bfd.get ());
+ well as BFD operations can be used. */
+ tmp_bfd_target = target_bfd_reopen (tmp_bfd);
/* On a running target, we can get the dynamic linker's base
address from the shared library table. */