Re: [RFA] Assuming malloc exists in callfwmall.exp

Michael Elizabeth Chastain
2001-02-15T12:56:00Z

Fernando,

chastain> How do you know whether calling an inferior function uses malloc or not?

fernando> If it does not call a string it does not.

This is a very literal question.

OK, so you know that when gdb calls an inferior function with no string
arguments (or arrays, or big structures, whatever), and the target
program does not itself call malloc(), that the call works properly.

*How* do you know?

I know because I ran callfwmall.exp, callfwmall.exp tested this behavior,
and told me that it PASSed.

I also know because I read the source code in gdb/valops.c, which is a
different avenue of knowledge.

Michael