Re: [RFA/RFC Prec] Add Linux AMD64 process record support second version, (instruction set support) 1/3

Hui Zhu
2009-07-20T06:14:20Z

Oops, I found a lot of push code need be check clear.

Thanks for you remind me. I will check them all.

Hui

On Mon, Jul 20, 2009 at 08:51, Michael Snyder<msnyder@vmware.com> wrote:
> Hi Hui,
>
> I think I discovered a bug in this one.  In 64-bit mode,
> the "call immediate" instruction is not correctly logging
> the pushed return address.  It's only saving 4 bytes.
>
> Please tell me what you think of this patch to your patch?
>
> Michael
>
> --- i386-tdep.c 2009-07-19 17:51:58.000300000 -0700
> +++ tmp/i386-tdep.c     2009-07-19 17:51:51.000907000 -0700
> @@ -4563,6 +4563,8 @@ reswitch:
>
>       /* call im */
>     case 0xe8:
> +      if (ir.regmap[X86_RECORD_R8_REGNUM] && ir.dflag)
> +        ir.dflag = 2;
>       if (i386_record_push (&ir, 1 << (ir.dflag + 1)))
>         return -1;
>       break;
>
>