Opened 4 years ago

Closed 4 years ago

#10468 closed bug (fixed)

debug test case fails on Windows

Reported by: ezyang Owned by: scpmw
Priority: normal Milestone: 7.10.2
Component: Compiler (Debugging) Version: 7.11
Keywords: Cc: scpmw
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: debug
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Here's the make output:

$ make debug
# Without optimisations, we should get annotations for basically
# all expressions in the example program.
echo == Dbg ==
== Dbg ==
'C:/msys64/home/ezyang/ghc-validate/inplace/bin/ghc-stage2.exe' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts  -fno-warn-tabs debug -fforce-recomp -g -dppr-ticks -ddump-cmm \
        | grep -o src\<debug.hs:.*\> | sort -u
C:\msys64\tmp\ghc21036_0\ghc21036_2.s: Assembler messages:
C:\msys64\tmp\ghc21036_0\ghc21036_2.s:421: Error: junk at end of line, first unrecognized character is `,'
C:\msys64\tmp\ghc21036_0\ghc21036_2.s:508: Error: junk at end of line, first unrecognized character is `,'
C:\msys64\tmp\ghc21036_0\ghc21036_2.s:557: Error: junk at end of line, first unrecognized character is `,'
C:\msys64\tmp\ghc21036_0\ghc21036_2.s:559: Error: junk at end of line, first unrecognized character is `,'
src<debug.hs:(3,1)-(5,29)>
src<debug.hs:3:9>
src<debug.hs:4:9>
src<debug.hs:5:13-17>
src<debug.hs:5:14>
src<debug.hs:5:21-29>
src<debug.hs:5:25-29>
src<debug.hs:5:26>
src<debug.hs:5:9-17>
src<debug.hs:5:9-29>
src<debug.hs:6:1-21>
./debug
make: ./debug: Command not found
Makefile:9: recipe for target 'debug' failed
make: *** [debug] Error 127

Peter, can you take a look?

Attachments (1)

dwarf-mingw.patch (3.8 KB) - added by scpmw 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by scpmw

Attachment: dwarf-mingw.patch added

comment:1 Changed 4 years ago by scpmw

Never got around to testing Windows... Fortunately less work than I had feared. The attached patch makes things work to the point where we can compile everything with -g and use gdb on the product.

comment:2 Changed 4 years ago by ezyang

Status: newpatch

Not qualified to review the patch, but looks reasonable to me.

comment:3 Changed 4 years ago by thomie

Milestone: 7.10.2

I confirm that the test succeeds on 64 bit Windows after applying this patch.

comment:4 Changed 4 years ago by Austin Seipp <austin@…>

In a66ef3567ea29c93a9c010befc672602dc1c644c/ghc:

Fix DWARF generation for MinGW (#10468)

Fortunately this is relatively straightforward - all we need to do is
switch to a non-ELF-specific way of specifying object file sections and
make sure that section-relative addresses work correctly. This is enough
to make "gdb" work on MinGW builds.

comment:5 Changed 4 years ago by thoughtpolice

Status: patchmerge

comment:6 Changed 4 years ago by thoughtpolice

Resolution: fixed
Status: mergeclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.