aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-block.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-11-05 10:12:27 -0700
committerTom Tromey <tromey@adacore.com>2019-11-14 11:58:50 -0700
commit55708e99aca33f2ee9036732d778cd5899d2a2b0 (patch)
treee62533e80ec25aa545539f243bb34d82ec125821 /gdb/python/py-block.c
parent6b92c0d3533b8b01970e6ba5aa92581e027a63c2 (diff)
downloadbinutils-55708e99aca33f2ee9036732d778cd5899d2a2b0.zip
binutils-55708e99aca33f2ee9036732d778cd5899d2a2b0.tar.gz
binutils-55708e99aca33f2ee9036732d778cd5899d2a2b0.tar.bz2
Allow re-assigning to convenience variables
A customer reported somewhat odd gdb behavior, where re-assigning an array or string to a convenience variable would yield "Too many array elements". A test case is: (gdb) p $x = "x" (gdb) p $x = "xyz" This patch fixes the problem by making a special case in the evaluator for assignment to convenience variables, which seems like the correct behavior. Note that a previous patch implemented this for Ada, see commit f411722cb ("Allow re-assigning to convenience variables"). gdb/ChangeLog 2019-11-14 Tom Tromey <tromey@adacore.com> * eval.c (evaluate_subexp_standard) <BINOP_ASSIGN>: Do not pass an expected type for the RHS if the LHS is a convenience variable. gdb/testsuite/ChangeLog 2019-11-14 Tom Tromey <tromey@adacore.com> * gdb.base/gdbvars.exp (test_convenience_variables): Add regression tests. Change-Id: I5e66a2d243931a5c43c7af4bc9f6717464c2477e
Diffstat (limited to 'gdb/python/py-block.c')
0 files changed, 0 insertions, 0 deletions