From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36628 invoked by alias); 12 Feb 2017 21:05:55 -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 36593 invoked by uid 89); 12 Feb 2017 21:05:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=U*dje.gcc, sk:djegcc, sk:dje.gcc, djegccgmailcom X-HELO: mail-qt0-f170.google.com Received: from mail-qt0-f170.google.com (HELO mail-qt0-f170.google.com) (209.85.216.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 12 Feb 2017 21:05:52 +0000 Received: by mail-qt0-f170.google.com with SMTP id v23so70641610qtb.0 for ; Sun, 12 Feb 2017 13:05:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fU7ZavTWhkOiX5QnLZ78oVw48Bl62w9B0+wgLuj78rA=; b=etqqpVzFe3INPSUJBypHOztRuvCiKzy0shnru777BY4yNdxIjx2R8Jnzhkh7u09pLU W39GJTr1rugrdoUT0y+WEyAn+a9baLFQAQlfbmlcyTopMG4xHN+ndq4xcrTTcXZViYUe YsrRbNPAO/t8rZcn0nlw65UU2wv1mcPhdv7c8ZChYJvZ2q0D5tCEjwg5EK7NeT3bnOg5 m4wayaS4l7gvaXKfg+ykbIzkQq6ff7yZ2SPj0ljvXdtTFNySMK/d8YkNcsUj+7CCWjWt pI7cZigtcllcVzU8irWFCmQ2ytcbXWJ9ONfWTVW5TuDCh7o4O2DIEKQZ0IWaRiUfYX32 8OJA== X-Gm-Message-State: AMke39nbwVeL1UNZ+Ov09OL5tCxJbz7sIHUyOqgYBFlOMkG+ca45/hhlvEGItZHCY6/+Yrwdiioq0//pYVe9Sg== X-Received: by 10.200.52.27 with SMTP id u27mr19522828qtb.26.1486933551022; Sun, 12 Feb 2017 13:05:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.181.202 with HTTP; Sun, 12 Feb 2017 13:05:50 -0800 (PST) In-Reply-To: References: <21a21388-b1d9-816c-377e-d4e084cc399e@redhat.com> <331a72d9-050c-7cd7-adc2-78e5f1ed6f85@redhat.com> <57147db4-83c3-2a8f-0c74-0efc6a94e9f5@redhat.com> From: David Edelsohn Date: Sun, 12 Feb 2017 21:05:00 -0000 Message-ID: Subject: Re: Issue with Latest GDB on AIX with GCC-6.12 To: Nitish Kumar Mishra , Pedro Alves Cc: "gdb@sourceware.org" , Yao Qi Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2017-02/txt/msg00027.txt.bz2 On Fri, Feb 10, 2017 at 10:52 AM, David Edelsohn wrote: > On Fri, Feb 10, 2017 at 2:22 AM, Nitish Kumar Mishra > wrote: >> Hi All, >> >>> 3. GDB with GCC-6.1, 64 bit mode, with static options : NOT WORKING >>> 4. GDB with GCC-6.1, 64 bit mode, without static options : COMPILATION ERROR. >>> >>> P.S.: Static options means: -static-libstdc++ -static-libgcc >> >>>What is the compilation error? >> With GCC-6.1, 64 bit mode, WITHOUT static option, below is the output of the >> compilation error: >> >> ld: 0711-317 ERROR: Undefined symbol: ._Unwind_Resume >> ld: 0711-317 ERROR: Undefined symbol: .__cxa_atexit >> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. >> collect2: error: ld returned 8 exit status >> >> >>> Does GCC 4.8.5 and GCC 6.1 fail in the same manner? Neither catch the >> exception? >> Yes, by NOT WORKING, I meant, niether catching the exception and process is >> getting terminated. > > Who built GCC 6.1 for you? Is this an IBM build or Bull Freeware? > > The version of GCC that you are using was built incorrectly. There > have been problems in the past with some of the pre-built binaries > containing libraries with recently added symbols not correctly > exported. > > There seems to be a problem with exception handling and -static-libgcc > in recent versions of GCC on AIX. I don't know what you have been > testing and why you were not able to triage this. Investigating the exception handling problem with another non-IBM AIX developer, the problem appears to be that statically linking libgcc and libstdc++ create two, separate and distinct copies of the unwind tables. These tables are not merged and the unwinder cannot find the EH catcher. It's not immediately clear why this worked in GCC 4.8 and not in GCC 4.9 and later. GDB with exception handling should work if libgcc and libstdc++ are linked as shared libraries. The linking error with GCC 6.1 is cockpit error. Can we disable -static-libgcc and -static-libstdc++ for AIX? Thanks, David