https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121157

--- Comment #11 from Andrew Teylu <andrew.teylu at vector dot com> ---
Ah, no, I think Eric is correct in that it doesn't work at all (even if gcc
doesn't fail).

I used https://github.com/Microsoft/microsoft-pdb/blob/master/cvdump/cvdump.exe
to look at the pdb file generated when compiling/linking my example, and the
`*** LINES` section looked like this:

```
** Module: "D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/b~main.o"

Mod::GetEnumLines failed

** Module: "D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/main.o"

** Module: "D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/local_io.o"
```

Notice: for the two files we compile with `-gcodeview` they _do not_ have
`Mod::GetEnumLines failed` (which, I think, means there is PDB info for those
objects, but it is empty).

I then wrote a matching C version (including a binder main that I did not
compile with `-gcodeview` to match what I did for Ada), and the `*** LINES`
section looked like this:

```
** Module: "D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/c/b_main.o"

Mod::GetEnumLines failed

** Module: "D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/c/main.o"

  D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/c/main.c (MD5:
7935177CE228764361F5487B3BDA29AC), 0001:000005E0-000005F7, line/addr pairs = 3

      4 000005E0      5 000005E8      6 000005F0

** Module: "D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/c/local_io.o"

  D:/DEV/msys64/home/ateylu/alire/tom_121157/v3/c/local_io.c (MD5:
5997CD3181362A6DA3EF9CCAA4E0B36D), 0001:00000600-0000060B, line/addr pairs = 3

      4 00000600      5 00000604      6 00000609
```

That is, there is the debug information for the object files (and, as we'd
like, not for the binder main).

Reply via email to