public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@freebsd.org>
To: gdb-patches@sourceware.org
Cc: Luis Machado <lgustavo@codesourcery.com>
Subject: Re: [PING] Re: [PATCH v2] Define an error function in the PPC simulator library.
Date: Tue, 06 Jun 2017 17:49:00 -0000	[thread overview]
Message-ID: <2612136.F9AmZpWORa@ralph.baldwin.cx> (raw)
In-Reply-To: <1629030.HKUpEVVaZy@ralph.baldwin.cx>

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 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.

Ping?

-- 
John Baldwin

  reply	other threads:[~2017-06-06 17:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 16:34 John Baldwin
2017-04-13 13:25 ` Luis Machado
2017-04-14 18:02   ` John Baldwin
2017-05-05 19:51     ` John Baldwin
2017-05-19 16:28       ` [PING] " John Baldwin
2017-06-06 17:49         ` John Baldwin [this message]
2017-06-23  6:39           ` Sebastian Huber
2017-09-04 14:19     ` Pedro Alves
2017-09-05  3:00       ` John Baldwin
2017-09-05  9:14         ` Pedro Alves
2017-09-05 11:46           ` John Baldwin
2017-09-05 19:38             ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2612136.F9AmZpWORa@ralph.baldwin.cx \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).