Re: gdb-7.12 powerpc-rtems4.12-gdb does not build on FreeBSD.

Pedro Alves
2016-11-24T14:02:06Z

On 11/24/2016 12:33 PM, Pedro Alves wrote:
> On 11/24/2016 12:12 PM, Pedro Alves wrote:
>
>> The PPC sim shouldn't be calling GDB's "error" directly. If it does,
>> then that's should be fixed. There's an "error" method in the
>> host_callback structure (filled in by GDB) that should be used instead.
>
> I tried reproducing on GNU/Linux here, but it doesn't. Looks like
> "error" ends up resolved to something, most probably glibc's own
> "error" function (a GNU extension):
>
> https://linux.die.net/man/3/error
>
> So on GNU/Linux those sim "error" calls probably crash at run time.

I've started writing a patch, and there are sooo many "error" calls
all over this sim... It'll be a larger patch than I thought.

For 7.12.1, the simplest would probably be to give GDB's "error"
function extern "C" linkage.

Meanwhile, if you're not interested in the sim,
you should be able to workaround this by configuring
with --disable-sim.

Chris, could you open a bug report in bugzilla?

Thanks,
Pedro Alves