public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix siginfo C++ build error
@ 2016-02-08 18:27 Simon Marchi
  2016-02-09  2:27 ` Sergio Durigan Junior
  2016-02-09 11:19 ` Pedro Alves
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Marchi @ 2016-02-08 18:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

Change the signature of gdbserver's siginfo_fixup functions so that it's
in line with gdb's.  This gets rid of the following build error in C++:

  /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c: In function ‘int x86_siginfo_fixup(siginfo_t*, void*, int)’:
  /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:694:21: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
               FIXUP_32);
                       ^
  In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
  /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error:   initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
   int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
       ^
  /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:698:20: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
             FIXUP_X32);
                      ^
  In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
  /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error:   initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
   int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
       ^

gdb/gdbserver/ChangeLog:

	* linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
	void * to gdb_byte *.
	* linux-low.c (siginfo_fixup): Likewise.
	(linux_xfer_siginfo): Likewise.
	* linux-low.h (struct linux_target_ops) <siginfo_fixup>:
	Likewise.
	* linux-x86-low.c (x86_siginfo_fixup): Likewise.
---
 gdb/gdbserver/linux-aarch64-low.c | 2 +-
 gdb/gdbserver/linux-low.c         | 4 ++--
 gdb/gdbserver/linux-low.h         | 2 +-
 gdb/gdbserver/linux-x86-low.c     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 1cc9f59..806a762 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -431,7 +431,7 @@ ps_get_thread_area (const struct ps_prochandle *ph,
 /* Implementation of linux_target_ops method "siginfo_fixup".  */
 
 static int
-aarch64_linux_siginfo_fixup (siginfo_t *native, void *inf, int direction)
+aarch64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
 {
   /* Is the inferior 32-bit?  If so, then fixup the siginfo object.  */
   if (!is_64bit_tdesc ())
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index bce7580..8b025bd 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -5982,7 +5982,7 @@ linux_qxfer_osdata (const char *annex,
    layout of the inferiors' architecture.  */
 
 static void
-siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction)
+siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
 {
   int done = 0;
 
@@ -6006,7 +6006,7 @@ linux_xfer_siginfo (const char *annex, unsigned char *readbuf,
 {
   int pid;
   siginfo_t siginfo;
-  char inf_siginfo[sizeof (siginfo_t)];
+  gdb_byte inf_siginfo[sizeof (siginfo_t)];
 
   if (current_thread == NULL)
     return -1;
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 0d9eb40..4ec8550 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -181,7 +181,7 @@ struct linux_target_ops
      Returns true if any conversion was done; false otherwise.
      If DIRECTION is 1, then copy from INF to NATIVE.
      If DIRECTION is 0, copy from NATIVE to INF.  */
-  int (*siginfo_fixup) (siginfo_t *native, void *inf, int direction);
+  int (*siginfo_fixup) (siginfo_t *native, gdb_byte *inf, int direction);
 
   /* Hook to call when a new process is created or attached to.
      If extra per-process architecture-specific data is needed,
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index ff51a95..0c4954a 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -681,7 +681,7 @@ x86_debug_reg_state (pid_t pid)
    INF.  */
 
 static int
-x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
+x86_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
 {
 #ifdef __x86_64__
   unsigned int machine;
-- 
2.5.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix siginfo C++ build error
  2016-02-08 18:27 [PATCH] Fix siginfo C++ build error Simon Marchi
@ 2016-02-09  2:27 ` Sergio Durigan Junior
  2016-02-09  8:13   ` Tedeschi, Walfred
  2016-02-09 11:19 ` Pedro Alves
  1 sibling, 1 reply; 4+ messages in thread
From: Sergio Durigan Junior @ 2016-02-09  2:27 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches, Walfred Tedeschi

On Monday, February 08 2016, Simon Marchi wrote:

> Change the signature of gdbserver's siginfo_fixup functions so that it's
> in line with gdb's.  This gets rid of the following build error in C++:
>
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c: In function ‘int x86_siginfo_fixup(siginfo_t*, void*, int)’:
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:694:21: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
>                FIXUP_32);
>                        ^
>   In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error:   initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
>    int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
>        ^
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:698:20: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
>              FIXUP_X32);
>                       ^
>   In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error:   initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
>    int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
>        ^

This has been broken since February 2nd.  The commit that caused this
was:

  <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-cxx-build-m64/builds/1869>

Walfred, out of curiosity, did you receive an e-mail from the BuildBot
about this breakage?

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] Fix siginfo C++ build error
  2016-02-09  2:27 ` Sergio Durigan Junior
@ 2016-02-09  8:13   ` Tedeschi, Walfred
  0 siblings, 0 replies; 4+ messages in thread
From: Tedeschi, Walfred @ 2016-02-09  8:13 UTC (permalink / raw)
  To: Sergio Durigan Junior, Simon Marchi; +Cc: gdb-patches

Sergio,

Not received any e-mail. Will take a look asap.

Sorry for the inconvenience.

Regards,
-Fred

-----Original Message-----
From: Sergio Durigan Junior [mailto:sergiodj@redhat.com] 
Sent: Tuesday, February 09, 2016 3:27 AM
To: Simon Marchi
Cc: gdb-patches@sourceware.org; Tedeschi, Walfred
Subject: Re: [PATCH] Fix siginfo C++ build error

On Monday, February 08 2016, Simon Marchi wrote:

> Change the signature of gdbserver's siginfo_fixup functions so that 
> it's in line with gdb's.  This gets rid of the following build error in C++:
>
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c: In function ‘int x86_siginfo_fixup(siginfo_t*, void*, int)’:
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:694:21: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
>                FIXUP_32);
>                        ^
>   In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error:   initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
>    int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
>        ^
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:698:20: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
>              FIXUP_X32);
>                       ^
>   In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
>   /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error:   initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
>    int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
>        ^

This has been broken since February 2nd.  The commit that caused this
was:

  <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-cxx-build-m64/builds/1869>

Walfred, out of curiosity, did you receive an e-mail from the BuildBot about this breakage?

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix siginfo C++ build error
  2016-02-08 18:27 [PATCH] Fix siginfo C++ build error Simon Marchi
  2016-02-09  2:27 ` Sergio Durigan Junior
@ 2016-02-09 11:19 ` Pedro Alves
  1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2016-02-09 11:19 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 02/08/2016 06:27 PM, Simon Marchi wrote:
> Change the signature of gdbserver's siginfo_fixup functions so that it's
> in line with gdb's.  This gets rid of the following build error in C++:

Thanks, pushed to master.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-09 11:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 18:27 [PATCH] Fix siginfo C++ build error Simon Marchi
2016-02-09  2:27 ` Sergio Durigan Junior
2016-02-09  8:13   ` Tedeschi, Walfred
2016-02-09 11:19 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).