This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: breakpoint for accessing memory location


Eli Zaretskii wrote:

Well, yes, but how far should we go in explaining the semantics of programming languages? I mean, isn't it common knowledge that the name of a variable stands for its value? When the manual says ``the value of a variable'', what could the reader possibly think of except the variable's name?


True, if C is the sole perspective. If so please disregard.


My remark stems from experience with dynamic programming languages. In that area, separate methods exist to programmatically refer to the name of a variable and to its value (Tcl example appended).

So, it depends on your background I suppose. And mine may be odd. Also, it may be ineffective to consider from where people may enter the debugging arena (or C arena). I leave this entirely to your judgement.

Regardless, I'm already very pleased with the explanation as it is now.

Thanks,

Erik
====

Interactive Tcl example (I guess Python and Perl show similar behaviour):

% set variableName 34
34
% puts $variableName
34
% puts variableName
variableName

== end of post ==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]