[gnu.gdb.bug] gdb bug report

ha@CS.PURDUE.EDU (10/30/89)

I am using gdb 3.3 on Sun 3/50 running SunOS 4.0.

If a program has a variable named `arr', and I try to assign a value
to it using the `set' command from within gdb, e.g., `set arr = 100',
it complaints about invalid syntax in expression. If I use the command
`print arr = 100' instead, it works fine. 

What is happenning is that while parsing `set arr = 100', `arr' is 
treated as an abbreviation of `array-max', so the command is internally
expanded into `set array-max = 100' which causes the syntax error (as 
the symbol `=' is not allowed with `set array-max' subcommand). 

Shouldn't the presence of `=' in a `set' command suppress abbreviation 
expansion, and treat the expression to the left of `=' as a program 
variable?

Try the above experiment with the following program:

main()
{
  int arr, other;

  arr = 1;
  other = 2;

} 

-- Hira.

PS: If you fix the above problem, could you please send me the patch?