Improve CSTART
I just realized that I am scanning the generated .C as part of cobcd-st. And in the beginning of the generated C code, we have this:
/* Main function */
int
main (int argc, char **argv)
{
cob_init (argc, argv);
cob_stop_run (RTEST ());
}
This means that I can find RTEST
, stick that information into the VARIABLE_STRING_xxx, and when CSTART is requested I can put create the breakpoint at RTEST_.
In fact, come to think of it, I might be able to process the C code and find the exact line number that we want. Looking further down in the file, we have this:
ENTRY_RTEST:;
#line 99 "rtest.c"
#line 15 "rtest.cbl"
I'll have to look at a few examples, but it could be that the first #line directive after the relevant ENTRY_ in the .cbl source file is exactly where we want CSTART to break.