public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, Ada, Darwin] update traceback choice for newer darwin systems.
@ 2011-09-07  9:13 Iain Sandoe
  2011-09-07  9:34 ` Arnaud Charlet
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Sandoe @ 2011-09-07  9:13 UTC (permalink / raw)
  To: GCC Patches; +Cc: Arnaud Charlet, Mike Stump

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

This doesn't actually make any functional change to x86 darwin, but it  
does group all the darwin versions together.

Current PPC darwin (like x86) should use the GCC unwinder.

(no Ada regression on *-darwin9, x86-64-darwin10)

OK for trunk/ 4.6 when the PPC changes are in?
cheers
Iain

ada:

	* traceback.c (Darwin) USE_GCC_UNWINDER for Darwin
	versions >= 8.


[-- Attachment #2: 178637-ada-traceback-diff.txt --]
[-- Type: text/plain, Size: 1027 bytes --]

Index: gcc/ada/tracebak.c
===================================================================
--- gcc/ada/tracebak.c	(revision 178627)
+++ gcc/ada/tracebak.c	(working copy)
@@ -203,9 +203,23 @@ extern void (*Unlock_Task) (void);
 
   */
 
-/*--------------------------- PPC AIX/Darwin ----------------------------*/
+/*------------------- Darwin 8 (OSX 10.4) or newer ----------------------*/
+#if defined (__APPLE__) \
+    && defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
+    && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040
+ 
+#define USE_GCC_UNWINDER
 
-#if ((defined (_POWER) && defined (_AIX)) || \
+#if defined (__i386__) || defined (__x86_64__)
+#define PC_ADJUST -2
+#elif defined (__ppc__) || defined (__ppc64__)
+#define PC_ADJUST -4
+#else
+#error Unhandled darwin architecture.
+#endif
+
+/*------------------------ PPC AIX/Older Darwin -------------------------*/
+#elif ((defined (_POWER) && defined (_AIX)) || \
 (defined (__ppc__) && defined (__APPLE__)))
 
 #define USE_GENERIC_UNWINDER

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





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

* Re: [Patch, Ada, Darwin] update traceback choice for newer darwin systems.
  2011-09-07  9:13 [Patch, Ada, Darwin] update traceback choice for newer darwin systems Iain Sandoe
@ 2011-09-07  9:34 ` Arnaud Charlet
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaud Charlet @ 2011-09-07  9:34 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches, Mike Stump, Tristan Gingold, Nicolas Setton

> This doesn't actually make any functional change to x86 darwin, but it does
> group all the darwin versions together.
> 
> Current PPC darwin (like x86) should use the GCC unwinder.
> 
> (no Ada regression on *-darwin9, x86-64-darwin10)
> 
> OK for trunk/ 4.6 when the PPC changes are in?
> cheers
> Iain
> 
> ada:
> 
> 	* traceback.c (Darwin) USE_GCC_UNWINDER for Darwin
> 	versions >= 8.

Patch looks OK to me, thanks.

> Index: gcc/ada/tracebak.c
> ===================================================================
> 
> --- gcc/ada/tracebak.c	(revision 178627)
> +++ gcc/ada/tracebak.c	(working copy)
> @@ -203,9 +203,23 @@ extern void (*Unlock_Task) (void);
>  
>    */
>  
> -/*--------------------------- PPC AIX/Darwin
> ----------------------------*/
> +/*------------------- Darwin 8 (OSX 10.4) or newer
> ----------------------*/
> +#if defined (__APPLE__) \
> +    && defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
> +    && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040
> + 
> +#define USE_GCC_UNWINDER
>  
> -#if ((defined (_POWER) && defined (_AIX)) || \
> +#if defined (__i386__) || defined (__x86_64__)
> +#define PC_ADJUST -2
> +#elif defined (__ppc__) || defined (__ppc64__)
> +#define PC_ADJUST -4
> +#else
> +#error Unhandled darwin architecture.
> +#endif
> +
> +/*------------------------ PPC AIX/Older Darwin
> -------------------------*/
> +#elif ((defined (_POWER) && defined (_AIX)) || \
>  (defined (__ppc__) && defined (__APPLE__)))
>  
>  #define USE_GENERIC_UNWINDER

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

end of thread, other threads:[~2011-09-07  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-07  9:13 [Patch, Ada, Darwin] update traceback choice for newer darwin systems Iain Sandoe
2011-09-07  9:34 ` Arnaud Charlet

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).