c[ode]clap»Forums
5 posts
some mingw gcc issues
Edited by hiddenfrog on
Hi, thanks for the debugger :)


There are some issues with newer versions of mingw gcc and g++ and codeclap.

Codeclap is not able to debug executables build with some newer versions of gcc and g++ under windows.

(ie. even some simple helloworld - 64bit build with debug infos)

(The mingw gdb's are working with the generated exe's)


For example:

-breakpoints not working
ie.
start with break at main - no break, it finish the program
start without break at main - stops at some address with assemblercode, message "main found in this program", when "run to main", progam ends

-no sourcecode view (ie. shift-ctrl-p main does not go to the main function - only to some address with assemblercode)



I tried the following:


Chris Wellons (nullprogram):

https://nullprogram.com/blog/2021/03/11/
https://github.com/skeeto/w64devkit

1.6.0 does not work
1.5.0 works


Brecht Sanders

http://winlibs.com/
https://github.com/brechtsanders/winlibs_mingw/releases/

gcc 11, 10.3, most 10.2 - not working
i found only one release working: GCC 10.2.0 + LLVM/Clang 11.0.0 + MinGW-w64 8.0.0 (release 5)


From the description the binutils are different: 2.35.x works, 2.36.x is not working with codeclap.



TDM-GCC are working, but is older, 9.2.0
https://jmeubank.github.io/tdm-gcc/



MSYS2
https://www.msys2.org/

installed some days ago, version 10.2.0 - does not work with codeclap



Please can you take a look at this problem, thanks.
spx
148 posts / 1 project
some mingw gcc issues
Thanks for collecting all these information.

Right now all the gcc/g++ tests on windows are compiled through msys2.
It is "gcc version 10.2.0" but you may have already found the problem as binutils is "mingw-w64-x86_64-binutils 2.34-3".

I don't think it is a good idea to also try to squeeze this into 0.9.7.1 but after that I will definitely update everything to the newest version and see if I can reproduce this.
spx
148 posts / 1 project
some mingw gcc issues
Edited by spx on
I believe this will already be fixed with 0.9.7.1. While adding the recently release clang 12 to all the tests I noticed the same problem when compiling with target x86_64-pc-windows-gnu.

Manually trying with w64devkit 1.6.0 the problem seems to be fixed as well.
5 posts
some mingw gcc issues
I tried 0.9.7.1 with w64devkit, winlibs and msys2 and now it works*, even with the new 11.1.0 from winlibs.

Thank you. :)



*):

There is one problem:

with 0.9.7.1 it works on my desktop pc with windows 10

but on my older netbook with windows 7 it does not work, its the same as version 0.9.7 with these newer compiler versions, only w64devkit 1.5.0 and tdm works with 0.9.7.1


Can there be some difference between win7 und 10 with your fix?
spx
148 posts / 1 project
some mingw gcc issues
I just checked on windows 7 and the problem happens for me as well.
From what I have gathered so far it doesn't look related to the original issue. Will try to fix this for the next update.
5 posts
some mingw gcc issues

hi,

on windows 10 newer versions of gcc and/or binutils break codeclap again:

with w64devkit 1.8.0 (gcc 11.1.0, binutils 2.36.1) it works

with w64devkit 1.9.0 (gcc 11.2.0, binutils 2.37) the original issue returned

spx
148 posts / 1 project
some mingw gcc issues
Replying to hiddenfrog (#25097)

to be sure I have also checked with w64devkit 1.10.0 using the latest 0.9.7.2 build (0.9.7.2-20210914) and seems this also happens for me with 1.9.0 and newer.

I will look into this.