This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 07/13] constify solib_add
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Tue, 22 Jul 2014 12:55:13 -0600
- Subject: [PATCH 07/13] constify solib_add
- Authentication-results: sourceware.org; auth=none
- References: <1406055319-26380-1-git-send-email-tromey at redhat dot com>
This constifies the "pattern" argument to solib_add.
2014-07-22 Tom Tromey <tromey@redhat.com>
* solib.c (solib_add): Make "pattern" const.
* solib.h (solib_add): Update.
---
gdb/ChangeLog | 5 +++++
gdb/solib.c | 2 +-
gdb/solib.h | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/solib.c b/gdb/solib.c
index e0afca0..c8f141f 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -900,7 +900,7 @@ libpthread_solib_p (struct so_list *so)
FROM_TTY and TARGET are as described for update_solib_list, above. */
void
-solib_add (char *pattern, int from_tty,
+solib_add (const char *pattern, int from_tty,
struct target_ops *target, int readsyms)
{
struct so_list *gdb;
diff --git a/gdb/solib.h b/gdb/solib.h
index 29fe8f7..4a7f56e 100644
--- a/gdb/solib.h
+++ b/gdb/solib.h
@@ -33,7 +33,7 @@ extern void clear_solib (void);
/* Called to add symbols from a shared library to gdb's symbol table. */
-extern void solib_add (char *, int, struct target_ops *, int);
+extern void solib_add (const char *, int, struct target_ops *, int);
extern int solib_read_symbols (struct so_list *, int);
/* Function to be called when the inferior starts up, to discover the
--
1.9.3