Coder Social home page Coder Social logo

Comments (7)

dg0yt avatar dg0yt commented on June 28, 2024 1

Maybe time to collect useful resources? But I don't know where to start.

https://www.tweag.io/blog/2023-11-23-debug-fission/

from vcpkg.

Osyotr avatar Osyotr commented on June 28, 2024

Would it be a reasonable addition to add -g to Release builds on Linux?

IMHO yes.
Though storing debug symbols on Linux is a major PITA.

from vcpkg.

russelltg avatar russelltg commented on June 28, 2024

We use debuginfod internally. It rocks

from vcpkg.

Osyotr avatar Osyotr commented on June 28, 2024

Do you use it on dev machines too?

from vcpkg.

WangWeiLin-MV avatar WangWeiLin-MV commented on June 28, 2024

Some information

The option CMAKE_<LANG>_FLAGS_<CONFIG> first introduced in eba9f6a while added /Zi, and update to /Z7 in 26516fe with current options, and eventually inherited to scripts/toolchains/windows.cmake.

For the option CMAKE_<LANG>_FLAGS_<CONFIG>_INIT in scripts/toolchains/linux.cmake, it introduced in f35ff4c.

It seems there is no special instructions for adding debug info options

Referrence

https://learn.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170
https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Debugging-Options.html

from vcpkg.

russelltg avatar russelltg commented on June 28, 2024

@WangWeiLin-MV sure, I understand it's not too difficult to add them manually (and that's what I did for us). However, the issue here is about the inconsistent defaults. On Windows, you just get symbols by default. On linux, by defaut, you don't.

People here are talking about symbol storage/splitting as well. In my opinion, this is out of scope for vcpkg (it doesn't do storage for windows either), but a great way to do symbol storage on Linux is build with symbols, store the binaries in a place accessiable by a debuginfod server, then strip the binaries you ship to customers. Then debuggers (lldb and gdb both support this) can be pointed to your server to download the debug symbols. It can even download executables in cases like coredumps that those are not available.

(I'm now worried I misread your comment...not sure if you're saying "no special instruction" as in "current state is fine" or that "it would not be special/difficult to pass -g by default")

from vcpkg.

WangWeiLin-MV avatar WangWeiLin-MV commented on June 28, 2024

@russelltg Sorry for not making it clearer. I only looked into the change history and found that there's no comments or documents was given about the options added many years ago, so further research is needed on current issue.

from vcpkg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.