This is the mail archive of the gdb-patches@sourceware.org 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: Results of macscp.exp test on cygwin


>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:

Pierre>  Shouldn't we force dwarf-2 debug format, or at least 
Pierre> skip the test if only stabs format is available?

Seems like a decent idea to me.

Pierre> FAIL: gdb.base/macscp.exp: c99 varargs expansion
[...]

Pierre> These failures are all due to the fact that stderr
Pierre> is itself a macro in cygwin that is expanded into
Pierre> "((__getreent())->_stderr)".

These tests don't really require the use of fprintf or stderr -- any
arbitrary identifier is fine.  I'm testing this patch, which changes
these names.

Ok if it passes testing?

Tom

:ADDPATCH testsuite:

2008-10-09  Tom Tromey  <tromey@redhat.com>

	* gdb.base/macscp.exp: Use 'vafunc' and 'fixedarg' rather than
	'fprintf' and 'stderr'.

diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
index 2a43a28..40546f9 100644
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -566,44 +566,44 @@ gdb_test "macro expand SPLICE(robot, invasion)" \
 
 # Varargs tests.
 
-gdb_test "macro define va_c99(...) fprintf (stderr, __VA_ARGS__)" \
+gdb_test "macro define va_c99(...) varfunc (fixedarg, __VA_ARGS__)" \
   "" \
   "define first varargs helper"
 
-gdb_test "macro define va2_c99(x, y, ...) fprintf (stderr, x, y, __VA_ARGS__)" \
+gdb_test "macro define va2_c99(x, y, ...) varfunc (fixedarg, x, y, __VA_ARGS__)" \
   "" \
   "define second varargs helper"
 
-gdb_test "macro define va_gnu(args...) fprintf (stderr, args)" \
+gdb_test "macro define va_gnu(args...) varfunc (fixedarg, args)" \
   "" \
   "define third varargs helper"
 
-gdb_test "macro define va2_gnu(args...) fprintf (stderr, ## args)" \
+gdb_test "macro define va2_gnu(args...) varfunc (fixedarg, ## args)" \
   "" \
   "define fourth varargs helper"
 
 gdb_test "macro expand va_c99(one, two, three)" \
-  "expands to: *fprintf \\(stderr, *one, two, three\\)" \
+  "expands to: *varfunc \\(fixedarg, *one, two, three\\)" \
   "c99 varargs expansion"
 
 gdb_test "macro expand va_c99()" \
-  "expands to: *fprintf \\(stderr, *\\)" \
+  "expands to: *varfunc \\(fixedarg, *\\)" \
   "c99 varargs expansion without an argument"
 
 gdb_test "macro expand va2_c99(one, two, three, four)" \
-  "expands to: *fprintf \\(stderr, *one, two, three, four\\)" \
+  "expands to: *varfunc \\(fixedarg, *one, two, three, four\\)" \
   "c99 varargs expansion, multiple formal arguments"
 
 gdb_test "macro expand va_gnu(one, two, three, four)" \
-  "expands to: *fprintf \\(stderr, *one, two, three, four\\)" \
+  "expands to: *varfunc \\(fixedarg, *one, two, three, four\\)" \
   "gnu varargs expansion"
 
 gdb_test "macro expand va_gnu()" \
-  "expands to: *fprintf \\(stderr, *\\)" \
+  "expands to: *varfunc \\(fixedarg, *\\)" \
   "gnu varargs expansion without an argument"
 
 gdb_test "macro expand va2_gnu()" \
-  "expands to: *fprintf \\(stderr\\)" \
+  "expands to: *varfunc \\(fixedarg\\)" \
   "gnu varargs expansion special splicing without an argument"
 
 # Stringification tests.


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