Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] fix build breakage on arm-none-eabi
@ 2009-01-08 18:21 Nathan Froyd
  2009-01-08 19:11 ` Stan Shebs
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Froyd @ 2009-01-08 18:21 UTC (permalink / raw)
  To: gdb-patches

This patch:

  http://sourceware.org/ml/gdb-patches/2009-01/msg00063.html

breaks compilation on arm-none-eabi:

/scratch/froydnj/fsf/armeabi/obj/gdb-src-mainline-0-arm-none-eabi-i686-pc-linux-gnu/gdb/remote-sim.c: In function `init_callbacks':
/scratch/froydnj/fsf/armeabi/obj/gdb-src-mainline-0-arm-none-eabi-i686-pc-linux-gnu/gdb/remote-sim.c:169: warning: assignment makes qualified function pointer from unqualified

The patch below fixes compilation.  sim/common/callback.c calls exit, so
I figured it was fair to make gdb_os_error call exit as well.

OK to commit?

-Nathan

2009-01-08  Nathan Froyd  <froydnj@codesourcery.com>

	* remote-sim.c (gdb_os_error): Mark as a noreturn function.
	Call exit to make it obvious to GCC.

Index: remote-sim.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sim.c,v
retrieving revision 1.81
diff -u -u -r1.81 remote-sim.c
--- remote-sim.c	3 Jan 2009 05:57:53 -0000	1.81
+++ remote-sim.c	8 Jan 2009 18:20:26 -0000
@@ -70,7 +70,11 @@
 
 static void gdb_os_evprintf_filtered (host_callback *, const char *, va_list);
 
-static void gdb_os_error (host_callback *, const char *, ...);
+static void gdb_os_error (host_callback *, const char *, ...)
+#ifdef __GNUC__
+  __attribute__ ((__noreturn__))
+#endif
+  ;
 
 static void gdbsim_fetch_register (struct regcache *regcache, int regno);
 
@@ -273,6 +277,7 @@
       verror (format, args);
       va_end (args);
     }
+  exit (1);
 }
 
 int


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

* Re: [PATCH] fix build breakage on arm-none-eabi
  2009-01-08 18:21 [PATCH] fix build breakage on arm-none-eabi Nathan Froyd
@ 2009-01-08 19:11 ` Stan Shebs
  2009-01-08 19:20   ` Nathan Froyd
  0 siblings, 1 reply; 3+ messages in thread
From: Stan Shebs @ 2009-01-08 19:11 UTC (permalink / raw)
  To: gdb-patches

Nathan Froyd wrote:
> This patch:
>
>   http://sourceware.org/ml/gdb-patches/2009-01/msg00063.html
>
> breaks compilation on arm-none-eabi:
>
> /scratch/froydnj/fsf/armeabi/obj/gdb-src-mainline-0-arm-none-eabi-i686-pc-linux-gnu/gdb/remote-sim.c: In function `init_callbacks':
> /scratch/froydnj/fsf/armeabi/obj/gdb-src-mainline-0-arm-none-eabi-i686-pc-linux-gnu/gdb/remote-sim.c:169: warning: assignment makes qualified function pointer from unqualified
>
> The patch below fixes compilation.  sim/common/callback.c calls exit, so
> I figured it was fair to make gdb_os_error call exit as well.
>
> OK to commit?
>   
This is good, thanks! (I ran into it in a checkout yesterday too.)

Stan
> -Nathan
>
> 2009-01-08  Nathan Froyd  <froydnj@codesourcery.com>
>
> 	* remote-sim.c (gdb_os_error): Mark as a noreturn function.
> 	Call exit to make it obvious to GCC.
>
> Index: remote-sim.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote-sim.c,v
> retrieving revision 1.81
> diff -u -u -r1.81 remote-sim.c
> --- remote-sim.c	3 Jan 2009 05:57:53 -0000	1.81
> +++ remote-sim.c	8 Jan 2009 18:20:26 -0000
> @@ -70,7 +70,11 @@
>  
>  static void gdb_os_evprintf_filtered (host_callback *, const char *, va_list);
>  
> -static void gdb_os_error (host_callback *, const char *, ...);
> +static void gdb_os_error (host_callback *, const char *, ...)
> +#ifdef __GNUC__
> +  __attribute__ ((__noreturn__))
> +#endif
> +  ;
>  
>  static void gdbsim_fetch_register (struct regcache *regcache, int regno);
>  
> @@ -273,6 +277,7 @@
>        verror (format, args);
>        va_end (args);
>      }
> +  exit (1);
>  }
>  
>  int
>
>   


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

* Re: [PATCH] fix build breakage on arm-none-eabi
  2009-01-08 19:11 ` Stan Shebs
@ 2009-01-08 19:20   ` Nathan Froyd
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Froyd @ 2009-01-08 19:20 UTC (permalink / raw)
  To: gdb-patches

On Thu, Jan 08, 2009 at 11:11:42AM -0800, Stan Shebs wrote:
> Nathan Froyd wrote:
> >The patch below fixes compilation.  sim/common/callback.c calls exit, so
> >I figured it was fair to make gdb_os_error call exit as well.
> >  
> This is good, thanks! (I ran into it in a checkout yesterday too.)

Thanks.  Pedro alerted me to the presence of ATTR_NORETURN; this is what
I committed instead.

-Nathan

Index: remote-sim.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sim.c,v
retrieving revision 1.81
diff -u -r1.81 remote-sim.c
--- remote-sim.c	3 Jan 2009 05:57:53 -0000	1.81
+++ remote-sim.c	8 Jan 2009 19:17:17 -0000
@@ -70,7 +70,7 @@
 
 static void gdb_os_evprintf_filtered (host_callback *, const char *, va_list);
 
-static void gdb_os_error (host_callback *, const char *, ...);
+static void gdb_os_error (host_callback *, const char *, ...) ATTR_NORETURN;
 
 static void gdbsim_fetch_register (struct regcache *regcache, int regno);
 
@@ -273,6 +273,7 @@
       verror (format, args);
       va_end (args);
     }
+  exit (1);
 }
 
 int


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

end of thread, other threads:[~2009-01-08 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-08 18:21 [PATCH] fix build breakage on arm-none-eabi Nathan Froyd
2009-01-08 19:11 ` Stan Shebs
2009-01-08 19:20   ` Nathan Froyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox