]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Define an error function in the PPC simulator library.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 5 Sep 2017 02:53:50 +0000 (19:53 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 5 Sep 2017 02:56:00 +0000 (19:56 -0700)
commit625ce09c1cfb557725310f602ee66ac1475d780e
tree319e01cb74c28fae3fcf1b9fb40a5b85cc6a02c5
parenta379bfd00effbbb0fb4df02dc686c2c110023cea
Define an error function in the PPC simulator library.

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.

Note that there are also error functions in sim/ppc/main.c and
sim/ppc/misc.c.  The ppc libsim.a expects each consumer to provide
several symbols used by the library including "error".  sim-calls.c
provides these symbols when the library is linked into gdb.  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.

sim/ppc/ChangeLog:

PR sim/20863
* sim_calls.c (error): New function.
sim/ppc/ChangeLog
sim/ppc/sim_calls.c