From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11201 invoked by alias); 26 Nov 2007 18:23:03 -0000 Received: (qmail 10749 invoked by uid 22791); 26 Nov 2007 18:22:58 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Nov 2007 18:22:50 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 702473C005; Mon, 26 Nov 2007 10:01:13 -0800 (PST) Subject: Re: Breakpoint when entering of functions on i386 From: Michael Snyder To: yichun wang Cc: gdb@sourceware.org In-Reply-To: <5f7f5dec0711252310y6c08920cr8464aa2d40ccf05e@mail.gmail.com> References: <5f7f5dec0711252308r5825abb8j91d43234ef7b617c@mail.gmail.com> <5f7f5dec0711252310y6c08920cr8464aa2d40ccf05e@mail.gmail.com> Content-Type: text/plain Date: Mon, 26 Nov 2007 18:23:00 -0000 Message-Id: <1196100635.2501.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00226.txt.bz2 On Mon, 2007-11-26 at 15:10 +0800, yichun wang wrote: > Hi, > > I'm now working on a script which will print calling graph by stepping > through program with GDB. The script actually works fine in some small > cases, but one big performance bottleneck is that I used "watch $ebp" > to catch the happening of function call, and it will become really > slow when in some cases, local variable/arguments are heavily used. So > my question is: > > Is there any better way in GDB to capture function call event? What about just setting breakpoints on all functions? That way, if there is a way to define an "interesting subset" of functions, you can limit your breakpoints to that subset, and save a lot of time.