[dpdk-dev] Generating Debug information in Windows using Clang (PDB files)
ranjit.menon at intel.com
Mon May 20 20:02:22 CEST 2019
I don't think we debugged using clang compiled code for Hello world - mainly because it was only a "helloworld" application and we didn't quite need any debugging!:-)
I found this link: http://blog.llvm.org/2017/08/llvm-on-windows-now-supports-pdb-debug.html
...which says to use the following:
Here are two simple ways to test out this new functionality:
1. Have clang-cl invoke lld automatically
clang-cl -fuse-ld=lld -Z7 -MTd hello.cpp
1. Invoke clang-cl and lld separately.
clang-cl -c -Z7 -MTd -o hello.obj hello.cpp
lld-link -debug hello.obj
Can you try it with just the -Z7 option?
I'm also adding some persons from Microsoft to this thread, hoping they can help...
+Harini +Omar +Jeffrey
From: Adham Masarwah <adham at mellanox.com>
Sent: Monday, May 20, 2019 3:27 AM
To: dev at dpdk.org
Cc: Menon, Ranjit <ranjit.menon at intel.com>; Kadam, Pallavi <pallavi.kadam at intel.com>; Yohad Tor <yohadt at mellanox.com>; Rani Sharoni <ranish at mellanox.com>; Tal Shnaiderman <talshn at mellanox.com>; Richardson, Bruce <bruce.richardson at intel.com>
Subject: Generating Debug information in Windows using Clang (PDB files)
In development we use WinDbg for debugging, so we need to create PDB files when compiling the DPDK, so we used ``-g`` in the CFLGAS and the PDB files are being created.
But when running the helloworld with WinDbg, we can see only function names, we can't see code neither variables, we get the following error: "Private symbols (symbols.pri) are required for locals."
We tried to append some flags like -Z7 and -gcodeview, but the compiler ignores them.
Do you have any idea what we miss here ? What is the debug mechanism is being used in Windows ?
More information about the dev