Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@omajid
Copy link
Member

@omajid omajid commented Oct 31, 2017

The windows build already includes /Zi /Zl as part of commit 920fd2f (PR #7840). It looks like it was simply missed on Unix.

This change also makes the native debug information closer to what CoreCLR does on all platforms. See dotnet/coreclr#3445 for more information.

This is also needed for the end-to-end debuginfo generation as part of source-build. See dotnet/source-build#267

The windows build already includes /Zi /Zl as part of commit 920fd2f
(PR dotnet#7840). It looks like it was simply missed on Unix.

This change also makes the native debug information closer to what
CoreCLR does on all platforms. See
dotnet/coreclr#3445 for more information.

This is also needed for the end-to-end debuginfo generation as part of
source-build. See dotnet/source-build#267
@omajid
Copy link
Member Author

omajid commented Oct 31, 2017

cc @dagood @gkhanna79 @ianhays @jkotas

@omajid omajid changed the title Add -g flag to generate debuginfo on unix platforms Generate debuginfo on all builds on unix platforms Oct 31, 2017
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit efe7652 into dotnet:master Nov 1, 2017
omajid added a commit to omajid/dotnet-source-build that referenced this pull request Nov 1, 2017
This patch makes coreclr and core-setup leave debug symbols in their
built native code instead of stripping it out.

After this patch, native symbols are only missing in corefx. A separate
PR in corefx will take care of that:
dotnet/corefx#24979

The final dotnet product, after both these fixes, should contain native
debug symbols for all native binaries.
@karelz karelz added this to the 2.1.0 milestone Nov 18, 2017
omajid added a commit to omajid/dotnet-runtime that referenced this pull request Sep 30, 2020
When packaging .NET for Linux distributions, the package builders
generally use a different workflow for shipping symbols to users:

1. The package maintainer builds code with the debug flags (such as
   `-g`) to generate full native debug info and symbols.

2. Nothing is stripped from build by the package maintainer.

3. The build system (`rpmbuild`, `debuild`) removes the debug
   info (or debug symbols) from the code and creates separate
   `-debuginfo` or `-debug` packages that contain just the debug
   symbols.

4. These debug packages are then distributed along with the normal
   packages using the normal Linux distribution mechanisms. This lets
   users install the exact set of debug symbols matching their other
   package.

To support this workflow in dotnet/runtime, we need to add optional
support for not stripping debug symbols. I used it has follows:

    CFLAGS=-g CXXFLAGS=-g ./build.sh --keepnativesymbols true

After this build, the built binaries include all debug symbols.

I can then rely on the distro package build system to identify, strip,
package and ship the debug info/symbols separately.

See dotnet#3781 and
dotnet/source-build#267 for more details on
the background and motivation.

For some related fixes, see:

- dotnet/coreclr#3445
- dotnet/corefx#24979
jkotas pushed a commit to dotnet/runtime that referenced this pull request Oct 1, 2020
When packaging .NET for Linux distributions, the package builders
generally use a different workflow for shipping symbols to users:

1. The package maintainer builds code with the debug flags (such as
   `-g`) to generate full native debug info and symbols.

2. Nothing is stripped from build by the package maintainer.

3. The build system (`rpmbuild`, `debuild`) removes the debug
   info (or debug symbols) from the code and creates separate
   `-debuginfo` or `-debug` packages that contain just the debug
   symbols.

4. These debug packages are then distributed along with the normal
   packages using the normal Linux distribution mechanisms. This lets
   users install the exact set of debug symbols matching their other
   package.

To support this workflow in dotnet/runtime, we need to add optional
support for not stripping debug symbols. I used it has follows:

    CFLAGS=-g CXXFLAGS=-g ./build.sh --keepnativesymbols true

After this build, the built binaries include all debug symbols.

I can then rely on the distro package build system to identify, strip,
package and ship the debug info/symbols separately.

See #3781 and
dotnet/source-build#267 for more details on
the background and motivation.

For some related fixes, see:

- dotnet/coreclr#3445
- dotnet/corefx#24979
MichaelSimons pushed a commit to dotnet/source-build-externals that referenced this pull request Feb 8, 2022
This patch makes coreclr and core-setup leave debug symbols in their
built native code instead of stripping it out.

After this patch, native symbols are only missing in corefx. A separate
PR in corefx will take care of that:
dotnet/corefx#24979

The final dotnet product, after both these fixes, should contain native
debug symbols for all native binaries.
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
)

The windows build already includes /Zi /Zl as part of commit 920fd2f
(PR dotnet/corefx#7840). It looks like it was simply missed on Unix.

This change also makes the native debug information closer to what
CoreCLR does on all platforms. See
dotnet/coreclr#3445 for more information.

This is also needed for the end-to-end debuginfo generation as part of
source-build. See dotnet/source-build#267

Commit migrated from dotnet/corefx@efe7652
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants