Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gdb-patches@sourceware.org
Subject: Fix gdb 8.0 compilation on Solaris
Date: Thu, 11 May 2017 11:53:00 -0000	[thread overview]
Message-ID: <ydd37cbboem.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

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.

Ok for gdb mainline (which is equally affected) and 8.0 branch?

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2017-05-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* procfs.c (procfs_create_inferior): Change prototype to match
	definition.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gdb-8.0-sol2.patch --]
[-- Type: text/x-patch, Size: 667 bytes --]

diff --git a/gdb/procfs.c b/gdb/procfs.c
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -122,8 +122,8 @@ static void procfs_pass_signals (struct 
 				 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 *,

             reply	other threads:[~2017-05-11 11:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 11:53 Rainer Orth [this message]
2017-05-11 21:16 ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ydd37cbboem.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox