[llvm-dev] LLD PDB Lines zero number issue

Shi, Steven via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 9 17:42:37 PST 2020


Hi Martin,

I tried your suggestion of adding "-mllvm -use-unknown-locations=Disable" in the clang CC flag to build test case in my previous email, but it looks still not work in my side with llvm 9.0.0.  Could you give me some more advices? Do I need to use the master LLVM instead of the 9.0.0?



$ make -f makefile_clanglto_Oz

"/home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang" -g  -m64 -mcmodel=small -target x86_64-unknown-windows -gcodeview -mllvm -use-unknown-locations=Disable -flto -Oz -c -o main.obj  main.c

"nasm" -f win64 -o assembly.obj assembly.nasm

"/home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-lib" /OUT:main.lib main.obj

"/home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-lib" /OUT:assembly.lib assembly.obj

"/home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld-link" /OUT:main.dll /Machine:X64 /DLL /ENTRY:main /DEBUG:GHASH /lldmap main.lib assembly.lib



$ /home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-pdbutil dump -l main.pdb

                           Lines

============================================================

Mod 0000 | `assembly.obj`:

Mod 0001 | `/home/jshi19/llvm/wrongcode/lld-link5/lto.tmp`:

/home/jshi19/llvm/wrongcode/lld-link5/main.c (MD5: 5F82BB79FE2DA0B0549B784CFDC37D05)

  0001:00000004-0000001E, line/addr entries = 5

     3 00000004 !    0 00000008 !    5 0000000D !    0 00000012 !    9 00000017 !





Thanks

Steven Shi





> -----Original Message-----

> From: Martin Storsjö <martin at martin.st>

> Sent: Friday, January 10, 2020 5:00 AM

> To: David Blaikie <dblaikie at gmail.com>

> Cc: Shi, Steven <steven.shi at intel.com>; Reid Kleckner <rnk at google.com>;

> llvm-dev <llvm-dev at lists.llvm.org>

> Subject: Re: [llvm-dev] LLD PDB Lines zero number issue

>

> On Thu, 9 Jan 2020, David Blaikie via llvm-dev wrote:

>

> > +rnk who works on COFF debugging things.

> >

> >  My understanding is that this has nothing to do with the linker - but is a

> > function of LLVM optimizations creating line zero debug locations. I believe

> > rnk & folks have disabled line zero emission for CodeView debug info in

> some

> > manner - perhaps that needs a flag? or Steven hasn't got a release with

> that

> > change in it?

>

> I think I've run into that with dwarf as well, and there AFAIK it can be

> gotten rid of by adding "-mllvm -use-unknown-locations=Disable".

>

> // Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200110/921cac87/attachment.html>


More information about the llvm-dev mailing list