msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.28k stars 486 forks source link

LLDB errors during debugging gcc and clang files in Mingw64 #4815

Open NikNik77771 opened 1 month ago

NikNik77771 commented 1 month ago

Description / Steps to reproduce the issue

  1. Compile simple hello world application clang -g hello.c
  2. lldb a.out
  3. b main
  4. run
  5. n
(lldb) run
(ocess 396 launched: 'Z:\a1\cprojects\hello-world1\tests\a.exe' (x86_64)
1 location added to breakpoint 1
Process 396 stopped
* thread #1, stop reason = breakpoint 1.2
    frame #0: 0x00007ff707d71466 a.exe`main at hello-world.c:9:5
   6     */
   7    int main() {
   8        // Print "Hello, World!" to the console
-> 9        printf("Hello, World!\n");
   10

Expected behavior

Not error

Actual behavior

error: a.exe [0x00000000000020c4]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000003b) attribute, but rang e extraction failed (invalid range list offset 0x3b), please file a bug and attach the file at the start of this e rror message error: a.exe [0x00000000000020fc]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but rang e extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this e rror message error: a.exe [0x0000000000002130]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but rang e extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this e rror message error: a.exe [0x0000000000002074]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000001a) attribute, but rang e extraction failed (invalid range list offset 0x1a), please file a bug and attach the file at the start of this e rror message error: a.exe [0x00000000000020c4]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x000000000000003b) attribute, but rang e extraction failed (invalid range list offset 0x3b), please file a bug and attach the file at the start of this e rror message error: a.exe [0x00000000000020fc]: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x0000000000000046) attribute, but rang e extraction failed (invalid range list offset 0x46), please file a bug and attach the file at the start of this e rror message Process 396 stopped

Verification

Windows Version

MINGW64_NT-10.0-19045

Are you willing to submit a PR?

No response

lazka commented 1 month ago

Are you using the cygwin clang (clang --version)? That was only used for bootstrapping and isn't functional right now.

NikNik77771 commented 1 month ago

Are you using the cygwin clang (clang --version)? That was only used for bootstrapping and isn't functional right now.

$ clang --version clang version 18.1.8 Target: x86_64-w64-windows-gnu Thread model: posix InstalledDir: C:/msys64/mingw64/bin

jeremyd2019 commented 1 month ago

I also see those dwarf errors trying to use lldb to debug msys-2.0.dll. It wouldn't surprise me if there's some incompatibility between gcc's generated dwarf and lldb's reading of them.

NikNik77771 commented 1 month ago

I also see those dwarf errors trying to use lldb to debug msys-2.0.dll. It wouldn't surprise me if there's some incompatibility between gcc's generated dwarf and lldb's reading of them.

Same result for compiling with gcc and clang.