0

Preface: I am out of my depth for debuggers and debug info, so the information may be straightforward, but a cursory google search returned nothing.

I am on x64 Windows, building a C program using MinGW64 and MSYS2. I have been debugging under MSYS2's gdb, but I wanted to spice up my debugging with a GUI debugger, making the process faster and bearable. I found and obtained a copy of Insight built for Windows for MinGW64. It works... but it does not pull debugging information! I'm getting raw x64 assembly (Motorola syntax too, ew), which doesn't make my debugging much easier.

The project I'm building is using an autotools build system. I can load symbols and source using the MSYS2's gdb when built with the appropriate flags. I would like to load symbols and source in Insight.

Versions for everything:
MSYS2: 2022-05-03
GCC: 12.2.0, Rev6
Insight: Built 2020-08-15 Obtained here, as insight-mingw64
MSYS2 GDB: 12.1
Insight GDB: 7.7

Various CFLAGS I've tried:
-Og -ggdb
-Og -gdwarf-2
-Og -g
-O0 -ggdb
-O0 -gdwarf-2

If the problem is intractible, I'm accepting suggestion comments for other GUI debuggers. My heart is not set on Insight.

Orion
  • 1,157
  • 9
  • 18
  • GCC since [version 11](https://www.gnu.org/software/gcc/gcc-11/changes.html) defaults to `-gdwarf-5`, and GDB 7.7 can't handle that yet. So I would expect that `-gdwarf-2` to work, maybe `-gdwarf-4` would be better. But I recommend that you don't use such an old GDB. And personally I just use GDB TUI, but there are a lot of [front ends](https://sourceware.org/gdb/wiki/GDB%20Front%20Ends) available. To change the assembly syntax, try `set disassembly-flavor intel`. – ssbssa Dec 07 '22 at 06:24
  • Unfortunately, Insight is [closely linked into GDB](https://stackoverflow.com/questions/19094457) so I can't change that GDB version. It's hard finding a frontend for GDB that builts for Windows without a lot of fuss. – Orion Dec 07 '22 at 17:55
  • I'm not sure what you mean. Why building yourself if you can use a prebuilt one, like Qt Creator, Eclipse, or maybe even vscode? – ssbssa Dec 07 '22 at 18:16
  • Those are pretty heavy, and I like Notepad++ otherwise. That said, they are not below consideration. The "builds dor Windows" comment was mainly to imply all of the Linux exclusive GDB frontends. – Orion Dec 07 '22 at 23:47
  • I agree that they are pretty heavy. You could also try [my own gdb build](https://github.com/ssbssa/gdb/releases), it has some extra TUI windows, enabled with `llf`, `lldf`, or `ltlfd`. – ssbssa Dec 08 '22 at 13:04

0 Answers0