From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41262 invoked by alias); 23 Jun 2017 06:39:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2121 invoked by uid 89); 23 Jun 2017 06:37:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT autolearn=no version=3.3.2 spammy=luis, sims, simulator, Luis X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 06:37:50 +0000 Received: from [88.198.220.130] (helo=sslproxy01.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dOIE0-0000tP-79; Fri, 23 Jun 2017 08:37:48 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dOIDz-000071-Si; Fri, 23 Jun 2017 08:37:48 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id F34972A004F; Fri, 23 Jun 2017 08:38:06 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qOa97A1QGtb5; Fri, 23 Jun 2017 08:38:06 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 873BC2A160A; Fri, 23 Jun 2017 08:38:06 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AQ_uwkXkbVZP; Fri, 23 Jun 2017 08:38:06 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id EE4C72A004F; Fri, 23 Jun 2017 08:38:05 +0200 (CEST) Subject: Re: Re: [PING] Re: [PATCH v2] Define an error function in the PPC simulator library. To: gdb-patches@sourceware.org Cc: John Baldwin References: <20170405163332.82109-1-jhb@FreeBSD.org> <2947645.NYcQbnJ46M@ralph.baldwin.cx> <1629030.HKUpEVVaZy@ralph.baldwin.cx> <2612136.F9AmZpWORa@ralph.baldwin.cx> From: Sebastian Huber Message-ID: <2745d6c3-830f-676f-ada5-d777bbc8a4c5@embedded-brains.de> Date: Fri, 23 Jun 2017 06:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <2612136.F9AmZpWORa@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00669.txt.bz2 On 06/06/17 19:48, John Baldwin wrote: > On Friday, May 19, 2017 09:27:01 AM John Baldwin wrote: >> On Friday, May 05, 2017 12:22:43 PM John Baldwin wrote: >>> On Thursday, April 13, 2017 10:18:14 AM John Baldwin wrote: >>>> On Thursday, April 13, 2017 08:25:27 AM Luis Machado wrote: >>>>> On 04/05/2017 11:33 AM, John Baldwin wrote: >>>>>> Previously this used the error function from GDB directly when linked >>>>>> against GDB instead of the error method in the host callbacks >>>>>> structure. This was exposed via a link error when GDB was converted >>>>>> to C++. The error function invokes the error callback similar to >>>>>> sim_io_error. >>>>>> >>>>> There is another implementation of error (...) in sim/ppc/main.c and >>>>> sim/ppc/misc.c. Should those be kept as is or should we only use the = new >>>>> function you're providing? >>>> My understanding is that they should be kept as-is. This file is only= used >>>> when linking the library against GDB (and actually, rereading the log = message, >>>> I should reword the opening sentence to make this clearer). sim-calls= .o isn't >>>> included in the actual library. Each consumer of the library is requi= red >>>> to export a couple of symbols that libsim.a uses including "error". T= he dgen, >>>> igen, tmp-filter, tmp-ld-decode, tmp-ld-cache, and tmp-ld-insn program= s use >>>> the functions from misc.c. psim uses the functions from main.c, and >>>> GDB uses the functions from sim-calls.o. glibc includes a global func= tion >>>> called 'error' that libsim.a is linking against when linked into GDB on >>>> Linux which is why it doesn't fail to link on Linux (but if it ever ne= eds >>>> to raise an error it probably blows up as error(3) doesn't have the sa= me >>>> calling convention). >>>> >>>>> Also, i don't see error being implemented in the other sim backends. I >>>>> wonder if we should just use whatever is available (sim_io_error?) >>>>> instead of supplying our own ppc-specific version? >>>> Other sims don't use an "error" function (ppc seems to be special in t= his >>>> case). I think Pedro took a stab at replacing "error" (there's a thre= ad >>>> with the subject "gdb-7.12-powerpc-rtems4.12-gdb does not build on Fre= eBSD" >>>> on gdb@) but thought this approach was simpler (and could also be merg= ed >>>> to 7.12 though that may be OBE by now). >>> Ping? >> Ping++ >> >> This does fix a PR, is a regression in 7.12, and is relatively small, so= I >> think it's a candidate for 8.0 if accepted. > Ping? > This issue breaks also at least the PowerPC GDB 7.12 and 8.0 support on=20 MacOS X. Its not only related to FreeBSD. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG.