650f5e1 s390: if -> gdb_assert for tdesc_has_registers check

2 files Authored by Philipp Rudo 6 years ago, Committed by Andreas Arnez 6 years ago,
    s390: if -> gdb_assert for tdesc_has_registers check
    
    Before doing the tdesc validation there is a check whether the tdesc has
    registers or not.  This check is not only unnecessary but wrong.
    
    First the check is done after a default tdesc is assigned if the original
    tdesc has no registers.  These default tdescs always have registers so the
    check alway returns true.
    
    Second if the default tdesc would not have registers the check only skips
    the tdesc validation instead of returning an error.  This would trigger a
    gdb_assert later on in tdesc_use_registers.
    
    gdb/ChangeLog:
    
    	* s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
    	tdesc_has_registers check
    
        
file modified
+5 -0
file modified
+6 -8