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" <[email protected]> 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. [X86_64] (x86_64_regs): Remove. * syscall.c [X86_64] (x86_64_regs): Make static. --- defs.h | 4 +--- syscall.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/defs.h b/defs.h index 2238373..45e3246 100644 --- a/defs.h +++ b/defs.h @@ -393,9 +393,7 @@ extern int mp_ioctl(int f, int c, void *a, int s); #ifdef LINUX # if defined(I386) -struct pt_regs i386_regs; -# elif defined(X86_64) -struct pt_regs x86_64_regs; +extern struct pt_regs i386_regs; # endif #endif /* LINUX */ diff --git a/syscall.c b/syscall.c index 706ded4..d356006 100644 --- a/syscall.c +++ b/syscall.c @@ -737,7 +737,7 @@ struct tcb *tcp_last = NULL; # if defined(I386) struct pt_regs i386_regs; # elif defined(X86_64) -struct pt_regs x86_64_regs; +static struct pt_regs x86_64_regs; # elif defined (IA64) long r8, r10, psr; /* TODO: make static? */ long ia32 = 0; /* not static */ -- ldv
pgpbNIAyIyKB4.pgp
Description: PGP signature
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
