s390: if -> gdb_assert for tdesc_has_registers check
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>
Tue, 23 Jan 2018 12:37:43 +0000 (13:37 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 23 Jan 2018 12:37:43 +0000 (13:37 +0100)
commit650f5e137006fb7aea98e33d2ca9c6ac6712334c
treed1ca0965303bd00c315c7f513e9b7d68fb59bae5
parent47c9317e71768ba9788c6dc055fb6932d0f0923a
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
gdb/ChangeLog
gdb/s390-linux-tdep.c
This page took 0.027153 seconds and 4 git commands to generate.