[antlr-interest] C/C++ instrumentation tool
Andy Tripp
atripp at jazillian.com
Mon Jun 20 07:31:22 PDT 2005
>
>
>Andy,
>
>You might want to consider watching the inputs and
>outputs of your functions and the flow of control
>rather than variable values per-se.
>
>It's fairly easy to do with GDM:
>
> info functions
>to find all the functions (or interrogate the program
>symbol table using another tool).
>
>the break on any/all functions of interest and try:
> finish
>which will do just that, plus report the result if
>it's a function.
>
>It should be fairly easy to write a tool to do this.
>
>However, you might want to consider, especially if one
>program is a rewrite of the other, a tool that
>compares the sources of all of the functions. I've
>done this in the past where one version was a rewrite
>of another and it was very productive -- by an order
>of magnitude at least in finding bugs.
>
>
One's C++ and one's Java. I know exactly where they differ...I wrote the
Java
one from the C++ one. They differ only "syntactically" - no logic changes.
>It sounds like you've been working with these two
>versions for a while -- have the bugs been mostly
>coding errors, due to language differences,
>differences in the execution environments or what?
>Categorizing them and then looking for these kinds of
>problems might be very productive.
>
>
Yea, welcome to my world :) A few coding errors (gotta stop doing this
by hand...if only there were a C to Java translator out there :). A few
language
differences (Java object pointers vs. copying of C structs). And a few
language
differences (sizes of primitives).
Thanks for the help.
>Peggy
>
More information about the antlr-interest
mailing list