From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16699 invoked by alias); 26 Mar 2007 10:04:06 -0000 Received: (qmail 16688 invoked by uid 22791); 26 Mar 2007 10:04:04 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-02.spheriq.net (HELO lon-del-02.spheriq.net) (195.46.50.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Mar 2007 11:03:57 +0100 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-02.spheriq.net with ESMTP id l2QA4F0g006516 for ; Mon, 26 Mar 2007 11:04:15 +0100 Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-01.spheriq.net with ESMTP id l2QA3qDv032634 for ; Mon, 26 Mar 2007 10:03:53 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id l2QA3ouB017671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 26 Mar 2007 10:03:52 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 98DDEDA47; Mon, 26 Mar 2007 10:03:46 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2DD5047540; Mon, 26 Mar 2007 10:03:46 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.7.5a-GA) with ESMTP id CIQ60120 (AUTH stubbsa); Mon, 26 Mar 2007 11:03:42 +0100 (BST) Message-ID: <46079A7F.4020308@st.com> Date: Mon, 26 Mar 2007 10:04:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: John Zoidberg Cc: gdb@sourceware.org Subject: Re: Log every call and exit in embedded system References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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-03/txt/msg00309.txt.bz2 John Zoidberg wrote: > Is this the only way? Can anyone give me any suggestions or hints? The way profiling works is that the compiler inserts a call to a function (mcount?) at each function call (*). I'm not sure on the precise rules for this, or whether it varies between target types, but these are details that you can certainly dig up from somewhere. If you provide your own implementation for this function then it can do anything you like. Printing a call graph at run time should not be too hard (though it may be tricky if your print mechanisms are also instrumented). * It typically also adds some kind of interrupt to count to time spent in various parts of the program, but that is probably not interesting here. Hope that helps, Andrew