From 992f1ddc3be1f5195f18beaa801ac50f284b10c5 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 20 Dec 2016 17:07:19 +0000 Subject: gdb: Constify solib_find gdb/ChangeLog: 2016-12-20 Pedro Alves * nto-tdep.c (nto_find_and_open_solib): Constify 'solib' parameter. * nto-tdep.h (nto_find_and_open_solib): Constify 'solib' parameter. * solib.c (solib_find_1, exec_file_find, solib_find): Constify in_pathname' parameter. * solist.h (struct target_so_ops) : Constify 'soname' parameter. (exec_file_find, solib_find): Constify 'in_pathname' parameter. --- gdb/solib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/solib.c') diff --git a/gdb/solib.c b/gdb/solib.c index c4b2cdc..82214d0 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -152,7 +152,7 @@ show_solib_search_path (struct ui_file *file, int from_tty, */ static char * -solib_find_1 (char *in_pathname, int *fd, int is_solib) +solib_find_1 (const char *in_pathname, int *fd, int is_solib) { const struct target_so_ops *ops = solib_ops (target_gdbarch ()); int found_file = -1; @@ -383,7 +383,7 @@ solib_find_1 (char *in_pathname, int *fd, int is_solib) file handle for the main executable. */ char * -exec_file_find (char *in_pathname, int *fd) +exec_file_find (const char *in_pathname, int *fd) { char *result; const char *fskind = effective_target_file_system_kind (); @@ -434,7 +434,7 @@ exec_file_find (char *in_pathname, int *fd) above. */ char * -solib_find (char *in_pathname, int *fd) +solib_find (const char *in_pathname, int *fd) { const char *solib_symbols_extension = gdbarch_solib_symbols_extension (target_gdbarch ()); @@ -443,7 +443,7 @@ solib_find (char *in_pathname, int *fd) extension. */ if (solib_symbols_extension != NULL) { - char *p = in_pathname + strlen (in_pathname); + const char *p = in_pathname + strlen (in_pathname); while (p > in_pathname && *p != '.') p--; -- cgit v1.1