PermissionsDarwin wiki fix

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

PermissionsDarwin wiki fix

Galder Zamarreno
Hi,

Information is missing in https://sourceware.org/gdb/wiki/PermissionsDarwin

On macOS 10.15, when you create the certificate, the default alias is set
to your email address. This needs to be set to gdb-cert too. This is
implicit in the `security find-certificate -c gdb-cert` output but is not
specified.

Without that, when you get to the `codesign --entitlements
gdb-entitlement.xml -fs gdb-cert $(which gdb)` stage, you get:

error: The specified item could not be found in the keychain.

Can someone update the wiki?

Thanks
Galder
Reply | Threaded
Open this post in threaded view
|

RE: PermissionsDarwin wiki fix

felix.willgerodt
A bit off-topic:
Are you actually able to debug anything on 10.15 with SIP enabled?

I was not able to debug anything the last time I checked, even with the correct signature and entitlements. And I don't seem to be the only one:
* https://sourceware.org/bugzilla/show_bug.cgi?id=24069 
* https://apple.stackexchange.com/questions/377934/mysterious-gdb-hangs-after-clean-build

I have done some digging a couple of months ago (https://sourceware.org/ml/gdb/2019-09/msg00004.html), but didn't have the time to investigate further.

Thanks,
Felix


-----Original Message-----
From: [hidden email] <[hidden email]> On Behalf Of Galder Zamarreno
Sent: Thursday, January 23, 2020 3:22 PM
To: [hidden email]
Subject: PermissionsDarwin wiki fix

Hi,

Information is missing in https://sourceware.org/gdb/wiki/PermissionsDarwin

On macOS 10.15, when you create the certificate, the default alias is set
to your email address. This needs to be set to gdb-cert too. This is
implicit in the `security find-certificate -c gdb-cert` output but is not
specified.

Without that, when you get to the `codesign --entitlements
gdb-entitlement.xml -fs gdb-cert $(which gdb)` stage, you get:

error: The specified item could not be found in the keychain.

Can someone update the wiki?

Thanks
Galder
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
Reply | Threaded
Open this post in threaded view
|

Re: PermissionsDarwin wiki fix

Galder Zamarreno
I'm encountering that exact same issue now :(


On Thu, Jan 23, 2020 at 3:42 PM Willgerodt, Felix <
[hidden email]> wrote:

> A bit off-topic:
> Are you actually able to debug anything on 10.15 with SIP enabled?
>
> I was not able to debug anything the last time I checked, even with the
> correct signature and entitlements. And I don't seem to be the only one:
> * https://sourceware.org/bugzilla/show_bug.cgi?id=24069
> *
> https://apple.stackexchange.com/questions/377934/mysterious-gdb-hangs-after-clean-build
>
> I have done some digging a couple of months ago (
> https://sourceware.org/ml/gdb/2019-09/msg00004.html), but didn't have the
> time to investigate further.
>
> Thanks,
> Felix
>
>
> -----Original Message-----
> From: [hidden email] <[hidden email]> On Behalf Of
> Galder Zamarreno
> Sent: Thursday, January 23, 2020 3:22 PM
> To: [hidden email]
> Subject: PermissionsDarwin wiki fix
>
> Hi,
>
> Information is missing in
> https://sourceware.org/gdb/wiki/PermissionsDarwin
>
> On macOS 10.15, when you create the certificate, the default alias is set
> to your email address. This needs to be set to gdb-cert too. This is
> implicit in the `security find-certificate -c gdb-cert` output but is not
> specified.
>
> Without that, when you get to the `codesign --entitlements
> gdb-entitlement.xml -fs gdb-cert $(which gdb)` stage, you get:
>
> error: The specified item could not be found in the keychain.
>
> Can someone update the wiki?
>
> Thanks
> Galder
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de
> Managing Directors: Christin Eisenschmid, Gary Kershaw
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
>
Reply | Threaded
Open this post in threaded view
|

Re: PermissionsDarwin wiki fix

Simon Marchi-4
In reply to this post by felix.willgerodt
On 2020-01-23 9:41 a.m., Willgerodt, Felix wrote:

> A bit off-topic:
> Are you actually able to debug anything on 10.15 with SIP enabled?
>
> I was not able to debug anything the last time I checked, even with the correct signature and entitlements. And I don't seem to be the only one:
> * https://sourceware.org/bugzilla/show_bug.cgi?id=24069 
> * https://apple.stackexchange.com/questions/377934/mysterious-gdb-hangs-after-clean-build
>
> I have done some digging a couple of months ago (https://sourceware.org/ml/gdb/2019-09/msg00004.html), but didn't have the time to investigate further.
>
> Thanks,
> Felix

The Darwin/macOS port is not in a very good shape.  I think that part of the problem
is that no GDB maintainer or active contributor is using macOS as their daily driver.
Ideally, we would need somebody who cares about this port to step up and help maintain
it.

Simon
Reply | Threaded
Open this post in threaded view
|

Re: PermissionsDarwin wiki fix

Joel Brobecker
In reply to this post by Galder Zamarreno
Hello Galder,

> Information is missing in https://sourceware.org/gdb/wiki/PermissionsDarwin
>
> On macOS 10.15, when you create the certificate, the default alias is set
> to your email address. This needs to be set to gdb-cert too. This is
> implicit in the `security find-certificate -c gdb-cert` output but is not
> specified.
>
> Without that, when you get to the `codesign --entitlements
> gdb-entitlement.xml -fs gdb-cert $(which gdb)` stage, you get:
>
> error: The specified item could not be found in the keychain.
>
> Can someone update the wiki?

Would it be an option for you to update the wiki? All you need
is an account on the wiki and for me to add you to the list of
authorized editors. The purpose of that list of editors is
purely there to stop spamming.

I think it would be more effective if you maintained it yourself.
I could update it for you, but I might not always undertand
your instructions correctly and thus might say something
incorrect or incomplete.

If you are happy to do so, please send me your wiki ID, and I will
set you up (the wiki ID can be sent to me privately).

Thank you,
--
Joel
Reply | Threaded
Open this post in threaded view
|

Re: PermissionsDarwin wiki fix

Sourceware - gdb list mailing list
Hi all,

I didn't end up working, so no need to update anything. The symbols I was
trying to use were not compatible with macOS in the first place.

Galder


On Fri, Jan 24, 2020 at 11:12 AM Joel Brobecker <[hidden email]>
wrote:

> Hello Galder,
>
> > Information is missing in
> https://sourceware.org/gdb/wiki/PermissionsDarwin
> >
> > On macOS 10.15, when you create the certificate, the default alias is set
> > to your email address. This needs to be set to gdb-cert too. This is
> > implicit in the `security find-certificate -c gdb-cert` output but is not
> > specified.
> >
> > Without that, when you get to the `codesign --entitlements
> > gdb-entitlement.xml -fs gdb-cert $(which gdb)` stage, you get:
> >
> > error: The specified item could not be found in the keychain.
> >
> > Can someone update the wiki?
>
> Would it be an option for you to update the wiki? All you need
> is an account on the wiki and for me to add you to the list of
> authorized editors. The purpose of that list of editors is
> purely there to stop spamming.
>
> I think it would be more effective if you maintained it yourself.
> I could update it for you, but I might not always undertand
> your instructions correctly and thus might say something
> incorrect or incomplete.
>
> If you are happy to do so, please send me your wiki ID, and I will
> set you up (the wiki ID can be sent to me privately).
>
> Thank you,
> --
> Joel
>
>