From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70394 invoked by alias); 12 Aug 2015 13:38:07 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 70382 invoked by uid 89); 12 Aug 2015 13:38:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausc60pc101.us.dell.com Received: from ausc60pc101.us.dell.com (HELO ausc60pc101.us.dell.com) (143.166.85.206) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 12 Aug 2015 13:38:05 +0000 X-LoopCount0: from 10.175.216.250 From: To: CC: Subject: Re: GDB on Mac OS Date: Wed, 12 Aug 2015 13:38:00 -0000 Message-ID: <95D02D49-26D2-454E-8E11-70EBF7CB5EC5@dell.com> References: <1739A299-ACE9-4D7F-A1DF-E64C89ECC8D1@dell.com> <20150812031208.GJ22225@adacore.com> In-Reply-To: <20150812031208.GJ22225@adacore.com> Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00016.txt.bz2 DQo+IE9uIEF1ZyAxMSwgMjAxNSwgYXQgMTE6MTIgUE0sIEpvZWwgQnJvYmVj a2VyIDxicm9iZWNrZXJAYWRhY29yZS5jb20+IHdyb3RlOg0KPiANCj4+IEkg anVzdCB0ZXN0IGJ1aWxkcyBvZiB0aGUgY3VycmVudCBnZGIgKEdJVCBtYXN0 ZXIpIG9uIE1hYyBPUyAxMC4xMC40Lg0KPj4gSSBidWlsdCBpdCB3aXRoIHRo ZSBzdG9jayBMTFZNLCB0aGVuIHdpdGggR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vciBteSBwYXNzd29yZCwgd2hpY2ggaXMgdGhlIGFsdGVybmF0 aXZlKS4gIFdoZXJlIHdvdWxkIEkgbG9vayBmb3IgaW5mb3JtYXRpb24gb24g aG93IHRvIGRvIHRoaXM/ICBJdCB3b3VsZCBzZWVtIGxvZ2ljYWwgZm9yIOKA nG1ha2UgY2hlY2vigJ0gZWl0aGVyIHRvIGRvIGl0LCBvciB0byByZXBvcnQg dGhhdCBpdCBuZWVkcyB0byBiZSBkb25lLg0KDQo+IA0KPiBNYWNPUyAxMC4x MCBzZWVtcyB2ZXJ5IG9sZCwgYXQgdGhpcyBwb2ludC4gV2UgdGVzdCBvbiAx My40IGFuZCAxNC4zLg0KDQpTb3JyeSwgSSBjb25mdXNlZCB0aGluZ3MgYnkg dGFsa2luZyBhYm91dCB0aGUgT1MgdmVyc2lvbiBhcyBvcHBvc2VkIHRvIHRo ZSBEYXJ3aW4gdmVyc2lvbi4gIEl04oCZcyBNYWMgT1MgWCAxMC4xMC40IChZ b3NlbWl0ZSksIERhcndpbiAxNC40LjAsIHg4Nl82NC4NCg0KCXBhdWwNCg== >From gdb-return-44593-listarch-gdb=sources.redhat.com@sourceware.org Wed Aug 12 13:52:12 2015 Return-Path: Delivered-To: listarch-gdb@sources.redhat.com Received: (qmail 7460 invoked by alias); 12 Aug 2015 13:52:12 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Delivered-To: mailing list gdb@sourceware.org Received: (qmail 7450 invoked by uid 89); 12 Aug 2015 13:52:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f170.google.com Received: from mail-ig0-f170.google.com (HELO mail-ig0-f170.google.com) (209.85.213.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 12 Aug 2015 13:52:10 +0000 Received: by igui7 with SMTP id i7so61765272igu.1 for ; Wed, 12 Aug 2015 06:52:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.40.42 with SMTP id u10mr22642860igk.71.1439387526282; Wed, 12 Aug 2015 06:52:06 -0700 (PDT) Received: by 10.107.170.164 with HTTP; Wed, 12 Aug 2015 06:52:06 -0700 (PDT) In-Reply-To: <95D02D49-26D2-454E-8E11-70EBF7CB5EC5@dell.com> References: <1739A299-ACE9-4D7F-A1DF-E64C89ECC8D1@dell.com> <20150812031208.GJ22225@adacore.com> <95D02D49-26D2-454E-8E11-70EBF7CB5EC5@dell.com> Date: Wed, 12 Aug 2015 13:52:00 -0000 Message-ID: Subject: Re: GDB on Mac OS From: Jack Howarth To: "Paul_Koning@dell.com" Cc: brobecker@adacore.com, "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00017.txt.bz2 Content-length: 4505 On Wed, Aug 12, 2015 at 9:37 AM, wrote: > >> On Aug 11, 2015, at 11:12 PM, Joel Brobecker wro= te: >> >>> I just test builds of the current gdb (GIT master) on Mac OS 10.10.4. >>> I built it with the stock LLVM, then with GDB 5.2. Both require the >>> configure switch --disable-build-warnings in order for things to build >>> (the default blows up with compiler error messages). >> >> The fact that it has build warnings is not too surprising. Outside >> of GNU/Linux, I'm not sure it's building warning-free on any >> other host. Building with --disable-werror is how we do it. > > Ok, but it would make sense for the default configure to select the corre= ct compile options that the build will run to completion. > >> >>> I then ran =E2=80=9Cmake check=E2=80=9D in the gdb subdirectory. The r= esults were >>> slightly different for the two builds, but in both I see about 5000 >>> pass and a bit over 4000 fail. That=E2=80=99s an awfully high fail >>> percentage. Is that expected? Is GDB still intended to work on Mac >>> OS? Should I report details on the failures, and if so, what should I >>> report and what logs are needed? >> >> It's working pretty well for us. Probably not perfect, but fairly >> well. A couple of things that come to mind: >> >> - I think we changed the default in AdaCore's compiler to build >> with -fno-common, although I'm not certain. You might want to >> try that and see if that brings you better results; >> >> - for actual debugging of a live inferior, the debugger needs >> to be codesigned - try with a simple example first to see >> if you can run a program and break somewhere. > > So is that the reason why so many tests fail? I know of the codesigning = requirement from actually using the debugger (or rather, answering the prom= pt for my password, which is the alternative). Where would I look for info= rmation on how to do this? It would seem logical for =E2=80=9Cmake check= =E2=80=9D either to do it, or to report that it needs to be done. > The instructions we provide in the fink gdb packaging are.... To execute fsf-gdb without using sudo, the binary needs to be codesigned on each machine that it is installed on. This requires the creation of a certificate and signing of the fsf-gdb binary with the following steps. 1) Open the application 'Keychain Access' from the Utilities folder. 2) In the Keychain Access application, select the 'Create a Certificate...' submenu item from the 'Keychain Access' menu and the 'Certificate Assistant' submenu. 3) In the 'Certificate Assistant' panel, enter 'gdb-cert' for the name of the certificate and leave the Identity Type as 'Self Signed Root'. Set the Certificate Type to 'Code Signing' and enable the 'Let me override defaults' checkbox. Click the 'Continue' button. You may wish to lengthen the default 365 day lifespan of the certificate to 3650 days. 4) Continue clicking the 'Continue' buttons that appear until you see the panel to 'Specify a Location For The Certificate'. Set the Keychain to 'System' at this point. If you can't store the certificate in the 'System' keychain, create it in the 'login' keychain, then export it. You can then import it into the 'System' keychain. 5) Select the 'System' entry in the Keychains listing of the Keychain Access window. Select your newly created 'gdb-cert' certificate and select the 'Get Info' contextual menu item, expand the 'Trust' item and set 'Code Signing' to '"Always Trust'. 6) Quit the 'Keychain Access' application. 7) On darwin12 or later, you must edit the line in the file /System/Library/LaunchDaemons/com.apple.taskgated.plist from -s to -sp adding the '-p' option. Due to kernel caching, a restart is needed for the changes to take effect. 8) After the restart, the actual codesigning should be done with the command 'sudo codesign -s gdb-cert %p/lib/fsf-gdb/fsf-gdb'. Note it can take over five minutes for the codesigning to complete. Of course you'll have to adjust the binary name and location for gdb to where ever you installed it. Jack >> >> MacOS 10.10 seems very old, at this point. We test on 13.4 and 14.3. > > Sorry, I confused things by talking about the OS version as opposed to th= e Darwin version. It=E2=80=99s Mac OS X 10.10.4 (Yosemite), Darwin 14.4.0,= x86_64. > > paul