Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CMD MSCP SCSI problems? (again?)



On Wed, 8 Feb 2023, Johnny Billquist wrote:

> > > I am crossing my fingers that the new version of gcc, with improved VAX
> > > backend might make it possible to do native builds again.
> > 
> >    That would be nice.
> 
> I just wish it would come sooner. The actual fixes to gcc happened more than a
> year ago, but I'm not sure if that version of gcc have been released yet, much
> less been incorporated into NetBSD...

 There have been two upstream GCC major releases since; third is underway.  
They always happen annually end of April/beginning of May nowadays.  Plus 
numerous maintenance releases.  These are roughly semi-annual.

 Mind that however, as I noted elsewhere[1] in the context of working on 
VAX/NetBSD `gdbserver', as recently as last month I discovered the libgcc 
frame unwinder for the VAX target is completely non-functional and AFAICT 
has always been ever since arrangements for it have been made in the VAX 
backend back in ~2002.  This means that any code that relies on exception 
handling (C++ in particular) will just crash as soon as an exception is 
thrown.

 See for yourself: run `gdb' and type ^C; the result is supposed to be as 
follows:

(gdb) Quit
(gdb) 

 The major issue here is libgcc generic DWARF frame unwinder is completely 
unfit for the unusual VAX frame layout and the hooks provided for targets 
to wire it in GCC seem inadequate for VAX.  There are two ways to move 
forward AFAICT: either to implement a modified VAX-specific DWARF frame 
unwinder (there's prior art for other targets, so it's not completely 
unfeasible), or to take advantage of the fixed and fully-described by 
hardware VAX frame layout and implement a VAX-specific dedicated frame 
unwinder.  The latter would benefit code built without unwind tables.

 I have not made my mind yet as to which path to take, and at the moment 
GCC is in a regression and documentation fixing mode anyway, so I am not 
going to dive into it right away; I have other priorities.  I do encourage 
at least to QA the newer versions of GCC with native NetBSD, but owing to 
this issue do expect problems.  At least GCC itseld does not (yet) use 
exceptions.

References:

[1] "[gdb/tdep, vax] Remove gdbarch_deprecated_function_start_offset", GDB
    PR 29804, <https://sourceware.org/bugzilla/show_bug.cgi?id=29804#c12>

 FWIW,

  Maciej


Home | Main Index | Thread Index | Old Index