This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Run arguments
- From: Peter Barada <peter at the-baradas dot com>
- To: Malcolm_Barrows at eur dot 3com dot com
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 22 Apr 2004 11:19:52 -0400 (EDT)
- Subject: Re: Run arguments
- References: <80256E7E.004FD1CA.00@notesmta.eur.3com.com>
>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