You can read the IPR registers and store the result to a variable. Note that note all interrupts will remain pending forever. Some like the IRQ pins show the actual state of the pin so if they negate so will the pending interrpt request.
With the IMR registers, you can also copy the register to a variable before mask-all is used to mask off all interrupts. You can then copy the variable back into the register to restore the mask....be sure to have the mask-all bit cleared.
PS The example code on our ColdFire product web pages have very good header files that define the complete register set including the system register to help make life easy for you to code and access them.
Retrieving data ...