This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] testsuite/gdb.arch/i386-prologue.c: Fix compiling on cygwin


On Mon, Jun 28, 2004 at 01:35:16PM +0200, Corinna Vinschen wrote:
>Hi,
>
>the gdb.arch/i386-prologue.c testcase doesn't compile on Cygwin since
>on Cygwin the assenmbler labels need leading underscores to match the
>same names in C.  The below patch fixes that.
>
>Corinna
>
>	* gdb.arch/i386-prologue.c: Conditionalize label names to build
>	on Cygwin.

SHouldn't there be a better conditional for this than "__CYGWIN__" like
"NAMES_HAVE_UNDERSCORE" or something?

cgf

>Index: gdb.arch/i386-prologue.c
>===================================================================
>RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.c,v
>retrieving revision 1.3
>diff -u -p -r1.3 i386-prologue.c
>--- gdb.arch/i386-prologue.c	29 Apr 2004 18:05:31 -0000	1.3
>+++ gdb.arch/i386-prologue.c	28 Jun 2004 11:32:02 -0000
>@@ -15,7 +15,11 @@ main (void)
> 
> asm(".text\n"
>     "    .align 8\n"
>+#ifdef __CYGWIN__
>+    "_gdb1253:\n"
>+#else
>     "gdb1253:\n"
>+#endif
>     "    pushl %ebp\n"
>     "    xorl  %ecx, %ecx\n"
>     "    movl  %esp, %ebp\n"
>@@ -28,7 +32,11 @@ asm(".text\n"
> 
> asm(".text\n"
>     "    .align 8\n"
>+#ifdef __CYGWIN__
>+    "_gdb1338:\n"
>+#else
>     "gdb1338:\n"
>+#endif
>     "    pushl %edi\n"
>     "    pushl %esi\n"
>     "    pushl %ebx\n"
>@@ -44,7 +52,11 @@ asm(".text\n"
> 
> asm(".text\n"
>     "    .align 8\n"
>+#ifdef __CYGWIN__
>+    "_jump_at_beginning:\n"
>+#else
>     "jump_at_beginning:\n"
>+#endif
>     "    pushl %ebp\n"
>     "    movl  %esp,%ebp\n"
>     "    jmp   .gdbjump\n"
>
>-- 
>Corinna Vinschen
>Cygwin Co-Project Leader
>Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]