How to build with full debug symbols

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

How to build with full debug symbols

Postby JodoKaast » Thu Aug 25, 2016 3:49 pm

I'm trying to build CEF from source, but when the process completes and I try to use the .pdb that was generated for debugging, I get stack traces with address locations, but no names (see attached picture).

My call to automate-git.py:

Code: Select all
python ..\automate\automate-git.py --download-dir=D:\CEF\chromium_git --depot-tools-dir=D:\CEF\depot_tools --branch=2785 --x64-build


Windows 10 x64
Visual Studio 2012

Thanks for all your work on CEF!! It's an incredibly useful framework!
Attachments
CefDebugSymbols.png
CefDebugSymbols.png (13.34 KiB) Viewed 15045 times
JodoKaast
Newbie
 
Posts: 4
Joined: Thu Aug 25, 2016 3:42 pm

Re: How to build with full debug symbols

Postby magreenblatt » Fri Aug 26, 2016 3:26 am

Presumably you built CEF with VS2015 as required by https://bitbucket.org/chromiumembedded/ ... e-branches. Are you only using VS2012 when building your application based on CEF? Did you copy libcef.dll.pdb next to libcef.dll in your application's executable directory?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: How to build with full debug symbols

Postby JodoKaast » Fri Aug 26, 2016 7:54 am

Yes, sorry. Built CEF/Chromium with VS2015. Here were my environment variables:

set GYP_MSVS_VERSION=2015
set GYP_DEFINES=buildtype=Official
set CEF_ARCHIVE_FORMAT=tar.bz2

And my own project is built with VS2012. I used cmake to create the the project for libcef_dll_wrapper.lib which I compiled with VS2012.

I notice that when I download the debug symbols from http://opensource.spotify.com/cefbuilds/index.html for instance, the .pdb is about 1.75 GB, but my .pdb is only 1.25 GB. Similar for the release mode .pdbs, the downloaded one is 900 MB whereas mine is 440 MB.

Did you copy libcef.dll.pdb next to libcef.dll in your application's executable directory?


Yeah, Visual Studio actually shows "Symbols loaded" for libcef.dll, but when I actually try to debug, I don't have any function names, just addresses.
JodoKaast
Newbie
 
Posts: 4
Joined: Thu Aug 25, 2016 3:42 pm

Re: How to build with full debug symbols

Postby magreenblatt » Fri Aug 26, 2016 7:57 am

Do symbols show up in VS2012 when you use the binary distribution and PDB from opensource.spotify.com?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: How to build with full debug symbols

Postby JodoKaast » Fri Aug 26, 2016 8:24 am

magreenblatt wrote:Do symbols show up in VS2012 when you use the binary distribution and PDB from opensource.spotify.com?


Yeah, they do.

I'm guessing maybe "GYP_DEFINES=buildtype=Official" is the culprit? Is that what the binary distributions on opensource.spotifiy.com use, or do they have buildtype=Dev or some other setting?
JodoKaast
Newbie
 
Posts: 4
Joined: Thu Aug 25, 2016 3:42 pm

Re: How to build with full debug symbols

Postby magreenblatt » Fri Aug 26, 2016 1:56 pm

Official build settings are listed here: https://bitbucket.org/chromiumembedded/ ... ldSetup.md
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: How to build with full debug symbols

Postby jholt » Wed Nov 22, 2017 5:37 pm

I'm encountering this issue with my local build of cef_binary_3.2526.1373 when trying to inspect stack frames (for some handle leak detection efforts.)
Was this tracked down to a specific build flag?

I'm going to try setting the /Z7 build flag on libcef_dll_wrapper to see if that works any better than /Zi.
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: How to build with full debug symbols

Postby HarmlessDave » Thu Nov 23, 2017 2:36 pm

The -official build flag is good for release builds because the results are more optimized. But for debug builds you lose the debug symbols.

So you probably want to build debug and release separately, only using -official for the release build.

It would be nice if there was an -official_release flag to only use it for the release version. I'm not familiar enough with Python and CMake to try to do that myself.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 39 guests