Re: embedded dataflow tracking code?

Tony Finch <>
27 Jul 2010 14:07:25 +0100 (BST)

          From comp.compilers

Related articles
embedded dataflow tracking code? (Dennis Yurichev) (2010-07-24)
Re: embedded dataflow tracking code? (George Neuner) (2010-07-26)
Re: embedded dataflow tracking code? (Gene) (2010-07-26)
Re: embedded dataflow tracking code? (Tony Finch) (2010-07-27)
Re: embedded dataflow tracking code? (Walter Banks) (2010-07-30)
| List of all articles for this month |

From: Tony Finch <>
Newsgroups: comp.compilers
Date: 27 Jul 2010 14:07:25 +0100 (BST)
Organization: dotat labs
References: 10-07-030
Keywords: debug
Posted-Date: 27 Jul 2010 10:36:53 EDT

Dennis Yurichev <> wrote:
>I would like to load debugger, attach to working process, and at some
>breakpoint, instead of numerical values in the CPU registers, I would
>like to see genesis of each value like "result of f(arg1, arg2,arg3)
>called at point X" or "result of comparison of values X and Y" and so
>Are there any known attempts or projects or...?

I recently read the following paper which is related to your question,
and which may be of interest as a starting point for digging through
the literature.

Idempotent I/O for safe time travel
Zoltan Somogyi. Proceedings of the Fifth International Workshop on
Automated Debugging, Ghent, Belgium, September 2003.


Debuggers for logic programming languages have traditionally had a
capability most other debuggers did not: the ability to jump back to a
previous state of the program, effectively travelling back in time in
the history of the computation. This ``retry'' capability is very
useful, allowing programmers to examine in detail a part of the
computation that they previously stepped over. Unfortunately, it also
creates a problem: while the debugger may be able to restore the
previous values of variables, it cannot restore the part of the
program's state that is affected by I/O operations. If the part of the
computation being jumped back over performs I/O, then the program will
perform these I/O operations twice, which will result in unwanted
effects ranging from the benign (e.g. output appearing twice) to the
fatal (e.g. trying to close an already closed file).

We present a simple mechanism for ensuring that every I/O action
called for by the program is executed at most once, even if the
programmer asks the debugger to travel back in time from after the
action to before the action. The overhead of this mechanism is low
enough and can be controlled well enough to make it practical to use
it to debug computations that do significant amounts of I/O.

f.anthony.n.finch <>

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.