From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85793 invoked by alias); 1 Oct 2016 05:12:03 -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 85763 invoked by uid 89); 1 Oct 2016 05:12:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f46.google.com Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Oct 2016 05:12:01 +0000 Received: by mail-oi0-f46.google.com with SMTP id n132so87601952oih.1 for ; Fri, 30 Sep 2016 22:12:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VRMrlQD//gXzbtILkY+d+04BbDDBhMUI0Xc6cHl8AZg=; b=JdHSTVfXcrAWGB8SBKsw/PO7av8ozI4O73J7XDNeNkyJEbirc5h9ScNgcS06Nwg/hZ yzpnTRQwAtMpc3DRcdV2b2PYoDJTrRbqNfrGsM4hcAcU1AMDCP9eQZNP39z2io0ABdwT grZDc400+kuzp8QUgYJ3t+X1ZhDzHJsKyTl0VR+VcEqoFx0+pGF2twVTk0QvieegNPim D7+XMMX7VnzegFoFD6u5Q4VyIbvOxfs0NHovTA57WpVUgXIApD1TtWgj9dCU7ocwQIYv kSEkT+W78a/bmVM92L9pSv4WPcNFafbTc0PjP98w2pktilcPEDE5O2PnitEmKygk8e/R G+Bg== X-Gm-Message-State: AA6/9Rke1QPtQRul2ZYgJ1tHyeEdk1DXLqfttW08cMsU7a31PgjPex+gexpz1dQGo5PHGmaHe97Sw5qgf28HIw== X-Received: by 10.157.42.39 with SMTP id t36mr7089991ota.14.1475298719374; Fri, 30 Sep 2016 22:11:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.232.8 with HTTP; Fri, 30 Sep 2016 22:11:58 -0700 (PDT) From: Peng Yu Date: Sat, 01 Oct 2016 05:12:00 -0000 Message-ID: Subject: How to print info of each function by running an executable (compiled with -g) in gdb? To: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00000.txt.bz2 Hi, I am currently inserting the following line into functions for which I want to print the function info. However, this can be tedious if the source code is large. fprintf(stderr, "%s:%d:%s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); Is there a way to automatically print the information of each function being called using gdb? -- Regards, Peng