From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3386 invoked by alias); 22 Apr 2004 15:19:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3336 invoked from network); 22 Apr 2004 15:19:53 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sources.redhat.com with SMTP; 22 Apr 2004 15:19:53 -0000 Received: by baradas.org (Postfix, from userid 500) id 9F0E998C8A; Thu, 22 Apr 2004 11:19:52 -0400 (EDT) From: Peter Barada To: Malcolm_Barrows@eur.3com.com Cc: gdb@sources.redhat.com In-reply-to: <80256E7E.004FD1CA.00@notesmta.eur.3com.com> (Malcolm_Barrows@eur.3com.com) Subject: Re: Run arguments References: <80256E7E.004FD1CA.00@notesmta.eur.3com.com> Message-Id: <20040422151952.9F0E998C8A@baradas.org> Date: Thu, 22 Apr 2004 16:30:00 -0000 X-SW-Source: 2004-04/txt/msg00137.txt.bz2 >Forgive the ignorance level for the following question > >I am using gdb for debugging an embedded C application. >I can call numerous embedded functions and pass parameters to it, add >breakpoints and step >through the code - so far so good. > >Some of the functions return values as part of their functionality > >as in > >int MYFUNCTION ( suppliedparam, rtndparam) >{ > some code ...... > > return (rtndparam) > >} > >The question is >How do I get to get the value of returned parameters output to the command line. > >i.e in the above example I want to know what the value of rtndparam is Place a breakpoint on the return statement, run the program and at the breakpoint, type "print rtndparam". -- Peter Barada peter@the-baradas.com