* Fix gdb.base/define.exp
@ 2006-11-23 7:45 Nathan Sidwell
2006-11-28 15:17 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Sidwell @ 2006-11-23 7:45 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
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
[-- Attachment #2: all.diff --]
[-- Type: text/plain, Size: 793 bytes --]
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix gdb.base/define.exp
2006-11-23 7:45 Fix gdb.base/define.exp Nathan Sidwell
@ 2006-11-28 15:17 ` Daniel Jacobowitz
2006-11-28 16:06 ` Nathan Sidwell
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-11-28 15:17 UTC (permalink / raw)
To: Nathan Sidwell; +Cc: gdb-patches
On Thu, Nov 23, 2006 at 07:45:50AM +0000, Nathan Sidwell wrote:
> 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?
OK. If you want, actually call the function somewhere; some compilers
(like ARM's I think?) default to the equivalent of --gc-sections.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix gdb.base/define.exp
2006-11-28 15:17 ` Daniel Jacobowitz
@ 2006-11-28 16:06 ` Nathan Sidwell
0 siblings, 0 replies; 3+ messages in thread
From: Nathan Sidwell @ 2006-11-28 16:06 UTC (permalink / raw)
To: Nathan Sidwell, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 373 bytes --]
Daniel Jacobowitz wrote:
> OK. If you want, actually call the function somewhere; some compilers
> (like ARM's I think?) default to the equivalent of --gc-sections.
Good idea. Here's what I committed
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
[-- Attachment #2: break.patch --]
[-- Type: text/x-patch, Size: 1461 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1281
diff -c -3 -p -r1.1281 ChangeLog
*** ChangeLog 28 Nov 2006 15:16:47 -0000 1.1281
--- ChangeLog 28 Nov 2006 16:03:34 -0000
***************
*** 1,4 ****
! 2006-11-28 Nathan Sidwell <nathan@codesourcery.com>
* gdb.threads/linux-dp.exp: Read thread table before and after
creating each philosopher and verify it.
--- 1,6 ----
! 2006-11-27 Nathan Sidwell <nathan@codesourcery.com>
!
! * gdb.base/break.c (main): Call malloc.
* gdb.threads/linux-dp.exp: Read thread table before and after
creating each philosopher and verify it.
Index: 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
*** gdb.base/break.c 13 Jun 2006 08:46:17 -0000 1.5
--- gdb.base/break.c 28 Nov 2006 16:03:34 -0000
*************** char *argv[], **envp;
*** 87,92 ****
--- 87,96 ----
set_debug_traps(); /* set breakpoint 5 here */
breakpoint();
#endif
+ /* We're used by a test that requires malloc, so make sure it is
+ in the executable. */
+ (void)malloc (1);
+
if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
fprintf (stderr, "usage: factorial <number>\n");
return 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-28 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-23 7:45 Fix gdb.base/define.exp Nathan Sidwell
2006-11-28 15:17 ` Daniel Jacobowitz
2006-11-28 16:06 ` Nathan Sidwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox