[PATCH] display mask on enter to sigreturn, not exit
Denys Vlasenko
dvlasenk at redhat.com
Tue Jan 17 19:01:00 UTC 2012
On 01/17/2012 07:53 PM, Dmitry V. Levin wrote:
> On Mon, Jan 09, 2012 at 01:49:10PM +0100, Denys Vlasenko wrote:
>> --- strace.3/defs.h 2012-01-04 15:09:05.000000000 +0100
>> +++ strace.4/defs.h 2012-01-09 13:25:17.314779225 +0100
>> @@ -391,6 +391,14 @@ extern int mp_ioctl(int f, int c, void *
>>
>> #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
>>
>> +#ifdef LINUX
>> +# if defined(I386)
>> +struct pt_regs i386_regs;
>> +# elif defined(X86_64)
>> +struct pt_regs x86_64_regs;
>> +# endif
>> +#endif /* LINUX */
>> +
>> /* Trace Control Block */
>> struct tcb {
>> int flags; /* See below for TCB_ values */
>
> I actually missed this obvious mistake during the first review.
> I'm about to push the following fix:
>
> From 024cad9a25bd11abc05525ab58b33cb570e29464 Mon Sep 17 00:00:00 2001
> From: "Dmitry V. Levin"<ldv at altlinux.org>
> Date: Tue, 17 Jan 2012 18:37:13 +0000
> Subject: [PATCH] Fix struct pt_regs declaration on i386 and x86-64
>
> * defs.h [I386] (i386_regs): Replace definition with declaration.
Awww yes, I forgot "extern" keyword!
> [X86_64] (x86_64_regs): Remove.
> * syscall.c [X86_64] (x86_64_regs): Make static.
I think we will eventually need register structs to be accessible
from all files. That's why I made x86_64_regs global too,
even though it does not have to be global (so far).
I would like to ask for it to remain global.
--
vda
More information about the Strace-devel
mailing list