oh oh ...

I did not take this into account ...

I wrote a C program to get the HPCB addresses for Belowheap and Anyheap,
and to get them, I needed the CEECAA, and I did this by looking at reg 12 using
an ASSEMBLER subprogram:

   memset (rbuffer, 0x00, sizeof (rbuffer));
   MDV9970 (rbuffer);

#if 0
   for (i = 0; i < 16; i ++)
   {
      printf ("Register %d = %p\n", i, rbuffer [i]);
   }
#endif

   ceecaa = rbuffer [12];
   ceeedb = *((char **) (ceecaa + 0x2f0));
   if (memcmp (ceeedb, "CEEEDB  ", 8) != 0)
      return;

   anyp = *((char **) (ceeedb + 0x20));
   if (memcmp (anyp, "HPCB", 4) != 0)
      return;

   belowp = *((char **) (ceeedb + 0x24));
   if (memcmp (belowp, "HPCB", 4) != 0)
      return;

worked without problems, but maybe lucky :-)

is there a LE function to get the address of the CEECAA?

or will I have to go back to the prior save area using reg 13?

the program, BTW, checks all the heap control blocks and does some
sort of book keeping at different points in time ... and then it prints the
differences ... looking for memory leaks. This helped us a lot to find
memory leaks in PL/1 programs ... but it works for every programming
language which uses LE.

Contact me offline, if you are interested about the details.

Thank you,
kind regards

Bernd



Am 11.05.2017 um 22:27 schrieb Allan Kielstra:
This statement:

CEECSA is always address by reg 12, while inside a LE module.
is not strictly true.  GPR12 is only required to point to CEECSA on entry to 
and exit from a procedure.  Compilers are free to use GPR12 for whatever other 
purpose they chose at other program points.

That means that if you get a crash in the middle of a procedure (COBOL PROGRAM) 
you should not look at the current value of GPR12.  You should go back to the 
register save area and find what GPR12 was on entry to the procedure.

(I mention this because with COBOL V5/6, GPR12 actually is often reused inside 
COBOL programs.)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to