🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by ha Mon, 30 Oct 1989 04:26
gdb bug report
#310
Author: ha
Date: Mon, 30 Oct 1989 04:26
31 lines
1308 bytes
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?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads