This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix gdb.base/define.exp
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 23 Nov 2006 07:45:50 +0000
- Subject: Fix gdb.base/define.exp
the define.exp test requires malloc to be in the target executable
whilenospace
evaluation of this expression requires the program to have a function "malloc".
(gdb) FAIL: gdb.base/define.exp: test whilenospace is parsed correctly
This patch forces malloc to be there. ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2006-11-22 Nathan Sidwell <nathan@codesourcery.com>
* gdb.base/break.c (need_malloc): New.
Index: testsuite/gdb.base/break.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 break.c
*** testsuite/gdb.base/break.c 13 Jun 2006 08:46:17 -0000 1.5
--- testsuite/gdb.base/break.c 22 Nov 2006 15:17:42 -0000
*************** extern void marker3 ();
*** 66,71 ****
--- 66,78 ----
extern void marker4 ();
#endif
+ /* We're used by a test that requires malloc, so make sure it is in
+ the executable. */
+ void *need_malloc ()
+ {
+ return malloc (1);
+ }
+
/*
* This simple classical example of recursion is useful for
* testing stack backtraces and such.