From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112649 invoked by alias); 24 Nov 2016 14:02:06 -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 112633 invoked by uid 89); 24 Nov 2016 14:02:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sooo X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Nov 2016 14:01:55 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7A0E635E2; Thu, 24 Nov 2016 14:01:54 +0000 (UTC) Received: from [127.0.0.1] (ovpn03.gateway.prod.ext.phx2.redhat.com [10.5.9.3]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAOE1rwl007977; Thu, 24 Nov 2016 09:01:53 -0500 Subject: Re: gdb-7.12 powerpc-rtems4.12-gdb does not build on FreeBSD. To: John Baldwin , Chris Johns References: <5834D6E0.9060601@rtems.org> <1893490.1c09n3VfH9@ralph.baldwin.cx> <58363493.6010108@rtems.org> <2608815.dbYXHQl3xm@ralph.baldwin.cx> <1ea845b2-d6bc-e9f7-d649-bc4f37462d92@redhat.com> <83274785-223a-952d-f881-eda75b94599d@redhat.com> Cc: gdb@sourceware.org From: Pedro Alves Message-ID: <2c9c6609-437d-a4a1-23d5-432aa0414eb7@redhat.com> Date: Thu, 24 Nov 2016 14:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <83274785-223a-952d-f881-eda75b94599d@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00047.txt.bz2 On 11/24/2016 12:33 PM, Pedro Alves wrote: > On 11/24/2016 12:12 PM, Pedro Alves wrote: > >> The PPC sim shouldn't be calling GDB's "error" directly. If it does, >> then that's should be fixed. There's an "error" method in the >> host_callback structure (filled in by GDB) that should be used instead. > > I tried reproducing on GNU/Linux here, but it doesn't. Looks like > "error" ends up resolved to something, most probably glibc's own > "error" function (a GNU extension): > > https://linux.die.net/man/3/error > > So on GNU/Linux those sim "error" calls probably crash at run time. I've started writing a patch, and there are sooo many "error" calls all over this sim... It'll be a larger patch than I thought. For 7.12.1, the simplest would probably be to give GDB's "error" function extern "C" linkage. Meanwhile, if you're not interested in the sim, you should be able to workaround this by configuring with --disable-sim. Chris, could you open a bug report in bugzilla? Thanks, Pedro Alves