From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19308 invoked by alias); 11 Jul 2012 15:10:53 -0000 Received: (qmail 19286 invoked by uid 22791); 11 Jul 2012 15:10:52 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-gg0-f169.google.com (HELO mail-gg0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jul 2012 15:10:39 +0000 Received: by ggm4 with SMTP id 4so1528816ggm.0 for ; Wed, 11 Jul 2012 08:10:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.171.98 with SMTP id at2mr14576091igc.26.1342019438658; Wed, 11 Jul 2012 08:10:38 -0700 (PDT) Received: by 10.64.137.134 with HTTP; Wed, 11 Jul 2012 08:10:38 -0700 (PDT) Date: Wed, 11 Jul 2012 15:10:00 -0000 Message-ID: Subject: how to print a function's return value From: Tom Frank To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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: 2012-07/txt/msg00025.txt.bz2 hi, in source code , there is a fuction call like this : int a = func(param); then I debug it with gdb , whein it stop at this line,I want to print the func's retvalue, which results in a gdb sigtrap,and cause gdb to go into a trap, then I can not find where am I . I konw there is a command to prevent gdb going to trap like this, what is that command? thanks!