https://gcc.gnu.org/g:59772414183d2df27efbd7bff7aaabba19e32309
commit r16-1143-g59772414183d2df27efbd7bff7aaabba19e32309 Author: Piotr Trojanek <troja...@adacore.com> Date: Thu Jan 16 17:41:56 2025 +0100 ada: Extend and clarify documentation of stack size settings for Windows The original documentation for more recent versions of Windows didn't specify whether the specified stack size acts as a "reserved" or "committed" stack size. Also, clarify the wording for older versions of Windows. gcc/ada/ChangeLog: * doc/gnat_ugn/platform_specific_information.rst (Setting Stack Size from gnatlink): Improve documentation. * gnat-style.texi: Regenerate. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Diff: --- gcc/ada/doc/gnat_ugn/platform_specific_information.rst | 7 ++++--- gcc/ada/gnat-style.texi | 4 ++-- gcc/ada/gnat_rm.texi | 14 +++++++------- gcc/ada/gnat_ugn.texi | 13 +++++++------ 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/gcc/ada/doc/gnat_ugn/platform_specific_information.rst b/gcc/ada/doc/gnat_ugn/platform_specific_information.rst index f2fc737f90d2..6493a065960d 100644 --- a/gcc/ada/doc/gnat_ugn/platform_specific_information.rst +++ b/gcc/ada/doc/gnat_ugn/platform_specific_information.rst @@ -2212,11 +2212,12 @@ Setting Stack Size from ``gnatlink`` You can specify the program stack size at link time. On most versions of Windows, starting with XP, this is mostly useful to set the size of the main stack (environment task). The other task stacks are set with -pragma Storage_Size or with the *gnatbind -d* command. +pragma Storage_Size or with the *gnatbind -d* command. The specified size will +become the reserved memory size of the underlying thread. Since very old versions of Windows (2000, NT4, etc.) don't allow setting the -reserve size of individual tasks, the link-time stack size applies to all -tasks, and pragma Storage_Size has no effect. +reserve size of individual tasks, for those versions the link-time stack size +applies to all tasks, and pragma Storage_Size has no effect. In particular, Stack Overflow checks are made against this link-time specified size. diff --git a/gcc/ada/gnat-style.texi b/gcc/ada/gnat-style.texi index dde6ec4a6e7d..0880400bd28a 100644 --- a/gcc/ada/gnat-style.texi +++ b/gcc/ada/gnat-style.texi @@ -3,7 +3,7 @@ @setfilename gnat-style.info @documentencoding UTF-8 @ifinfo -@*Generated by Sphinx 8.0.2.@* +@*Generated by Sphinx 8.2.3.@* @end ifinfo @settitle GNAT Coding Style A Guide for GNAT Developers @defindex ge @@ -19,7 +19,7 @@ @copying @quotation -GNAT Coding Style: A Guide for GNAT Developers , Jan 03, 2025 +GNAT Coding Style: A Guide for GNAT Developers , Jun 02, 2025 AdaCore diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 97469d739520..00236ee6c5ca 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -3,7 +3,7 @@ @setfilename gnat_rm.info @documentencoding UTF-8 @ifinfo -@*Generated by Sphinx 8.0.2.@* +@*Generated by Sphinx 8.2.3.@* @end ifinfo @settitle GNAT Reference Manual @defindex ge @@ -19,7 +19,7 @@ @copying @quotation -GNAT Reference Manual , Jan 03, 2025 +GNAT Reference Manual , Jun 02, 2025 AdaCore @@ -4682,8 +4682,8 @@ pragma Interrupt_State Normally certain interrupts are reserved to the implementation. Any attempt to attach an interrupt causes Program_Error to be raised, as described in RM C.3.2(22). A typical example is the @code{SIGINT} interrupt used in -many systems for an @code{Ctrl-C} interrupt. Normally this interrupt is -reserved to the implementation, so that @code{Ctrl-C} can be used to +many systems for an @code{Ctrl}-@code{C} interrupt. Normally this interrupt is +reserved to the implementation, so that @code{Ctrl}-@code{C} can be used to interrupt execution. Additionally, signals such as @code{SIGSEGV}, @code{SIGABRT}, @code{SIGFPE} and @code{SIGILL} are often mapped to specific Ada exceptions, or used to implement run-time functions such as the @@ -8837,15 +8837,15 @@ pragma Unreserve_All_Interrupts; Normally certain interrupts are reserved to the implementation. Any attempt to attach an interrupt causes Program_Error to be raised, as described in RM C.3.2(22). A typical example is the @code{SIGINT} interrupt used in -many systems for a @code{Ctrl-C} interrupt. Normally this interrupt is -reserved to the implementation, so that @code{Ctrl-C} can be used to +many systems for a @code{Ctrl}-@code{C} interrupt. Normally this interrupt is +reserved to the implementation, so that @code{Ctrl}-@code{C} can be used to interrupt execution. If the pragma @code{Unreserve_All_Interrupts} appears anywhere in any unit in a program, then all such interrupts are unreserved. This allows the program to handle these interrupts, but disables their standard functions. For example, if this pragma is used, then pressing -@code{Ctrl-C} will not automatically interrupt execution. However, +@code{Ctrl}-@code{C} will not automatically interrupt execution. However, a program can then handle the @code{SIGINT} interrupt as it chooses. For a full list of the interrupts handled in a specific implementation, diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 2579b31a7fcc..ca1d7bcc1abf 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -3,7 +3,7 @@ @setfilename gnat_ugn.info @documentencoding UTF-8 @ifinfo -@*Generated by Sphinx 8.0.2.@* +@*Generated by Sphinx 8.2.3.@* @end ifinfo @settitle GNAT User's Guide for Native Platforms @defindex ge @@ -19,7 +19,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Jan 13, 2025 +GNAT User's Guide for Native Platforms , Jun 02, 2025 AdaCore @@ -25582,11 +25582,12 @@ the breakpoint we have set. From there you can use standard You can specify the program stack size at link time. On most versions of Windows, starting with XP, this is mostly useful to set the size of the main stack (environment task). The other task stacks are set with -pragma Storage_Size or with the `gnatbind -d' command. +pragma Storage_Size or with the `gnatbind -d' command. The specified size will +become the reserved memory size of the underlying thread. Since very old versions of Windows (2000, NT4, etc.) don’t allow setting the -reserve size of individual tasks, the link-time stack size applies to all -tasks, and pragma Storage_Size has no effect. +reserve size of individual tasks, for those versions the link-time stack size +applies to all tasks, and pragma Storage_Size has no effect. In particular, Stack Overflow checks are made against this link-time specified size. @@ -29832,8 +29833,8 @@ to permit their use in free software. @printindex ge -@anchor{d2}@w{ } @anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } +@anchor{d2}@w{ } @c %**end of body @bye