Understanding the RoPE Extensions of Long-Context LLMs: An Attention Perspective