This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Define an error function in the PPC simulator.


On 25 Nov 2016 09:21, John Baldwin wrote:
> On Friday, November 25, 2016 08:49:08 AM Mike Frysinger wrote:
> > On 24 Nov 2016 07:29, John Baldwin wrote:
> > > Previously this used the error function from GDB directly 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.
> > 
> > ppc/main.c and ppc/misc.c already have error() definitions
> 
> Yes, though those are not included when libsim is linked into gdb itself.
> misc.o is explicitly included for certain binaries in sim/ppc/Makefile.in.
> Note that zalloc() is defined in both misc.c and sim_calls.c as well, I
> suspect for similar reasons.
> 
> Looking at main.c, it overrides various symbols (sim_io_*, also
> zalloc) that are defined in sim_calls.c with local versions.  (Perhaps
> psim should not be linking sim_calls.o in at all?)  'error' is another
> such symbol.

yes, the ppc sim is a bit of mess due to its history.  i'm not sure we
should just keep throwing onto the pile though.

if psim/main.c doesn't need it, then dropping it sounds easy enough.
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]