0

I am using VS Code for a C++ Project. I am also using CMake Tools to manage the CMake side of things and my compiler toolchains.

I have two separate compiler kits - i686-w64-mingw32 and x86_64-w64-mingw32 (gcc version 10.1.0).

I have set the gdb.exe path in my launch.json to the path of the 64-bit gdb debugger. This works correctly and I can run and debug with breakpoints as expected.

However, when running the 32-bit executable with the 64-bit debugger, I get no output to my console whatsoever, and the breakpoint is not hit.

What could be the problem?

1 Answer 1

1

Don't mix platforms. Debug the 32-bit executable with the 32-bit debugger.

Sign up to request clarification or add additional context in comments.

6 Comments

The 64-bit GDB is perfectly capable of debugging 32-bit executables. See here stackoverflow.com/questions/3931889/…. Unfortunately my current setting using CMake Tools makes it a bit of a mission to switch debuggers like that and I'd like to make everything as automated as possible.
Have you tried doing this via command line? Do you get an error? If I try to debug a 32-bit process with 64-bit gdb I do see some warnings that match this: virtuallyfun.com/wordpress/2015/10/04/32bit-64bit-gdb-collision
I have not yet, but I have re-asked this question with a detailed output log here: stackoverflow.com/questions/62404382/…. Side note - are you Brecht Sanders i.e. from Winlibs? I happen to be using your build of MinGW-w64! Haha, thanks very much. So if it isn't working for you then we are in exactly the same boat it seems? Why does that other link mention that it is possible? @brecht-sanders
@gasko Yes, I'm the guy from winlibs.com where separating 32-bit and 64-bit toolchains completely is part of the philosophy in order to avoid any possible problems when the 2 get mixed up (as I noticed on stackoverflow happens a lot).
Haha. I just got a reply on my other question stating that it is supported on Linux but not on Windows just yet, but will be for GDB version 10. Thanks for the help!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.