Perform the following steps to locate a parameter in the Language Environment dump:
- Identify the address of the start of the parameter list. A pointer
to the parameter list is passed to the called function in register
1. This is the address of the start of the parameter list. Figure 1 shows an example code for the parameter
variable.
Figure 1. Example code for parameter variablefunc0() {
⋮
func1(a1,a2);
⋮
}
func1(int ppx, int pp0) {
⋮
}
Parameters ppx and pp0 correspond
to copies of a1 and a2 in
the stack frame belonging to func0.
- Use the address of the start of the parameter list to find the
register and offset in the partial storage offset listing. As shown
in the following example, the offset is 4 (X'4') from register
1.
pp0 62-0:62 Class = parameter, Location = 4(r1), Length = 4
- Determine the value of GPR1 in the Saved Registers
section for the function that called the function you are interested
in.
- Add this base address to the offset of the parameter.
When you are done, the contents of the variable can then be read
in the DSA frame section corresponding to the function the parameter
was passed from.