Record support for sahf/lahf opcodes on x86_64

Bogdan Harjoc
Fri Aug 2 12:12:00 GMT 2019

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-lafh-sahf.patch
Type: text/x-patch
Size: 810 bytes
Desc: not available
URL: <>

More information about the Gdb-patches mailing list