Handle fixed-point division by zero
authorTom Tromey <tromey@adacore.com>
Mon, 14 Dec 2020 14:35:45 +0000 (07:35 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 14 Dec 2020 14:35:45 +0000 (07:35 -0700)
commita3bdae4ef826f2b59cc475e530b2a4130185cfac
tree18d4c1cd273e34ce9e7766d9a824d58ab14daec3
parentbf6d80378274fa33001f2ca1cef084eabc904178
Handle fixed-point division by zero

fixed_point_binop did not account for division by zero.  This would
lead to gdb getting SIGFPE and subsequently cause some test cases to
hang.

gdb/ChangeLog
2020-12-14  Tom Tromey  <tromey@adacore.com>

* valarith.c (fixed_point_binop): Call error on division by zero.

gdb/testsuite/ChangeLog
2020-12-14  Tom Tromey  <tromey@adacore.com>

* gdb.dwarf2/dw2-fixed-point.exp: Add test for division by zero.
gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
gdb/valarith.c
This page took 0.025091 seconds and 4 git commands to generate.