Record support for sahf/lahf opcodes on x86_64

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Record support for sahf/lahf opcodes on x86_64

Bogdan Harjoc
GDB currently stops with the message

"Process record does not support instruction 0x9f at address 0x..."

when encountering a lahf instruction in x86_64 code (and similar, 0x9e
for sahf). If I understand correctly, the code that handles lahf:

    case 0x9f:    /* lahf */
      if (ir.regmap[X86_RECORD_R8_REGNUM])
        {
          ir.addr -= 1;
          goto no_support;
        }

is meant to reject lahf/sahf unless running in 32-bit mode. But
lahf/sahf are valid on 64-bit too, so would it be ok to remove the
checks from i386-tdep.c ? Patch is attached.

Regards,
Bogdan

gdb-lafh-sahf.patch (1K) Download Attachment