From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22033 invoked by alias); 31 Aug 2004 05:25:01 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21973 invoked from network); 31 Aug 2004 05:25:00 -0000 Received: from unknown (HELO foon.sendmail.com) (209.246.26.40) by sourceware.org with SMTP; 31 Aug 2004 05:25:00 -0000 Received: from [192.168.57.3] ([192.168.57.3]) (authenticated bits=0) by foon.sendmail.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id i7V5OprR025589 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=OK); Mon, 30 Aug 2004 22:24:52 -0700 Message-ID: <41340BA3.6020801@sendmail.com> Date: Tue, 31 Aug 2004 05:25:00 -0000 From: Chris Markle User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803 MIME-Version: 1.0 To: Eli Zaretskii CC: gdb@sources.redhat.com Subject: Re: calling glibc mallinfo() from GDB after attaching to a process? References: <4133DDC2.3040403@sendmail.com> <01c48f0e$Blat.v2.2.2$c9e5a100@zahav.net.il> In-Reply-To: <01c48f0e$Blat.v2.2.2$c9e5a100@zahav.net.il> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00436.txt.bz2 Ed, > call mallinfo (warning - gdb rookie here - although I have the manual open on my lap...) I get in response to this: [...] (gdb) break main Breakpoint 1 at 0x80484d8: file malloc.c, line 12. (gdb) run Starting program: /home/cmarkle/src/x Breakpoint 1, main (argc=1, argv=0xbffebf54) at malloc.c:12 12 malloc(10000); (gdb) n 13 malloc(100000); (gdb) n 14 malloc(1000000); (gdb) call mallinfo $1 = {} 0x400a4b30 <__libc_mallinfo> Supposedly mallinfo() returns a 40-byte mallinfo structure. How do I get that structure returned and how do I display it? Thx in advance... Chris