Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Run arguments
@ 2004-04-22 14:47 Malcolm Barrows
  2004-04-22 16:30 ` Peter Barada
  0 siblings, 1 reply; 2+ messages in thread
From: Malcolm Barrows @ 2004-04-22 14:47 UTC (permalink / raw)
  To: gdb




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

Any pointers greatly appreciated

Malcolm



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Run arguments
  2004-04-22 14:47 Run arguments Malcolm Barrows
@ 2004-04-22 16:30 ` Peter Barada
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Barada @ 2004-04-22 16:30 UTC (permalink / raw)
  To: Malcolm_Barrows; +Cc: gdb


>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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-22 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-22 14:47 Run arguments Malcolm Barrows
2004-04-22 16:30 ` Peter Barada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox