Skip to content

Support of dsymutil on MacOS X #2686

Open

Description

@bdbaddog

This issue was originally created at: 2010-08-31 16:37:56.
This issue was reported by: luc_j_bourhis.
luc_j_bourhis said at 2010-08-31 16:37:57

It is often useful on MacOS X to compile shared libraries with debug symbols in the so-called DWARF + dSYM format. The make gdb work better in many circumstances, e.g. when those shared libraries are Python modules written in C or C++ that one wishes to debug by running python through gdb. For each xxx.so library, there is a xxx.dSYM directory containing some extra information.

This is produced by first compiling the objects with -g and then by running the command-line tool dsymutil on the library:

dsymutil xxx.so

SCons does a great job at taking care of the first step with env.SharedLibrary(...) after setting CPPFLAGS or CFLAGS appropriately for that environment. On the contrary, it does not support the second step out of the box.

Hence this request.

garyo said at 2010-09-06 17:12:14

Just for the record, here's my comment from the mailing list:

To do it robustly is a little bit more work than the [simple case], because (if I understand the man page correctly) it's actually producing a new .dSYM file as a side effect of the link now, and SCons should be taught about that side-effect file, similarly to Windows where it builds .dll and .lib files as a side effect of linking a .dll.

gregnoel said at 2010-09-27 17:44:39

Bug party triage. Too complicated to settle on IRC; Gary to lead discussion in dev@scons and look at it again next time.

Activity

  1. added this to the milestone on Jan 2, 2018
  2. mwichmann commented on Apr 4, 2022

    @mwichmann
    Collaborator

    Could we help this along by providing a Cookbook recipe showing adding an emitter to SHLIBEMITTER? I realize this was asking for built-in support but at least if there's a recorded Way To Do It that would be something, no?

  3. bdbaddog commented on Apr 4, 2022

    @bdbaddog
    ContributorAuthor

    @mwichmann - sounds reasonable. And regardless if we get to add this functionality in core, having such an example is valuable.
    You volunteering? ;)

  4. mwichmann commented on Apr 4, 2022

    @mwichmann
    Collaborator

    Well, neither of my Mac VMs are working any more... (I had an 11.6 and 12.something). Logistical problems, I know... couldn't test it.

  5. self-assigned this
    on Apr 4, 2022
  6. bdbaddog commented on Apr 4, 2022

    @bdbaddog
    ContributorAuthor

    I'll take a look at some point..

  7. acmorrow commented on Apr 4, 2022

    @acmorrow
    Contributor
  8. deleted a comment from acmorrow on Apr 4, 2022
  9. added
    has patch
    on Apr 4, 2022
  10. bdbaddog commented on Apr 4, 2022

    @bdbaddog
    ContributorAuthor

    Can use MongoDB's logic for this perhaps? (marked has patch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Op Sys: macOSenhancementhas patch

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions