This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
How is gdb/testsuite/gdb.base/callfwmall.exp supposed to work?
- To: gdb at sourceware dot cygnus dot com
- Subject: How is gdb/testsuite/gdb.base/callfwmall.exp supposed to work?
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: Mon, 24 Apr 2000 12:42:28 -0500 (EST)
The stated point of callfwmall.exp is to try debugging programs which
don't explicitly use `malloc'. However, some of the tests have GDB
evaluate expressions containing string literals; GDB implements string
literals by calling malloc to reserve some space in the inferior, and
then copying the literal text into that space.
It seems to me that those tests can only pass if malloc has somehow
been linked into the inferior, but I don't see any reason to assume
this must necessarily happen, since callfwmall.c makes no explicit
calls to malloc, or indeed to any library routines whatsoever.
So aren't these tests fundamentally misconceived? Why are they
supposed to work? How have people dealt with them in the past?