[LCP]segmentation fault core dump
Mike & Penny Novack
stepbystepfarm at shaysnet.com
Wed Feb 6 02:03:50 UTC 2002
> May I ask what is a batch debugger ?
> >From what I understand, what you call a non interactive debugger
> is post mortem core debugging, but I don't see what can be the batch
> version.
> Thanks
>
> --
> Vincent Penquerc'h
>
No, I meant something quite different. And not necessarily a different
application than an "interactive" debugger. Some debuggers have both
"interactive" and "batch" modes, and in fact may be used in
combination -- like begin in batch mode watching for some condition,
which if it occurs, "break" into interactive mode --- or simply if/when
you reach a certain line (ie: set a "breakpoint").
Keep in mind that I have as yet little experience with the debugging
tools avilable for C not yet having had a bug that couldn't be quickly
"eyeballed" OR one they would require much more complex examination at
some point than you would care to do with an interactive debugger. Say
your program has a queue, and what's wrong is the elements get into an
unexpected order (ie: your symptom implies that). Well these aren't
named variables you could easily examine with a debugger; you'll
probably want a debugging FUNCTION "show me the state of the queue".
Keep in mind, a program that I wrote would almost certainly already
contain such a function, just not now being called, since how else did I
test my enqueue and dequeue functions when I wrote those.
Try to look at it this way. If the program were only executing a few
lines, if "stepping through" from the beginning WERE practical, if I
knew pretty closely at which line I need to begin stepping through, then
likely I can simply "see" the bug. But if it's not, say I'm not hanging
every time I enter some function but only say the 10,000th time, I
certainly do NOT want to step through examining the values of variables
until I get to the 'bad" situation. I prefer to let the computer do that
tedious work for me (either "old fashioned" debugging lines or a "batch
debugger" tool).
BTW, a batch debugging tool might be used for much else besides what you
might consider debugging just like a "profiler" can be used for purposes
other than "tuning". They can usually be ordered to tell you "was this
code executed (how many times)" and thus prove that a set of test data
is sufficient to exercise all pertainent code at least once (eg: set
ranges for everything NOT in abnormal termination paths).
Mike
More information about the linuxCprogramming
mailing list