TCC as a Debugger?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

TCC as a Debugger?

Hi guys,

Its occurred to me that one could write a really interesting debugger using
libtcc.  I'm sitting here making simple changes to some code and having to
recompile and relink the whole thing for every change as I debug.

Instead of having to recompile changes as you make them to the code, TCC could
simply compile on the fly.  Since it IS the compiler, it would understand the
structures and other details that debuggers can sometimes have trouble with,
and it could debug without breakpoints by simply compiling and executing code
line by line, effectively becoming a C interpretter.

TCC is not only faster than GCC, but using libtcc so that its a seperate project
instead of "fork" would be quite nice.  Even if someone uses GCC for the final
compile, using a debugger that could single step through code as changes are
being made would be nice .. of course, there is the issue of maintaining the
link information as addresses suddenly change, but I'm thinking TCC just has to
remember the information in a hash or something as it will be generating the
code on the fly anyway.

Comments anyone?

Tinycc-devel mailing list
[hidden email]