We only have an x64 architecture; we invoke dsymutil several times for the
frameworks and the plugin bundles, but only once for the main executable,
like this
dsymutil
/Volumes/Work/D-084/Bin.Mactel/Programs_GCC4_2_64_LLVM.dev/ArchiCAD\
16.app/Contents/MacOS/ArchiCAD -o
/Volumes/Work/D-084/Bin.Mactel/Programs_GCC4_2_64_LLVM.dev/Support/MAPs/Arc
hiCAD 16.dsym
I take it you have quotes around your second path with the space in it? You have a backslash before the space for the app, but not for the dSYM above. The propper case for the extension is "dSYM" in case you want it to look like the what Xcode produces, though this likely won't matter on case insensitive file systems, though it would be good to change just in case.
Is it a problem that the .app has a different name than the executable? Or
the dSYM file is created in a separate folder?
No, as long as spotlight can see the folder, you should easily be able to locate your dSYM file. If you want to make sure spotlight can see it, do this:
% mdls "/Volumes/Work/D-084/Bin.Mactel/Programs_GCC4_2_64_LLVM.dev/Support/MAPs/ArchiCAD 16.dsym"
You should see some UUID key/value pairs:
% mdls ~/Documents/src/attach/a.out.dSYM
com_apple_xcode_dsym_paths = (
"Contents/Resources/DWARF/a.out"
)
com_apple_xcode_dsym_uuids = (
"FDB4DE40-DC70-3E53-907A-442A6E379283"
)
If you see these, the debuggers will be able to find your dSYM file no matter what the name.
If I do a clean debug build, then the dsym file is created fine. If I do
an incremental build, then the dsym file is created only partially, and I
cannot see the source when debugging the main executable's code.
Sounds like you have a stripping issue. Don't strip your executable except on the install phase of your build. Why? Because in a build like:
- build all .o files
- link executable
- make dSYM
- strip executable
you now have an executable that is newer than your dSYM file. If you use a Makefile, it will notice that your dSYM file depends on your executable, and it will try to rebuild your dSYM file which will now use a stripped executable which won't have any of the needed debug map entries that dsymutil uses to link the dSYM files and all debug info will be lost.
Breakpoints in the other frameworks work fine; I can step through the
source.
I also tried to create a flat dSYM file, to no avail.
With verbose logging turned on, I got a bit more than 11 000 lines like
this: "address information attributes will be removed because there is no
relocation address"
That is fine. We dead strip the DWARF and remove functions, types and other info that didn't make it into the final linked executable. If you indeed are stripping your executable, this will happen for just about everything which you don't want. So try to not do any stripping as part of your normal compile/link/debug/fix cycles.
Does that make sense and/or help?