You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing an app which is currently built with MinGW-W64 5.3.0 on Windows. As it always goes, a need arose to see stacktrace when on crash on consumer machine. Quick Google search led me to "Printing a Stack Trace with MinGW" article. I mindlessly copied code to see if it even works (article is almost 5 years now). Indeed it does and it is quite satisfactorily for my needs.
And so I started tinkering with it. Compiling without optimizations produces satisfactory trace for my needs.
After that I decided to see if anything changes if I switch to MinGW-W64 8.1.0. Yes, some things have changed: stack trace without optimizations looks about the same, and with optimizations turned on it is a little bit better:
As of this moment, I cannot migrate to a newer version of MinGW-W64 (or to another compiler altogether).
Is it possible to get any kind of info with MinGW-W64 5.3.0? Upgrade to a newer version is planned, but it is a quite a long way away from now on still.
The text was updated successfully, but these errors were encountered:
I suspect that your code for functiion_a/b/c is inlined, so there are no stack frames to follow. Maybe using -fno-inline while keeping the rest of the optimizations helps.
The moment I noticed lack of function names, I put a no inline attribute (__attribute__ ((noinline))) and it didn't help. Just now tried also with the compile flag and nothing has changed as well.
Hello.
I am developing an app which is currently built with MinGW-W64 5.3.0 on Windows. As it always goes, a need arose to see stacktrace when on crash on consumer machine. Quick Google search led me to "Printing a Stack Trace with MinGW" article. I mindlessly copied code to see if it even works (article is almost 5 years now). Indeed it does and it is quite satisfactorily for my needs.
And so I started tinkering with it. Compiling without optimizations produces satisfactory trace for my needs.
However, the moment I turn on regular optimization level (
-O2
) all info is lost.After that I decided to see if anything changes if I switch to MinGW-W64 8.1.0. Yes, some things have changed: stack trace without optimizations looks about the same, and with optimizations turned on it is a little bit better:
As of this moment, I cannot migrate to a newer version of MinGW-W64 (or to another compiler altogether).
Is it possible to get any kind of info with MinGW-W64 5.3.0? Upgrade to a newer version is planned, but it is a quite a long way away from now on still.
The text was updated successfully, but these errors were encountered: