[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decladebug

Title:Digital Ladebug debugger
Moderator:TLE::LUCIA
Created:Fri Feb 28 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:969
Total number of notes:3959

878.0. "Ladebug doesn't like data member called "state"" by GALVIA::STONES (Tom Stones) Tue Mar 11 1997 06:49

I have a c++ class with a member called state:

class RCS_t {
private:
  int		state;			
  RCS_t         *txRCS;			
...
}


When I examine the data member called "state", ladebug complains:

  
(ladebug) p rcs1->state
print rcs1->state
                ^
Unable to parse input as legal command or C++ expression.
(ladebug) whatis rcs1
RCS_t* rcs1
(ladebug) p rcs1->txRCS
0x12000

But it lets me examine it if it is in parentheses:

(ladebug) p (rcs1->state)
1
T.RTitleUserPersonal
Name
DateLines
878.1TLE::LUCIAhttp://asaab.zko.dec.com/~lucia/biography.htmlTue Mar 11 1997 13:525
Such is the way of the yacc-generated parser.  "state" is a reserved word in the
ladebug grammar.  Same with "print print" or "print thread" -- expressions which
are also ladebug reserved words must be enclosed in ().

Tim
878.2Mmmmm...GALVIA::STONESTom StonesWed Mar 12 1997 08:325
Mmmm - Yes I can see how a yacc grammar might cause it, but surely it is still a
bug.  (a) It's a pain in the ... for the ladebug user and (b) the expression I
used is a legal C++ expression, so the error message indicates you have a
problem:
"Unable to parse input as legal command or C++ expression."
878.3TLE::LUCIAhttp://asaab.zko.dec.com/~lucia/biography.htmlWed Mar 12 1997 14:3011
A bug is behavior other than what is claimed.  While we agree it is a pain, it
is the claimed and intended behavior.  Significant work was done to investigate
this some time ago.  I do not believe there are any current plans to revisit
this.  At the time, you could not get ladebug to print variable named 'state' or
a Fortran variable named 'int'.  Now, you can print (state) or print INT and it
will work just fine.

"Noted".


Tim
878.4TLE::LUCIAhttp://asaab.zko.dec.com/~lucia/biography.htmlThu Mar 13 1997 09:304
Wanfang has pointed out the error of my thinking.  Apparently, this is on the
list to be re-opened.  I apologize for being uninformed.

Tim