Hello,

I'm trying to use mingw and gfortran to allow me to develop and compile on
windows instead of just on linux.  On my windows computer, I installed
msys2 and then the mingw-w64_x86_64 version of the compilers (gcc,
gfortran, 9.3.0).  I can compile and run both in native widows and in the
mingw64.exe console.  My code seems to behave as I expect.

My problem is that backtraces do not seem to work, which makes my
development cycle difficult.

For example:
```
program test
    print *,'Goodbye'
    error stop 1
end program
```
compile with "gfortran -g test.f90",

On linux this will print a very short backtrace, just #0 is "in test" and
#1 is "in main", but when I compile on windows I get:
"Could not print backtrace: libbacktrace could not find executable to open"
and the stack is just a series of 0xffffffff numbered #0 through #20.
Similar results if I change this to statically link all libraries.

I don't know how to generate similar backtraces in C code, but I suspect
the result would be the same.  I've tried different variations of running
the program within cmd.exe vs mingw's console, with different paths, etc,
but the results are all the same, and I'm not sure how to proceed.

>From an internet search there are lots of people showing these sorts of
errors, but generally people are interested in fixing the crash rather than
letting the crash happen and getting debugging info (which is my goal).

Any help would be greatly appreciated.  Thank you

Luke
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to