aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-spu.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-02-13 13:34:45 -0700
committerTom Tromey <tom@tromey.com>2018-02-14 08:09:53 -0700
commit692d6f9760bc67b68a5c96baac47067fd7dfa711 (patch)
tree32c976a3a03a840fd0457431758cbd9fb405dcf3 /gdb/solib-spu.c
parente0cc99a62f9ceb9a0db0b5bc28711fd8c82a6151 (diff)
downloadgdb-692d6f9760bc67b68a5c96baac47067fd7dfa711.zip
gdb-692d6f9760bc67b68a5c96baac47067fd7dfa711.tar.gz
gdb-692d6f9760bc67b68a5c96baac47067fd7dfa711.tar.bz2
Constify target_so_ops::bfd_open
This constifies the bfd_open method of struct target_so_ops. gdb/ChangeLog 2018-02-14 Tom Tromey <tom@tromey.com> * solist.h (struct target_so_ops) <bfd_open>: Make pathname const. (solib_bfd_open): Make pathname const. * solib.c (solib_bfd_open): Make pathname const. * solib-spu.c (spu_bfd_fopen): Make name const. (spu_bfd_open): Make pathname const. * solib-darwin.c (darwin_bfd_open): Make pathname const. * solib-aix.c (solib_aix_bfd_open): Make pathname const.
Diffstat (limited to 'gdb/solib-spu.c')
-rw-r--r--gdb/solib-spu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index d0d63b5..943ebf5 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -320,7 +320,7 @@ spu_bfd_iovec_stat (bfd *abfd, void *stream, struct stat *sb)
}
static gdb_bfd_ref_ptr
-spu_bfd_fopen (char *name, CORE_ADDR addr)
+spu_bfd_fopen (const char *name, CORE_ADDR addr)
{
CORE_ADDR *open_closure = XNEW (CORE_ADDR);
@@ -342,9 +342,9 @@ spu_bfd_fopen (char *name, CORE_ADDR addr)
/* Open shared library BFD. */
static gdb_bfd_ref_ptr
-spu_bfd_open (char *pathname)
+spu_bfd_open (const char *pathname)
{
- char *original_name = strrchr (pathname, '@');
+ const char *original_name = strrchr (pathname, '@');
asection *spu_name;
unsigned long long addr;
int fd;