[PATCH] Cygwin: Raise dumpstack frame limit to 32

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Cygwin: Raise dumpstack frame limit to 32

Mark Geisert
Create a #define for the limit and raise it from 16 to 32.
---
 winsup/cygwin/exceptions.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 132fea427..3e7d7275c 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -42,6 +42,7 @@ details. */
 
 #define CALL_HANDLER_RETRY_OUTER 10
 #define CALL_HANDLER_RETRY_INNER 10
+#define DUMPSTACK_FRAME_LIMIT    32
 
 PWCHAR debugger_command;
 extern uint8_t _sigbe;
@@ -382,7 +383,7 @@ cygwin_exception::dumpstack ()
 #else
       small_printf ("Stack trace:\r\nFrame     Function  Args\r\n");
 #endif
-      for (i = 0; i < 16 && thestack++; i++)
+      for (i = 0; i < DUMPSTACK_FRAME_LIMIT && thestack++; i++)
  {
   small_printf (_AFMT "  " _AFMT, thestack.sf.AddrFrame.Offset,
  thestack.sf.AddrPC.Offset);
@@ -392,7 +393,8 @@ cygwin_exception::dumpstack ()
   small_printf (")\r\n");
  }
       small_printf ("End of stack trace%s\n",
-    i == 16 ? " (more stack frames may be present)" : "");
+    i == DUMPSTACK_FRAME_LIMIT ?
+        " (more stack frames may be present)" : "");
       if (h)
  NtClose (h);
     }
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: Raise dumpstack frame limit to 32

Corinna Vinschen-2
On Nov  7 16:13, Mark Geisert wrote:

> Create a #define for the limit and raise it from 16 to 32.
> ---
>  winsup/cygwin/exceptions.cc | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
> index 132fea427..3e7d7275c 100644
> --- a/winsup/cygwin/exceptions.cc
> +++ b/winsup/cygwin/exceptions.cc
> @@ -42,6 +42,7 @@ details. */
>  
>  #define CALL_HANDLER_RETRY_OUTER 10
>  #define CALL_HANDLER_RETRY_INNER 10
> +#define DUMPSTACK_FRAME_LIMIT    32
>  
>  PWCHAR debugger_command;
>  extern uint8_t _sigbe;
> @@ -382,7 +383,7 @@ cygwin_exception::dumpstack ()
>  #else
>        small_printf ("Stack trace:\r\nFrame     Function  Args\r\n");
>  #endif
> -      for (i = 0; i < 16 && thestack++; i++)
> +      for (i = 0; i < DUMPSTACK_FRAME_LIMIT && thestack++; i++)
>   {
>    small_printf (_AFMT "  " _AFMT, thestack.sf.AddrFrame.Offset,
>   thestack.sf.AddrPC.Offset);
> @@ -392,7 +393,8 @@ cygwin_exception::dumpstack ()
>    small_printf (")\r\n");
>   }
>        small_printf ("End of stack trace%s\n",
> -    i == 16 ? " (more stack frames may be present)" : "");
> +    i == DUMPSTACK_FRAME_LIMIT ?
> +        " (more stack frames may be present)" : "");
>        if (h)
>   NtClose (h);
>      }
> --
> 2.21.0
Pushed, including the release msg patch.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment