Fix winedbg stack_backtrace on non i386

Eric Pouech pouech-eric at wanadoo.fr
Sun Jun 20 02:48:12 CDT 2004


emmanuel maillard a écrit :
> Hi,
> 
> stack.c fail to build on ppc host due to CONTEXT_SEGMENTS flag, wich is 
> only define for i386 host.
> 
> 
> ChangeLog:
> Fix compilation error on non-i386 in stack_backtrace.
> 
we shouldn't need the __i386__ tests in the winedbg code, except in the 
CPU specific files (be_*.c). IMO, we should do something like this:

Index: stack.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/programs/winedbg/stack.c,v
retrieving revision 1.3
diff -u -u -r1.3 stack.c
--- stack.c	4 Jun 2004 00:59:16 -0000	1.3
+++ stack.c	20 Jun 2004 07:45:37 -0000
@@ -119,7 +119,11 @@
                return;
           }
           memset(&ctx, 0, sizeof(ctx));
-         ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_SEGMENTS;
+         ctx.ContextFlags = CONTEXT_CONTROL
+#ifdef CONTEXT_SEGMENTS
+             | CONTEXT_SEGMENTS
+#endif
+             ;

           if (SuspendThread(thread->handle) == -1 ||
               !GetThreadContext(thread->handle, &ctx))



More information about the wine-patches mailing list