From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2057.outbound.protection.outlook.com [40.92.90.57]) by sourceware.org (Postfix) with ESMTPS id 99C7D385B831 for ; Mon, 6 Apr 2020 07:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 99C7D385B831 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bernd.edlinger@hotmail.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hq4UYYy55pkqWOh4v84C8upxknKCfepwbtCKgnj/zq8+ipl0VKGX23jtIWc62faAF2UEVN6B6jsHUKerXQnmey0CsaPNQQS9jQCepDPR4RklOcQaTXxAXr3D9uqzhQ39MGhSbfgsbWgUiRFmyrPQKkOmozUtw8ufSnmmRUQsIrtFOyaib5cD+BmYh3buaEL/RnUbIUCJ9Ivq2YgjdMp+rrufWsfUGtMjl0cFxPQlWyEwJB/hz79w145p3yOwHHfu0CQTQavivhxCM+xTUgoJVwzXW6nv7RUYcRJt9Z0E5pGgOdmSj9Bk5A9jvWoby33fnDkY+6AZ2gJrLjqWYvzu1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FDB298zJ4cgWCN+C1GRaLDFjJ04KV3w3rwQKEKfNrqw=; b=CAWxP+KyvUlIE0Amr0b96dGamE2YKfiywv0IyU5LxFfMolPfzKzYUmO/Rib+9aJeUxixxGtV8T4b0825BxQk+cMGo81Ji4L1V7SZhWLDDdeB//k9ReoPowzYs3a71YHhy5a+nx7u1IhS2mwc07uSESoNRqfN+kDJgyE3TKXahzNYvTopr99BQ55s4vmrh9sO8RDQ6YlVZcpcaln0cL2Y56Cmx2CfoygZdSiFyhXn9h0nu1okhYx1SVkNQcXW6jXs6nIwFPZjS4Y2/hjpLKClcKJ4T0TADyk8diQtWRR0aXLzAejvkluI2qX6lIT8m0v3Bc/WiyfzNzA5hO0sZCjGhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hotmail.de; dmarc=pass action=none header.from=hotmail.de; dkim=pass header.d=hotmail.de; arc=none Received: from VI1EUR05FT028.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc12::48) by VI1EUR05HT112.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc12::461) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 07:14:51 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (2a01:111:e400:fc12::4c) by VI1EUR05FT028.mail.protection.outlook.com (2a01:111:e400:fc12::439) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Mon, 6 Apr 2020 07:14:51 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:15C009E3092088A385683D9364324333A45C93B9816F2B3F1F18D2C01837EB11; UpperCasedChecksum:EDB8F9232AED3D0EC5783CE4374FE867AC9CD44EB292A7C1FC1642766D30D467; SizeAsReceived:8109; Count:50 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::d57:5853:a396:969d]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::d57:5853:a396:969d%7]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 07:14:51 +0000 Subject: Re: static linking of gdb From: Bernd Edlinger To: Eli Zaretskii Cc: gdb-patches@sourceware.org, Tom Tromey References: <837dyut6kx.fsf@gnu.org> Message-ID: Date: Mon, 6 Apr 2020 09:14:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM0PR10CA0002.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::12) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) X-Microsoft-Original-Message-ID: <5afdc258-185f-29cb-7ff7-9dd687022683@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (92.77.140.102) by AM0PR10CA0002.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Mon, 6 Apr 2020 07:14:51 +0000 X-Microsoft-Original-Message-ID: <5afdc258-185f-29cb-7ff7-9dd687022683@hotmail.de> X-TMN: [uizcpj8eQCik6jOjWy+p0FDS1GkTBN2g] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 495bb790-36cf-4921-d42c-08d7d9fa32b1 X-MS-TrafficTypeDiagnostic: VI1EUR05HT112: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DZz3qPfM+J32ZtygmL4nt/M9tEQapqYRNaDGZ9Vq1vKiJq8qQUyU/qUAlkxAn9TSgHFh4R4prqcZpFtAfNwLOxZhWFrno+F/id8SBKaGc+SSiDe+3go2WMTJN3HbVGS/M7TdwxSoo6B7w+1E81/jv/dY3dsifGQpZA5DCLR8z+cV71Jr768hJyF4lcPsIetTGgKs4JLHIjbqvCkulFdqKwq5cQBK+MDy+WjEpG88O0s= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR03MB5170.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: ofkP/0RxpglHI/cB2+4FmpsOwX6C7UjfP1EEqDG1oOIZu8WeM+yV5BrHwo6lvCnqmJSrPiqcyBkvyXlOzzmV1VfYLK+/vVGJjW/M2totVHNOWdIrG33E0fNeCtuQGokBvtvzEZOcf1W8XLhQ3ek9Ag== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 495bb790-36cf-4921-d42c-08d7d9fa32b1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 07:14:51.5758 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR05HT112 X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00, FORGED_MUA_MOZILLA, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 07:14:55 -0000 On 4/6/20 5:27 AM, Bernd Edlinger wrote: > > > On 4/5/20 3:17 PM, Eli Zaretskii wrote: >>> From: Bernd Edlinger >>> Date: Sun, 5 Apr 2020 12:13:42 +0200 >>> >>> I noticed that gdb is currently not >>> linking libstdc++ statically, as it did >>> in the past if I remember correclty. >> >> You need to request that by passing --with-static-standard-libraries >> to the configure script. Note that if you do that, you may encounter >> an error at configure time, because the configure script thinks the >> above option is incompatible with source-highlight library (without >> checking whether a static version of that library is available). This >> was reported here: >> >> https://sourceware.org/pipermail/gdb-patches/2020-February/165843.html >> >> but AFAIK was not fixed yet. >> > > But when I follow this pointer, > I end up here: > https://gcc.gnu.org/legacy-ml/gcc-patches/2019-08/msg00287.html > >> gdb should normally not be linked with -static-libstdc++. Currently >> this has not caused problems, but it's incompatible with catching an >> exception thrown from a shared library -- and a subsequent patch >> changes gdb to do just this. > > Now this makes me a bit nervios. > > Tom can you explain where this might happen? > In general I don't think that throwing and catching > exceptions makes a good design, please dont take that personally, > but throwing exceptions of a shared library looks like hazard to me. > Just as an idea, have you thought of a wrapper.so that does invoke the GNU highlight.so and catches the exceptions, and converts them to return codes? Bernd. > > Thanks > Bernd. >