Fix a crash in compile_to_object function

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Sep 9 08:07:00 GMT 2019


Hi Libor,

> On non-Linux platforms, gdb crashes when compile command is issued
> because of the null pointer in struct osabi_names gdb_osab. The attached
> patch adds a check to avoid this crash and adds osabi name for Solaris.
> However, there is probably more work required to enable compile feature
> on Solaris (e.g., solaris_infcall_munmap) and other platforms.

just out of curiosity: what prompted you to try this?

I gave it a very quick whirl myself, trying to run the
gdb.compile/compile.exp test on amd64-pc-solaris2.11 with gdb master and
libcc1.so from gcc mainline: all I got was a SIGTRAP from the very first
compile command.

That said, I'm quite unlikely to work on this any time soon: with
ca. 2500 failures in the gdb testsuite on Solaris and even basic
features unimplented (e.g. I'm currently looking into TLS support), I
believe there are way more pressing issues.  However, if you want to
give it a try yourself, I'm more than happy to help get a patch in.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gdb-patches mailing list