Let's talk about +debug

Blair Zajac blair at orcaware.com
Thu Apr 19 12:46:12 PDT 2012


On 04/19/2012 12:37 PM, Sean Farley wrote:
>> Maybe instead of adding code to a port as a portgroup, it's a post-process
>> step run by MacPorts main that looks for all *.dylib, *.so and executables,
>> gets the debugging symbols from them and drops them into
>> ${prefix}/lib/debug.  This way it's not associated with the port itself.
>>
>> In fact, this seems much cleaner.  Instead of making it a +debug option, it
>> can be a macports.conf option.
>
> Not bad, but how would a port be built with "-O0 -g"? I find that a
> lot of times variables are optimized out during a gdb session.

It's one thing for a distro to provide symbols by default, but if you 
want a package to be compiled with -O0 -g, then you're always looking at 
doing your own recompile.  So I guess one would need to edit the 
Portfile to change the optimization flags.

Blair


More information about the macports-dev mailing list