From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99281 invoked by alias); 19 May 2017 16:28:30 -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 99239 invoked by uid 89); 19 May 2017 16:28:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=sims, thursday, our X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 May 2017 16:28:28 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1C0BC10A87D; Fri, 19 May 2017 12:28:30 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Cc: Luis Machado Subject: [PING] Re: [PATCH v2] Define an error function in the PPC simulator library. Date: Fri, 19 May 2017 16:28:00 -0000 Message-ID: <1629030.HKUpEVVaZy@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <2947645.NYcQbnJ46M@ralph.baldwin.cx> References: <20170405163332.82109-1-jhb@FreeBSD.org> <2136315.0HrDL9yZYa@ralph.baldwin.cx> <2947645.NYcQbnJ46M@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00459.txt.bz2 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 required > > to export a couple of symbols that libsim.a uses including "error". The dgen, > > igen, tmp-filter, tmp-ld-decode, tmp-ld-cache, and tmp-ld-insn programs 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 function > > 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 needs > > to raise an error it probably blows up as error(3) doesn't have the same > > 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 this > > case). I think Pedro took a stab at replacing "error" (there's a thread > > with the subject "gdb-7.12-powerpc-rtems4.12-gdb does not build on FreeBSD" > > on gdb@) but thought this approach was simpler (and could also be merged > > 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. -- John Baldwin