From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28039 invoked by alias); 31 Aug 2004 03:58:35 -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 28031 invoked from network); 31 Aug 2004 03:58:34 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org with SMTP; 31 Aug 2004 03:58:34 -0000 Received: from zaretski ([80.230.148.99]) by legolas.inter.net.il (MOS 3.5.3-GR) with ESMTP id CKS69276 (AUTH halo1); Tue, 31 Aug 2004 06:58:28 +0300 (IDT) Date: Tue, 31 Aug 2004 03:58:00 -0000 From: "Eli Zaretskii" To: Chris Markle Message-ID: <01c48f0e$Blat.v2.2.2$c9e5a100@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: gdb@sources.redhat.com In-reply-to: <4133DDC2.3040403@sendmail.com> (message from Chris Markle on Mon, 30 Aug 2004 19:09:06 -0700) Subject: Re: calling glibc mallinfo() from GDB after attaching to a process? Reply-to: Eli Zaretskii References: <4133DDC2.3040403@sendmail.com> X-SW-Source: 2004-08/txt/msg00435.txt.bz2 > Date: Mon, 30 Aug 2004 19:09:06 -0700 > From: Chris Markle > > I would like to attach to a running program, issue a call to the glibc > mallinfo() function, display the returned mallinfo structure, and the > continue execution of the program. The idea here is to grab some malloc > statistics from a running program... Is this kind of thing possible? Yes. > If so, can someone offer up some clues as to the GDB commands to > issue to do this? After attaching to the program, use the command call mallinfo to call the function. This will work if mallinfo is linked into the program.