diff options
author | Tom Tromey <tom@tromey.com> | 2020-04-01 14:09:52 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-01 14:09:53 -0600 |
commit | c34e87146628a14cf662dca46aac893d06502f52 (patch) | |
tree | 3dd1b1f4ab1cea91ed807e40b81427fb696f4ce7 /gdb/target.h | |
parent | fa649bb7d3c8fd97c1d8f01a3023094468f66ca4 (diff) | |
download | gdb-c34e87146628a14cf662dca46aac893d06502f52.zip gdb-c34e87146628a14cf662dca46aac893d06502f52.tar.gz gdb-c34e87146628a14cf662dca46aac893d06502f52.tar.bz2 |
Implement complex arithmetic
This adds support for complex arithmetic to gdb. Now something like
"print 23 + 7i" will work.
Addition, subtraction, multiplication, division, and equality testing
are supported binary operations.
Unary +, negation, and complement are supported. Following GCC, the ~
operator computes the complex conjugate.
gdb/ChangeLog
2020-04-01 Tom Tromey <tom@tromey.com>
PR exp/25299:
* valarith.c (promotion_type, complex_binop): New functions.
(scalar_binop): Handle complex numbers. Use promotion_type.
(value_pos, value_neg, value_complement): Handle complex numbers.
gdb/testsuite/ChangeLog
2020-04-01 Tom Tromey <tom@tromey.com>
* gdb.base/complex-parts.exp: Add arithmetic tests.
Diffstat (limited to 'gdb/target.h')
0 files changed, 0 insertions, 0 deletions