aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2017-05-15 14:43:15 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2017-05-15 14:43:15 +0200
commit5f2ad7a3c73fcec0a7891794eb5aade73bac8523 (patch)
tree8fbcee6da6de126d7cc2b53279c6e30fbf1032da /gdb
parent786e3eba7915df35df1d98a300e06f757336c75b (diff)
downloadgdb-5f2ad7a3c73fcec0a7891794eb5aade73bac8523.zip
gdb-5f2ad7a3c73fcec0a7891794eb5aade73bac8523.tar.gz
gdb-5f2ad7a3c73fcec0a7891794eb5aade73bac8523.tar.bz2
Fix gdb procfs.c compilation on Solaris
Prompted by the creation of the gdb 8.0 branch, I tried to build it on x86_64-pc-solaris2.12, but failed: /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/procfs.c: In function `target_ops* procfs_target()': /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/procfs.c:186:27: error: invalid conversion from `void (*)(target_ops*, char*, char*, char**, int)' to `void (*)(target_ops*, const char*, const string&, char**, int) {aka void (*)(target_ops*, const char*, const std::__cxx11::basic_string<char>&, char**, int)}' [-fpermissive] t->to_create_inferior = procfs_create_inferior; ^~~~~~~~~~~~~~~~~~~~~~ /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/procfs.c: At global scope: /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/procfs.c:125:13: warning: `void procfs_create_inferior(target_ops*, char*, char*, char**, int)' declared `static' but never defined [-Wunused-function] static void procfs_create_inferior (struct target_ops *, char *, ^~~~~~~~~~~~~~~~~~~~~~ /vol/src/gnu/gdb/gdb-8.0-branch/local/gdb/procfs.c:4529:1: warning: `void procfs_create_inferior(target_ops*, const char*, const string&, char**, int)' defined but not used [-Wunused-function] procfs_create_inferior (struct target_ops *ops, const char *exec_file, ^~~~~~~~~~~~~~~~~~~~~~ This can easily be fixed by the following patch. * procfs.c (procfs_create_inferior): Change prototype to match definition.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/procfs.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8c07086..980bd3f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * procfs.c (procfs_create_inferior): Change prototype to match
+ definition.
+
2017-05-13 Eli Zaretskii <eliz@gnu.org>
* tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 5d940dd..adb2e84 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -122,8 +122,8 @@ static void procfs_pass_signals (struct target_ops *self,
int, unsigned char *);
static void procfs_kill_inferior (struct target_ops *ops);
static void procfs_mourn_inferior (struct target_ops *ops);
-static void procfs_create_inferior (struct target_ops *, char *,
- char *, char **, int);
+static void procfs_create_inferior (struct target_ops *, const char *,
+ const std::string &, char **, int);
static ptid_t procfs_wait (struct target_ops *,
ptid_t, struct target_waitstatus *, int);
static enum target_xfer_status procfs_xfer_memory (gdb_byte *,