From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82054 invoked by alias); 7 Mar 2018 06:46:11 -0000 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 Received: (qmail 82021 invoked by uid 89); 7 Mar 2018 06:46:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=lifting, H*c:alternative X-Spam-User: qpsmtpd, 3 recipients X-HELO: pb-smtp1.pobox.com Received: from pb-smtp1.pobox.com (HELO pb-smtp1.pobox.com) (64.147.108.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Mar 2018 06:46:09 +0000 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 848C3DA6F1; Wed, 7 Mar 2018 01:46:07 -0500 (EST) Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 7CC95DA6F0; Wed, 7 Mar 2018 01:46:07 -0500 (EST) Received: from mail-io0-f178.google.com (unknown [209.85.223.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 06804DA6ED; Wed, 7 Mar 2018 01:46:07 -0500 (EST) Received: by mail-io0-f178.google.com with SMTP id m22so1819075iob.12; Tue, 06 Mar 2018 22:46:07 -0800 (PST) X-Gm-Message-State: AElRT7FmlHpqmiwyz4ZZ7B46wWNZ8lyyVPSFHXIBfkrZvmN1VhkRqWK8 0zja2cOlF6IRK9zgnTj1ic/b6Xx1tfnR6A8G9Is= X-Google-Smtp-Source: AG47ELumYalFQbDH4Lewgq0g3e5xktIHLfrG9CJqgn00AGWsnWWxjWcf7Lw4xasBPUXdemgS5zeE6kRhg7bP2aLQmGA= X-Received: by 10.107.135.39 with SMTP id j39mr26206619iod.160.1520405166535; Tue, 06 Mar 2018 22:46:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.58.133 with HTTP; Tue, 6 Mar 2018 22:46:05 -0800 (PST) Received: by 10.107.58.133 with HTTP; Tue, 6 Mar 2018 22:46:05 -0800 (PST) In-Reply-To: References: <20180308014408.GA6094@HP> From: Jonah Graham Date: Wed, 07 Mar 2018 06:46:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GDB Trace functions calls when executing a program To: Satya Prakash Prasad Cc: Yubin Ruan , gdb-info@sourceware.org, gdb-faq@sourceware.org, gdb@sourceware.org X-Pobox-Relay-ID: 36775532-21D3-11E8-AA3F-44CE1968708C-18936988!pb-smtp1.pobox.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00023.txt.bz2 On 7 Mar 2018 06:17, "Satya Prakash Prasad" wrote: Also inserting printf in each function call is not possible cause it would take long hours and effort for a code spreading thousands of lines. You can let the compiler do the heavy lifting by using -finstrument-functions Here is a nice blog post about it https://mcuoneclipse.com/2015/04/04/poor-mans-trace-free-of-charge-function-entryexit-trace-with-gnu-tools/