Do you convert the return and entry point addresses to offsets?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List on behalf of Bernd Oppolzer Sent: Monday, May 5, 2025 10:02 AM To: [email protected] Subject: Re: Detecting the call chain of 3GL programs from main to current External Message: Use Caution no, there is no such table. Others have already commented most interesting parts of this topic. I would like to add my personal experience: I had to write a dump analysis tool for a customer of mine which is acitivated at the time of the error and should produce a readable dump in (most of) all circumstances. I did the following: first I tried to walk back from the current DSA (from register 13) to TCBFSA (first save area, recorded in the TCB). If this works, you have the whole chain and all is good. If not, the chain is corrupt at some place, which is usually an error in an non-XPLINK environment. I then try to go forward from TCBFSA, which usually does not lead us far, because LE and some of the languages (like PL/1) don't fill the forward pointers. But: if the first levels are (in our case) homegrown ASSEMBLER programs, we may have luck. At every step, I check, if the new found save area is, by any chance, already present in the previous chain found by stepping backward. If so, I match the two parts, and again, all is good. Before accessing a "spurious" pointer, I check the address, if it is valid, using VSMLOC (IIRC). If I cannot produce the complete chain, I report the parts, at least. For every entry point found in the chain, I report the name of the function or procedure, and, if possible, the language and the compiler. We have an environment where there are many modules written in ASSEMBLER, PL/1 and C, calling each other dynamically,. I also show entry points adresses, return adresses (of course), resulting offsets, parameter lists, and DSA areas. If I know the size of the DSAs (in PL/1 and C, for example), I show the complete DSA, otherwise 8k. This error reporting feature (for IMS dialog, batch, TSO etc. ... everywhere the same layout) is in production use since 2005, and the users (that is: developers) are happily using it. Before that, we had different sorts of dump layouts, depending on environment and programming language, which was cumbersome for the users. Kind regards Bernd Am 04.05.2025 um 15:02 schrieb Steff Gladstone: > Is there some table (or data in some other form) in memory (maintained > perhaps by Language Environment) that details the current calling chain of > 3GL or assembler programs starting with the main program and running down > the chain to the current executing program? If so, how would I navigate > to it? (Or is there a callable routine that provides the information?) > > I tried to produce such a chain by following the savearea chain from the > current program up the calling hierarchy, but at some point in the > hierarchy I receive a spurious pointer to the next higher program's > savearea. > > Thank you for any assistance or pointers (double entendre) you can provide. > > All the best, > Steff Gladstone > > ---------------------------------------------------------------------- > 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
