• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: debugging symbols for universial binary library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: debugging symbols for universial binary library


  • Subject: Re: debugging symbols for universial binary library
  • From: Jim Ingham <email@hidden>
  • Date: Thu, 2 Apr 2009 10:39:46 -0700

Note that as long as you build the dSYM before you delete or move the .o files or strip the executables, you could also lipo the executables and THEN run dsymutil, and it will find all the appropriate .o files and build the dSYM for each of the architectures into a universal dSYM. Each slice of the universal binary contains the paths to all the .o files that went into making it, so provided they are still in place dsymutil will find them. The other important bit is that these paths are one of the things that "strip -S" removes, so you have to strip AFTER building the dSYM file.

This isn't particularly preferable to lipo-ing the dSYM's yourself, but it might be easier since you'll have to lipo the binaries anyway.

Jim


On Apr 2, 2009, at 10:21 AM, Ethan Tira-Thompson wrote:

DWARF is embedded in the object files of the binary, but not in the binary itself (unlike stabs, which are linked into the binary proper). dsym extracts the DWARF info from the object files, puts it in a separate dSYM bundle and makes the binary refer to this bundle (instead of to the object files).

For those interested in the details of the DWARF handling on Mac OS X: http://wiki.dwarfstd.org/index.php?title=Apple's_"Lazy"_DWARF_Scheme

Ah, interesting link!

For some background in response to Chris, the trick is libpng has a configure script, which needs to be rerun to generate proper config headers for each architecture. So I can't just toss a bunch of - arch flags in the CFLAGS and do it as one build, I wind up with separate .dylibs instead. As Jonas notes, it produces a separate .dSYM for each .dylib. I can use lipo to merge the binaries, but was stuck on how to merge the symbols. And then, wasn't sure the right way to distribute the .dSYM if I did create it.

But now that I realize the .dSYM is a bundle and went spelunking, I find the main content is... another .dylib! And it looks like I can lipo all of these .dSYM dylibs together just like the binaries, and then do a bit of editing on the Info.plist to include all of the UUIDs in the dSYM_UUID array entry. (should be all I need, right?) So I guess that's the answer to my original question. And then I just stick it in /usr/local/lib with the executable dylibs and that'll be the first place it looks (tho the UUID spotlight trick is a brilliant fallback).

Thanks!
 -Ethan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >debugging symbols for universial binary library (From: Ethan Tira-Thompson <email@hidden>)
 >Re: debugging symbols for universial binary library (From: Ethan Tira-Thompson <email@hidden>)
 >Re: debugging symbols for universial binary library (From: Chris Espinosa <email@hidden>)
 >Re: debugging symbols for universial binary library (From: Jonas Maebe <email@hidden>)
 >Re: debugging symbols for universial binary library (From: Ethan Tira-Thompson <email@hidden>)

  • Prev by Date: Organizer actions don't put output in new document?
  • Next by Date: CFShow truncated CFStrings in Leopard's Console.app (but not Xcode's debugger console)
  • Previous by thread: Re: debugging symbols for universial binary library
  • Next by thread: Re: Adding custom toolbar items to my program's toolbar
  • Index(es):
    • Date
    • Thread