This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Define an error function in the PPC simulator library.
- From: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at FreeBSD dot org>, Luis Machado <lgustavo at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Joel Brobecker <brobecker at adacore dot com>
- Date: Tue, 5 Sep 2017 10:14:08 +0100
- Subject: Re: [PATCH v2] Define an error function in the PPC simulator library.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D10C525C28
- References: <20170405163332.82109-1-jhb@FreeBSD.org> <aba5ecb5-42f0-9d68-b990-9ae7c412e2e7@codesourcery.com> <2136315.0HrDL9yZYa@ralph.baldwin.cx> <6ff2bd23-446a-b27c-0b04-2c0d6b92315b@redhat.com> <8dcb1a42-4367-527e-1e5b-6f250c5e0e4c@FreeBSD.org>
On 09/05/2017 04:00 AM, John Baldwin wrote:
> On 9/4/17 7:19 AM, Pedro Alves wrote:
>> On 04/13/2017 06:18 PM, 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.
>>
>> It'd be nice to include this info somewhere, likely in the commit log.
>
> Will do. Is there still time to merge this into 8.0.1
I think the plan was yesterday, but it didn't happen yet, so I think
there's still time, though likely not much.
(and if so, can you approve it)?
Yes, I think it's safe.
You'll need to be sure that there's an entry for the issue
listed at:
https://sourceware.org/gdb/wiki/GDB_8.0_Release
Either via the bugzilla query or explicitly listed.
Thanks,
Pedro Alves