This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Run arguments


>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]