This is the mail archive of the gdb@sourceware.cygnus.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]

How is gdb/testsuite/gdb.base/callfwmall.exp supposed to work?



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?

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