diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-18 11:53:00 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-18 11:53:00 +0200 |
commit | 0877856b4ea175fe9d5339752124a2b4faf929ea (patch) | |
tree | 3d9032a0797e7fdf2282a10a3eb70fe86bfbd5d6 /gcc/ada/sysdep.c | |
parent | a780db15307e718218f39f753eebe20689fa1e30 (diff) | |
download | gcc-0877856b4ea175fe9d5339752124a2b4faf929ea.zip gcc-0877856b4ea175fe9d5339752124a2b4faf929ea.tar.gz gcc-0877856b4ea175fe9d5339752124a2b4faf929ea.tar.bz2 |
[multiple changes]
2010-10-18 Arnaud Charlet <charlet@adacore.com>
* g-comlin.adb (Get_Switches): Prevent dereferencing null Config.
2010-10-18 Robert Dewar <dewar@adacore.com>
* aspects.ads, aspects.adb: Add entries for aspects
Read/Write/Input/Output.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for
handling aspects Read/Write/Input/Output.
2010-10-18 Robert Dewar <dewar@adacore.com>
* sem_util.adb (Note_Possible_Modification): Do not give warning for
use of pragma Unmodified unless we are sure this is a modification.
2010-10-18 Tristan Gingold <gingold@adacore.com>
* sysdep.c: Add __gnat_get_stack_bounds.
* s-taprop-mingw.adb Call __gnat_get_stack_bounds to set Pri_Stack_Info.
2010-10-18 Robert Dewar <dewar@adacore.com>
* a-assert.ads: Fix bad name in header.
* sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch10.adb: Minor
reformatting.
* exp_aggr.adb: Fix typo in comment.
From-SVN: r165615
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 49d2f83..1961288 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -235,7 +235,7 @@ winflush_nt (void) /* Does nothing as there is no problem under NT. */ } -#else +#else /* !RTX */ static void winflush_init (void); @@ -301,9 +301,27 @@ __gnat_is_windows_xp (void) return is_win_xp; } -#endif +#endif /* !RTX */ -#endif +/* Get the bounds of the stack. The stack pointer is supposed to be + initialized to BASE when a thread is created and the stack can be extended + to LIMIT before reaching a guard page. + Note: for the main thread, the system automatically extend the stack, so + LIMIT is only the current limit. */ + +void +__gnat_get_stack_bounds (void **base, void **limit) +{ + NT_TIB *tib; + + /* We know that the first field of the TEB is the TIB. */ + tib = (NT_TIB *)NtCurrentTeb (); + + *base = tib->StackBase; + *limit = tib->StackLimit; +} + +#endif /* !__MINGW32__ */ #else |