Rafter pulling out of wall

Movement in the structure has created this potentially dangerous condition. If the rafter continues to move, as is evident from the color differences, a failure of the roofing system will occur. This was one of many in this attic. The services of a structural engineer are required to design a proper repair.