commit | 5a98b457ade0f8fb9f13ac50c999ebf5a1ac1d2f | [log] [tgz] |
---|---|---|
author | Tom de Vries <tdevries@suse.de> | Fri Mar 07 09:25:33 2025 +0100 |
committer | Tom de Vries <tdevries@suse.de> | Fri Mar 07 09:25:33 2025 +0100 |
tree | 884c18d20cd0cf4b3ed5e9725706642ad0c52ec7 | |
parent | a7769415cb4a3207de4c18baf46794344ab220d1 [diff] |
[gdb/tdep] Fix rip-relative insn handling in amd64_get_used_input_int_reg I wanted to add a unit test for an an rip-relative amd64 insn, so I did: ... $ gcc -fPIE hello.c ... and used an rip-relative insn from main: ... 4005db: 48 8d 3d 1e 00 00 00 lea 0x1e(%rip),%rdi ... While writing the unit test, I found that amd64_get_used_input_int_reg returns rbp as input register. Fix this by using rip_relative_p in amd64_get_used_input_int_reg to handle this case. Tested on x86_64-linux.