From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Elizabeth Chastain To: chastain@cygnus.com, jimb@cygnus.com Cc: ac131313@cygnus.com, fnasser@redhat.com, gdb-patches@sources.redhat.com, keiths@cygnus.com Subject: Re: [RFA] Assuming malloc exists in callfwmall.exp Date: Thu, 15 Feb 2001 19:05:00 -0000 Message-id: <200102160305.TAA28093@bosch.cygnus.com> X-SW-Source: 2001-02/msg00281.html [I thought about whether to reply to this ... I want to mention one data point, and that's all I will write]. Jim Blandy writes: > Not if you link statically. I did link statically. [chastain@delta chastain]$ cat bar.c main () { write (1, "Howdy.\n", 7); } [chastain@delta chastain]$ gcc --version 2.9-gnupro-99r1 [chastain@delta chastain]$ gcc bar.c -o bar -g -static [chastain@delta chastain]$ gdb bar GNU gdb 4.18-gnupro-99r1 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. This version of GDB is supported for customers of Cygnus Solutions. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.5"... (gdb) break main Breakpoint 1 at 0x101fc: file bar.c, line 3. (gdb) run Starting program: /home/chastain/bar Breakpoint 1, main () at bar.c:3 3 write (1, "Howdy.\n", 7); (gdb) write (1, "bye", 3); Undefined command: "write". Try "help". (gdb) call write (1, "bye", 3) bye$1 = 3 (gdb) p malloc $2 = {} 0x140ac So malloc does get pulled in on my Solaris configuration. Michael