aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-12-20 17:07:19 +0000
committerPedro Alves <palves@redhat.com>2016-12-20 17:07:19 +0000
commit992f1ddc3be1f5195f18beaa801ac50f284b10c5 (patch)
treee2f66588b82457a9f1066212766f920b6e0db65a /gdb/solib.c
parent2693a26216c329bd7ec2aae7743409f572de4fa5 (diff)
gdb: Constify solib_find
gdb/ChangeLog: 2016-12-20 Pedro Alves <palves@redhat.com> * 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) <find_and_open_solib>: Constify 'soname' parameter. (exec_file_find, solib_find): Constify 'in_pathname' parameter.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index c4b2cdc40e..82214d01dd 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--;