Fix issue with XMM on linux64 (pid vs tid)

This commit is contained in:
skuater 2015-04-01 17:09:11 +02:00 committed by pancake
parent 0e91eaaeda
commit 5bad0aae82
2 changed files with 4 additions and 2 deletions

View File

@ -143,3 +143,5 @@ When you sold that exploit, what they really bought, was your silence.
Greetings, human.
nothing personal, just bitness
Too old to crash
Finnished a beer
ESIL ruined my life

View File

@ -1077,7 +1077,7 @@ eprintf ("++ EFL = 0x%08x %d\n", ctx.EFlags, r_offsetof (CONTEXT, EFlags));
int i;
#if __x86_64__
#if !__ANDROID__
ret1 = ptrace (PTRACE_GETFPREGS, tid, NULL, &fpregs);
ret1 = ptrace (PTRACE_GETFPREGS, pid, NULL, &fpregs);
eprintf ("---- x86-64 ----\n ");
eprintf ("cwd = 0x%04x ; control ", fpregs.cwd);
eprintf ("swd = 0x%04x ; status\n", fpregs.swd);
@ -1121,7 +1121,7 @@ eprintf ("++ EFL = 0x%08x %d\n", ctx.EFlags, r_offsetof (CONTEXT, EFlags));
memcpy (buf, &fpregs, size);
return sizeof (fpregs);
#else
ret1 = ptrace (PTRACE_GETFPREGS, tid, NULL, &fpregs);
ret1 = ptrace (PTRACE_GETFPREGS, pid, NULL, &fpregs);
eprintf ("cwd = 0x%04x ; control ", fpregs.cwd);
eprintf ("swd = 0x%04x ; status\n", fpregs.swd);
eprintf ("ftw = 0x%04x ", fpregs.ftw);