Article View: gnu.gdb.bug
Article #310gdb bug report
From: ha
Date: Mon, 30 Oct 1989 04:26
Date: Mon, 30 Oct 1989 04:26
31 lines
1308 bytes
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?
Technical Details
Message-ID:
<8910300426.AA24998@serc3.cs.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CS.PURDUE.EDU!haShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CS.PURDUE.EDU!ha From: ha@CS.PURDUE.EDU Newsgroups: gnu.gdb.bug Subject: gdb bug report Message-ID: <8910300426.AA24998@serc3.cs.purdue.edu> Date: 30 Oct 89 04:26:42 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31