[LCP]Printing a Variables Value..!!!
Mike and/or Penny Novack
stepbystepfarm at mtdata.com
Mon Jun 23 20:18:01 UTC 2003
I believe what Mohamed is looking for is the capability of a BATCH debugger.
I am too unfamiliar with the capabilities of the available C debuggers
to be able to advise him. Most of you who have used debuggers have
probably used them in interactive mode which is handy for many
situations. Unfortunately interactive debugging is less useful for other
common situations.
He has a LARGE application and perhaps thousands of variables any of
which he might need to examine. This is a familiar situation to me
although not in C. So I don't know which if any of the "standard" C
debuggers might have a "batch" mode. These usually will do other things
besides "debugging" -- for example, will any of the debuggers "profile"
a program for you (display where a program spends its time, useful in
determining where it might pay to "tune" or in proving a test run
entered some specific area of code). They are trickier to use when
debugging since you must specify in advance what you wish to have
displayed and can't "hunt and peck" at a breakpoint. On the other hand,
you usually can give them commands like "show me this specified variable
the first time it is referenced and then every time it is modified
indicating where (and the new value)". Like I said, I have no idea if
any C tools can do this.
I haven't used C debuggers at all yet. But that's mainly because my
designs will usually keep separate the high level abstract entities and
their low level manipulation. Standard debuggers are of use only for the
latter (level of C variables) since to examine the abstract entities as
abstract you always need custom debugging functions. I pretty much
stick them in as I go instead of waiting to see if they will be needed
-- in the long run this saves time.
Michael
More information about the linuxCprogramming
mailing list