f411722 Allow re-assigning to convenience variables

Authored and Committed by Tom Tromey 4 years ago
    Allow re-assigning to convenience variables
    
    In Ada mode, re-assigning an array of a different size to a
    convenience variable will cause an error:
    
        (gdb) set lang ada
        (gdb) set $v := "abc"
        (gdb) set $v := "abcd"
        cannot assign arrays of different length
    
    However, this does not really make sense -- instead, it should always
    be possible to overwrite a convenience variable.
    
    This patch fixes this bug.
    
    This was reviewed off-list by Joel.  I'm checking it in.
    
    gdb/ChangeLog
    2019-06-14  Tom Tromey  <tromey@adacore.com>
    
    	* ada-lang.c (ada_evaluate_subexp) <case BINOP_ASSIGN>: Always
    	allow assignment to an internalvar.
    
    gdb/testsuite/ChangeLog
    2019-06-14  Tom Tromey  <tromey@adacore.com>
    
    	* gdb.ada/set_wstr.exp: Add reassignment test.
    
        
file modified
+5 -0
file modified
+5 -1
file modified
+4 -0