lldb ...

Jeremy Huddleston Sequoia jeremyhu at apple.com
Fri Sep 16 01:18:28 PDT 2016


> On Sep 10, 2016, at 17:56, Jeremy Sequoia <jeremyhu at apple.com> wrote:
> 
> On Sep 10, 2016, at 16:51, Rainer Müller <raimue at macports.org> wrote:
> 
>> I got gdb to work now on Sierra now. In fact I did not even have to sign
>> any of the libraries it links to.
>> 
>> 
>> $ otool -L /opt/local/bin/ggdb |awk 'NR>1 {print $1}' \
>>    |grep '^/opt/local' | xargs -I{} codesign -d -v {}
>> /opt/local/lib/libintl.8.dylib: code object is not signed at all
>> /opt/local/lib/libncurses.6.dylib: code object is not signed at all
>> /opt/local/lib/libz.1.dylib: code object is not signed at all
>> /opt/local/lib/libiconv.2.dylib: code object is not signed at all
>> /opt/local/lib/libexpat.1.dylib: code object is not signed at all
>> 
>> $ /opt/local/bin/ggdb -q /opt/local/bin/curl
>> Reading symbols from /opt/local/bin/curl...(no debugging symbols
>> found)...done.
>> (gdb) r
>> Starting program: /opt/local/bin/curl
>> warning: unhandled dyld version (15)
>> curl: try 'curl --help' or 'curl --manual' for more information
>> [Inferior 1 (process 6964) exited with code 02]
>> (gdb) q
> 
> Hmm.  That isn't what I'd expect.  Gonna need to check why that is.  It looks like CS_RESTRICT isn't implying CS_HARD like I thought it should.

Yeah, this contradicts what I'm seeing as expected.  Given that you've signed /opt/local/bin/ggdb with an entitlement, it should be CS_RESTRICT which should imply CS_HARD.  The lack of a code signature would trigger !CS_VALID which would prevent the process from loading the unsigned libraries.

Can you send me a tarball of your working

/opt/local/bin/ggdb
/opt/local/lib/libintl.8.dylib
/opt/local/lib/libncurses.6.dylib
/opt/local/lib/libz.1.dylib
/opt/local/lib/libiconv.2.dylib
/opt/local/lib/libexpat.1.dylib
+ all other recursive dependencies that those dylibs link against in /opt/local?

I want to take a closer look.

--Jeremy


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4465 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20160916/b538f01a/attachment.p7s>


More information about the macports-dev mailing list